]> Git Repo - binutils.git/blob - gdb/ChangeLog
MI: Fix printing of frame architecture with Python frame filters enabled
[binutils.git] / gdb / ChangeLog
1 2018-08-27  Jan Vrany  <[email protected]>
2
3         * python/py-framefilter.c (py_print_frame): Print frame architecture
4         when printing on an MI output.
5
6 2018-08-27  Tom Tromey  <[email protected]>
7
8         PR build/23087:
9         * configure: Rebuild.
10         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
11
12 2018-08-27  Tom Tromey  <[email protected]>
13
14         * aarch64-linux-tdep.c
15         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
16         casts to int.
17
18 2018-08-27  Tom Tromey  <[email protected]>
19
20         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
21         unsigned.
22         (ppc64_standard_linkage1, ppc64_standard_linkage2)
23         (ppc64_standard_linkage3, ppc64_standard_linkage4)
24         (ppc64_standard_linkage5, ppc64_standard_linkage6)
25         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
26         unsigned.
27
28 2018-08-27  Tom Tromey  <[email protected]>
29
30         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
31         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
32
33 2018-08-27  Tom Tromey  <[email protected]>
34
35         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
36         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
37         ULONGEST_MAX.
38         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
39         ULONGEST_MAX.
40         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
41         ULONGEST_MAX.
42         * sparc-linux-tdep.c (sparc32_linux_sigframe)
43         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
44         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
45         ULONGEST_MAX.
46         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
47         (ppc64_linux_sigaction_tramp_frame)
48         (ppc32_linux_sighandler_tramp_frame)
49         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
50         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
51         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
52         * mn10300-linux-tdep.c (am33_linux_sigframe)
53         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
54         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
55         * mips-linux-tdep.c (mips_linux_o32_sigframe)
56         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
57         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
58         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
59         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
60         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
61         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
62         * microblaze-linux-tdep.c
63         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
64         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
65         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
66         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
67         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
68         * common/common-types.h (ULONGEST_MAX): New define.
69         (CORE_ADDR_MAX): Fix formatting.
70         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
71         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
72         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
73         (arm_linux_rt_sigreturn_tramp_frame)
74         (arm_eabi_linux_sigreturn_tramp_frame)
75         (arm_eabi_linux_rt_sigreturn_tramp_frame)
76         (thumb2_eabi_linux_sigreturn_tramp_frame)
77         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
78         (arm_linux_restart_syscall_tramp_frame)
79         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
80         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
81         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
82         ULONGEST_MAX.
83         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
84
85 2018-08-27  Tom Tromey  <[email protected]>
86
87         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
88         CORE_ADDR_MAX.
89         * mips-tdep.c (mips_deal_with_atomic_sequence)
90         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
91         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
92         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
93         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
94         CORE_ADDR_MAX.
95         * aarch64-tdep.c (aarch64_software_single_step): Use
96         CORE_ADDR_MAX.
97
98 2018-08-27  Tom Tromey  <[email protected]>
99
100         * linespec.c (complete_linespec_component): Add cast to "char".
101         * completer.c (completion_tracker::build_completion_result): Add
102         cast to "char".
103
104 2018-08-26  Simon Marchi  <[email protected]>
105
106         * solist.h (struct solist, struct target_so_ops): Fix
107         indentation.
108
109 2018-08-26  Simon Marchi  <[email protected]>
110
111         * ada-tasks.c (ada_task_info_s): Remove typedef.
112         (DEF_VEC_O(ada_task_info_s)): Remove.
113         (struct ada_tasks_inferior_data): Initialize fields.
114         <task_list>: Make an std::vector.
115         (get_ada_tasks_inferior_data): Allocate with new.
116         (ada_get_task_number): Adjust.
117         (get_task_number_from_id): Likewise.
118         (valid_task_id): Likewise.
119         (ada_get_task_info_from_ptid): Likewise.
120         (iterate_over_live_ada_tasks): Likewise.
121         (add_ada_task): Likewise.
122         (read_known_tasks): Likewise.
123         (ada_build_task_list): Likewise.
124         (print_ada_task_info): Likewise.
125         (info_task): Likewise.
126         (task_command_1): Likewise.
127
128 2018-08-26  Simon Marchi  <[email protected]>
129
130         * ada-lang.c (add_angle_brackets): Return std::string.
131
132 2018-08-25  Simon Marchi  <[email protected]>
133
134         * python/py-threadevent.c (py_get_event_thread): Initialize
135         pythread.
136
137 2018-08-24  Pedro Alves  <[email protected]>
138
139         * python/py-bpevent.c (create_breakpoint_event_object): Use
140         copy-initialization.
141         * python/py-continueevent.c (emit_continue_event): Use
142         copy-initialization.
143         * python/py-exitedevent.c (create_exited_event_object): Return a
144         gdbpy_ref<>.
145         (emit_exited_event): Use copy-initialization.
146         * python/py-inferior.c (python_new_inferior)
147         (python_inferior_deleted, add_thread_object): Use
148         copy-initialization.
149         * python/py-infevents.c (create_inferior_call_event_object)
150         (create_register_changed_event_object)
151         (create_memory_changed_event_object): Return a gdbpy_ref<>.
152         (emit_inferior_call_event, emit_memory_changed_event)
153         (emit_register_changed_event): Use copy-initialization.
154         * python/py-newobjfileevent.c (create_new_objfile_event_object):
155         Return a gdbpy_ref<>.
156         (emit_new_objfile_event): Use copy-initialization.
157         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
158         (emit_clear_objfiles_event): Use copy-initialization.
159         * python/py-signalevent.c (create_signal_event_object): Use
160         copy-initialization.
161         * python/py-threadevent.c (create_thread_event_object): Use
162         copy-initialization.
163
164 2018-08-24  Pedro Alves  <[email protected]>
165             Simon Marchi  <[email protected]>
166
167         PR gdb/23379
168         * python/py-continueevent.c: Include "gdbthread.h".
169         (create_continue_event_object): Add intro comment.  Add 'ptid'
170         parameter.  Use it to find thread to pass to
171         create_thread_event_object.
172         (emit_continue_event): Pass PTID down to
173         create_continue_event_object.
174         * python/py-event.h (py_get_event_thread): Declare.
175         (create_thread_event_object): Remove default from 'thread'
176         parameter.
177         * python/py-stopevent.c (create_stop_event_object): Use
178         py_get_event_thread.
179         * python/py-threadevent.c (get_event_thread): Rename to ...
180         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
181         and use it to find the thread.
182         (create_thread_event_object): Assert that THREAD isn't null.
183         Don't find the event thread here.
184
185 2018-08-23  Kevin Buettner  <[email protected]>
186
187         * block.h (blockrange, blockranges): New struct declarations.
188         (struct block): Add new field named `ranges'.
189         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
190         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
191         macros for accessing ranges in struct block.
192         (make_blockranges): New declaration.
193         block.c (make_blockranges): New function.
194         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
195         for block.
196         * symtab.h (find_pc_partial_function): Add new parameter `block'.
197         * blockframe.c (cache_pc_function_block): New static global.
198         (clear_pc_function_cache): Clear cache_pc_function_block.
199         (find_pc_partial_function): Move comment to symtab.h.  Add
200         support for non-contiguous blocks.
201         * cli/cli-cmds.c (block.h): Include.
202         (print_disassembly): Handle printing of non-contiguous blocks.
203         (disassemble_current_function): Likewise.
204         (disassemble_command): Likewise.
205
206         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
207         BLOCK_START.
208         * blockframe.c (get_pc_function_start): Likewise.
209         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
210         (gcc_symbol_address): Likewise.
211         * compile/compile-object-run.c (compile_object_run): Likewise.
212         * compile/compile.c (get_expr_block_and_pc): Likewise.
213         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
214         (func_addr_to_tail_call_list): Likewise.
215         * findvar.c (default_read_var_value): Likewise.
216         * inline-frame.c (inline_frame_this_id): Likewise.
217         (skip-inline_frames): Likewise.
218         * infcmd.c (until_next_command): Likewise.
219         * linespec.c (convert_linespec_to_sals): Likewise.
220         * parse.c (parse_exp_in_context_1): Likewise.
221         * printcmd.c (build_address_symbolic): likewise.
222         (info_address_command): Likewise.
223         symtab.c (find_function_start_sal): Likewise.
224         (skip_prologue_sal): Likewise.
225         (find_function_alias_target): Likewise.
226         (find_gnu_ifunc): Likewise.
227         * stack.c (find_frame_funname): Likewise.
228         * symtab.c (fixup_symbol_section): Likewise.
229         (find_function_start_sal): Likewise.
230         (skip_prologue_sal): Likewsie.
231         (find_function_alias_target): Likewise.
232         (find_gnu_ifunc): Likewise.
233         * tracepoint.c (info_scope_command): Likewise.
234         * value.c (value_fn_field): Likewise.
235
236         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
237         in place of find_pc_partial_function.
238         * blockframe.c (find_function_entry_range_from_pc): New function.
239         * symtab.h (find_function_entry_range_from_pc): Declare and document.
240         * objfiles.c (objfile_relocate1): Relocate start and end addresses
241         for each range in a block.
242
243
244 2018-08-23  Xavier Roirand  <[email protected]>
245
246         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
247         incrementation.
248
249 2018-08-22  Simon Marchi  <[email protected]>
250
251         * solib-svr4.c (read_program_headers_from_bfd): Return
252         gdb::optional<gdb::byte_vector>.
253         (svr4_exec_displacement): Adjust.
254
255 2018-08-22  Simon Marchi  <[email protected]>
256
257         * solib-svr4.c (read_program_header): Return
258         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
259         (find_program_interpreter): Return
260         gdb::optional<gdb::byte_vector>.
261         (scan_dyntag_auxv): Adjust.
262         (enable_break): Adjust.
263         (svr4_exec_displacement): Adjust.
264
265 2018-08-22  Simon Marchi  <[email protected]>
266
267         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
268         * inf-child.c (inf_child_target::terminal_save_inferior): New.
269
270 2018-08-22  Simon Marchi  <[email protected]>
271
272         * guile/scm-string.c (gdbscm_scm_from_printf): Use
273         string_vprintf.
274         * guile/scm-utils.c (gdbscm_printf): Likewise.
275         * serial.c (serial_printf): Likewise.
276         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
277
278 2018-08-22  Jan Vrany  <[email protected]>
279
280         * stack.c (print_frame): Print frame architecture when printing on
281         an MI output.
282         * NEWS: Mention new "arch" attribute in frame output.
283
284 2018-08-21  Alan Hayward  <[email protected]>
285
286         * arch/aarch64.h (aarch64_regnum): Update comment.
287
288 2018-08-21  Alan Hayward  <[email protected]>
289
290         * NEWS: Add SVE to 8.2 section.
291
292 2018-08-21  Pedro Alves  <[email protected]>
293
294         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
295         out from gdbscm_parse_function_args.
296         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
297         gdbscm_parse_function_args_1.
298
299 2018-08-21  Simon Marchi  <[email protected]>
300
301         PR gdb/17816
302         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
303         operator.
304
305 2018-08-19  Simon Marchi  <[email protected]>
306
307         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
308
309 2018-08-19  Michael Spang  <[email protected]>
310
311         PR gdb/11786
312         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
313         for PT_TLS segments.
314
315 2018-08-18  Kevin Buettner  <[email protected]>
316
317         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
318         dwarf_variable_value.
319         * dwarf2-frame.c (class dwarf_expr_executor):
320         Add override for dwarf_variable_value.
321         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
322         (class symbol_needs_eval_context): Likewise.
323         (indirect_synthetic_pointer): Add forward declaration.
324         (sect_variable_value): New function.
325         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
326         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
327         for DW_OP_GNU_variable_value.
328
329 2018-08-16  Tom Tromey  <[email protected]>
330
331         * top.c (read_command_file): Update.
332         (command_line_input): Remove "repeat" argument.
333         * ada-lang.c (get_selections): Update.
334         * linespec.c (decode_line_2): Update.
335         * defs.h (command_line_input): Remove argument.
336         * cli/cli-script.c (read_next_line): Update.
337         * python/py-gdb-readline.c: Update.
338
339 2018-08-17  Tom Tromey  <[email protected]>
340
341         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
342         command_line_input.
343
344 2018-08-15  Tom Tromey  <[email protected]>
345
346         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
347
348 2018-08-14  Jan Vrany  <[email protected]>
349
350         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
351         If used, use find_pc_partial_function to find address range
352         to disassemble.
353         * mi/mi-main.c (mi_cmd_list_features): Report
354         "data-disassemble-a-option" feature.
355         * NEWS: Mention new -data-disassemble option -a.
356
357 2018-08-13  Tom Tromey  <[email protected]>
358
359         * common/common-defs.h (_FORTIFY_SOURCE): Define.
360
361 2018-08-13  Alan Hayward  <[email protected]>
362
363         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
364         (aarch64_linux_collect_sve_regset): Likewise.
365         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
366         * regcache.h (regcache_map_entry_size): New function.
367
368 2018-08-13  Alan Hayward  <[email protected]>
369
370         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
371         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
372         (SVE_HEADER_VL_LENGTH): Likewise.
373         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
374         (SVE_HEADER_FLAGS_LENGTH): Likewise.
375         (SVE_HEADER_RESERVED_LENGTH): Likewise.
376         (SVE_HEADER_SIZE_OFFSET): Likewise.
377         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
378         (SVE_HEADER_VL_OFFSET): Likewise.
379         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
380         (SVE_HEADER_FLAGS_OFFSET): Likewise.
381         (SVE_HEADER_RESERVED_OFFSET): Likewise.
382         (SVE_HEADER_SIZE): Likewise.
383         (aarch64_linux_core_read_vq): Add function.
384         (aarch64_linux_core_read_description): Check for SVE section.
385
386 2018-08-13  Alan Hayward  <[email protected]>
387
388         * aarch64-fbsd-tdep.c
389         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
390         collect_size.
391         * aarch64-linux-tdep.c
392         (aarch64_linux_iterate_over_regset_sections): Likewise.
393         * alpha-linux-tdep.c
394         (alpha_linux_iterate_over_regset_sections):
395         * alpha-nbsd-tdep.c
396         (alphanbsd_iterate_over_regset_sections): Likewise.
397         * amd64-fbsd-tdep.c
398         (amd64fbsd_iterate_over_regset_sections): Likewise.
399         * amd64-linux-tdep.c
400         (amd64_linux_iterate_over_regset_sections): Likewise.
401         * arm-bsd-tdep.c
402         (armbsd_iterate_over_regset_sections): Likewise.
403         * arm-fbsd-tdep.c
404         (arm_fbsd_iterate_over_regset_sections): Likewise.
405         * arm-linux-tdep.c
406         (arm_linux_iterate_over_regset_sections): Likewise.
407         * corelow.c (get_core_registers_cb): Likewise.
408         (core_target::fetch_registers): Likewise.
409         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
410         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
411         * gdbarch.h (void): Regenerate.
412         * gdbarch.sh: Add supply_size and collect_size.
413         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
414         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
415         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
416         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
417         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
418         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
419         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
420         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
421         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
422         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
423         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
424         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
425         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
426         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
427         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
428         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
429         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
430         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
431         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
432         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
433         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
434         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
435         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
436         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
437         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
438         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
439         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
440         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
441         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
442         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
443
444 2018-08-10  Simon Marchi  <[email protected]>
445
446         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
447         with string_printf.
448
449 2018-08-10  Keith Seitz  <[email protected]>
450
451         * compile/compile-c-support.c (add_code_header, add_code_footer):
452         Move into policy class.
453         (c_push_user_expression, pop_user_expression_nop)
454         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
455         (compile_program): New host class.
456         (c_compile_program): New typedef.
457         (c_compute_porgram): Use c_compile_program.
458
459 2018-08-10  Keith Seitz  <[email protected]>
460
461         * compile/compile-internal.h (compile_instance::~compile_instance):
462         Remove calls to htab_delete.
463         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
464         * compile.c (compile_instance::compile_instance): Initialize
465         htab unique pointers.
466         (compile_instance::get_cached_type, compile_instance::insert_type)
467         (compile_instance::error_symbol_once): Update for unique_ptr.
468
469 2018-08-10  Keith Seitz  <[email protected]>
470
471         * compile/compile-c-symbols.c (struct symbol_error)
472         (hash_symbol_error, eq_symbol_error, del_symbol_error)
473         (compile_instance::insert_symbol_error)
474         (compile_instance::error_symbol_once): Move to ...
475         * compile/compile.c: ... here.
476
477 2018-08-10  Keith Seitz  <[email protected]>
478
479         * compile/compile-c-support.c (c_get_compile_context): Use `new'
480         instead of `new_compile_instance'.
481         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
482         Update description.
483         If the symbol error map is not initialized, create it.
484         (generate_c_for_for_one_symbol): Do not check/initialize
485         the symbol error map.
486         * compile/compile-c-types.c (compile_c_instance): Make a class.
487         Update all callers.
488         (compile_instance::compile_instance): Initialize the type cache.
489         (get_cached_type): New function.
490         (insert_type): Update description.
491         (compile_c_instance::m_default_cflags): Define.
492         (convert_type): Update description.  Use get_cached_type.
493         (delete_instance): Moved to destructor.
494         (new_compile_instance): Moved to constructor.
495         * compile/compile-c.h (compile_c_instance): Make class inheriting
496         from compile_instance.
497         <base>: Remove field.
498         <type_map, symbol_err_map>: Move to base class.
499         <c_plugin>: Rename to `m_plugin' and remove pointer type.
500         * compile/compile-internal.h (compile_instance): Make class.
501         <type_map_t, symbol_err_map_t>: Define.
502         <fe>: Rename to `m_gcc_fe'.
503         <scope, block, gcc_target_options>: Add `m_' prefix.
504         <m_type_map, m_symbol_err_map>: New fields, moved from
505         compile_c_instance.
506         <destroy>: Remove.
507         (convert_type, new_compile_instance): Remove.
508         * compile/compile.c (cleanup_compile_instance): Remove.
509         (compile_to_object): Use unique_ptr to eliminate cleanups.
510         (compile_instance::set_print_callback, compile_instance::version)
511         (compile_instance::set_verbose)
512         (compile_instance::set_driver_filename)
513         (compile_instance::set_triplet_regexp)
514         (compile_instance::set_arguments)
515         (compile_instance::set_source_file)
516         (compile_instance::compile): Define.
517
518 2018-08-10  Keith Seitz  <[email protected]>
519
520         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
521         * compile/compile-c-types.c: Define GCC_METHODN macros and include
522         gcc-c-fe.def to define C plugin.
523         (delete_instance): Delete `c_plugin'.
524         (new_compile_instance): Initialize `c_plugin'.
525         * compile/compile-c.h: Include gcc_c_plugin.h.
526         (struct compile_c_instance) <c_plugin>: New member.
527         * gcc-c-plugin.h: New file.
528         Update all callers with API change.
529
530 2018-08-10  Keith Seitz  <[email protected]>
531
532         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
533         (HFILES_NO_SRCDIR): ... to here.
534         Add compile-internal.h and compile-c.h.
535         * compile/compile-c-support.c: Include compile-c.h.
536         * compile/compile-c-symbols.c: Include compile-c.h.
537         (generate_c_for_variable_locations): Update comment.
538         * compile/compile-c-types.c: Include compile-c.h.
539         * compile/compile-c.h: New file -- moved C language declarations
540         from other files here.
541         * compile/compile-internal.h: Do not include hashtab.h or
542         common/enum-flags.h.
543         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
544         (gcc_convert_symbol, gcc_symbol_address)
545         (generate_c_for_variable_locations, c_get_mode_for_size)
546         (c_get_range_decl_name): Definitions moved to compile-c.h.
547         * compile/compile-loc2c.c: Include compile-c.h.
548
549 2018-08-10  Keith Seitz  <[email protected]>
550
551         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
552         (c_symbol_substitution_name): ... this.
553         Update all callers.
554
555 2018-08-10  Keith Seitz  <[email protected]>
556
557         * compile/compile-c-support.c (c_compute_program): Use
558         unique_xmalloc_ptr to eliminate cleanup.
559         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
560         Return a unique_xmalloc_ptr and eliminate cleanup.
561         * compile/compile-internal.h (generate_c_for_variable_locations):
562         Return unique_xmalloc_ptr and update description.
563
564 2018-08-10  Alan Hayward  <[email protected]>
565
566         * corelow.c (core_target::get_core_register_section): Rename
567         min_size to section_min_size.
568
569 2018-08-09  Jim Wilson  <[email protected]>
570
571         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
572         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
573         * NEWS: Mention new GNU/Linux RISC-V target.
574         * configure.host: Add riscv*-*-linux*.
575         * configure.nat: Add riscv*.
576         * configure.tgt: Add riscv*-*-linux*.
577         * riscv-linux-nat.c: New file.
578         * riscv-linux-tdep.c: New file.
579
580 2018-08-09  Andrew Burgess  <[email protected]>
581
582         * infrun.c (resume): Make static, add forward declaration.
583         (proceed): Update header comment.
584         * infrun.h (resume): Delete declaration.
585
586 2018-08-09  Tom Tromey  <[email protected]>
587
588         * riscv-tdep.h: Minor formatting fixes.
589
590 2018-08-09  Simon Marchi  <[email protected]>
591
592         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
593         * dwarf-index-cache.c (create_dir_and_check): Likewise.
594         (test_mkdir_recursive): Likewise.
595         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
596
597 2018-08-09  Andrew Burgess  <[email protected]>
598
599         * valarith.c (value_subscripted_rvalue): If an array is not in
600         memory, and we don't know the upper bound, then we can't know that
601         the requested element exists or not.
602
603 2018-08-08  Simon Marchi  <[email protected]>
604
605         * target.c (str_comma_list_concat_elem): Fix typo in comment.
606         (target_options_to_string): Add comment.
607
608 2018-08-08  Tom Tromey  <[email protected]>
609
610         * unittests/scoped_mmap-selftests.c: Check result of "write".
611
612 2018-08-08  Jim Wilson  <[email protected]>
613
614         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
615         (decode_register_index_short): New.
616         (decode_j_type_insn, decode_cj_type_insn): New.
617         (decode_b_type_insn, decode_cb_type_insn): New.
618         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
619         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
620         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
621         is_c_sw_insn instead of is_sw_insn.
622         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
623         (riscv_software_single_step): New.
624         * riscv-tdep.h (riscv_software_single_step): Declare.
625
626         * riscv-tdep.c (riscv_isa_xlen): Drop static.
627         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
628
629 2018-08-08  Andrew Burgess  <[email protected]>
630
631         PR gdb/18050:
632         * target.c (dispose_inferior): Don't dispose of inferiors that are
633         already killed.
634
635 2018-08-08  Szabolcs Nagy  <[email protected]>
636
637         * remote.c (remote_target::download_tracepoint): Change char* to
638         const char*.
639
640 2018-08-07  Simon Marchi  <[email protected]>
641
642         * target.h (target_options_to_string): Return an std::string.
643         * target.c (str_comma_list_concat_elem): Return void, use
644         std::string.
645         (do_option): Likewise.
646         (target_options_to_string): Return an std::string.
647         * linux-nat.c (linux_nat_target::wait): Adjust.
648         * target-debug.h (target_debug_print_options): Adjust.
649
650 2018-08-07  Tom Tromey  <[email protected]>
651
652         * Makefile.in (CPPFLAGS): New variable.
653         (INTERNAL_CPPFLAGS): Use it.
654
655 2018-08-07  Simon Marchi  <[email protected]>
656
657         * NEWS: Mention the index cache.
658
659 2018-08-07  Simon Marchi  <[email protected]>
660
661         * common/pathstuff.h (get_standard_cache_dir): New.
662         * common/pathstuff.c (get_standard_cache_dir): New.
663         * build-id.h (build_id_to_string): New.
664         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
665         DEBUG_STR_SUFFIX): Move to here.
666         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
667         DEBUG_STR_SUFFIX): Move from there.
668         (write_psymtabs_to_index): Make non-static, add basename
669         parameter.  Write to temporary files, rename when done.
670         (save_gdb_index_command): Adjust call to
671         write_psymtabs_to_index.
672         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
673         field.
674         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
675         (get_gdb_index_contents_from_cache): New.
676         (get_gdb_index_contents_from_cache_dwz): New.
677         (dwarf2_initialize_objfile): Read index from cache.
678         (dwarf2_build_psymtabs): Save to index.
679         * dwarf-index-cache.h: New file.
680         * dwarf-index-cache.c: New file.
681         * dwarf-index-write.h: New file.
682
683 2018-08-07  Simon Marchi  <[email protected]>
684
685         * gnulib/aclocal.m4: Re-generate.
686         * gnulib/config.in: Re-generate.
687         * gnulib/configure: Re-generate.
688         * gnulib/import/Makefile.am: Re-generate.
689         * gnulib/import/Makefile.in: Re-generate.
690         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
691         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
692         * gnulib/import/m4/mkdir.m4: New file.
693         * gnulib/import/mkdir.c: New file.
694         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
695         module.
696
697 2018-08-07  Simon Marchi  <[email protected]>
698
699         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
700         * common/scoped_mmap.c: New file.
701         * common/scoped_mmap.h (destroy): New method.
702         (~scoped_mmap, reset): Use destroy.
703         (scoped_mmap): New move constructor.
704         (mmap_file): New declaration.
705         * unittests/scoped_mmap-selftests.c (test_normal,
706         test_invalid_filename, run_tests): New functions.
707         (_initialize_scoped_mmap_selftests): Register selftest.
708
709 2018-08-07  Simon Marchi  <[email protected]>
710
711         * dwarf2read.c (read_gdb_index_from_section): Rename to...
712         (read_gdb_index_from_buffer): ... this.  Remove section
713         parameter, add buffer parameter.
714         (get_gdb_index_contents_ftype,
715         get_gdb_index_contents_dwz_ftype): New typedefs.
716         (dwarf2_read_gdb_index): Add callback parameters to get the
717         index contents.
718         (get_gdb_index_contents_from_section): New.
719         (dwarf2_initialize_objfile): Update call to
720         dwarf2_read_gdb_index.
721
722 2018-08-07  Simon Marchi  <[email protected]>
723
724         * common/filestuff.h (gdb_fopen_cloexec): New overload.
725         (gdb_open_cloexec): Likewise.
726         * nat/linux-osdata.c (command_from_pid): Use string_printf.
727         (commandline_from_pid): Likewise.
728         (linux_xfer_osdata_threads): Likewise.
729         (linux_xfer_osdata_fds): Likewise.
730         * ada-lang.c (is_package_name): Likewise.
731         * auxv.c (procfs_xfer_auxv): Likewise.
732         * breakpoint.c (print_one_breakpoint_location): Use
733         uiout::field_fmt.
734         (print_one_catch_solib): Use string_printf.
735         * coff-pe-read.c (add_pe_exported_sym): Likewise.
736         (add_pe_forwarded_sym): Likewise.
737         * dwarf2read.c (create_type_unit_group): Likewise.
738         (build_error_marker_type): Likewise.
739         * infcall.c (get_function_name): Likewise.
740         * valprint.c (print_converted_chars_to_obstack): Likewise.
741         * xtensa-tdep.c (xtensa_register_type): Likewise.
742
743 2018-08-06  Simon Marchi  <[email protected]>
744
745         * remote.c (remote_target::download_tracepoint): Fix format
746         string errors.
747
748 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
749
750         * tracefile.c: Include common/byte-vector.h.
751         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
752         with trace_regblock_size if needed.  Update uses of buf.
753
754 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
755
756         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
757         std::vector<unsigned char>.
758         * tracepoint.c (collection_list::collection_list): Remove
759         m_regs_mask initializer from initializer list.  Resize
760         m_regs_mask using the largest remote register number.
761         (collection_list::add_remote_register): Remove size check on
762         m_regs_mask.  Use at to access element.
763         (collection_list::stringify): Change type of temp_buf to
764         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
765         stringify the register mask.  Use pack_hex_byte for the register
766         mask.
767
768 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
769
770         * tracepoint.h (class collection_list) <add_register>: Remove.
771         <add_remote_register, add_ax_registers, add_local_register>:
772         Declare.
773         <add_memrange>: Add scope parameter.
774         * tracepoint.c (encode_actions_1): Likewise.
775         (collection_list::add_register): Rename to ...
776         (collection_list::add_remote_register): ... this.  Update
777         comment.
778         (collection_list::add_ax_registers, add_local_register): New
779         methods.
780         (collection_list::add_memrange): Add scope parameter.  Call
781         add_local_register instead of add_register.
782         (finalize_tracepoint_aexpr): New function.
783         (collection_list::collect_symbol): Update calls to add_memrange.
784         Call add_local_register instead of add_register.  Call
785         add_ax_registers.  Call finalize_tracepoint_aexpr.
786         (encode_actions_1): Get remote regnos for $reg action.  Call
787         add_remote_register, add_ax_registers, and add_local_register.
788         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
789         (validate_actionline): Call finalize_tracepoint_aexpr.
790
791 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
792
793         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
794         Replace array buf with gdb::char_vector buf, of size
795         get_remote_packet_size ().  Replace references to buf and
796         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
797         and xsnprintf with snprintf.  Raise errors if the buffer is too
798         small.
799
800 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
801
802         * remote.c (remote_target::download_tracepoint): Fix the has_more
803         predicate in the QTDP action list iteration.
804
805 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
806
807         * remote.c (remote_target::download_tracepoint): Fix indentation
808         in for block.
809
810 2018-08-06  Rainer Orth  <[email protected]>
811
812         * proc-api.c (_initialize_proc_api): Remove c, unused.
813         * procfs.c (procfs_init_inferior): Remove signals, unused.
814         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
815         unused.
816
817 2018-08-06  Sergey Korolev  <[email protected]>
818             Andrew Burgess  <[email protected]>
819
820         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
821         'W_STOPCODE (0)' as this could be ambiguous.
822
823 2018-08-03  Sergio Durigan Junior  <[email protected]>
824
825         * ser-tcp.c (net_open): Fix thinko when deciding whether to
826         disable TCP's Nagle algorithm (use "ai_protocol" instead of
827         "ai_socktype").
828
829 2018-08-02  Tom Tromey  <[email protected]>
830
831         PR symtab/16842.
832         * dwarf2read.c (read_func_scope): Set symtab on template parameter
833         symbols.
834         (process_structure_scope): Likewise.
835
836 2018-08-02  Xavier Roirand  <[email protected]>
837
838         PR gdb/22629:
839         * darwin-nat.c (darwin_kill_inferior): Fix handling of
840         kill inferior.
841
842 2018-08-02  Tom Tromey  <[email protected]>
843
844         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
845         (darwin_suspend_inferior, darwin_resume_inferior)
846         (darwin_decode_notify_message, darwin_resume_inferior_threads)
847         (darwin_check_new_threads): Check result of get_darwin_inferior.
848
849 2018-07-31  Joel Brobecker  <[email protected]>
850
851         GDB 8.1.1 released.
852
853 2018-07-31  Jan Vrany  <[email protected]>
854
855         * varobj.c (varobj_get_path_expr_parent): Report an error if
856         parent is a dynamic varobj.
857
858 2018-07-31  Simon Marchi  <[email protected]>
859
860         * gnulib/aclocal.m4: Re-generate.
861         * gnulib/config.in: Re-generate.
862         * gnulib/configure: Re-generate.
863         * gnulib/import/Makefile.in: Re-generate.
864         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
865         * gnulib/import/m4/onceonly.m4: Re-generate.
866
867 2018-07-31  Simon Marchi  <[email protected]>
868
869         * target-descriptions.c (struct xml_test_tdesc): New.
870         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
871         (record_xml_tdesc): Update.
872         (maintenance_check_xml_descriptions): Update.
873         * target-descriptions.h (record_xml_tdesc): Update comment.
874
875 2018-07-30  Andrew Burgess  <[email protected]>
876
877         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
878         checking array bounds are defined.
879
880 2018-07-30  Tom Tromey  <[email protected]>
881
882         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
883         irreflexivity violation.
884
885 2018-07-30  Tom Tromey  <[email protected]>
886
887         * cli/cli-decode.c (lookup_cmd): Remove lint code.
888         * value.c (unpack_long): Remove lint code.
889         * valops.c (value_ind): Remove lint code.
890         * valarith.c (value_x_binop, value_x_unop, value_equal)
891         (value_pos): Remove lint code.
892
893 2018-07-28  Tom de Vries  <[email protected]>
894
895         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
896         with undefined upper bound as <optimized out>.
897
898 2018-07-27  Sergio Durigan Junior  <[email protected]>
899
900         * gcore.in: Rename variable "name" to "prefix".  Expand
901         "usage" text.
902
903 2018-07-14  Jon Turney  <[email protected]>
904
905         * windows-nat.c (windows_nat_target::create_inferior): Update to
906         call close() in global namespace.
907
908 2018-07-26  Tom Tromey  <[email protected]>
909
910         * dwarf-index-write.c (add_address_entry): Don't add objfile
911         offsets.
912         * dbxread.c (find_stab_function): Rename from
913         find_stab_function_addr.  Return a bound_minimal_symbol.
914         (read_dbx_symtab): Use raw_text_low, raw_text_high.
915         Don't add objfile offsets.
916         (end_psymtab): Use raw_text_low, raw_text_high,
917         MSYMBOL_VALUE_RAW_ADDRESS.
918         (read_ofile_symtab): Update.
919         (process_one_symbol): Update.
920         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
921         offsets.
922         (dw2_relocate): Remove.
923         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
924         searching addrmap.
925         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
926         Update.
927         (process_psymtab_comp_unit_reader, add_partial_symbol)
928         (add_partial_subprogram, dwarf2_ranges_read): Update.
929         (load_partial_dies): Update.
930         (add_address_entry): Don't add objfile offsets.
931         (dwarf2_build_include_psymtabs): Update.
932         (create_addrmap_from_aranges): Don't add objfile offsets.
933         (dw2_find_pc_sect_compunit_symtab): Update.
934         * mdebugread.c (parse_symbol): Don't add objfile offsets.
935         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
936         Update.
937         (parse_partial_symbols): Don't add objfile offsets.  Use
938         raw_text_low, raw_text_high.  Update.
939         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
940         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
941         or call 'relocate' quick function.  Clear psymbol_map.
942         * psympriv.h (struct partial_symbol) <address>: Add section
943         offset.
944         <set_unrelocated_address>: Rename from set_address.
945         <raw_text_low, raw_text_high>: New methods.
946         <text_low, text_high>: Add objfile parameter.
947         (add_psymbol_to_bcache): Add 'section' parameter.  Call
948         set_unrelocated_address.
949         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
950         (find_pc_psymbol): Update.
951         (fixup_psymbol_section, relocate_psymtabs): Remove.
952         (dump_psymtab, psym_functions): Update.
953         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
954         parameter.
955         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
956         (start_psymtab_common): Update.
957         * symfile-debug.c (debug_qf_relocate): Remove.
958         (debug_sym_quick_functions): Update.
959         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
960         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
961         Update.
962
963 2018-07-26  Tom Tromey  <[email protected]>
964
965         * dbxread.c (end_psymtab): Use text_high_valid and
966         text_low_valid.
967         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
968         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
969         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
970         Update comment.
971         <text_low_valid, text_high_valid>: New fields.
972         <set_text_low, set_text_high>: Update.
973         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
974
975 2018-07-26  Tom Tromey  <[email protected]>
976
977         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
978         Update.
979         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
980         textlow and texthigh fields.
981         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
982         Update.
983         * mdebugread.c (parse_lines, parse_partial_symbols)
984         (psymtab_to_symtab_1): Update.
985         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
986         Rename fields.  Update comment.  Now private.
987         <text_low, text_high, set_text_low, set_text_high>: New methods.
988         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
989         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
990         (start_psymtab_common, maintenance_info_psymtabs)
991         (maintenance_check_psymtabs): Update.
992         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
993         texthigh fields.
994         (scan_xcoff_symtab): Update.
995
996 2018-07-26  Tom Tromey  <[email protected]>
997
998         * psympriv.h (struct partial_symbol) <unrelocated_address,
999         address, set_address>: New methods.
1000         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1001         (fixup_psymbol_section, relocate_psymtabs): Update.
1002         (print_partial_symbols): Add 'objfile' parameter.  Update.
1003         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1004         Update.
1005
1006 2018-07-26  Tom Tromey  <[email protected]>
1007
1008         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1009         (debug_names::write_psymbols): Update.
1010         * psympriv.h (struct partial_symbol): Derive from
1011         general_symbol_info.
1012         <obj_section>: New method.
1013         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1014         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1015         (find_pc_sect_psymbol, fixup_psymbol_section)
1016         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1017         (print_partial_symbols, recursively_search_psymtabs)
1018         (compare_psymbols, psymbol_hash, psymbol_compare)
1019         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1020         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1021
1022 2018-07-26  Tom Tromey  <[email protected]>
1023
1024         * dbxread.c (end_psymtab): Remove dead code.
1025
1026 2018-07-26  Andrew Burgess  <[email protected]>
1027
1028         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1029         DWARF unwinders are disabled.
1030         * dwarf2-frame.c: Add dwarf2read.h include.
1031         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1032         disabled.
1033         (dwarf2_frame_unwinders_enabled_p): Define.
1034         (show_dwarf_unwinders_enabled_p): New function.
1035         (_initialize_dwarf2_frame): Register switch to control DWARF
1036         unwinder use.
1037         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1038         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1039         (show_dwarf_cmdlist): Remove static keyword.
1040         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1041         (show_dwarf_cmdlist): Declare.
1042         * NEWS: Document new feature.
1043
1044 2018-07-26  Tom de Vries  <[email protected]>
1045
1046         PR breakpoints/23366
1047         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1048
1049 2018-07-26  Tom de Vries  <[email protected]>
1050
1051         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1052         DW_AT_count can't be translated to a dynamic prop.
1053
1054 2018-07-25  Tom de Vries  <[email protected]>
1055
1056         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1057         try/catch.
1058
1059 2018-07-25  Jan Vrany  <[email protected]>
1060
1061         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1062
1063 2018-07-25  Joel Brobecker  <[email protected]>
1064
1065         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1066
1067 2018-07-24  Keith Seitz  <[email protected]
1068
1069         PR symtab/23010
1070         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1071         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1072         instead of add_symbol_to_list.
1073         (read_file_scope): Call prepare_one_comp_unit before reading
1074         any other DIEs.
1075
1076 2018-07-24  Simon Marchi  <[email protected]>
1077
1078         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1079
1080 2018-07-24  Tom Tromey  <[email protected]>
1081
1082         * utils.c (malloc, realloc, free): Don't declare.
1083         * configure, config.in: Rebuild.
1084         * configure.ac: Don't check for declarations of free, malloc, or
1085         realloc.
1086
1087 2018-07-22  Simon Marchi  <[email protected]>
1088
1089         * aarch64-linux-nat.c
1090         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1091         variable.
1092         * arm-linux-nat.c (fetch_regs): Likewise.
1093         (store_regs): Likewise.
1094         (fetch_vfp_regs): Likewise.
1095         (store_vfp_regs): Likewise.
1096         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1097         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1098         (arm_linux_nat_target::insert_watchpoint): Likewise.
1099         (arm_linux_nat_target::remove_watchpoint): Likewise.
1100         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1101         Likewise.
1102         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1103         Likewise.
1104         * ppc-linux-nat.c (fetch_register): Likewise.
1105         (fetch_all_gp_regs): Likewise.
1106         (fetch_ppc_registers): Likewise.
1107         (store_all_gp_regs): Likewise.
1108         (store_ppc_registers): Likewise.
1109         (hwdebug_insert_point): Likewise.
1110         (can_use_watchpoint_cond_accel): Likewise.
1111         * remote-sim.c (gdb_os_write_stdout): Likewise.
1112
1113 2018-07-22  Simon Marchi  <[email protected]>
1114             Tom Tromey  <[email protected]>
1115
1116         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1117         test for it.
1118         * configure: Rebuild.
1119
1120 2018-07-22  Tom Tromey  <[email protected]>
1121
1122         * regformats/regdat.sh: Define xmltarget_${name} inside
1123         #ifndef IN_PROCESS_AGENT.
1124
1125 2018-07-22  Tom Tromey  <[email protected]>
1126
1127         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1128
1129 2018-07-22  Tom Tromey  <[email protected]>
1130
1131         * symfile.c (reread_symbols): Notify iter, not objfile.
1132
1133 2018-07-22  Tom Tromey  <[email protected]>
1134
1135         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1136         Use arch_ops.
1137         (ravenscar_thread_target::prepare_to_store): Likewise.
1138
1139 2018-07-22  Tom Tromey  <[email protected]>
1140
1141         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1142         unused variable.  Call value_fetch_lazy when needed.
1143         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1144         Remove unused variable.  Call value_fetch_lazy when needed.
1145
1146 2018-07-22  Tom Tromey  <[email protected]>
1147
1148         * m32c-tdep.c (mark_dma): Return void.
1149         (make_regs): Remove unused declarations.
1150
1151 2018-07-22  Tom Tromey  <[email protected]>
1152
1153         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1154         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1155         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1156         bkscm_get_valid_block_smob_arg_unsafe for effect.
1157
1158 2018-07-22  Tom Tromey  <[email protected]>
1159
1160         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1161         value_type.
1162
1163 2018-07-22  Tom Tromey  <[email protected]>
1164
1165         * windows-nat.c (saved_context): Conditionally define.
1166         * remote.c (remote_target::remote_btrace_maybe_reopen):
1167         Conditionally declare "warned".
1168         * inflow.c (sigquit_ours): Conditionally define.
1169         (new_tty): Move "tty" declaration inside #if.
1170         * guile/guile.c (guile_datadir): Conditionally define.
1171         * charset.c (set_be_le_names): Move some declarations inside #if.
1172         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1173         #if.
1174         (parse_xml_btrace_conf): Likewise.
1175
1176 2018-07-22  Tom Tromey  <[email protected]>
1177
1178         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1179
1180 2018-07-22  Tom Tromey  <[email protected]>
1181
1182         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1183         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1184         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1185         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1186         * stack.c (frame_apply_level_command): Remove unused variable.
1187         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1188         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1189         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1190         unused variable.
1191         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1192         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1193         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1194         variable.
1195         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1196         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1197         variable.
1198         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1199         Remove unused variable.
1200         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1201         variable.
1202         * common/tdesc.c (print_xml_feature::visit): Remove unused
1203         variable.
1204         * compile/compile-object-load.c (store_regs): Remove unused
1205         variables.
1206         * complaints.c (clear_complaints): Remove unused variable.
1207         * corelow.c (core_target_open): Remove unused variable.
1208         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1209         variable.
1210         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1211         variable.
1212         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1213         variable.
1214         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1215         variable.
1216         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1217         variable.
1218         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1219         variable.
1220         * ia64-tdep.c (examine_prologue): Remove unused variable.
1221         * infcall.c (run_inferior_call): Remove unused variable.
1222         * inferior.c (exit_inferior): Remove unused variable.
1223         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1224         * linespec.c (decode_line_2): Remove unused variable.
1225         * linux-nat.c (super_close): Remove.
1226         * linux-tdep.c (linux_info_proc): Remove unused variable.
1227         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1228         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1229         Remove unused variable.
1230         * parse.c (find_minsym_type_and_address): Remove unused variable.
1231         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1232         variable.
1233         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1234         variable.
1235         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1236         variables.
1237         * record-btrace.c (record_btrace_target::store_registers): Remove
1238         unused variable.
1239         (cmd_show_record_btrace_cpu): Remove unused variable.
1240         * riscv-tdep.c (riscv_register_reggroup_p)
1241         (riscv_push_dummy_call, riscv_return_value): Remove unused
1242         variable.
1243         * rust-exp.y (literal): Remove unused variable.
1244         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1245         unused variable.
1246         <STRUCTOP_ANONYMOUS>: Likewise.
1247         * s390-linux-tdep.c (s390_linux_init_abi_31)
1248         (s390_linux_init_abi_64): Remove unused variable.
1249         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1250         (file_select_thread, net_windows_open, _initialize_ser_windows):
1251         Remove unused variables.
1252         * symtab.c (find_pc_sect_line): Remove unused variable.
1253         * target-memory.c (compute_garbled_blocks): Remove unused
1254         variable.
1255         (target_write_memory_blocks): Remove unused variable.
1256         * target.c (target_stack::unpush): Remove unused variables.
1257         * tracepoint.c (start_tracing, all_tracepoint_actions)
1258         (merge_uploaded_trace_state_variables)
1259         (print_one_static_tracepoint_marker): Remove unused variable.
1260         * unittests/basic_string_view/element_access/char/1.cc (test01):
1261         Remove unused variable.
1262         * windows-nat.c (windows_continue, windows_add_all_dlls)
1263         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1264         Remove unused variables.
1265
1266 2018-07-21  Simon Marchi  <[email protected]>
1267
1268         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1269         attr_profile in HAVE_ELF.
1270         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1271         HAVE_ELF.
1272
1273 2018-07-20  Simon Marchi  <[email protected]>
1274
1275         * frame.c (frame_register_unwind): Change parameter name.
1276         (frame_unwind_register): Likewise.
1277         (frame_unwind_register_value): Likewise.
1278         (frame_unwind_register_signed): Likewise.
1279         (frame_unwind_register_unsigned): Likewise.
1280         * frame.h (frame_register_unwind): Likewise.
1281         (frame_unwind_register): Likewise.
1282         (frame_unwind_register_value): Likewise.
1283         (frame_unwind_register_signed): Likewise.
1284         (frame_unwind_register_unsigned): Likewise.
1285         (frame_unwind_arch): Likewise.
1286
1287 2018-07-20  Maciej W. Rozycki  <[email protected]>
1288
1289         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1290         ISA maintenance.
1291
1292 2018-07-20  Maciej W. Rozycki  <[email protected]>
1293
1294         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1295         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1296         hand.
1297
1298 2018-07-20  Keith Seitz  <[email protected]>
1299
1300         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1301         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1302         m_compunit_symtab, m_language>: Add "m_" prefix.
1303         Update all uses.
1304         * buildsym.c: Update all uses.
1305
1306 2018-07-20  Tom Tromey  <[email protected]>
1307
1308         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1309         * buildsym.h (record_line_ftype): Remove typedef.
1310
1311 2018-07-20  Tom Tromey  <[email protected]>
1312
1313         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1314         (end_expandable_symtab): Likewise.
1315         (end_symtab_get_static_block): Likewise.
1316         (end_symtab_from_static_block): Likewise.
1317         * buildsym-legacy.c (augment_type_symtab): Remove.
1318         (end_expandable_symtab): Remove.
1319         (end_symtab_get_static_block): Remove.
1320         (end_symtab_from_static_block): Remove.
1321
1322 2018-07-20  Tom Tromey  <[email protected]>
1323
1324         * dwarf2read.c: Include buildsym.h.
1325         (struct dwarf2_cu) <builder>: New method.
1326         (fixup_go_packaging): Update.
1327         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1328         use scoped_free_pendings.
1329         (using_directives): Add "cu" parameter, remove "language".
1330         (read_import_statement, setup_type_unit_groups, )
1331         (read_func_scope, read_lexical_block_scope)
1332         (dwarf2_record_block_ranges, read_namespace): Update.
1333         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1334         (lnp_state_machine::handle_end_sequence): Update.
1335         (class lnp_state_machine) <m_cu>: New member.
1336         <m_record_line_callback>: Remove.
1337         <m_currently_recording_lines>: New member.
1338         (lnp_state_machine::handle_set_file): Update.
1339         (noop_record_line): Remove.
1340         (dwarf_record_line_p): Add cu parameter.
1341         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1342         (lnp_state_machine::record_line)
1343         (lnp_state_machine::lnp_state_machine)
1344         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1345         (dwarf_decode_lines): Update.
1346         (dwarf2_start_subfile): Add cu parameter.
1347         (dwarf2_start_symtab, new_symbol): Update.
1348         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1349         Remove dwarf2_per_objfile parameter.
1350         (dwarf_decode_macros): Update.
1351
1352 2018-07-20  Tom Tromey  <[email protected]>
1353
1354         * stabsread.c (define_symbol): Update.
1355         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1356         * dwarf2read.c (new_symbol): Update.
1357         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1358         * cp-namespace.c: Include buildsym.h.
1359         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1360         * buildsym-legacy.c (get_buildsym_compunit): New function.
1361
1362 2018-07-20  Tom Tromey  <[email protected]>
1363
1364         * xcoffread.c: Include buildsym-legacy.h.
1365         * windows-nat.c: Include buildsym-legacy.h.
1366         * stabsread.c: Include buildsym-legacy.h.
1367         * mdebugread.c: Include buildsym-legacy.h.
1368         * buildsym-legacy.h: New file.
1369         * buildsym-legacy.c: New file, from buildsym.c.
1370         * go32-nat.c: Include buildsym-legacy.h.
1371         * dwarf2read.c: Include buildsym-legacy.h.
1372         * dbxread.c: Include buildsym-legacy.h.
1373         * cp-namespace.c: Include buildsym-legacy.h.
1374         * coffread.c: Include buildsym-legacy.h.
1375         * buildsym.h: Move some contents to buildsym-legacy.h.
1376         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1377         buildsym-legacy.c.
1378         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1379
1380 2018-07-20  Tom Tromey  <[email protected]>
1381
1382         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1383         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1384         (buildsym_compunit::buildsym_compunit)
1385         (buildsym_compunit::~buildsym_compunit)
1386         (buildsym_compunit::get_macro_table): Define.
1387
1388 2018-07-20  Tom Tromey  <[email protected]>
1389
1390         * buildsym.c (reset_symtab_globals): Remove.
1391         (buildsym_compunit::end_symtab_from_static_block): Update.
1392         (buildsym_compunit::augment_type_symtab): Update.
1393         (end_symtab_from_static_block): Call free_buildsym_compunit.
1394         (augment_type_symtab, end_symtab, end_expandable_symtab):
1395         Likewise.
1396
1397 2018-07-20  Tom Tromey  <[email protected]>
1398
1399         * arch-utils.c: Do not include buildsym.h.
1400         * mipsread.c: Do not include buildsym.h.
1401         * machoread.c: Do not include buildsym.h.
1402         * elfread.c: Do not include buildsym.h.
1403
1404 2018-07-20  Tom Tromey  <[email protected]>
1405
1406         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1407         initialization.
1408         (buildsym_compunit): Add new constructor.
1409         (struct buildsym_compunit) <get_last_source_file, finish_block,
1410         record_block_range, start_subfile, patch_subfile_names,
1411         push_subfile, pop_subfile, record_line, get_compunit_symtab,
1412         set_last_source_start_addr, get_last_source_start_addr,
1413         get_local_using_directives, set_local_using_directives,
1414         get_global_using_directives, outermost_context_p,
1415         get_current_context_stack, get_context_stack_depth,
1416         get_current_subfile, get_local_symbols, get_file_symbols,
1417         get_global_symbols, record_debugformat, record_producer,
1418         push_context, pop_context, end_symtab_get_static_block,
1419         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1420         New public methods.
1421         <record_pending_block, finish_block_internal, make_blockvector,
1422         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1423         private methods.
1424         Update all users.
1425
1426 2018-05-22  Tom Tromey  <[email protected]>
1427
1428         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1429         parameter.
1430         (finish_block_internal): Update.
1431
1432 2018-07-20  Tom Tromey  <[email protected]>
1433
1434         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
1435         parameter.
1436         (finish_block_internal): Update.
1437
1438 2018-07-20  Tom Tromey  <[email protected]>
1439
1440         * buildsym.h (EXTERN): Don't define or undef.
1441         * buildsym.c (EXTERN): Don't define.
1442
1443 2018-07-20  Tom Tromey  <[email protected]>
1444
1445         * buildsym.c: Remove TODO comment.
1446
1447 2018-07-20  Tom Tromey  <[email protected]>
1448
1449         * coffread.c (coff_symtab_read): Update.
1450         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1451         (xcoff_new_init): Update.
1452         * mipsread.c (mipscoff_new_init): Update.
1453         * mdebugread.c (mdebug_build_psymtabs): Update.
1454         * elfread.c (elf_new_init): Update.
1455         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1456         Update.
1457         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1458         (coffstab_build_psymtabs, elfstab_build_psymtabs)
1459         (stabsect_build_psymtabs): Update.
1460         * buildsym.h (buildsym_init): Don't declare.
1461         * buildsym.c: Update comment.
1462         (prepare_for_building): Remove.
1463         (start_symtab, restart_symtab): Update.
1464         (reset_symtab_globals): Update comment.
1465         (buildsym_init): Remove.
1466
1467 2018-07-20  Tom Tromey  <[email protected]>
1468
1469         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1470         * stabsread.c (patch_block_stabs, define_symbol, read_type)
1471         (read_enum_type, common_block_start, common_block_end)
1472         (cleanup_undefined_types_1, finish_global_stabs): Update.
1473         * mdebugread.c (psymtab_to_symtab_1): Update.
1474         * dwarf2read.c (fixup_go_packaging, read_func_scope)
1475         (read_lexical_block_scope, new_symbol): Update.
1476         * dbxread.c (process_one_symbol): Update.
1477         * coffread.c (coff_symtab_read, process_coff_symbol)
1478         (coff_read_enum_type): Update.
1479         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1480         declare.
1481         (get_local_symbols, get_file_symbols, get_global_symbols): New
1482         functions.
1483         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1484         m_global_symbols.
1485         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1486         (~scoped_free_pendings): Update.
1487         (finish_block, prepare_for_building, reset_symtab_globals)
1488         (end_symtab_get_static_block, end_symtab_with_blockvector)
1489         (augment_type_symtab, push_context): Update.
1490         (get_local_symbols, get_file_symbols, get_global_symbols): New
1491         functions.
1492         (buildsym_init): Update.
1493
1494 2018-07-20  Tom Tromey  <[email protected]>
1495
1496         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1497         (process_full_type_unit): Likewise.
1498         (dwarf2_start_symtab): Set list_in_scope.
1499
1500 2018-07-20  Tom Tromey  <[email protected]>
1501
1502         * dwarf2read.c (process_psymtab_comp_unit_reader)
1503         (build_type_psymtabs_reader): Do not set list_in_scope.
1504
1505 2018-07-20  Tom Tromey  <[email protected]>
1506
1507         * buildsym.c (free_pendings): Remove.
1508         (add_symbol_to_list, scoped_free_pendings)
1509         (finish_block_internal, buildsym_init): Update.
1510
1511 2018-07-20  Tom Tromey  <[email protected]>
1512
1513         * xcoffread.c (read_xcoff_symtab): Update.
1514         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1515         Update.
1516         * dbxread.c (process_one_symbol): Update.
1517         * coffread.c (coff_symtab_read): Update.
1518         * buildsym.h (finish_block): Update.
1519         * buildsym.c (finish_block): Remove "listhead" argument.
1520         (end_symtab_get_static_block): Update.
1521
1522 2018-07-20  Tom Tromey  <[email protected]>
1523
1524         * buildsym.h (class scoped_free_pendings): Remove constructor.
1525         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1526         method.
1527         <m_pending_block_obstack, m_pending_blocks>: New members.
1528         (pending_block_obstack, pending_blocks): Remove.
1529         (scoped_free_pendings::scoped_free_pendings): Default.
1530         (~scoped_free_pendings): Update.
1531         (free_pending_blocks): Remove.
1532         (finish_block_internal, record_pending_block, make_blockvector)
1533         (end_symtab_get_static_block, augment_type_symtab, push_context)
1534         (buildsym_init): Update.
1535
1536 2018-07-20  Tom Tromey  <[email protected]>
1537
1538         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1539         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1540         members.
1541         (pending_addrmap, pending_addrmap_obstack)
1542         (pending_addrmap_interesting): Remove.
1543         (scoped_free_pendings, record_block_range, make_blockvector)
1544         (prepare_for_building, reset_symtab_globals, buildsym_init):
1545         Update.
1546
1547 2018-07-20  Tom Tromey  <[email protected]>
1548
1549         * xcoffread.c (process_linenos): Update.
1550         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1551         * mdebugread.c (psymtab_to_symtab_1): Update.
1552         * dwarf2read.c (setup_type_unit_groups)
1553         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1554         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1555         * dbxread.c (process_one_symbol): Update.
1556         * coffread.c (coff_symtab_read, enter_linenos)
1557         (process_coff_symbol): Update.
1558         * buildsym.h (current_subfile): Don't declare.
1559         (get_current_subfile): Declare.
1560         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1561         member.
1562         (start_subfile, free_buildsym_compunit, push_subfile)
1563         (prepare_for_building, start_symtab): Update.
1564         (get_current_subfile): New function.
1565
1566 2018-07-20  Tom Tromey  <[email protected]>
1567
1568         * coffread.c (coff_symtab_read): Update.
1569         * xcoffread.c (read_xcoff_symtab): Update.
1570         * dwarf2read.c (new_symbol): Update.
1571         (read_func_scope, read_lexical_block_scope): Update.
1572         * dbxread.c (process_one_symbol): Update.
1573         * buildsym.h (context_stack, context_stack_depth): Don't declare.
1574         (outermost_context_p): Remove macro.
1575         (outermost_context_p, get_current_context_stack)
1576         (get_context_stack_depth): Declare.
1577         (pop_context): Return struct context_stack.
1578         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1579         member.
1580         (context_stack_size): Remove.
1581         (INITIAL_CONTEXT_STACK_SIZE): Remove.
1582         (prepare_for_building, end_symtab_get_static_block)
1583         (augment_type_symtab, push_context): Update.
1584         (pop_context): Return struct context_stack.
1585         (outermost_context_p, get_current_context_stack)
1586         (get_context_stack_depth): New functions.
1587         (buildsym_init): Update.
1588
1589 2018-07-20  Tom Tromey  <[email protected]>
1590
1591         * rust-exp.y: Now a pure parser.  Update all rules.
1592         (%union): Move earlier.
1593         (current_parser, work_obstack): Remove globals.
1594         (rust_parser, ~rust_parser): Update.
1595         (class rust_parser) <copy_name, concat3, crate_name, super_name,
1596         lex_character, lex_number, lex_string, lex_identifier,
1597         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1598         convert_name, convert_params_to_expression,
1599         convert_ast_to_expression, ast_basic_type, ast_operation,
1600         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1601         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1602         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1603         ast_array_type, ast_slice_type, ast_reference_type,
1604         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1605         (rust_parse): Update.
1606         (rustyyerror, rustyylex): Add parser parameter.
1607         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1608         (rust_lex_stringish_test, rust_lex_test_sequence)
1609         (rust_lex_test_trailing_dot, rust_lex_test_completion)
1610         (rust_lex_test_push_back, rust_lex_tests): Update.
1611
1612 2018-07-19  Pedro Alves  <[email protected]>
1613
1614         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1615         gdb::unique_xmalloc_ptr.
1616         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1617         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1618         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1619         copy-initialization.
1620         * guile/scm-pretty-print.c (ppscm_print_children): Use
1621         gdb::unique_xmalloc_ptr instead of cleanups.
1622         (gdbscm_apply_val_pretty_printer): Remove cleanups.
1623         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1624         gdb::unique_xmalloc_ptr.
1625         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1626         Adjust to use gdb::unique_xmalloc_ptr.
1627         * guile/scm-utils.c (extract_arg): Adjust.
1628         * guile/scm-value.c (gdbscm_value_field): Adjust to use
1629         gdb::unique_xmalloc_ptr instead of a cleanup.
1630
1631 2018-07-19  Tom Tromey  <[email protected]>
1632
1633         * utils.c (do_value_free_to_mark)
1634         (make_cleanup_value_free_to_mark): Remove.
1635         * utils.h (make_cleanup_value_free_to_mark): Remove.
1636
1637 2018-07-19  Pedro Alves  <[email protected]>
1638
1639         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1640         forwarding reference.
1641
1642 2018-07-18  Pedro Alves  <[email protected]>
1643
1644         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1645         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
1646         cleanup.
1647
1648 2018-07-18  Pedro Alves  <[email protected]>
1649
1650         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1651         exceptions.
1652         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1653         (gdbscm_wrap): New.
1654         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1655         directly instead of a cleanup.
1656         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1657         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
1658         (vlscm_binop_gdbthrow): New, factored out from ...
1659         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
1660         (vlscm_rich_compare): Use gdbscm_wrap.
1661         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1662         instead of a cleanup.
1663         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1664         cleanup.
1665         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1666         Use xfree directly instead of a cleanup.
1667         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1668         Adjust to use gdbscm_wrap and scoped_value_mark.
1669         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1670         (gdbscm_value_address, gdbscm_value_dereference)
1671         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1672         scoped_value_mark.
1673         (gdbscm_value_dynamic_type): Use scoped_value_mark.
1674         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1675         scoped_value_mark.
1676         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1677         gdbscm_wrap and scoped_value_mark.
1678         (gdbscm_value_to_string): Use xfree directly instead of a
1679         cleanup.  Move 'buffer' unique_ptr to TRY scope.
1680         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1681         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
1682         scoped_value_mark.
1683         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1684         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1685         scoped_value_mark.
1686         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1687         gdbscm_wrap.
1688
1689 2018-07-18  Tom de Vries  <[email protected]>
1690
1691         * findvar.c (default_read_var_value): Also resolve dynamic type for
1692         LOC_OPTIMIZED_OUT vars.
1693
1694 2018-07-18  Maciej W. Rozycki  <[email protected]>
1695
1696         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1697         decoding.
1698
1699 2018-07-17  Tom Tromey  <[email protected]>
1700
1701         * guile/scm-param.c (pascm_set_func, pascm_show_func)
1702         (compute_enum_list, pascm_set_param_value_x)
1703         (gdbscm_parameter_value): Update.
1704         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1705         (gdbscm_scm_to_host_string): Update.
1706         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1707         Update.
1708         * guile/scm-cmd.c (cmdscm_add_completion): Update.
1709         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1710         * guile/scm-string.c (gdbscm_scm_to_string): Return
1711         unique_xmalloc_ptr.
1712         (gdbscm_scm_to_host_string): Likewise.
1713
1714 2018-07-17  Tom Tromey  <[email protected]>
1715
1716         * guile/guile.c (gdbscm_eval_from_control_command): Update.
1717         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1718         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1719         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1720         unique_xmalloc_ptr.
1721
1722 2018-07-17  Tom Tromey  <[email protected]>
1723
1724         * guile/scm-param.c (pascm_signal_setshow_error): Update.
1725         * guile/guile-internal.h (gdbscm_exception_message_to_string):
1726         Update.
1727         * guile/scm-cmd.c (cmdscm_function): Update.
1728         * guile/scm-pretty-print.c
1729         (ppscm_print_exception_unless_memory_error): Update.
1730         * guile/scm-exception.c (gdbscm_exception_message_to_string):
1731         Return unique_xmalloc_ptr.
1732
1733 2018-07-17  Tom Tromey  <[email protected]>
1734
1735         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1736         Use string_printf.
1737
1738 2018-07-17  Jim Wilson  <[email protected]>
1739
1740         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1741         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
1742         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
1743         unecessary braces after EF_RISCV_RVC test.  Delete call to
1744         set_gdbarch_decr_pc_after_break.
1745
1746         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1747         RISCV_LAST_FP_REGNUM + 1.
1748         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1749
1750 2018-07-17  Tom Tromey  <[email protected]>
1751
1752         * configure.ac: Remove --disable-gdbcli.
1753         * configure: Rebuild.
1754         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1755         (SUBDIR_CLI_CFLAGS): Remove.
1756         (SFILES): Use SUBDIR_CLI_SRCS.
1757         (COMMON_OBS): Use SUBDIR_CLI_OBS.
1758
1759 2018-07-17  Tom Tromey  <[email protected]>
1760
1761         PR gdb/18624:
1762         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1763
1764 2018-07-16  Jim Wilson  <[email protected]>
1765
1766         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1767
1768 2018-07-16  Simon Marchi  <[email protected]>
1769
1770         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1771         variable.
1772         (libunwind_frame_sniffer): Likewise.
1773         (libunwind_frame_prev_register): Likewise.
1774         (libunwind_sigtramp_frame_sniffer): Likewise.
1775         * ia64-tdep.c (ia64_access_reg): Likewise.
1776         (ia64_access_rse_reg): Likewise.
1777         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1778         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1779
1780 2018-07-16  Simon Marchi  <[email protected]>
1781
1782         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1783
1784 2018-07-16  Simon Marchi  <[email protected]>
1785
1786         * remote-sim.c (gdbsim_target::close,
1787         gdbsim_target::mourn_inferior): Remove unused variables.
1788
1789 2018-07-16  Simon Marchi  <[email protected]>
1790
1791         * ia64-tdep.c (ktab_buf): New global.
1792         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1793         (get_kernel_table): Adjust.
1794
1795 2018-07-16  Tom Tromey  <[email protected]>
1796
1797         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1798         * dwarf2read.c (using_directives, new_symbol): Use
1799         outermost_context_p.
1800         * dbxread.c (process_one_symbol): Use outermost_context_p.
1801         * coffread.c (coff_symtab_read): Use outermost_context_p.
1802
1803 2018-07-16  Tom Tromey  <[email protected]>
1804
1805         * dwarf2read.c (using_directives, read_func_scope)
1806         (read_lexical_block_scope): Update.
1807         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1808         * buildsym.h (local_using_directives, global_using_directives):
1809         Don't declare.
1810         (get_local_using_directives, set_local_using_directives)
1811         (get_global_using_directives): Declare.
1812         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1813         m_global_using_directives>: New members.
1814         (finish_block_internal, prepare_for_building)
1815         (reset_symtab_globals, end_symtab_get_static_block)
1816         (push_context): Update.
1817         (get_local_using_directives, set_local_using_directives)
1818         (get_global_using_directives): New functions.
1819         (buildsym_init): Update.
1820
1821 2018-07-16  Tom Tromey  <[email protected]>
1822
1823         * xcoffread.c (xcoff_initial_scan): Don't call
1824         free_pending_blocks.
1825         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1826         * buildsym.h (class scoped_free_pendings): Add constructor.
1827         (free_pending_blocks): Don't declare.
1828         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1829         (free_pending_blocks): Now static.
1830
1831 2018-07-16  Tom Tromey  <[email protected]>
1832
1833         * buildsym.h (push_subfile, pop_subfile): Update declarations.
1834         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1835         member.
1836         (struct subfile_stack): Remove.
1837         (subfile_stack): Remove.
1838         (push_subfile, pop_subfile, buildsym_init): Update.
1839
1840 2018-07-16  Tom Tromey  <[email protected]>
1841
1842         * buildsym.c (push_subfile): Use gdb_assert.
1843         (pop_subfile): Use gdb_assert.
1844
1845 2018-07-16  Tom Tromey  <[email protected]>
1846
1847         * buildsym.h (merge_symbol_lists): Remove.
1848         * buildsym.c (merge_symbol_lists): Remove.
1849
1850 2018-07-16  Tom Tromey  <[email protected]>
1851
1852         * stabsread.c (scan_file_globals): Update comment.
1853         * stabsread.h (scan_file_globals): Move from buildsym.h.
1854         * buildsym.h (scan_file_globals): Move to stabsread.h.
1855
1856 2018-07-16  Tom Tromey  <[email protected]>
1857
1858         * xcoffread.c (xcoff_new_init): Update.
1859         * mipsread.c (mipscoff_new_init): Update.
1860         * mdebugread.c (mdebug_build_psymtabs): Update.
1861         * elfread.c (elf_new_init): Update.
1862         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1863         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1864         * buildsym.h (buildsym_new_init): Don't declare.
1865         * buildsym.c (buildsym_new_init): Remove.
1866
1867 2018-07-16  Tom Tromey  <[email protected]>
1868
1869         * stabsread.h (within_function): Move from buildsym.h.
1870         * stabsread.c (start_stabs): Clear within_function.
1871         * coffread.c (coff_start_symtab): Clear within_function.
1872         * buildsym.h (within_function): Move to stabsread.h.
1873         * buildsym.c (prepare_for_building): Update.
1874
1875 2018-07-16  Tom Tromey  <[email protected]>
1876
1877         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1878         * dwarf2read.c (dwarf2_start_symtab): Don't set
1879         processing_gcc_compilation.
1880         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1881
1882 2018-07-16  Tom Tromey  <[email protected]>
1883
1884         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1885         (next_symbol_text_func): Move from buildsym.h.
1886         * stabsread.c (hashname): Move from buildsym.c.
1887         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1888         (next_symbol_text_func, hashname): Move to stabsread.h.
1889         * buildsym.c: Don't include bcache.h
1890         (hashname): Move to stasbread.c.
1891
1892 2018-07-16  Tom Tromey  <[email protected]>
1893
1894         * buildsym.h (context_stack_size): Don't declare.
1895         * buildsym.c (context_stack_size): New global.
1896
1897 2018-07-16  Tom Tromey  <[email protected]>
1898
1899         * dbxread.c (processing_acc_compilation): New global.
1900         * buildsym.h (processing_acc_compilation): Don't declare.
1901
1902 2018-07-16  Tom Tromey  <[email protected]>
1903
1904         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1905         * dbxread.c (read_ofile_symtab): Update.
1906         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1907         * buildsym.h (last_source_start_addr): Remove.
1908         (set_last_source_start_addr, get_last_source_start_addr):
1909         Declare.
1910         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1911         parameter.
1912         (struct buildsym_compunit) <m_last_source_start_addr>: New
1913         member.
1914         (prepare_for_building): Remove start_addr parameter.
1915         (start_symtab, restart_symtab, end_symtab_get_static_block)
1916         (end_symtab_with_blockvector): Update.
1917         (set_last_source_start_addr, get_last_source_start_addr): New
1918         functions.
1919
1920 2018-07-16  Tom Tromey  <[email protected]>
1921
1922         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1923         member.
1924         (have_line_numbers): Remove.
1925         (record_line, prepare_for_building, end_symtab_get_static_block)
1926         (augment_type_symtab): Update.
1927
1928 2018-07-16  Tom Tromey  <[email protected]>
1929
1930         * buildsym.c (~buildsym_compunit): Free the macro table.
1931         (struct buildsym_compunit) <get_macro_table, release_macros>: New
1932         methods.
1933         <m_pending_macros>: New member.
1934         (pending_macros): Remove.
1935         (~scoped_free_pendings, get_macro_table, prepare_for_building)
1936         (reset_symtab_globals, end_symtab_get_static_block)
1937         (end_symtab_with_blockvector, augment_type_symtab)
1938         (buildsym_init): Update.
1939
1940 2018-07-16  Tom Tromey  <[email protected]>
1941
1942         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1943         parameter.
1944         (buildsym_compunit::set_last_source_file): New method.
1945         <m_last_source_file>: New member.
1946         (prepare_for_building): Remove "name" parameter.
1947         (start_symtab, restart_symtab, reset_symtab_globals): Update.
1948         (last_source_file): Remove.
1949         (set_last_source_file, get_last_source_file): Update.
1950
1951 2018-07-16  Tom Tromey  <[email protected]>
1952
1953         * buildsym.c (prepare_for_building): Add assert.
1954
1955 2018-07-16  Tom Tromey  <[email protected]>
1956
1957         * buildsym.c (~buildsym_compunit): Update.
1958         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1959         (start_subfile, patch_subfile_names)
1960         (end_symtab_with_blockvector): Update.
1961
1962 2018-07-16  Tom Tromey  <[email protected]>
1963
1964         * buildsym.c (struct buildsym_compunit): Add constructor,
1965         destructor, initializers.
1966         (start_buildsym_compunit): Remove.
1967         (free_buildsym_compunit): Use "delete".
1968         (start_symtab, restart_symtab): Use "new".
1969
1970 2018-07-13  Simon Marchi  <[email protected]>
1971
1972         * symfile.c (set_objfile_default_section_offset): Remove struct
1973         keyword.
1974
1975 2018-07-14  Stafford Horne  <[email protected]>
1976
1977         * (Responsible Maintainers): Add myself as or1k maintainer.
1978
1979 2018-07-13  Tom Tromey  <[email protected]>
1980
1981         * symfile.c (set_objfile_default_section_offset): Use extra braces
1982         around initializer.
1983
1984 2018-07-13  Andreas Arnez  <[email protected]>
1985
1986         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1987         non-branching basr.
1988
1989 2018-07-12  Philippe Waroquiers  <[email protected]>
1990
1991         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1992         unittests/cli-utils-selftests.c
1993         * unittests/cli-utils-selftests.c: New file.
1994
1995 2018-07-12  Philippe Waroquiers  <[email protected]>
1996
1997         * NEWS: Mention new commands. Mention change to 'thread apply'.
1998
1999 2018-07-12  Philippe Waroquiers  <[email protected]>
2000
2001         * thread.c (thr_try_catch_cmd): New function.
2002         (thread_apply_all_command): Handle qcs flags.
2003         (thread_apply_command): Handle qcs flags.
2004         (taas_command): New function.
2005         (tfaas_command): New function.
2006         (_initialize_thread): Update to setup the new commands 'taas
2007         and 'tfaas'. Change doc string for 'thread apply'.
2008
2009 2018-07-12  Philippe Waroquiers  <[email protected]>
2010
2011         * stack.c: (trailing_outermost_frame): New function, mostly
2012         extracted from backtrace_command_1.
2013         (leading_innermost_frame): New function.
2014         (backtrace_command_1): Update to call trailing_outermost_frame.
2015         (frame_apply_command_count): New function.
2016         (frame_apply_level_command): New function.
2017         (frame_apply_all_command): New function.
2018         (frame_apply_command): New function.
2019         (faas_command): New function.
2020         (frame_cmd_list): New variable.
2021         (_initialize_stack): Update to setup the new commands 'frame apply'
2022         and 'faas'.
2023
2024 2018-07-12  Philippe Waroquiers  <[email protected]>
2025
2026         * cli-utils.c (number_or_range_parser::get_number): Only handle
2027         numbers or convenience var as numbers.
2028         (parse_flags): New function.
2029         (parse_flags_qcs): New function.
2030         (number_or_range_parser::finished): Ensure parsing end is detected
2031         before end of string.
2032         * cli-utils.h (parse_flags): New function.
2033         (parse_flags_qcs): New function.
2034         (number_or_range_parser): Remove m_finished bool.
2035         (number_or_range_parser::skip_range): Set m_in_range to false.
2036
2037 2018-07-12  Sergio Durigan Junior  <[email protected]>
2038
2039         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2040         on Windows.
2041
2042 2018-07-11  Sergio Durigan Junior  <[email protected]>
2043             Jan Kratochvil  <[email protected]>
2044             Paul Fertser  <[email protected]>
2045             Tsutomu Seki  <[email protected]>
2046             Pedro Alves  <[email protected]>
2047
2048         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2049         'unittests/parse-connection-spec-selftests.c'.
2050         (COMMON_SFILES): Add 'common/netstuff.c'.
2051         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2052         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2053         * common/netstuff.c: New file.
2054         * common/netstuff.h: New file.
2055         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2056         (wait_for_connect): Update comment.  New parameter
2057         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2058         Use 'sock' directly instead of 'scb->fd'.
2059         (try_connect): New function, with code from 'net_open'.
2060         (net_open): Rewrite main loop to deal with multiple
2061         sockets/addresses.  Handle IPv6-style hostnames; implement
2062         support for IPv6 connections.
2063         * unittests/parse-connection-spec-selftests.c: New file.
2064
2065 2018-07-11  Pedro Alves  <[email protected]>
2066
2067         PR gdb/23377
2068         * remote.c (remote_target::remote_detach_pid): Call
2069         set_current_process.
2070
2071 2018-07-11  Pedro Alves  <[email protected]>
2072
2073         * h8300-tdep.c (h8300_gdbarch_init): Remove
2074         set_gdbarch_ecoff_reg_to_regnum calls.
2075
2076 2018-07-11  Sergio Durigan Junior  <[email protected]>
2077
2078         PR c++/23373
2079         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2080         offsets/sizes for static members of a class/struct.
2081
2082 2018-07-11  Alan Hayward  <[email protected]>
2083
2084         * target-descriptions.c (tdesc_register_bitsize): Rename.
2085         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2086         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2087         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2088
2089 2018-07-10  Tom Tromey  <[email protected]>
2090
2091         * breakpoint.c (moribund_locations): Now static and a
2092         std::vector.
2093         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2094         (build_bpstat_chain, update_global_location_list)
2095         (breakpoint_retire_moribund): Update.
2096         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2097         VEC.
2098
2099 2018-07-10  Andrew Burgess  <[email protected]>
2100
2101         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2102         (riscv_register_reggroup_p): Use new function, remove unneeded
2103         parenthesis.
2104         (riscv_push_dummy_call): Extend assert to compare against xlen or
2105         flen based on register type.
2106
2107 2018-07-10  Andrew Burgess  <[email protected]>
2108
2109         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2110
2111 2018-07-09  Andrew Burgess  <[email protected]>
2112
2113         * remote.c (show_hardware_watchpoint_limit): New function.
2114         (show_hardware_watchpoint_length_limit): New function.
2115         (show_hardware_breakpoint_limit): New function.
2116         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2117         where appropriate, update help text.
2118
2119 2018-07-09  Tom Tromey  <[email protected]>
2120
2121         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2122         (CLIBS): Don't mention NAT_CLIBS.
2123
2124 2018-07-09  Tom Tromey  <[email protected]>
2125
2126         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2127         (LIBGDB_OBS, clean mostlyclean): Update.
2128         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2129
2130 2018-07-09  Tom Tromey  <[email protected]>
2131
2132         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2133         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2134         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2135
2136 2018-07-09  Tom Tromey  <[email protected]>
2137
2138         * Makefile.in (ALLDEPFILES): Remove exec.c.
2139         (COMMON_OBS): Remove exec.o.
2140         (COMMON_SFILES): Add exec.c.
2141
2142 2018-07-09  Tom Tromey  <[email protected]>
2143
2144         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2145
2146 2018-07-09  Tom Tromey  <[email protected]>
2147
2148         * Makefile.in (clean mostlyclean): Remove stamp-version.
2149         (version.c): Depend on stamp-version.
2150         (stamp-version): New rule, from version.c rule.
2151
2152 2018-07-09  Tom Tromey  <[email protected]>
2153
2154         * Makefile.in (init.c): Depend on stamp-init.
2155         (stamp-init): New rule, from init.c rule.
2156         (clean mostlyclean): Remove stamp-init.
2157
2158 2018-07-09  Tom Tromey  <[email protected]>
2159
2160         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2161         SUBDIR_GCC_COMPILE_SRCS.
2162
2163 2018-07-09  Tom Tromey  <[email protected]>
2164
2165         * Makefile.in (init.c): Remove some unused sed rules.
2166
2167 2018-07-09  Tom Tromey  <[email protected]>
2168
2169         * Makefile.in (TSOBS): Remove.
2170         (INIT_FILES): Update.
2171         (LIBGDB_OBS): Update.
2172         (COMMON_SFILES): Add inflow.c.
2173         (SFILES): Remove inflow.c.
2174
2175 2018-07-07  Jan Kratochvil  <[email protected]>
2176
2177         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2178
2179 2018-07-07  Simon Marchi  <[email protected]>
2180
2181         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2182         get_saveloc_name, is_signal_frame_name, step_name,
2183         init_remote_name, create_addr_space_name,
2184         destroy_addr_space_name, search_unwind_table_name,
2185         find_dyn_list_name): Constify.
2186
2187 2018-07-05  Simon Marchi  <[email protected]>
2188
2189         * darwin-nat.c (darwin_pthread_kill): New function.
2190         (darwin_resume_thread): Use darwin_pthread_kill.
2191
2192 2018-07-05  Tom de Vries  <[email protected]>
2193
2194         * macroexp.c (macro_buffer) <operator=>: New member function.
2195
2196 2018-07-04  Tom Tromey  <[email protected]>
2197
2198         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2199
2200 2018-07-04  Simon Marchi  <[email protected]>
2201
2202         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2203         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2204         * maint.c: Likewise.
2205         * top.c: Likewise.
2206
2207 2018-07-04  Joel Brobecker  <[email protected]>
2208
2209         * NEWS: Create a new section for the next release branch.
2210         Rename the section of the current branch, now that it has
2211         been cut.
2212
2213 2018-07-04  Joel Brobecker  <[email protected]>
2214
2215         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2216         * version.in: Bump version to 8.2.50.DATE-git.
2217
2218 2018-07-04  Vyacheslav Barinov  <[email protected]>
2219             Pedro Alves  <[email protected]>
2220
2221         * linux-nat.c (linux_init_ptrace): Rename to ...
2222         (linux_init_ptrace_procfs): ... this.  Call
2223         linux_proc_init_warnings.
2224         (linux_nat_target::post_attach)
2225         (linux_nat_target::post_startup_inferior): Adjust.
2226         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2227         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2228
2229 2018-07-04  Tom de Vries  <[email protected]>
2230
2231         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2232         check ...
2233         (read_comp_unit_head): ... here.
2234
2235 2018-07-03  Tom Tromey  <[email protected]>
2236
2237         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2238         (stop_tracing, tstatus_command)
2239         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2240         (print_one_static_tracepoint_marker): Update.
2241         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2242         std::vector.
2243         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2244         VEC.
2245         (all_tracepoints, static_tracepoints_here): Return std::vector.
2246
2247 2018-07-03  Tom Tromey  <[email protected]>
2248
2249         * common/ptid.c (ptid_equal): Remove.
2250         * common/ptid.h (ptid_equal): Don't declare.
2251         * ada-tasks.c: Update.
2252         * breakpoint.c: Update.
2253         * common/agent.c: Update.
2254         * corelow.c: Update.
2255         * darwin-nat-info.c: Update.
2256         * darwin-nat.c: Update.
2257         * dcache.c: Update.
2258         * dtrace-probe.c: Update.
2259         * dummy-frame.c: Update.
2260         * fbsd-nat.c: Update.
2261         * frame.c: Update.
2262         * gdbthread.h: Update.
2263         * gnu-nat.c: Update.
2264         * go32-nat.c: Update.
2265         * inf-loop.c: Update.
2266         * inf-ptrace.c: Update.
2267         * infcall.c: Update.
2268         * infcmd.c: Update.
2269         * inflow.c: Update.
2270         * infrun.c: Update.
2271         * linux-fork.c: Update.
2272         * linux-nat.c: Update.
2273         * linux-thread-db.c: Update.
2274         * mi/mi-cmd-var.c: Update.
2275         * mi/mi-interp.c: Update.
2276         * mi/mi-main.c: Update.
2277         * nto-procfs.c: Update.
2278         * ppc-linux-tdep.c: Update.
2279         * procfs.c: Update.
2280         * python/py-inferior.c: Update.
2281         * python/py-record-btrace.c: Update.
2282         * python/py-record.c: Update.
2283         * ravenscar-thread.c: Update.
2284         * regcache.c: Update.
2285         * remote-sim.c: Update.
2286         * remote.c: Update.
2287         * sol-thread.c: Update.
2288         * solib.c: Update.
2289         * target.c: Update.
2290         * tui/tui-stack.c: Update.
2291         * varobj.c: Update.
2292         * windows-nat.c: Update.
2293         * windows-tdep.c: Update.
2294
2295 2018-07-03  Tom Tromey  <[email protected]>
2296
2297         * common/ptid.c (ptid_match): Remove.
2298         * common/ptid.h (ptid_match): Don't declare.
2299         * fbsd-nat.c: Update.
2300         * infcmd.c: Update.
2301         * infrun.c: Update.
2302         * linux-nat.c: Update.
2303         * record-btrace.c: Update.
2304         * regcache.c: Update.
2305         * remote.c: Update.
2306
2307 2018-07-03  Tom Tromey  <[email protected]>
2308
2309         * common/ptid.c (ptid_tid_p): Remove.
2310         * common/ptid.h (ptid_tid_p): Don't declare.
2311         * sol-thread.c: Update.
2312
2313 2018-07-03  Tom Tromey  <[email protected]>
2314
2315         * common/ptid.c (ptid_lwp_p): Remove.
2316         * common/ptid.h (ptid_lwp_p): Don't declare.
2317         * fbsd-nat.c: Update.
2318         * linux-nat.c: Update.
2319         * nat/linux-procfs.c: Update.
2320         * nat/x86-linux-dregs.c: Update.
2321         * sol-thread.c: Update.
2322
2323 2018-07-03  Tom Tromey  <[email protected]>
2324
2325         * common/ptid.c (ptid_is_pid): Remove.
2326         * common/ptid.h (ptid_is_pid): Don't declare.
2327         * infrun.c: Update.
2328         * linux-nat.c: Update.
2329         * mi/mi-interp.c: Update.
2330         * remote.c: Update.
2331         * thread.c: Update.
2332
2333 2018-07-03  Tom Tromey  <[email protected]>
2334
2335         * common/ptid.c (ptid_get_tid): Remove.
2336         * common/ptid.h (ptid_get_tid): Don't declare.
2337         * ada-tasks.c: Update.
2338         * aix-thread.c: Update.
2339         * bsd-uthread.c: Update.
2340         * darwin-nat.c: Update.
2341         * fbsd-nat.c: Update.
2342         * i386-darwin-nat.c: Update.
2343         * infrun.c: Update.
2344         * linux-tdep.c: Update.
2345         * nto-procfs.c: Update.
2346         * ppc-ravenscar-thread.c: Update.
2347         * python/py-infthread.c: Update.
2348         * ravenscar-thread.c: Update.
2349         * sol-thread.c: Update.
2350         * sparc-ravenscar-thread.c: Update.
2351         * windows-nat.c: Update.
2352
2353 2018-07-03  Tom Tromey  <[email protected]>
2354
2355         * common/ptid.c (ptid_get_lwp): Remove.
2356         * common/ptid.h (ptid_get_lwp): Don't declare.
2357         * aarch64-linux-nat.c: Update.
2358         * ada-tasks.c: Update.
2359         * aix-thread.c: Update.
2360         * amd64-linux-nat.c: Update.
2361         * arm-linux-nat.c: Update.
2362         * corelow.c: Update.
2363         * fbsd-nat.c: Update.
2364         * fbsd-tdep.c: Update.
2365         * gnu-nat.c: Update.
2366         * i386-cygwin-tdep.c: Update.
2367         * i386-gnu-nat.c: Update.
2368         * i386-linux-nat.c: Update.
2369         * ia64-linux-nat.c: Update.
2370         * inf-ptrace.c: Update.
2371         * infrun.c: Update.
2372         * linux-fork.c: Update.
2373         * linux-nat.c: Update.
2374         * linux-tdep.c: Update.
2375         * linux-thread-db.c: Update.
2376         * mips-linux-nat.c: Update.
2377         * nat/aarch64-linux-hw-point.c: Update.
2378         * nat/aarch64-linux.c: Update.
2379         * nat/linux-btrace.c: Update.
2380         * nat/linux-osdata.c: Update.
2381         * nat/linux-procfs.c: Update.
2382         * nat/x86-linux-dregs.c: Update.
2383         * obsd-nat.c: Update.
2384         * ppc-fbsd-nat.c: Update.
2385         * ppc-linux-nat.c: Update.
2386         * procfs.c: Update.
2387         * python/py-infthread.c: Update.
2388         * ravenscar-thread.c: Update.
2389         * remote.c: Update.
2390         * s390-linux-nat.c: Update.
2391         * sol-thread.c: Update.
2392         * sol2-tdep.c: Update.
2393         * spu-linux-nat.c: Update.
2394         * x86-linux-nat.c: Update.
2395         * xtensa-linux-nat.c: Update.
2396
2397 2018-07-03  Tom Tromey  <[email protected]>
2398
2399         * common/ptid.c (ptid_get_pid): Remove.
2400         * common/ptid.h (ptid_get_pid): Don't declare.
2401         * aarch64-linux-nat.c: Update.
2402         * ada-lang.c: Update.
2403         * aix-thread.c: Update.
2404         * alpha-bsd-nat.c: Update.
2405         * amd64-fbsd-nat.c: Update.
2406         * amd64-linux-nat.c: Update.
2407         * arm-linux-nat.c: Update.
2408         * arm-nbsd-nat.c: Update.
2409         * auxv.c: Update.
2410         * break-catch-syscall.c: Update.
2411         * breakpoint.c: Update.
2412         * bsd-uthread.c: Update.
2413         * corelow.c: Update.
2414         * ctf.c: Update.
2415         * darwin-nat.c: Update.
2416         * fbsd-nat.c: Update.
2417         * fbsd-tdep.c: Update.
2418         * gcore.c: Update.
2419         * gnu-nat.c: Update.
2420         * hppa-nbsd-nat.c: Update.
2421         * hppa-obsd-nat.c: Update.
2422         * i386-fbsd-nat.c: Update.
2423         * ia64-linux-nat.c: Update.
2424         * inf-ptrace.c: Update.
2425         * infcmd.c: Update.
2426         * inferior.c: Update.
2427         * inferior.h: Update.
2428         * inflow.c: Update.
2429         * infrun.c: Update.
2430         * linux-fork.c: Update.
2431         * linux-nat.c: Update.
2432         * linux-tdep.c: Update.
2433         * linux-thread-db.c: Update.
2434         * m68k-bsd-nat.c: Update.
2435         * mi/mi-interp.c: Update.
2436         * mi/mi-main.c: Update.
2437         * mips-linux-nat.c: Update.
2438         * mips-nbsd-nat.c: Update.
2439         * mips64-obsd-nat.c: Update.
2440         * nat/aarch64-linux-hw-point.c: Update.
2441         * nat/aarch64-linux.c: Update.
2442         * nat/linux-btrace.c: Update.
2443         * nat/linux-osdata.c: Update.
2444         * nat/linux-procfs.c: Update.
2445         * nat/x86-linux-dregs.c: Update.
2446         * nto-procfs.c: Update.
2447         * obsd-nat.c: Update.
2448         * ppc-linux-nat.c: Update.
2449         * ppc-nbsd-nat.c: Update.
2450         * ppc-obsd-nat.c: Update.
2451         * proc-service.c: Update.
2452         * procfs.c: Update.
2453         * python/py-inferior.c: Update.
2454         * python/py-infthread.c: Update.
2455         * ravenscar-thread.c: Update.
2456         * record.c: Update.
2457         * remote-sim.c: Update.
2458         * remote.c: Update.
2459         * rs6000-nat.c: Update.
2460         * s390-linux-nat.c: Update.
2461         * sh-nbsd-nat.c: Update.
2462         * sol-thread.c: Update.
2463         * sparc-nat.c: Update.
2464         * sparc64-tdep.c: Update.
2465         * spu-linux-nat.c: Update.
2466         * spu-tdep.c: Update.
2467         * target-debug.h: Update.
2468         * target.c: Update.
2469         * thread.c: Update.
2470         * tid-parse.c: Update.
2471         * tracefile-tfile.c: Update.
2472         * vax-bsd-nat.c: Update.
2473         * windows-nat.c: Update.
2474         * x86-linux-nat.c: Update.
2475         * x86-nat.c: Update.
2476
2477 2018-07-03  Tom Tromey  <[email protected]>
2478
2479         * common/ptid.c (pid_to_ptid): Remove.
2480         * common/ptid.h (pid_to_ptid): Don't declare.
2481         * aix-thread.c: Update.
2482         * arm-linux-nat.c: Update.
2483         * common/ptid.c: Update.
2484         * common/ptid.h: Update.
2485         * corelow.c: Update.
2486         * ctf.c: Update.
2487         * darwin-nat.c: Update.
2488         * fbsd-nat.c: Update.
2489         * fork-child.c: Update.
2490         * gnu-nat.c: Update.
2491         * go32-nat.c: Update.
2492         * inf-ptrace.c: Update.
2493         * infcmd.c: Update.
2494         * inferior.c: Update.
2495         * infrun.c: Update.
2496         * linux-fork.c: Update.
2497         * linux-nat.c: Update.
2498         * nat/aarch64-linux-hw-point.c: Update.
2499         * nat/fork-inferior.c: Update.
2500         * nat/x86-linux-dregs.c: Update.
2501         * nto-procfs.c: Update.
2502         * obsd-nat.c: Update.
2503         * procfs.c: Update.
2504         * progspace.c: Update.
2505         * remote.c: Update.
2506         * rs6000-nat.c: Update.
2507         * s390-linux-nat.c: Update.
2508         * sol-thread.c: Update.
2509         * spu-linux-nat.c: Update.
2510         * target.c: Update.
2511         * top.c: Update.
2512         * tracefile-tfile.c: Update.
2513         * windows-nat.c: Update.
2514
2515 2018-07-03  Tom Tromey  <[email protected]>
2516
2517         * common/ptid.h (ptid_build): Don't declare.
2518         * common/ptid.c (ptid_build): Remove.
2519         * aix-thread.c: Update.
2520         * bsd-kvm.c: Update.
2521         * bsd-uthread.c: Update.
2522         * common/agent.c: Update.
2523         * common/ptid.c: Update.
2524         * common/ptid.h: Update.
2525         * corelow.c: Update.
2526         * darwin-nat.c: Update.
2527         * fbsd-nat.c: Update.
2528         * gnu-nat.c: Update.
2529         * linux-fork.c: Update.
2530         * linux-nat.c: Update.
2531         * linux-thread-db.c: Update.
2532         * nat/linux-osdata.c: Update.
2533         * nat/linux-procfs.c: Update.
2534         * nto-procfs.c: Update.
2535         * obsd-nat.c: Update.
2536         * proc-service.c: Update.
2537         * procfs.c: Update.
2538         * ravenscar-thread.c: Update.
2539         * remote-sim.c: Update.
2540         * remote.c: Update.
2541         * sol-thread.c: Update.
2542         * target.c: Update.
2543         * windows-nat.c: Update.
2544
2545 2018-07-03  Tom Tromey  <[email protected]>
2546
2547         * infrun.c (follow_exec): Use exit_inferior_silent.
2548         * inferior.c (exit_inferior_num_silent): Remove.
2549         * inferior.h (exit_inferior_num_silent): Don't declare.
2550
2551 2018-07-03  Tom Tromey  <[email protected]>
2552
2553         PR cli/23340:
2554         * darwin-nat.c (darwin_attach_pid): Reset inferior and
2555         inferior_ptid on error.
2556
2557 2018-07-02  Maciej W. Rozycki  <[email protected]>
2558             Simon Marchi  <[email protected]>
2559
2560         PR tdep/8282
2561         * disasm.h (gdb_disassembler): Add
2562         `m_disassembler_options_holder'. member
2563         * disasm.c (get_all_disassembler_options): New function.
2564         (gdb_disassembler::gdb_disassembler): Use it.
2565         (gdb_buffered_insn_length_init_dis): Likewise.
2566         (gdb_buffered_insn_length): Adjust accordingly.
2567         (set_disassembler_options): Handle options with arguments.
2568         (show_disassembler_options_sfunc): Likewise.  Add a leading new
2569         line if showing options with descriptions.
2570         (disassembler_options_completer): Adapt to using the
2571         `disasm_options_and_args_t' structure.
2572         * mips-tdep.c (mips_disassembler_options): New variable.
2573         (mips_disassembler_options_o32): Likewise.
2574         (mips_disassembler_options_n32): Likewise.
2575         (mips_disassembler_options_n64): Likewise.
2576         (gdb_print_insn_mips): Don't set `disassembler_options'.
2577         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2578         functions.
2579         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2580         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
2581         `gdbarch_disassembler_options_implicit' and
2582         `gdbarch_valid_disassembler_options'.
2583         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2584         `disasm_options_and_args_t' structure.
2585         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2586         method.
2587         (valid_disassembler_options): Switch from `disasm_options_t' to
2588         the `disasm_options_and_args_t' structure.
2589         * NEWS: Document `set disassembler-options' support for the MIPS
2590         target.
2591         * gdbarch.h: Regenerate.
2592         * gdbarch.c: Regenerate.
2593
2594 2018-07-02  Sebastian Huber  <[email protected]>
2595
2596         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2597
2598 2018-06-29  Joel Brobecker  <[email protected]>
2599
2600         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2601         parameter in call to amd64_target_description.
2602         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2603         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2604         (amd64fbsd_init_abi): Likewise.
2605         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2606         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2607         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2608         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2609
2610 2018-06-29  Pedro Alves  <[email protected]>
2611
2612         * gdb/amd64-tdep.h (amd64_create_target_description): Add
2613         "segments" parameter.
2614         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2615         (_initialize_amd64_tdep): Update call to
2616         amd64_create_target_description.
2617         (amd64_target_description): Add "segments" parameter.  Adjust
2618         the implementation to use it.
2619         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2620         call to amd64_create_target_description.
2621         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2622         * gdb/arch/amd64.h (amd64_create_target_description): Add
2623         "segments" register.
2624         * gdb/arch/amd64.c (amd64_create_target_description): Add
2625         "segments" parameter.  Call create_feature_i386_64bit_segments
2626         only if SEGMENTS is true.
2627         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2628         call to amd64_create_target_description.
2629
2630 2018-06-29  Pedro Alves  <[email protected]>
2631
2632         * thread.c (thread_target_id_str): New, factored out from ...
2633         (print_thread_info_1): ... here.  Use it to compute the max
2634         "Target Id" column width.
2635
2636 2018-06-29  Pedro Alves  <[email protected]>
2637
2638         * remote.c (remote_target::extra_thread_info): Delete
2639         'display_buf' and 'n' locals.  from the cache, regardless of
2640         packet mechanims is in use.  Use cache for qThreadExtra and qP
2641         methods too.
2642
2643 2018-06-29  Pedro Alves  <[email protected]>
2644
2645         * blockframe.c (find_pc_sect_containing_function): New function.
2646         * breakpoint.c (print_breakpoint_location): Don't call
2647         find_pc_sect_function.
2648         * linespec.c (create_sals_line_offset): Record the location's
2649         symbol in the sal.
2650         * linespec.c (convert_address_location_to_sals): Fill in sal's
2651         symbol with find_pc_sect_containing_function.
2652         * symtab.c (find_function_start_sal): Rename to ...
2653         (find_function_start_sal_1): ... this.
2654         (find_function_start_sal): Reimplement as wrapper around
2655         find_function_start_sal_1, and use
2656         find_pc_sect_containing_function to fill in the sal's symbol.
2657         (find_function_start_sal(symbol*, bool)): Adjust.
2658         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2659         comments.
2660         (find_pc_sect_containing_function): Declare.
2661
2662 2018-06-29  Pedro Alves  <[email protected]>
2663
2664         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2665         true if the the location has no symbol.
2666
2667 2018-06-28  Tom Tromey  <[email protected]>
2668
2669         * NEWS: Mention --enable-codesign.
2670         * silent-rules.mk (ECHO_SIGN): New variable.
2671         * configure.ac: Add --enable-codesign.
2672         * configure: Rebuild.
2673         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2674         (gdb$(EXEEXT)): Optionally invoke codesign.
2675
2676 2018-06-28  Pedro Alves  <[email protected]>
2677
2678         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2679         comments.
2680         (switch_to_thread_no_regs): Adjust comment.
2681         * infcmd.c (stop_pc): Delete.
2682         (post_create_inferior, info_program_command): Replace references
2683         to stop_pc with references to thread_info->suspend.stop_pc.
2684         * inferior.h (stop_pc): Delete declaration.
2685         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2686         (handle_inferior_event_1, handle_signal_stop)
2687         (process_event_stop_test, keep_going_stepped_thread)
2688         (handle_step_into_function, handle_step_into_function_backward)
2689         (print_stop_location): Replace references to stop_pc with
2690         references to thread_info->suspend.stop_pc.
2691         (struct infcall_suspend_state) <stop_pc>: Delete field.
2692         (save_infcall_suspend_state, restore_infcall_suspend_state):
2693         Remove references to inf_stat->stop_pc.
2694         * linux-fork.c (fork_load_infrun_state): Likewise.
2695         * record-btrace.c (record_btrace_set_replay): Likewise.
2696         * record-full.c (record_full_goto_entry): Likewise.
2697         * remote.c (print_one_stopped_thread): Likewise.
2698         * target.c (target_resume): Extend comment.
2699         * thread.c (set_executing_thread): New.
2700         (set_executing): Use it.
2701         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2702         Remove references to stop_pc.
2703
2704 2018-06-28  Pedro Alves  <[email protected]>
2705
2706         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2707         Moving fetching stop_pc until after ecs->event_thread is refreshed.
2708
2709 2018-06-28  Tom Tromey  <[email protected]>
2710
2711         * coffread.c (coff_symfile_finish): Update.
2712         * xcoffread.c (xcoff_symfile_finish): Update.
2713         * elfread.c (elf_symfile_finish): Update.
2714         * symfile.h (dwarf2_free_objfile): Don't declare.
2715         * dwarf2read.c (_initialize_dwarf2_read): Use
2716         register_objfile_data_with_cleanup.
2717         (dwarf2_free_objfile): Now static.  Change signature.
2718
2719 2018-06-28  Petr Tesarik  <[email protected]>
2720
2721         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2722         option "-o" to add-symbol-file-load to add an offset to each
2723         section's load address.
2724         * symfile.c (set_objfile_default_section_offset): New function.
2725
2726 2018-06-28  Petr Tesarik  <[email protected]>
2727
2728         * symfile.c (add_symbol_file_command): Make sure that sections
2729         with the same name are sorted in the same order.
2730
2731 2018-06-28  Petr Tesarik  <[email protected]>
2732
2733         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2734         require the second argument.  If omitted, load sections at the
2735         addresses specified in the file.
2736
2737 2018-06-28  Petr Tesarik  <[email protected]>
2738
2739         * symfile.c (symbol_file_command, symbol_file_add_main_1)
2740         (_initialize_symfile): Add option "-o" to symbol-file to add an
2741         offset to each section of the symbol file.
2742
2743 2018-06-28  Petr Tesarik  <[email protected]>
2744
2745         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2746
2747 2018-06-27  Tom Tromey  <[email protected]>
2748
2749         * stack.c (_initialize_stack): Update "func" help text.
2750
2751 2018-06-27  Tom Tromey  <[email protected]>
2752
2753         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2754         std::vector.
2755         (unwind_infopy_str, pyuw_create_unwind_info)
2756         (unwind_infopy_add_saved_register, pyuw_sniffer)
2757         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2758         Update.
2759         (struct saved_reg): Add constructor.
2760         <value>: Now a gdbpy_ref<>.
2761
2762 2018-06-27  Tom Tromey  <[email protected]>
2763
2764         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2765
2766 2018-06-27  Simon Marchi  <[email protected]>
2767
2768         * gdb-gdb.py.in: Format using autopep8.
2769
2770 2018-06-27  Simon Marchi  <[email protected]>
2771
2772         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2773         (type_lookup_function): Recognize CORE_ADDR values.
2774
2775 2018-06-27  Simon Marchi  <[email protected]>
2776
2777         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2778         print tag_name.
2779
2780 2018-06-27  Simon Marchi  <[email protected]>
2781
2782         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2783         <__lt__>: Add.
2784
2785 2018-06-27  Simon Marchi  <[email protected]>
2786
2787         * gdb-gdb.py: Move to...
2788         * gdb-gdb.py.in: ... here.
2789         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2790         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2791         dependencies.
2792         (distclean): Remove gdb-gdb.py when cleaning.
2793         (gdb-gdb.py, gdb-gdb.gdb): New rules.
2794         * configure: Re-generate.
2795
2796 2018-06-27  Pedro Alves  <[email protected]>
2797
2798         * proc-service.c (get_ps_regcache): New.
2799         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2800         (ps_lsetfpregs): Use it.
2801
2802 2018-06-27  Omair Javaid  <[email protected]>
2803
2804         PR gdb/21695
2805         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2806         (dwarf_decode_lines_1): Adjust.
2807
2808 2018-06-27  Simon Marchi  <[email protected]>
2809
2810         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2811         override.
2812         <info_proc>: Likewise.
2813
2814 2018-06-26  Joel Brobecker  <[email protected]>
2815
2816         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2817         to windows_fetch_one_register, and only handle the case of
2818         fetching one register.  Move the code that reloads the context
2819         and iterates over all registers if R is negative to...
2820         (windows_nat_target::fetch_registers): ... here.
2821         (do_windows_store_inferior_registers): Rename to
2822         windows_store_one_register, and only handle the case of storing
2823         one register.  Move the code that handles the case where r is
2824         negative to...
2825         (windows_nat_target::store_registers) ... here.
2826
2827 2018-06-26  Tom Tromey  <[email protected]>
2828
2829         PR rust/22574:
2830         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2831         * rust-lang.c (rust_print_struct_def): Add podata parameter.
2832         Update.
2833         (rust_internal_print_type): Add podata parameter.
2834         (rust_print_type): Update.
2835
2836 2018-06-26  Tom Tromey  <[email protected]>
2837
2838         * typeprint.h (struct print_offset_data) <update, finish,
2839         maybe_print_hole>: New methods.
2840         <indentation>: New constant.
2841         * typeprint.c (print_offset_data::indentation): Define.
2842         (print_offset_data::maybe_print_hole, print_offset_data::update)
2843         (print_offset_data::finish): Move from c-typeprint.c and rename.
2844         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2845         (print_spaces_filtered_with_print_options): Update.
2846         (c_print_type_union_field_offset, maybe_print_hole)
2847         (c_print_type_struct_field_offset): Move to typeprint.c and
2848         rename.
2849         (c_type_print_base_struct_union): Update.
2850
2851 2018-06-25  Pedro Alves  <[email protected]>
2852
2853         * gdbthread.h (thread_info_ref, delete_thread)
2854         (delete_thread_silent, first_thread_of_inferior)
2855         (any_thread_of_inferior, switch_to_thread)
2856         (enable_thread_stack_temporaries)
2857         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2858         (get_last_thread_stack_temporary)
2859         (value_in_thread_stack_temporaries, can_access_registers_thread):
2860         Spell out "struct thread_info" instead of just "thread_info".
2861         * inferior.h (notice_new_inferior): Likewise.
2862
2863 2018-06-25  Pedro Alves  <[email protected]>
2864
2865         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2866         pass thread_info pointer to delete_thread.
2867         (windows_nat_target::detach): Pass inferior pointer to
2868         detach_inferior.
2869         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2870         delete_thread.
2871         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2872         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2873         and pass a thread_info pointer to delete_thread.
2874         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2875         pass thread_info pointer to delete_thread.
2876         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2877         delete_thread_silent call.
2878         * procfs.c (procfs_target::detach): Pass inferior pointer to
2879         detach_inferior.
2880         (procfs_target::wait): Pass thread_info pointer to delete_thread.
2881         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2882         delete_thread_silent call.
2883         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2884         pass thread_info pointer to delete_thread.
2885         (windows_nat_target::detach): Pass inferior pointer to
2886         delete_inferior.
2887
2888 2018-06-22  Alan Hayward  <[email protected]>
2889
2890         * regcache.c (readable_regcache::read_part): Fix asserts.
2891         (reg_buffer::raw_collect_part): New function.
2892         (regcache::write_part): Fix asserts.
2893         (reg_buffer::raw_supply_part): New function.
2894         (regcache::transfer_regset_register): New helper function.
2895         (regcache::transfer_regset): Call new functions.
2896         (regcache_supply_regset): Use gdb_byte*.
2897         (regcache::supply_regset): Likewise.
2898         (regcache_collect_regset): Likewise.
2899         (regcache::collect_regset): Likewise.
2900         * regcache.h (reg_buffer::raw_collect_part): New declaration.
2901         (reg_buffer::raw_supply_part): Likewise.
2902         (regcache::transfer_regset_register): Likewise.
2903         (regcache::transfer_regset): Use gdb_byte*.
2904
2905 2018-06-22  Alan Hayward  <[email protected]>
2906
2907         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2908
2909 2018-06-21  Pedro Alves  <[email protected]>
2910
2911         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2912         instead of a ptid_t.  All callers adjusted.
2913         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
2914         adjusted.
2915         (print_ada_task_info, display_current_task_id, task_command_1):
2916         Adjust.
2917         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2918         inferior_thread.
2919         (breakpoint_kind): Adjust.
2920         (remove_breakpoints_pid): Rename to ...
2921         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
2922         pointer.  All callers adjusted.
2923         (bpstat_clear_actions): Use inferior_thread.
2924         (get_bpstat_thread): New.
2925         (bpstat_do_actions): Use it.
2926         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2927         to take a thread_info pointer.  All callers adjusted.
2928         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2929         (breakpoint_re_set_thread): Use inferior_thread.
2930         * breakpoint.h (struct inferior): Forward declare.
2931         (bpstat_stop_status): Update.
2932         (remove_breakpoints_pid): Delete.
2933         (remove_breakpoints_inf): New.
2934         * bsd-uthread.c (bsd_uthread_target::wait)
2935         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2936         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2937         (maint_btrace_packet_history_cmd)
2938         (maint_btrace_clear_packet_history_cmd): Adjust.
2939         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2940         inferior_thread.
2941         * cli/cli-interp.c: Include "inferior.h".
2942         * common/refcounted-object.h (struct
2943         refcounted_object_ref_policy): New.
2944         * compile/compile-object-load.c: Include gdbthread.h.
2945         (store_regs): Use inferior_thread.
2946         * corelow.c (core_target::close): Use current_inferior.
2947         (core_target_open): Adjust to use first_thread_of_inferior and use
2948         the current inferior.
2949         * ctf.c (ctf_target::close): Adjust to use current_inferior.
2950         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2951         <thread>: ... this new field.  All references adjusted.
2952         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2953         Take a thread_info pointer instead of a ptid_t.
2954         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2955         (dummy_frame_discard, register_dummy_frame_dtor): Take a
2956         thread_info pointer instead of a ptid_t.
2957         * elfread.c: Include "inferior.h".
2958         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2959         Use inferior_thread.
2960         * eval.c (evaluate_subexp): Likewise.
2961         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2962         inferior_thread.
2963         * gdb_proc_service.h (struct thread_info): Forward declare.
2964         (struct ps_prochandle) <ptid>: Delete, replaced by ...
2965         <thread>: ... this new field.  All references adjusted.
2966         * gdbarch.h, gdbarch.c: Regenerate.
2967         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2968         'thread' parameter.  All implementations and callers adjusted.
2969         * gdbthread.h (thread_info) <set_running>: New method.
2970         (delete_thread, delete_thread_silent): Take a thread_info pointer
2971         instead of a ptid.
2972         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2973         (first_thread_of_process): Delete, replaced by ...
2974         (first_thread_of_inferior): ... this new function.  All callers
2975         adjusted.
2976         (any_live_thread_of_process): Delete, replaced by ...
2977         (any_live_thread_of_inferior): ... this new function.  All callers
2978         adjusted.
2979         (switch_to_thread, switch_to_no_thread): Declare.
2980         (is_executing): Delete.
2981         (enable_thread_stack_temporaries): Update comment.
2982         <enable_thread_stack_temporaries>: Take a thread_info pointer
2983         instead of a ptid_t.  Incref the thread.
2984         <~enable_thread_stack_temporaries>: Decref the thread.
2985         <m_ptid>: Delete
2986         <m_thr>: New.
2987         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2988         (get_last_thread_stack_temporary)
2989         (value_in_thread_stack_temporaries, can_access_registers_thread):
2990         Take a thread_info pointer instead of a ptid_t.  All callers
2991         adjusted.
2992         * infcall.c (get_call_return_value): Use inferior_thread.
2993         (run_inferior_call): Work with thread pointers instead of ptid_t.
2994         (call_function_by_hand_dummy): Work with thread pointers instead
2995         of ptid_t.  Use thread_info_ref.
2996         * infcmd.c (proceed_thread_callback): Access thread's state
2997         directly.
2998         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2999         access thread's state directly.
3000         (continue_command): Use inferior_thread.
3001         (info_program_command): Use find_thread_ptid and access thread
3002         state directly.
3003         (proceed_after_attach_callback): Use thread state directly.
3004         (notice_new_inferior): Take a thread_info pointer instead of a
3005         ptid_t.  All callers adjusted.
3006         (exit_inferior): Take an inferior pointer instead of a pid.  All
3007         callers adjusted.
3008         (exit_inferior_silent): New.
3009         (detach_inferior): Delete.
3010         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3011         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3012         (detach_inferior_command, kill_inferior_command): Use
3013         find_inferior_id instead of valid_gdb_inferior_id and
3014         gdb_inferior_id_to_pid.
3015         (inferior_command): Use inferior and thread pointers.
3016         * inferior.h (struct thread_info): Forward declare.
3017         (notice_new_inferior): Take a thread_info pointer instead of a
3018         ptid_t.  All callers adjusted.
3019         (detach_inferior): Delete declaration.
3020         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3021         instead of a pid.  All callers adjusted.
3022         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3023         (valid_gdb_inferior_id): Delete.
3024         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3025         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3026         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3027         ...
3028         <inf>: ... this new field.
3029         <step_ptid>: Delete, replaced by ...
3030         <step_thread>: ... this new field.
3031         (get_displaced_stepping_state): Take an inferior pointer instead
3032         of a pid.  All callers adjusted.
3033         (displaced_step_in_progress_any_inferior): Adjust.
3034         (displaced_step_in_progress_thread): Take a thread pointer instead
3035         of a ptid_t.  All callers adjusted.
3036         (displaced_step_in_progress, add_displaced_stepping_state): Take
3037         an inferior pointer instead of a pid.  All callers adjusted.
3038         (get_displaced_step_closure_by_addr): Adjust.
3039         (remove_displaced_stepping_state): Take an inferior pointer
3040         instead of a pid.  All callers adjusted.
3041         (displaced_step_prepare_throw, displaced_step_prepare)
3042         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3043         All callers adjusted.
3044         (start_step_over): Adjust.
3045         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3046         displaced step queue.
3047         (do_target_resume): Adjust.
3048         (fetch_inferior_event): Use inferior_thread.
3049         (context_switch, get_inferior_stop_soon): Take an
3050         execution_control_state pointer instead of a ptid_t.  All callers
3051         adjusted.
3052         (switch_to_thread_cleanup): Delete.
3053         (stop_all_threads): Use scoped_restore_current_thread.
3054         * inline-frame.c: Include "gdbthread.h".
3055         (inline_state) <inline_state>: Take a thread pointer instead of a
3056         ptid_t.  All callers adjusted.
3057         <ptid>: Delete, replaced by ...
3058         <thread>: ... this new field.
3059         (find_inline_frame_state): Take a thread pointer instead of a
3060         ptid_t.  All callers adjusted.
3061         (skip_inline_frames, step_into_inline_frame)
3062         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3063         pointer instead of a ptid_t.  All callers adjusted.
3064         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3065         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3066         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3067         pointers directly.
3068         * linux-nat.c (get_detach_signal): Likewise.
3069         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3070         (thread_db_notice_clone): Adjust.
3071         (thread_db_find_new_threads_silently)
3072         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3073         a thread pointer instead of a ptid_t.  All callers adjusted.
3074         * mi/mi-cmd-var.c: Include "inferior.h".
3075         (mi_cmd_var_update_iter): Update to use thread pointers.
3076         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3077         inferior directly.
3078         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3079         out to ...
3080         (mi_output_running): ... this new function.
3081         (mi_on_resume_1): Adjust to use it.
3082         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3083         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3084         directly.
3085         (interrupt_thread_callback): : Adjust to use thread and inferior
3086         pointers.
3087         * proc-service.c: Include "gdbthread.h".
3088         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3089         * progspace-and-thread.c: Include "inferior.h".
3090         * progspace.c: Include "inferior.h".
3091         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3092         hold a reference to an inferior_object.
3093         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3094         inferior_thread.
3095         * python/py-inferior.c (struct inferior_object): Give the type a
3096         tag name instead of a typedef.
3097         (python_on_normal_stop): No need to check if the current thread is
3098         listed.
3099         (inferior_to_inferior_object): Change return type to
3100         inferior_object.  All callers adjusted.
3101         (find_thread_object): Delete, bits factored out to ...
3102         (thread_to_thread_object): ... this new function.
3103         * python/py-infthread.c (create_thread_object): Use
3104         inferior_to_inferior_object.
3105         (thpy_is_stopped): Use thread pointer directly.
3106         (gdbpy_selected_thread): Use inferior_thread.
3107         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3108         field, replaced with ...
3109         <thread>: ... this new field.  All users adjusted.
3110         (btpy_insn_or_gap_new): Drop const.
3111         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3112         callers adjusted.
3113         * python/py-record.c: Include "gdbthread.h".
3114         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3115         a ptid_t.  All callers adjusted.
3116         (gdbpy_current_recording): Use inferior_thread.
3117         * python/py-record.h (recpy_record_object) <ptid>: Delete
3118         field, replaced with ...
3119         <thread>: ... this new field.  All users adjusted.
3120         (recpy_element_object) <ptid>: Delete
3121         field, replaced with ...
3122         <thread>: ... this new field.  All users adjusted.
3123         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3124         a ptid_t.  All callers adjusted.
3125         * python/py-threadevent.c: Include "gdbthread.h".
3126         (get_event_thread): Use thread_to_thread_object.
3127         * python/python-internal.h (struct inferior_object): Forward
3128         declare.
3129         (find_thread_object, find_inferior_object): Delete declarations.
3130         (thread_to_thread_object, inferior_to_inferior_object): New
3131         declarations.
3132         * record-btrace.c: Include "inferior.h".
3133         (require_btrace_thread): Use inferior_thread.
3134         (record_btrace_frame_sniffer)
3135         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3136         (get_thread_current_frame): Use scoped_restore_current_thread and
3137         switch_to_thread.
3138         (get_thread_current_frame): Use thread pointer directly.
3139         (record_btrace_replay_at_breakpoint): Use thread's inferior
3140         pointer directly.
3141         * record-full.c: Include "inferior.h".
3142         * regcache.c: Include "gdbthread.h".
3143         (get_thread_arch_regcache): Use the inferior's address space
3144         directly.
3145         (get_thread_regcache, registers_changed_thread): New.
3146         * regcache.h (get_thread_regcache(thread_info *thread)): New
3147         overload.
3148         (registers_changed_thread): New.
3149         (remote_target) <remote_detach_1>: Swap order of parameters.
3150         (remote_add_thread): <remote_add_thread>: Return the new thread.
3151         (get_remote_thread_info(ptid_t)): New overload.
3152         (remote_target::remote_notice_new_inferior): Use thread pointers
3153         directly.
3154         (remote_target::process_initial_stop_replies): Use
3155         thread_info::set_running.
3156         (remote_target::remote_detach_1, remote_target::detach)
3157         (extended_remote_target::detach): Adjust.
3158         * stack.c (frame_show_address): Use inferior_thread.
3159         * target-debug.h (target_debug_print_thread_info_pp): New.
3160         * target-delegates.c: Regenerate.
3161         * target.c (default_thread_address_space): Delete.
3162         (memory_xfer_partial_1): Use current_inferior.
3163         (target_detach): Use current_inferior.
3164         (target_thread_address_space): Delete.
3165         (generic_mourn_inferior): Use current_inferior.
3166         * target.h (struct target_ops) <thread_address_space>: Delete.
3167         (target_thread_address_space): Delete.
3168         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3169         pointers directly.
3170         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3171         thread pointer instead of a ptid_t.  Adjust all callers.
3172         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3173         (first_thread_of_process): Delete, replaced by ...
3174         (first_thread_of_inferior): ... this new function.  All callers
3175         adjusted.
3176         (any_thread_of_process): Rename to ...
3177         (any_thread_of_inferior): ... this, and take an inferior pointer.
3178         (any_live_thread_of_process): Rename to ...
3179         (any_live_thread_of_inferior): ... this, and take an inferior
3180         pointer.
3181         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3182         (value_in_thread_stack_temporaries)
3183         (get_last_thread_stack_temporary): Take a thread pointer instead
3184         of a ptid_t.  Adjust all callers.
3185         (thread_info::set_running): New.
3186         (validate_registers_access): Use inferior_thread.
3187         (can_access_registers_ptid): Rename to ...
3188         (can_access_registers_thread): ... this, and take a thread
3189         pointer.
3190         (print_thread_info_1): Adjust to compare thread pointers instead
3191         of ptids.
3192         (switch_to_no_thread, switch_to_thread): Make extern.
3193         (scoped_restore_current_thread::~scoped_restore_current_thread):
3194         Use m_thread pointer directly.
3195         (scoped_restore_current_thread::scoped_restore_current_thread):
3196         Use inferior_thread.
3197         (thread_command): Use thread pointer directly.
3198         (thread_num_make_value_helper): Use inferior_thread.
3199         * top.c (execute_command): Use inferior_thread.
3200         * tui/tui-interp.c: Include "inferior.h".
3201         * varobj.c (varobj_create): Use inferior_thread.
3202         (value_of_root_1): Use find_thread_global_id instead of
3203         global_thread_id_to_ptid.
3204
3205 2018-06-21  Alan Hayward  <[email protected]>
3206
3207         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3208         possible.
3209         (regcache::write_part): Likewise.
3210         (readable_regcache::cooked_read_part): Update comment.
3211         (readable_regcache::cooked_write_part): Likewise.
3212         * regcache.h: (readable_regcache::read_part): Likewise.
3213         (regcache::write_part): Likewise.
3214
3215 2018-06-21  Richard Bunt  <[email protected]>
3216             Dirk Schubert  <[email protected]>
3217
3218         * aarch64-linux-nat.c (post_attach): New.
3219         (aarch64_linux_nat_target::post_attach): Override post_attach to
3220         record the number of hardware debug registers.
3221
3222 2018-06-20  Tom Tromey  <[email protected]>
3223
3224         * python/py-param.c (add_setshow_generic): Make parameters const.
3225         (parmpy_init): Update.
3226
3227 2018-06-20  Simon Marchi  <[email protected]>
3228
3229         * regcache.h (regcache_cooked_read_ftype): Rename to...
3230         (register_read_ftype): ...this, change type to function_view.
3231         (class reg_buffer) <save>: Remove src parameter.
3232         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3233         parameter non-const in first overload.  Remove src parameter in
3234         second overload.
3235         * regcache.c (do_cooked_read): Remove.
3236         (readonly_detached_regcache::readonly_detached_regcache): Make
3237         parameter non-const, adjust call to other constructor.
3238         (reg_buffer::save): Remove src parameter.
3239         * frame.c (do_frame_register_read): Remove.
3240         (frame_save_as_regcache): Use lambda function.
3241         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3242         parameter to ppu2spu_data *.
3243         (ppu2spu_sniffer): Use lambda function.
3244
3245 2018-06-20  Simon Marchi  <[email protected]>
3246
3247         * record-full.c (record_full_target::insert_breakpoint): Remove
3248         "struct" keyword, add const.
3249
3250 2018-06-19  Simon Marchi  <[email protected]>
3251
3252         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3253         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3254         * configure.ac: Remove AC_PREREQ, add missing quoting.
3255         * gnulib/configure.ac: Modernize usage of
3256         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3257         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3258         (AUTOMAKE_VERSION): Bump to 1.15.1.
3259         * configure: Re-generate.
3260         * config.in: Re-generate.
3261         * aclocal.m4: Re-generate.
3262         * gnulib/aclocal.m4: Re-generate.
3263         * gnulib/config.in: Re-generate.
3264         * gnulib/configure: Re-generate.
3265         * gnulib/import/Makefile.in: Re-generate.
3266
3267 2018-06-19  Pedro Alves  <[email protected]>
3268
3269         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3270         (lookup_minimal_symbol_by_pc_section): ... here with
3271         gdb_assert_not_reached added.
3272
3273 2018-06-19  Pedro Alves  <[email protected]>
3274
3275         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3276         parameter with a block parameter.  Compare location's block symbol
3277         with the frame's block instead of addresses.
3278         (skip_inline_frames): Pass the current block instead of the
3279         frame's address.  Break out as soon as we determine the frame
3280         should not be skipped.
3281
3282 2018-06-18  Tom Tromey  <[email protected]>
3283
3284         * solib-aix.c (solib_aix_get_section_offsets): Return
3285         unique_xmalloc_ptr.
3286         (solib_aix_solib_create_inferior_hook): Update.
3287
3288 2018-06-18  Tom Tromey  <[email protected]>
3289
3290         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3291
3292 2018-06-18  Tom Tromey  <[email protected]>
3293
3294         * solib-frv.c (frv_relocate_main_executable): Use
3295         unique_xmalloc_ptr.
3296         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3297         unique_xmalloc_ptr.
3298
3299 2018-06-18  Tom Tromey  <[email protected]>
3300
3301         * objfiles.h (inhibit_section_map_updates): Update.
3302         (resume_section_map_updates, resume_section_map_updates_cleanup):
3303         Remove.
3304         * solib-svr4.c (svr4_handle_solib_event): Update.
3305         * objfiles.c (inhibit_section_map_updates): Return
3306         scoped_restore_tmpl<int>.
3307         (resume_section_map_updates, resume_section_map_updates_cleanup):
3308         Remove.
3309
3310 2018-06-18  Tom Tromey  <[email protected]>
3311
3312         * valprint.h (read_string): Update.
3313         * valprint.c (read_string): Change type of "buffer".
3314         (val_print_string): Update.
3315         * python/py-value.c (valpy_string): Update.
3316         * language.h (struct language_defn) <la_get_string>: Change
3317         type of "buffer".
3318         (default_get_string, c_get_string): Update.
3319         * language.c (default_get_string): Change type of "buffer".
3320         * guile/scm-value.c (gdbscm_value_to_string): Update.
3321         * c-lang.c (c_get_string): Change type of "buffer".
3322
3323 2018-06-18  Tom Tromey  <[email protected]>
3324
3325         * ser-mingw.c (struct pipe_state_destroyer): New.
3326         (pipe_state_up): New typedef.
3327         (cleanup_pipe_state): Remove.
3328         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3329
3330 2018-06-18  Tom Tromey  <[email protected]>
3331
3332         * rust-lang.h (rust_yyerror): Don't declare.
3333         * rust-lang.c (rust_language_defn): Update.
3334         * rust-exp.y (yyerror): Now static.
3335         * parse.c (parse_exp_in_context_1): Update.
3336         * p-lang.h (p_yyerror): Don't declare.
3337         * p-lang.c (p_language_defn): Update.
3338         * p-exp.y (yyerror): Now static.
3339         * opencl-lang.c (opencl_language_defn): Update.
3340         * objc-lang.c (objc_language_defn): Update.
3341         * m2-lang.h (m2_yyerror): Don't declare.
3342         * m2-lang.c (m2_language_defn): Update.
3343         * m2-exp.y (yyerror): Now static.
3344         * language.h (struct language_defn) <la_error>: Remove.
3345         * language.c (unk_lang_error): Remove.
3346         (unknown_language_defn, auto_language_defn): Remove.
3347         * go-lang.h (go_yyerror): Don't declare.
3348         * go-lang.c (go_language_defn): Update.
3349         * go-exp.y (yyerror): Now static.
3350         * f-lang.h (f_yyerror): Don't declare.
3351         * f-lang.c (f_language_defn): Update.
3352         * f-exp.y (yyerror): Now static.
3353         * d-lang.h (d_yyerror): Don't declare.
3354         * d-lang.c (d_language_defn): Update.
3355         * d-exp.y (yyerror): Now static.
3356         * c-lang.h (c_yyerror): Don't declare.
3357         * c-lang.c (c_language_defn, cplus_language_defn)
3358         (asm_language_defn, minimal_language_defn): Update.
3359         * c-exp.y (yyerror): Now static.
3360         * ada-lang.h (ada_yyerror): Don't declare.
3361         * ada-lang.c (ada_language_defn): Update.
3362         * ada-exp.y (yyerror): Now static.
3363
3364 2018-06-18  Alan Hayward  <[email protected]>
3365
3366         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3367         (store_sveregs_to_thread): Likewise.
3368         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3369         (aarch64_linux_store_inferior_registers): Likewise.
3370         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3371         function.
3372         (aarch64_sve_regs_copy_to_regcache): Likewise.
3373         (aarch64_sve_regs_copy_from_regcache): Likewise.
3374         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3375         declaration.
3376         (aarch64_sve_regs_copy_to_regcache): Likewise.
3377         (aarch64_sve_regs_copy_from_regcache): Likewise.
3378         (sve_context): Structure from Linux headers.
3379         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3380         (SVE_SIG_ZREG_SIZE): Likewise.
3381         (SVE_SIG_PREG_SIZE): Likewise.
3382         (SVE_SIG_FFR_SIZE): Likewise.
3383         (SVE_SIG_REGS_OFFSET): Likewise.
3384         (SVE_SIG_ZREGS_OFFSET): Likewise.
3385         (SVE_SIG_ZREG_OFFSET): Likewise.
3386         (SVE_SIG_ZREGS_SIZE): Likewise.
3387         (SVE_SIG_PREGS_OFFSET): Likewise.
3388         (SVE_SIG_PREG_OFFSET): Likewise.
3389         (SVE_SIG_PREGS_SIZE): Likewise.
3390         (SVE_SIG_FFR_OFFSET): Likewise.
3391         (SVE_SIG_REGS_SIZE): Likewise.
3392         (SVE_SIG_CONTEXT_SIZE): Likewise.
3393         (SVE_PT_REGS_MASK): Likewise.
3394         (SVE_PT_REGS_FPSIMD): Likewise.
3395         (SVE_PT_REGS_SVE): Likewise.
3396         (SVE_PT_VL_INHERIT): Likewise.
3397         (SVE_PT_VL_ONEXEC): Likewise.
3398         (SVE_PT_REGS_OFFSET): Likewise.
3399         (SVE_PT_FPSIMD_OFFSET): Likewise.
3400         (SVE_PT_FPSIMD_SIZE): Likewise.
3401         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3402         (SVE_PT_SVE_PREG_SIZE): Likewise.
3403         (SVE_PT_SVE_FFR_SIZE): Likewise.
3404         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3405         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3406         (__SVE_SIG_TO_PT): Likewise.
3407         (SVE_PT_SVE_OFFSET): Likewise.
3408         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3409         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3410         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3411         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3412         (SVE_PT_SVE_PREG_OFFSET): Likewise.
3413         (SVE_PT_SVE_PREGS_SIZE): Likewise.
3414         (SVE_PT_SVE_FFR_OFFSET): Likewise.
3415         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3416         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3417         (SVE_PT_SVE_SIZE): Likewise.
3418         (SVE_PT_SIZE): Likewise.
3419         (HAS_SVE_STATE): New define.
3420
3421 2018-06-18  Alan Hayward  <[email protected]>
3422
3423         * nat/aarch64-sve-linux-sigcontext.h: New file.
3424         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3425         new files.
3426         (SVE_VQ_MIN): Likewise.
3427         (SVE_VQ_MAX): Likewise.
3428         (SVE_VL_MIN): Likewise.
3429         (SVE_VL_MAX): Likewise.
3430         (SVE_NUM_ZREGS): Likewise.
3431         (SVE_NUM_PREGS): Likewise.
3432         (sve_vl_valid): Likewise.
3433         (struct user_sve_header): Likewise.
3434
3435 2018-06-16  Andrew Burgess  <[email protected]>
3436             Richard Bunt <[email protected]>
3437
3438         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3439         was requested by GDB.
3440
3441 2018-06-15  Tom de Vries  <[email protected]>
3442
3443         * MAINTAINERS (Write After Approval): Add Tom de Vries.
3444
3445 2018-06-14  Simon Marchi  <[email protected]>
3446
3447         * gnulib/update-gnulib.sh: Print expected versions of
3448         autoconf/aclocal.
3449
3450 2018-06-14  Simon Marchi  <[email protected]>
3451
3452         * arch-utils.c (default_type_align): Use type_length_units.
3453         * gdbtypes.c (type_align): Use type_length_units.
3454
3455 2018-06-14  Philippe Waroquiers  <[email protected]>
3456
3457         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3458         of 'define' command.
3459
3460 2018-06-14  Tom de Vries  <[email protected]>
3461
3462         PR cli/22573
3463         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3464         get_no_prettyformat_print_options.
3465
3466 2018-06-13  Simon Marchi  <[email protected]>
3467
3468         * sparc-nat.h: Include target.h.
3469         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3470         <fetch_registers>: Remove this argument in function call.
3471         <store_registers>: Remove this argument in function call, remove
3472         extra semicolon.
3473         <low_forget_process>: Call sparc64_forget_process instead of
3474         sparc_forget_process.
3475
3476 2018-06-13  Rainer Orth  <[email protected]>
3477
3478         * procfs.c (_initialize_procfs): Use add_inf_child_target.
3479         (procfs_target::make_corefile_notes): Adjust to new
3480         target_read_alloc return type.
3481
3482 2018-06-12  Andrew Burgess  <[email protected]>
3483             Stephen Roberts  <[email protected]>
3484
3485         PR gdb/22882
3486         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3487         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3488         Move should_notify_stop local into more inner scope.
3489
3490 2018-06-12  Andrew Burgess  <[email protected]>
3491             Stephen Roberts  <[email protected]>
3492
3493         PR gdb/22882
3494         * infrun.c (resume_1): Add call to mark_async_event_handler.
3495
3496 2018-06-12  Andrew Burgess  <[email protected]>
3497
3498         * infrun.c (do_target_wait): Change old version of $pc printed.
3499
3500 2018-06-11  Simon Marchi  <[email protected]>
3501
3502         * dwarf2read.c (read_index_from_section): Rename to...
3503         (read_gdb_index_from_section): ... this, update all callers.
3504         (dwarf2_read_index): Rename to...
3505         (dwarf2_read_gdb_index): ... this, update all callers.
3506
3507 2018-06-11  John David Anglin  <[email protected]>
3508
3509         * gdb/hppa-linux-nat.c
3510         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3511         hppa_linux_nat_target::fetch_registers.
3512
3513 2018-06-11  Alan Hayward  <[email protected]>
3514
3515         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3516         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3517         (AARCH64_DWARF_SVE_FFR): Likewise.
3518         (AARCH64_DWARF_SVE_P0): Likewise.
3519         (AARCH64_DWARF_SVE_Z0): Likewise.
3520
3521 2018-06-11  Alan Hayward  <[email protected]>
3522
3523         * common/common-regcache.h (raw_compare): New function.
3524         * regcache.c (regcache::raw_compare): Likewise.
3525         * regcache.h (regcache::raw_compare): New declaration.
3526
3527 2018-06-11  Alan Hayward  <[email protected]>
3528
3529         * common/common-regcache.h (reg_buffer_common): New structure.
3530         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3531         (reg_buffer::raw_supply): Likewise.
3532         (reg_buffer::raw_supply_integer): Likewise.
3533         (reg_buffer::raw_supply_zeroed): Likewise.
3534         (reg_buffer::raw_collect): Likewise.
3535         (reg_buffer::raw_collect_integer): Likewise.
3536         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3537         (reg_buffer::raw_supply): Likewise.
3538         (reg_buffer::raw_supply_integer): Likewise.
3539         (reg_buffer::raw_supply_zeroed): Likewise.
3540         (reg_buffer::raw_collect): Likewise.
3541         (reg_buffer::raw_collect_integer): Likewise.
3542
3543 2018-06-10  Tom Tromey  <[email protected]>
3544
3545         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
3546         (class remote_state) <stop_reply_queue>: Now std::vector.
3547         (remote_state::~remote_state)
3548         (remote_target::stop_reply_queue_length): Update.
3549         (struct queue_iter_param, remove_child_of_pending_fork)
3550         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3551         (check_pending_event_prevents_wildcard_vcont_callback)
3552         (remove_stop_reply_for_inferior)
3553         (remove_stop_reply_of_remote_state)
3554         (remote_notif_remove_once_on_match)
3555         (stop_reply_match_ptid_and_ws)
3556         (remote_kill_child_of_pending_fork): Remove.
3557         (remote_target::remove_new_fork_children)
3558         (remote_target::check_pending_events_prevent_wildcard_vcont)
3559         (remote_target::discard_pending_stop_replies)
3560         (remote_target::discard_pending_stop_replies_in_queue)
3561         (remote_target::remote_notif_remove_queued_reply)
3562         (remote_target::queued_stop_reply)
3563         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3564         (remote_target::wait, remote_target::kill_new_fork_children)
3565         (remote_target::async): Update.
3566
3567 2018-06-10  Tom Tromey  <[email protected]>
3568
3569         * record-full.c (record_full_arch_list_cleanups): Remove.
3570         (record_full_message): Use try/catch.
3571         (record_full_wait_cleanups): Remove.
3572         (record_full_wait_1): Use try/catch.
3573         (record_full_restore): Likewise.
3574
3575 2018-06-10  Tom Tromey  <[email protected]>
3576
3577         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
3578         declare VEC.  Add constructor.
3579         <in_target_beneath>: Now bool.
3580         (record_full_breakpoints): Now a std::vector, static.
3581         (record_full_sync_record_breakpoints)
3582         (record_full_init_record_breakpoints)
3583         (record_full_target::insert_breakpoint)
3584         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
3585
3586 2018-06-10  Simon Marchi  <[email protected]>
3587
3588         * dwarf2read.c (process_cu_includes): Remove struct keyword.
3589         * serial.c (serial_interface_lookup): Remove struct keyword.
3590
3591 2018-06-10  Tom Tromey  <[email protected]>
3592
3593         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3594         method.
3595         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3596         a method.
3597         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3598         method.
3599         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3600         "beneath" as a method.
3601         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3602         Use "beneath" as a method.
3603
3604 2018-06-10  Tom Tromey  <[email protected]>
3605
3606         * tracefile.c (struct trace_file_writer_deleter): New.
3607         <operator()>: Rename from trace_file_writer_xfree.
3608         (trace_file_writer_up): New typedef.
3609         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3610
3611 2018-06-09  Simon Marchi  <[email protected]>
3612
3613         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3614         <m_registers, m_register_status>: Change type to
3615         std::unique_ptr.
3616         * regcache.c (reg_buffer::reg_buffer): Use new instead of
3617         XCNEWVEC.
3618
3619 2018-06-09  Simon Marchi  <[email protected]>
3620
3621         * common/common-regcache.h (enum register_status): Add
3622         underlying type "signed char".
3623         * regcache.h (reg_buffer) <m_register_status>: Change type to
3624         register_status *.
3625         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3626         register_status instead of signed char.
3627         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3628         (reg_buffer::get_register_status): Remove cast.
3629         (readable_regcache::raw_read): Remove cast.
3630         (readable_regcache::cooked_read): Remove cast.
3631
3632 2018-06-09  Tom Tromey  <[email protected]>
3633
3634         * source.c (reverse_search_command, forward_search_command): Use
3635         scoped_fd.
3636
3637 2018-06-09  Tom Tromey  <[email protected]>
3638
3639         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
3640         (serial_ops_list): Now static, std::vector.
3641         (serial_interface_lookup, serial_add_interface): Update.
3642
3643 2018-06-09  Tom Tromey  <[email protected]>
3644
3645         * dwarf2read.c (process_cu_includes): Update.
3646         (process_full_comp_unit): Update.
3647         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3648         std::vector.
3649
3650 2018-06-08  Paul Koning  <[email protected]>
3651
3652         PR gdb/23252
3653
3654         * python/python.c (do_start_initialization):
3655         Avoid call to internal Python API.
3656         (init__gdb_module): New function.
3657
3658 2018-06-08  Gary Benson <[email protected]>
3659
3660         * linux-thread-db.c (valprint.h): New include.
3661         (struct check_thread_db_info): New structure.
3662         (check_thread_db_on_load, tdb_testinfo): New static globals.
3663         (check_thread_db, check_thread_db_callback): New functions.
3664         (try_thread_db_load_1): Run integrity checks if requested.
3665         (maintenance_check_libthread_db): New function.
3666         (_initialize_thread_db): Register "maint check libthread-db"
3667         and "maint set/show check-libthread-db".
3668         * NEWS: Mention the above new commands.
3669
3670 2018-06-08  Tom Tromey  <[email protected]>
3671
3672         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3673         now a method.
3674
3675 2018-06-08  Tom Tromey  <[email protected]>
3676
3677         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3678
3679 2018-06-08  Tom Tromey  <[email protected]>
3680
3681         * common/btrace-common.h (struct btrace_data): Add constructor,
3682         destructor, move assignment operator.
3683         <empty, clear, fini>: New methods.
3684         <format>: Initialize.
3685         (btrace_data_init, btrace_data_fini, btrace_data_clear)
3686         (btrace_data_empty): Don't declare.
3687         * common/btrace-common.c (btrace_data_init): Remove.
3688         (btrace_data::fini): Rename from btrace_data_fini.
3689         (btrace_data::empty): Rename from btrace_data_empty.
3690         (btrace_data::clear): Rename from btrace_data_clear.  Return
3691         bool.
3692         * btrace.h (make_cleanup_btrace_data): Don't declare.
3693         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3694         (parse_xml_btrace): Update.
3695         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3696         (maint_btrace_clear_packet_history_cmd): Update.
3697
3698 2018-06-07  Pedro Alves  <[email protected]>
3699
3700         * target.h (target_ops) <beneath>: Now a method.  All references
3701         updated.
3702         (class target_stack): New.
3703         * target.c (g_target_stack): New.
3704         (g_current_top_target): Delete.
3705         (current_top_target): Get the top target out of g_target_stack.
3706         (target_stack::push, target_stack::unpush): New.
3707         (push_target, unpush_target): Reimplement.
3708         (target_is_pushed): Reimplement in terms of g_target_stack.
3709         (target_ops::beneath, target_stack::find_beneath): New.
3710
3711 2018-06-07  Pedro Alves  <[email protected]>
3712
3713         * target.h (find_target_beneath): Delete declaration.
3714         * target.c (find_target_beneath): Delete definition.
3715         * aix-thread.c: All callers of find_target_beneath adjusted to
3716         call target_ops::beneath instead.
3717         * bsd-uthread.c: Likewise.
3718         * linux-thread-db.c: Likewise.
3719         * ravenscar-thread.c: Likewise.
3720         * sol-thread.c: Likewise.
3721         * spu-multiarch.c: Likewise.
3722
3723 2018-06-07  Pedro Alves  <[email protected]>
3724
3725         * target.h (target_ops) <beneath>: Now a method.  All references
3726         updated.
3727         (target_ops) <m_beneath>: New.
3728         * target.c (target_ops::beneath): New.
3729         * corelow.c: Adjust all references to target_ops::beneath.
3730         * linux-thread-db.c: Likewise.
3731         * make-target-delegates: Likewise.
3732         * record-btrace.c: Likewise.
3733         * record-full.c: Likewise.
3734         * remote.c: Likewise.
3735         * target.c: Likewise.
3736         * target-delegates.c: Regenerate.
3737
3738 2018-06-07  Pedro Alves  <[email protected]>
3739
3740         * target.h (target_stack): Delete.
3741         (current_top_target): Declare function.
3742         * target.c (target_stack): Delete.
3743         (g_current_top_target): New.
3744         (current_top_target): New function.
3745         * auxv.c: Use current_top_target instead of target_stack
3746         throughout.
3747         * avr-tdep.c: Likewise.
3748         * breakpoint.c: Likewise.
3749         * corefile.c: Likewise.
3750         * elfread.c: Likewise.
3751         * eval.c: Likewise.
3752         * exceptions.c: Likewise.
3753         * frame.c: Likewise.
3754         * gdbarch-selftests.c: Likewise.
3755         * gnu-v3-abi.c: Likewise.
3756         * ia64-tdep.c: Likewise.
3757         * ia64-vms-tdep.c: Likewise.
3758         * infcall.c: Likewise.
3759         * infcmd.c: Likewise.
3760         * infrun.c: Likewise.
3761         * linespec.c: Likewise.
3762         * linux-tdep.c: Likewise.
3763         * minsyms.c: Likewise.
3764         * ppc-linux-nat.c: Likewise.
3765         * ppc-linux-tdep.c: Likewise.
3766         * procfs.c: Likewise.
3767         * regcache.c: Likewise.
3768         * remote.c: Likewise.
3769         * rs6000-tdep.c: Likewise.
3770         * s390-linux-nat.c: Likewise.
3771         * s390-tdep.c: Likewise.
3772         * solib-aix.c: Likewise.
3773         * solib-darwin.c: Likewise.
3774         * solib-dsbt.c: Likewise.
3775         * solib-spu.c: Likewise.
3776         * solib-svr4.c: Likewise.
3777         * solib-target.c: Likewise.
3778         * sparc-tdep.c: Likewise.
3779         * sparc64-tdep.c: Likewise.
3780         * spu-tdep.c: Likewise.
3781         * symfile.c: Likewise.
3782         * symtab.c: Likewise.
3783         * target-descriptions.c: Likewise.
3784         * target-memory.c: Likewise.
3785         * target.c: Likewise.
3786         * target.h: Likewise.
3787         * tracefile-tfile.c: Likewise.
3788         * tracepoint.c: Likewise.
3789         * valops.c: Likewise.
3790         * valprint.c: Likewise.
3791         * value.c: Likewise.
3792         * windows-tdep.c: Likewise.
3793         * mi/mi-main.c: Likewise.
3794
3795 2018-06-07  Tom Tromey  <[email protected]>
3796
3797         * valprint.h (build_address_symbolic): Declare.
3798         * printcmd.c (print_address_symbolic): Update.
3799         (build_address_symbolic): Change "name" and "filename" to
3800         std::string.
3801         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3802         Update.
3803         * defs.h (build_address_symbolic): Remove declaration.
3804
3805 2018-06-07  Alan Hayward  <[email protected]>
3806
3807         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3808         (aarch64_vnv_type): Add function.
3809         (aarch64_pseudo_register_name): Add V regs for SVE.
3810         (aarch64_pseudo_register_type): Likewise.
3811         (aarch64_pseudo_register_reggroup_p): Likewise.
3812         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3813         (aarch64_pseudo_read_value): Add V regs for SVE.
3814         (aarch64_pseudo_write_2): Use V0 offset for SVE
3815         (aarch64_pseudo_write): Add V regs for SVE.
3816         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3817
3818 2018-06-06  Sergio Durigan Junior  <[email protected]>
3819
3820         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3821         (sve_vl_from_vq): Likewise.
3822
3823 2018-06-05  Tom Tromey  <[email protected]>
3824
3825         * cli/cli-cmds.c (show_version): Update.
3826         * top.c (print_gdb_version): Add "interactive" parameter.
3827         Update.
3828         * main.c (captured_main_1): Update.
3829         * top.h (print_gdb_version): Add "interactive" parameter and a
3830         comment.
3831
3832 2018-06-05  David Malcolm  <[email protected]>
3833
3834         * common/enum-flags.h: Add trailing semicolon to example in
3835         comment.
3836
3837 2018-06-05  Tom Tromey  <[email protected]>
3838
3839         PR cli/12326:
3840         * NEWS: Add entry about pager.
3841         * utils.c (pagination_disabled_for_command): New global.
3842         (prompt_for_continue): Allow "c" response to prompt.
3843         (reinitialize_more_filter): Clear
3844         pagination_disabled_for_command.
3845         (fputs_maybe_filtered): Check pagination_disabled_for_command.
3846
3847 2018-06-04  Tom Tromey  <[email protected]>
3848
3849         * ada-lang.h (ada_lookup_symbol_list): Update.
3850         * ada-lang.c (resolve_subexp): Update.
3851         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
3852         parameter.
3853         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3854         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3855         results parameter to std::vector.
3856         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3857         Update.
3858         * ada-exp.y (block_lookup): Update.
3859         (select_possible_type_sym): Change type of syms.  Remove nsyms
3860         parameter.
3861         (write_var_or_type, write_name_assoc): Update.
3862
3863 2018-06-04  Joel Brobecker  <[email protected]>
3864
3865         * windows-nat.c (windows_nat_target::xfer_partial): Return
3866         TARGET_XFER_E_IO if we need to delegate to the target beneath
3867         but BENEATH is NULL.
3868
3869 2018-06-04  Simon Marchi  <[email protected]>
3870
3871         * Makefile.in (config.status): Add configure.nat as a
3872         dependency.
3873
3874 2018-06-04  Tom Tromey  <[email protected]>
3875
3876         * cp-name-parser.y (cpname_state): Add method declarations.
3877         (HANDLE_QUAL): Update.
3878         (cpname_state::d_grab, cpname_state::fill_comp)
3879         (cpname_state::make_operator, cpname_state::make_dtor)
3880         (cpname_state::make_builtin_type, cpname_state::make_name)
3881         (cpname_state::d_qualify, cpname_state::d_int_type)
3882         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3883         (%union): Move earlier.
3884
3885 2018-06-04  Alan Hayward  <[email protected]>
3886
3887         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3888
3889 2018-06-04  Alan Hayward  <[email protected]>
3890
3891         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3892         (aarch64_pseudo_write_1): Likewise.
3893         (aarch64_pseudo_read_value): Use helper.
3894         (aarch64_pseudo_write): Likewise.
3895
3896 2018-06-04  Pedro Alves  <[email protected]>
3897
3898         * darwin-nat.c (darwin_ops): Delete.
3899         (darwin_attach_pid): Use get_native_target.
3900
3901 2018-06-04  Alan Hayward  <[email protected]>
3902
3903         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3904         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3905
3906 2018-06-04  Alan Hayward  <[email protected]>
3907
3908         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3909         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3910         (aarch64_gdbarch_init): Check for SVE.
3911         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3912
3913 2018-06-04  Alan Hayward  <[email protected]>
3914
3915         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3916         * aarch64-tdep.h (aarch64_read_description): Likewise.
3917         * arch/aarch64.c (aarch64_create_target_description): Likewise.
3918         * arch/aarch64.h (aarch64_create_target_description): Likewise.
3919         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3920         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3921         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3922
3923 2018-06-02  Simon Marchi  <[email protected]>
3924
3925         * value.c (value_fetch_lazy_bitfield): New.
3926         (value_fetch_lazy_memory): New.
3927         (value_fetch_lazy_register): New.
3928         (value_fetch_lazy): Factor out to smaller functions.
3929
3930 2018-06-01  Tom Tromey  <[email protected]>
3931
3932         * cp-name-parser.y (backslashable, represented): Now const.
3933
3934 2018-06-01  Tom Tromey  <[email protected]>
3935
3936         * cp-name-parser.y: Include parser-defs.h.
3937         (parser_fprintf): Remove declaration.
3938
3939 2018-06-01  Tom Tromey  <[email protected]>
3940
3941         * cp-name-parser.y: Use %pure-parser, %lex-param, and
3942         %parse-param.
3943         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3944         (global_result): Remove globals.
3945         (struct cpname_state): New.
3946         (yyparse): Don't declare.
3947         (yylex, yyerror): Move declarations after %union.
3948         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3949         (make_name): Add state parameter.
3950         Update all callers.
3951         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3952         parameter.
3953         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3954         Update.
3955         (yylex): Add lvalp, state parameters.
3956         (yyerror): Add state parameter.
3957         (cp_demangled_name_to_comp): Update.
3958
3959 2018-06-01  Tom Tromey  <[email protected]>
3960
3961         * cp-name-parser.y (parser_fprintf): Declare.
3962         (GDB_YY_REMAP_PREFIX): Define.
3963         Include yy-remap.h.  Don't redefine yy* identifiers.
3964
3965 2018-06-01  Tom Tromey  <[email protected]>
3966
3967         * python/py-type.c (typy_legacy_template_argument): Update.
3968         * cp-support.h (cp_demangled_name_to_comp): Update.
3969         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3970         parameter to be a "std::string *".
3971         (main): Update.
3972
3973 2018-06-01  H.J. Lu  <[email protected]>
3974
3975         * ada-lex.l: Include "diagnostics.h" instead of
3976         "common/diagnostics.h".
3977         * unittests/environ-selftests.c: Likewise.
3978         * common/diagnostics.h: Moved to ../include.
3979
3980 2018-06-01  Joel Brobecker  <[email protected]>
3981
3982         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3983         to language_mode_manual while calling breakpoint_re_set_one.
3984
3985 2018-06-01  Tom Tromey  <[email protected]>
3986
3987         * valops.c (value_cast_structs, destructor_name_p): Update.
3988         * symtab.c (gdb_mangle_name): Update.
3989         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3990         Update.
3991         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3992         (pascal_object_print_value_fields, pascal_object_print_value):
3993         Update.
3994         * p-typeprint.c (pascal_type_print_derivation_info): Update.
3995         * linespec.c (find_methods): Update.
3996         * gdbtypes.h (type_name_no_tag): Remove.
3997         (type_name_or_error): Rename from type_name_no_tag_or_error.
3998         * gdbtypes.c (type_name_no_tag): Remove.
3999         (type_name_or_error): Rename from type_name_no_tag_or_error.
4000         (lookup_struct_elt_type, check_typedef): Update.
4001         * expprint.c (print_subexp_standard): Update.
4002         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4003         * d-namespace.c (d_lookup_nested_symbol): Update.
4004         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4005         (cp_print_class_member): Update.
4006         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4007         * completer.c (add_struct_fields): Update.
4008         * c-typeprint.c (cp_type_print_derivation_info)
4009         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4010         Update.
4011         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4012         (ada_prefer_type, ada_is_exception_sym): Update.
4013
4014 2018-06-01  Tom Tromey  <[email protected]>
4015
4016         * valops.c (enum_constant_from_type, value_namespace_elt)
4017         (value_maybe_namespace_elt): Update.
4018         * valarith.c (find_size_for_pointer_math): Update.
4019         * target-descriptions.c (make_gdb_type): Update.
4020         * symmisc.c (print_symbol): Update.
4021         * stabsread.c (define_symbol, read_type)
4022         (complain_about_struct_wipeout, add_undefined_type)
4023         (cleanup_undefined_types_1): Update.
4024         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4025         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4026         (rust_internal_print_type, rust_composite_type)
4027         (rust_evaluate_funcall, rust_evaluate_subexp)
4028         (rust_inclusive_range_type_p): Update.
4029         * python/py-type.c (typy_get_tag): Update.
4030         * p-typeprint.c (pascal_type_print_base): Update.
4031         * mdebugread.c (parse_symbol, parse_type): Update.
4032         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4033         Update.
4034         * guile/scm-type.c (gdbscm_type_tag): Update.
4035         * go-lang.c (sixg_string_p): Update.
4036         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4037         Update.
4038         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4039         (TYPE_TAG_NAME): Remove.
4040         * gdbtypes.c (type_name_no_tag): Simplify.
4041         (check_typedef, check_types_equal, recursive_dump_type)
4042         (copy_type_recursive, arch_composite_type): Update.
4043         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4044         in summary mode when needed.
4045         * eval.c (evaluate_funcall): Update.
4046         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4047         (process_structure_scope, read_enumeration_type)
4048         (read_namespace_type, read_module_type, determine_prefix): Update.
4049         * cp-support.c (inspect_type): Update.
4050         * coffread.c (process_coff_symbol, decode_base_type): Update.
4051         * c-varobj.c (c_is_path_expr_parent): Update.
4052         * c-typeprint.c (c_type_print_base_struct_union): Update.
4053         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4054         summary when using C language.
4055         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4056         (gen_maybe_namespace_elt): Update.
4057         * ada-lang.c (ada_type_name): Simplify.
4058         (empty_record, ada_template_to_fixed_record_type_1)
4059         (template_to_static_fixed_type)
4060         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4061
4062 2018-06-01  Tom Tromey  <[email protected]>
4063
4064         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4065         c_print_type.
4066         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4067         (c_print_type): Update.
4068         (c_print_type): New overload.
4069         (c_type_print_varspec_prefix, c_type_print_args)
4070         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4071         (c_type_print_base_struct_union, c_type_print_base_1)
4072         (cp_type_print_method_args): Add "language" parameter.
4073         (c_type_print_base): Update.
4074         * c-lang.h (c_print_type): Add new overload.
4075
4076 2018-06-01  Tom Tromey  <[email protected]>
4077
4078         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4079         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4080
4081 2018-06-01  Alan Hayward  <[email protected]>
4082
4083         * aarch64-tdep.c (aarch64_sve_register_names): New const
4084         var.
4085         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4086         (AARCH64_SVE_Z_REGS_NUM): New define.
4087         (AARCH64_SVE_P_REGS_NUM): Likewise.
4088         (AARCH64_SVE_NUM_REGS): Likewise.
4089
4090 2018-05-31  Uros Bizjak  <[email protected]>
4091
4092         * nat/linux-ptrace.h [__alpha__]
4093         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4094         definitions.
4095
4096 2018-05-31  Maciej W. Rozycki  <[email protected]>
4097
4098         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4099         the endianness selected.
4100         * NEWS: Document `set endian auto' mode operation update.
4101
4102 2018-05-31  Alan Hayward  <[email protected]>
4103
4104         * Makefile.in: Add new header.
4105         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4106         (sve_vl_from_vg): Likewise.
4107         (sve_vq_from_vl): Likewise.
4108         (sve_vl_from_vq): Likewise.
4109         (sve_vq_from_vg): Likewise.
4110         (sve_vg_from_vq): Likewise.
4111         * configure.nat: Add new c file.
4112         * nat/aarch64-sve-linux-ptrace.c: New file.
4113         * nat/aarch64-sve-linux-ptrace.h: New file.
4114
4115 2018-05-31  Alan Hayward  <[email protected]>
4116
4117         * aarch64-linux-nat.c (aarch64_linux_read_description):
4118         Add parmeter zero.
4119         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4120         Likewise.
4121         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4122         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4123         (aarch64_gdbarch_init): Add parmeter zero.
4124         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4125         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4126         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4127         parmeter.
4128         * doc/gdb.texinfo: Describe SVE feature
4129         * features/aarch64-sve.c: New file.
4130
4131 2018-05-31  Omair Javaid  <[email protected]>
4132
4133         PR gdb/23210
4134         * gdbarch.sh (significant_addr_bit): Default to zero when
4135         not set by target architecture.
4136         * gdbarch.c: Re-generated.
4137         * utils.c (address_significant): Update.
4138
4139 2018-05-30  Joel Brobecker  <[email protected]>
4140
4141         * stack.c (func_command): Remove trailing newline in call to error.
4142
4143 2018-05-30  Simon Marchi  <[email protected]>
4144
4145         * regcache.h (regcache_raw_collect): Remove, update callers to
4146         use regcache::raw_collect.
4147         * regcache.c (regcache_raw_collect): Remove.
4148
4149 2018-05-30  Simon Marchi  <[email protected]>
4150
4151         * regcache.h (regcache_raw_supply): Remove, update callers to
4152         use detached_regcache::raw_supply.
4153         * regcache.c (regcache_raw_supply): Remove.
4154
4155 2018-05-30  Simon Marchi  <[email protected]>
4156
4157         * regcache.h (regcache_cooked_write_part): Remove, update
4158         callers to use regcache::cooked_write_part.
4159         * regcache.c (regcache_cooked_write_part): Remove.
4160
4161 2018-05-30  Simon Marchi  <[email protected]>
4162
4163         * regcache.h (regcache_cooked_read_part): Remove, update callers
4164         to use readable_regcache::cooked_read_part.
4165         * regcache.c (regcache_cooked_read_part): Remove.
4166
4167 2018-05-30  Simon Marchi  <[email protected]>
4168
4169         * regcache.h (regcache_cooked_read_value): Remove, update
4170         callers to use readable_regcache::cooked_read_value.
4171         * regcache.c (regcache_cooked_read_value): Remove.
4172
4173 2018-05-30  Simon Marchi  <[email protected]>
4174
4175         * regcache.h (regcache_cooked_write): Remove, update callers to
4176         use regcache::cooked_write.
4177         * regcache.c (regcache_cooked_write): Remove.
4178
4179 2018-05-30  Simon Marchi  <[email protected]>
4180
4181         * regcache.h (regcache_invalidate): Remove, update callers to
4182         use detached_regcache::invalidate instead.
4183         * regcache.c (regcache_invalidate): Remove.
4184
4185 2018-05-30  Simon Marchi  <[email protected]>
4186
4187         * regcache.h (regcache_raw_write_part): Remove, update callers
4188         to use regcache::raw_write_part instead.
4189         * regcache.c (regcache_raw_write_part): Remove.
4190
4191 2018-05-30  Simon Marchi  <[email protected]>
4192
4193         * regcache.h (regcache_raw_read_part): Remove, update callers to
4194         use readable_regcache::raw_read_part instead.
4195         * regcache.c (regcache_raw_read_part): Remove.
4196
4197 2018-05-30  Simon Marchi  <[email protected]>
4198
4199         * regcache.h (regcache_cooked_read): Remove, update callers to
4200         use readable_regcache::cooked_read instead.
4201         * regcache.c (regcache_cooked_read): Remove.
4202
4203 2018-05-30  Simon Marchi  <[email protected]>
4204
4205         * regcache.h (regcache_raw_write): Remove, update callers to use
4206         regcache::raw_write instead.
4207         * regcache.c (regcache_raw_write): Remove.
4208
4209 2018-05-30  Simon Marchi  <[email protected]>
4210
4211         * regcache.h (regcache_raw_read): Remove, update callers to use
4212         readable_regcache::raw_read instead.
4213         * regcache.c (regcache_raw_read): Remove.
4214
4215 2018-05-30  Simon Marchi  <[email protected]>
4216
4217         * regcache.h (regcache_raw_update): Remove, update callers to
4218         use readable_regcache::raw_update instead.
4219         * regcache.c (regcache_raw_update): Remove.
4220
4221 2018-05-30  Simon Marchi  <[email protected]>
4222
4223         * regcache.h (regcache_register_status): Remove, update callers
4224         to use reg_buffer::get_register_status directly instead.
4225         * regcache.c (regcache_register_status): Remove.
4226
4227 2018-05-30  Simon Marchi  <[email protected]>
4228
4229         * regcache.h (regcache_get_ptid): Remove, update all callers to
4230         call regcache::ptid instead.
4231         * regcache.c (regcache_get_ptid): Remove.
4232
4233 2018-05-30  Simon Marchi  <[email protected]>
4234
4235         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4236
4237 2018-05-30  Pedro Alves  <[email protected]>
4238
4239         * common/common-exceptions.h (exception_rethrow): Use
4240         ATTRIBUTE_NORETURN.
4241
4242 2018-05-29  Simon Marchi  <[email protected]>
4243
4244         * breakpoint.c (print_solib_event, check_status_catch_solib):
4245         Remove struct keyword in range-based for loops.
4246         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4247         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4248         Likewise.
4249         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4250         Likewise.
4251         * symfile.c (addr_info_make_relative): Likewise.
4252         * thread.c (value_in_thread_stack_temporaries): Likewise.
4253
4254 2018-06-12  Weimin Pan  <[email protected]>
4255
4256         PR gdb/16841
4257         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4258         aggregate type to get its real type before accessing it.
4259
4260 2018-05-29  Weimin Pan  <[email protected]>
4261
4262         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4263         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4264         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4265         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4266         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4267         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4268         * printcmd.c (info_address_command): Likewise.
4269
4270 2018-05-29  Tom Tromey  <[email protected]>
4271
4272         * windows-nat.c (handle_exception): Update fall-through comment.
4273
4274 2018-05-29  Tom Tromey  <[email protected]>
4275
4276         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4277         (struct program_space) <added_solibs>: Now a std::vector.
4278         * breakpoint.c (print_solib_event): Update.
4279         (check_status_catch_solib): Update.
4280         * progspace.c (clear_program_space_solib_cache): Update.
4281         * solib.c (update_solib_list): Update.
4282
4283 2018-05-29  Tom Tromey  <[email protected]>
4284
4285         * python/py-type.c (typy_richcompare): Update.
4286         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4287         * gdbtypes.h (types_deeply_equal): Return bool.
4288         (types_equal): Likewise.
4289         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4290         declare VEC.
4291         (check_types_equal): Change worklist to std::vector.  Return
4292         bool.
4293         (struct type_equality_entry): Add constructor.
4294         (compare_maybe_null_strings): Return bool.
4295         (check_types_worklist): Return bool.  Change worklist to
4296         std::vector.
4297         (types_deeply_equal): Use std::vector.
4298         (types_equal): Return bool.
4299         (compare_maybe_null_strings): Simplify.
4300
4301 2018-05-29  Tom Tromey  <[email protected]>
4302
4303         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4304
4305 2018-05-29  Tom Tromey  <[email protected]>
4306
4307         * objc-lang.h: Don't include cp-support.h.
4308         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4309         declare VEC.
4310
4311 2018-05-27  Tom Tromey  <[email protected]>
4312
4313         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4314
4315 2018-05-25  Tom Tromey  <[email protected]>
4316
4317         * value.c (value::location): Initialize.
4318
4319 2018-05-25  Tom Tromey  <[email protected]>
4320
4321         * dbxread.c (init_bincl_list): Remove.
4322         (bincl_list): Now a std::vector.
4323         (bincls_allocated, next_bincl): Remove.
4324         (free_bincl_list, do_free_bincl_list_cleanup)
4325         (make_cleanup_free_bincl_list): Remove.
4326         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4327         unique_xmalloc_ptr.
4328         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4329         (struct header_file_location): Add constructor.
4330         (add_bincl_to_list): Remove.
4331
4332 2018-05-25  Tom Tromey  <[email protected]>
4333
4334         * tui/tui.c (tui_enable): Update.
4335         * mi/mi-interp.c (mi_interp::init): Update.
4336         * interps.h (class interp) <name>: New method.
4337         <m_name>: Rename from name.
4338         (~scoped_restore_interp): Update.
4339         * interps.c (interp::interp): Update.
4340         (interp_add, interp_set, interp_lookup_existing)
4341         (current_interp_named_p): Update.
4342
4343 2018-05-25  Tom Tromey  <[email protected]>
4344
4345         * interps.c (interp_name): Remove.
4346         * mi/mi-interp.c (mi_interp::init): Update.
4347         * interps.h (interp_name): Remove.
4348         (~scoped_restore_interp): Update.
4349         * tui/tui.c (tui_enable): Update.
4350
4351 2018-05-25  Tom Tromey  <[email protected]>
4352
4353         * utils.c (fputs_maybe_filtered): Update.
4354         * linespec.c (decode_line_full): Update.
4355         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4356         (mi_print_breakpoint_for_event, mi_solib_loaded)
4357         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4358         (mi_user_selected_context_changed): Update.
4359         * mi/mi-main.c (mi_execute_command): Update.
4360         * cli/cli-script.c (execute_control_command): Update.
4361         * python/python.c (execute_gdb_command): Update.
4362         * solib.c (info_sharedlibrary_command): Update.
4363         * interps.c (interp_ui_out): Remove.
4364         * interps.h (interp_ui_out): Remove.
4365
4366 2018-05-25  Tom Tromey  <[email protected]>
4367
4368         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4369         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4370         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4371
4372 2018-05-25  Tom Tromey  <[email protected]>
4373
4374         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4375         * interps.c (interp_exec): Use scoped_restore.
4376
4377 2018-05-25  Tom Tromey  <[email protected]>
4378
4379         * remote.c (remote_target::remote_file_get): Use
4380         gdb::byte_vector.
4381         (remote_target::remote_file_put): Likewise.
4382
4383 2018-05-25  Tom Tromey  <[email protected]>
4384
4385         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4386         a std::string.
4387         (get_pe_section_index, add_pe_exported_sym): Update.
4388         (read_pe_exported_syms): Use gdb::def_vector.
4389
4390 2018-05-25  Tom Tromey  <[email protected]>
4391
4392         * frame.c (remove_prev_frame): Remove.
4393         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4394
4395 2018-05-25  Maciej W. Rozycki  <[email protected]>
4396
4397         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4398         Remove prototypes.
4399         * mips-linux-nat.c (supply_fpregset): Always call
4400         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4401         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4402         `mips_fill_fpregset'.
4403         * mips-linux-tdep.c (mips_supply_fpregset)
4404         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4405         (mips_fill_fpregset_wrapper): Remove functions.
4406         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4407         (mips_linux_fpregset): Remove variable.
4408         (mips_linux_iterate_over_regset_sections): Use
4409         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4410         (mips_linux_o32_sigframe_init): Remove comment.
4411
4412 2018-05-25  Pedro Alves  <[email protected]>
4413
4414         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4415         (struct readahead_cache, struct packet_reg, struct
4416         remote_arch_state, class remote_state): Move higher up in the
4417         file.
4418         (remote_target::m_remote_state): Now an object instead of a pointer.
4419         (remote_target::get_remote_state): Adjust.
4420
4421 2018-05-24  Andrew Burgess  <[email protected]>
4422
4423         * stack.c (select_and_print_frame): Delete.
4424         (struct function_bounds): Move struct within function.
4425         (func_command): Most content moved into new function
4426         find_frame_for_function, use new function, print result, add
4427         function comment.
4428         (find_frame_for_function): New function, now returns a result.
4429
4430 2018-05-24  Philippe Waroquiers  <[email protected]>
4431
4432         * stack.c (iterate_over_block_arg_vars): Fix comment.
4433         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4434
4435 2018-05-24  Andrew Burgess  <[email protected]>
4436
4437         PR gdb/23203
4438         * frame.c
4439         (scoped_restore_selected_frame::scoped_restore_selected_frame):
4440         Define.
4441         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4442         Define.
4443         * frame.h (class scoped_restore_selected_frame): New class.
4444         * stack.c (print_frame_local_vars): Remove catching and rethrowing
4445         of any exception, use scoped_restore_selected_frame to restore the
4446         frame instead.
4447
4448 2018-05-24  Pedro Alves  <[email protected]>
4449
4450         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4451         override.
4452
4453 2018-05-23  Tom Tromey  <[email protected]>
4454
4455         * complaints.c (struct complaints): Remove.
4456         (symfile_complaint_book): Remove.
4457         (series): New global.
4458         (complaint_internal): Update.
4459         (clear_complaints): Update.
4460
4461 2018-05-23  Tom Tromey  <[email protected]>
4462
4463         * complaints.c (counters): New global.
4464         (struct complain): Remove.
4465         (struct complaints) <root>: Remove.
4466         (complaint_sentinel): Remove.
4467         (symfile_complaint_book): Update.
4468         (find_complaint) Remove.
4469         (complaint_internal, clear_complaints): Update.
4470
4471 2018-05-23  Tom Tromey  <[email protected]>
4472
4473         * complaints.c (struct complain) <file, line>: Remove.
4474         (find_complaint): Remove file, line parameters.
4475         (complaint_internal): Update.
4476
4477 2018-05-23  Tom Tromey  <[email protected]>
4478
4479         * complaints.c (vcomplaint): Remove.
4480         (complaint_internal) Merge in contents of vcomplaint.
4481
4482 2018-05-23  Tom Tromey  <[email protected]>
4483
4484         * complaints.c (struct complaints) <explanation>: Remove.
4485         (symfile_explanations): Remove.
4486         (symfile_complaint_book): Update.
4487         (vcomplaint): Update.
4488         (struct explanation): Remove.
4489
4490 2018-05-23  Tom Tromey  <[email protected]>
4491
4492         * complaints.c (symfile_complaints): Remove.
4493         (complaint_internal): Remove "complaints" parameter.
4494         (clear_complaints, vcomplaint): Remove "c" parameter.
4495         (get_complaints): Remove.
4496         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4497         (dwarf2_debug_line_missing_file_complaint)
4498         (dwarf2_debug_line_missing_end_sequence_complaint)
4499         (dwarf2_complex_location_expr_complaint)
4500         (dwarf2_const_value_length_mismatch_complaint)
4501         (dwarf2_section_buffer_overflow_complaint)
4502         (dwarf2_macro_malformed_definition_complaint)
4503         (dwarf2_invalid_attrib_class_complaint)
4504         (create_addrmap_from_index, dw2_symtab_iter_next)
4505         (dw2_expand_marked_cus)
4506         (dw2_debug_names_iterator::find_vec_in_debug_names)
4507         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4508         (create_debug_type_hash_table, init_cutu_and_read_dies)
4509         (partial_die_parent_scope, add_partial_enumeration)
4510         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4511         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4512         (read_import_statement, read_file_scope, create_dwo_cu_reader)
4513         (create_cus_hash_table, create_dwp_hash_table)
4514         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4515         (dwarf2_rnglists_process, dwarf2_ranges_process)
4516         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4517         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4518         (handle_struct_member_die, process_structure_scope)
4519         (read_array_type, read_common_block, read_module_type)
4520         (read_tag_pointer_type, read_typedef, read_base_type)
4521         (read_subrange_type, load_partial_dies, partial_die_info::read)
4522         (partial_die_info::read, partial_die_info::read)
4523         (partial_die_info::read, read_checked_initial_length_and_offset)
4524         (dwarf2_string_attr, read_formatted_entries)
4525         (dwarf_decode_line_header)
4526         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4527         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4528         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4529         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4530         (get_signatured_type, get_DW_AT_signature_type)
4531         (decode_locdesc, file_file_name, consume_improper_spaces)
4532         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4533         (dwarf_decode_macro_bytes, dwarf_decode_macros)
4534         (dwarf2_symbol_mark_computed, set_die_type)
4535         (read_attribute_value): Update.
4536         * stap-probe.c (handle_stap_probe, get_stap_base_address):
4537         Update.
4538         * dbxread.c (unknown_symtype_complaint)
4539         (lbrac_mismatch_complaint, repeated_header_complaint)
4540         (set_namestring, function_outside_compilation_unit_complaint)
4541         (read_dbx_symtab, process_one_symbol): Update.
4542         * gdbtypes.c (stub_noname_complaint): Update.
4543         * windows-nat.c (handle_unload_dll): Update.
4544         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4545         (decode_base_type): Update.
4546         * xcoffread.c (bf_notfound_complaint, ef_complaint)
4547         (eb_complaint, record_include_begin, record_include_end)
4548         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4549         (process_xcoff_symbol, read_symbol)
4550         (function_outside_compilation_unit_complaint)
4551         (scan_xcoff_symtab): Update.
4552         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4553         * buildsym.c (finish_block_internal, make_blockvector)
4554         (end_symtab_get_static_block, augment_type_symtab): Update.
4555         * dtrace-probe.c (dtrace_process_dof)
4556         (dtrace_static_probe_ops::get_probes): Update.
4557         * complaints.h (struct complaint): Don't declare.
4558         (symfile_complaints): Remove.
4559         (complaint_internal): Remove "complaints" parameter.
4560         (complaint): Likewise.
4561         (clear_complaints): Likewise.
4562         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4563         (reread_symbols): Update.
4564         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4565         (dwarf2_frame_cache, decode_frame_entry): Update.
4566         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4567         * objc-lang.c (lookup_objc_class, lookup_child_selector)
4568         (info_selectors_command): Update.
4569         * macrotab.c (macro_include, check_for_redefinition)
4570         (macro_undef): Update.
4571         * objfiles.c (filter_overlapping_sections): Update.
4572         * stabsread.c (invalid_cpp_abbrev_complaint)
4573         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4574         (define_symbol, error_type, read_type, rs6000_builtin_type)
4575         (stabs_method_name_from_physname, read_member_functions)
4576         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4577         (attach_fields_to_type, complain_about_struct_wipeout)
4578         (read_range_type, read_args, common_block_start)
4579         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4580         Update.
4581         * mdebugread.c (index_complaint, unknown_ext_complaint)
4582         (basic_type_complaint, bad_tag_guess_complaint)
4583         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4584         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4585         (parse_procedure, parse_lines)
4586         (function_outside_compilation_unit_complaint)
4587         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4588         (bad_tag_guess_complaint, reg_value_complaint): Update.
4589         * cp-support.c (demangled_name_complaint): Update.
4590         * macroscope.c (sal_macro_scope): Update.
4591         * dwarf-index-write.c (class debug_names): Update.
4592
4593 2018-05-23  Tom Tromey  <[email protected]>
4594
4595         * complaints.c (clear_complaints): Remove "noisy" parameter.
4596         * complaints.h (clear_complaints): Update.
4597         * symfile.c (syms_from_objfile_1, finish_new_objfile)
4598         (reread_symbols): Update.
4599
4600 2018-05-23  Tom Tromey  <[email protected]>
4601
4602         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4603         SUBSEQUENT_MESSAGE.
4604         (vcomplaint, clear_complaints): Update.
4605         (symfile_explanations): Remove some messages.
4606
4607 2018-05-23  Tom Tromey  <[email protected]>
4608
4609         * complaints.c (internal_complaint): Remove.
4610         * complaints.h (internal_complaint): Remove.
4611
4612 2018-05-22  Maciej W. Rozycki  <[email protected]>
4613
4614         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4615
4616 2018-05-22  Pedro Alves  <[email protected]>
4617
4618         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4619         (remote_fileio_badfd, remote_fileio_return_errno)
4620         (remote_fileio_return_success, remote_fileio_func_open)
4621         (remote_fileio_func_open, remote_fileio_func_close)
4622         (remote_fileio_func_read, remote_fileio_func_write)
4623         (remote_fileio_func_lseek, remote_fileio_func_rename)
4624         (remote_fileio_func_unlink, remote_fileio_func_stat)
4625         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4626         (remote_fileio_func_isatty, remote_fileio_func_system): Add
4627         remote_target parameter.
4628         (remote_fio_func_map) <func>: Add remote_target parameter.
4629         (do_remote_fileio_request, remote_fileio_request):
4630         * remote-fileio.h (remote_fileio_request):
4631         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4632         remote_target parameter.
4633         (remote_notif_process, handle_notification): Adjust to pass down
4634         the remote.
4635         (remote_notif_state_allocate): Add remote_target parameter.  Save
4636         it.
4637         * remote-notif.h (struct remote_target): Forward declare.
4638         (struct notif_client) <parse, ack, can_get_pending_events>: Add
4639         remote_target parameter.
4640         (struct remote_notif_state) <remote>: New field.
4641         (remote_notif_ack, remote_notif_parse): Add remote_target
4642         parameter.
4643         (remote_notif_state_allocate, remote_notif_state_allocate): Add
4644         remote_target parameter.
4645         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4646         (threads_listing_context, rmt_thread_action, protocol_feature)
4647         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4648         (packet_result, struct threads_listing_context, remote_state):
4649         Move definitions and declarations higher up.
4650         (remote_target) <~remote_target>: Declare.
4651         (remote_download_command_source, remote_file_put, remote_file_get)
4652         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4653         (remote_hostio_pread_vFile, remote_hostio_send_command)
4654         (remote_hostio_set_filesystem, remote_hostio_open)
4655         (remote_hostio_close, remote_hostio_unlink, remote_state)
4656         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4657         (get_memory_write_packet_size, get_memory_read_packet_size)
4658         (append_pending_thread_resumptions, remote_detach_1)
4659         (append_resumption, remote_resume_with_vcont)
4660         (add_current_inferior_and_thread, wait_ns, wait_as)
4661         (process_stop_reply, remote_notice_new_inferior)
4662         (process_initial_stop_replies, remote_add_thread)
4663         (btrace_sync_conf, remote_btrace_maybe_reopen)
4664         (remove_new_fork_children, kill_new_fork_children)
4665         (discard_pending_stop_replies, stop_reply_queue_length)
4666         (check_pending_events_prevent_wildcard_vcont)
4667         (discard_pending_stop_replies_in_queue, stop_reply)
4668         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4669         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4670         (remote_interrupt_as, remote_interrupt_ns)
4671         (remote_get_noisy_reply, remote_query_attached)
4672         (remote_add_inferior, remote_current_thread, get_current_thread)
4673         (set_thread, set_general_thread, set_continue_thread)
4674         (set_general_process, write_ptid)
4675         (remote_unpack_thread_info_response, remote_get_threadinfo)
4676         (parse_threadlist_response, remote_get_threadlist)
4677         (remote_threadlist_iterator, remote_get_threads_with_ql)
4678         (remote_get_threads_with_qxfer)
4679         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4680         (get_offsets, remote_check_symbols, remote_supported_packet)
4681         (remote_query_supported, remote_packet_size)
4682         (remote_serial_quit_handler, remote_detach_pid)
4683         (remote_vcont_probe, remote_resume_with_hc)
4684         (send_interrupt_sequence, interrupt_query)
4685         (remote_notif_get_pending_events, fetch_register_using_p)
4686         (send_g_packet, process_g_packet, fetch_registers_using_g)
4687         (store_register_using_P, store_registers_using_G)
4688         (set_remote_traceframe, check_binary_download)
4689         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4690         (remote_xfer_live_readonly_partial, remote_read_bytes)
4691         (remote_send_printf, remote_flash_write, readchar)
4692         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4693         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4694         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4695         (extended_remote_disable_randomization, extended_remote_run)
4696         (send_environment_packet, extended_remote_environment_support)
4697         (extended_remote_set_inferior_cwd, remote_write_qxfer)
4698         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4699         (packet_command): Now methods of ...
4700         (remote_target): ... this class.
4701         (m_remote_state) <remote_target>: New field.
4702         (struct remote_state) <stop_reply_queue,
4703         remote_async_inferior_event_token, wait_forever_enabled_p>: New
4704         fields.
4705         (remote_state::remote_state): Allocate stop_reply_queue.
4706         (remote_state): Delete global.
4707         (get_remote_state_raw): Delete.
4708         (remote_target::get_remote_state): Allocate m_remote_state on
4709         demand.
4710         (get_current_remote_target): New.
4711         (remote_ops, extended_remote_ops): Delete.
4712         (wait_forever_enabled_p, remote_async_inferior_event_token):
4713         Delete, moved to struct remote_state.
4714         (remote_target::close): Delete self.  Destruction bits split to
4715         ...
4716         (remote_target::~remote_target): ... this.
4717         (show_memory_packet_size): Adjust to use
4718         get_current_remote_target.
4719         (struct protocol_feature) <func>: Add remote_target parameter.
4720         All callers adjusted.
4721         (curr_quit_handler_target): New.
4722         (remote_serial_quit_handler): Reimplement.
4723         (remote_target::open_1): Adjust to use get_current_remote_target.
4724         Heap-allocate remote_target/extended_remote_target instances.
4725         (vcont_builder::vcont_builder): Add remote_target parameter, and
4726         save it in m_remote.  All callers adjusted.
4727         (vcont_builder::m_remote): New field.
4728         (vcont_builder::restart, vcont_builder::flush)
4729         (vcont_builder::push_action): Use it.
4730         (remote_target::commit_resume): Use it.
4731         (struct queue_iter_param) <remote>: New field.
4732         (remote_target::remove_new_fork_children): Fill in 'remote' field.
4733         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4734         (check_pending_event_prevents_wildcard_vcont_callback)
4735         (remote_target::check_pending_events_prevent_wildcard_vcont)
4736         (remote_target::discard_pending_stop_replies)
4737         (remote_target::discard_pending_stop_replies_in_queue)
4738         (remote_target::remote_notif_remove_queued_reply): Fill in
4739         'remote' field.
4740         (remote_notif_get_pending_events): New.
4741         (remote_target::readchar, remote_target::remote_serial_write):
4742         Save/restore curr_quit_handler_target.
4743         (putpkt): New.
4744         (kill_new_fork_children): Fill in 'remote' field.
4745         (packet_command): Use get_current_remote_target, defer to
4746         remote_target method of same name.
4747         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4748         parameter, and save it in m_remote.  All callers adjusted.
4749         (scoped_remote_fd::release): Use m_remote.
4750         (scoped_remote_fd::m_remote): New field.
4751         (remote_file_put, remote_file_get, remote_file_delete): Use
4752         get_current_remote_target, defer to remote_target method of same
4753         name.
4754         (remote_btrace_reset): Add remote_state paremeter.  Update all
4755         callers.
4756         (remote_async_inferior_event_handler). Pass down 'data'.
4757         (remote_new_objfile): Use get_current_remote_target.
4758         (remote_target::vcont_r_supported): New.
4759         (set_range_stepping): Use get_current_remote_target and
4760         remote_target::vcont_r_supported.
4761         (_initialize_remote): Don't allocate 'remote_state' and
4762         'stop_reply_queue' globals.
4763         * remote.h (struct remote_target): Forward declare.
4764         (getpkt, putpkt, remote_notif_get_pending_events): Add
4765         'remote_target' parameter.
4766
4767 2018-05-22  Pedro Alves  <[email protected]>
4768
4769         * remote.c (vcont_builder): Now a class.  Make all data members
4770         private.
4771         (vcont_builder) <vcont_builder, restart, flush, push_action>:
4772         Declare methods.
4773         (vcont_builder_restart): Rename to ...
4774         (vcont_builder::restart): ... this.
4775         (vcont_builder_flush): Rename to ...
4776         (vcont_builder::flush): ... this.
4777         (vcont_builder_push_action): Rename to ...
4778         (vcont_builder::push_action): ... this.
4779         (remote_target::commit_resume): Adjust.
4780
4781 2018-05-22  Pedro Alves  <[email protected]>
4782
4783         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4784         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4785         (get_fixed_memory_packet_size): New.
4786         (get_memory_packet_size): Use it.
4787         (set_memory_packet_size): Don't override the config size with
4788         DEFAULT_MAX_MEMORY_PACKET_SIZE.
4789         (show_memory_packet_size): Use get_fixed_memory_packet_size.
4790         Don't refer to get_memory_packet_size if not connected to a remote
4791         target.  Show "(default)" if configured size is 0.
4792
4793 2018-05-22  Pedro Alves  <[email protected]>
4794
4795         * remote.c (remote_target::mourn_inferior): Move
4796         discard_pending_stop_replies call here from ...
4797         (_initialize_remote): ... here.
4798
4799 2018-05-22  Pedro Alves  <[email protected]>
4800
4801         * remote.c (compare_section_command): Remove set_general_process
4802         call.
4803
4804 2018-05-22  Pedro Alves  <[email protected]>
4805
4806         * remote.c (struct packet_reg, struct remote_arch_state):
4807         Move higher up in the file.
4808         (remote_state) <m_arch_states>: Store remote_arch_state values
4809         instead of remote_arch_state pointers.
4810         (remote_state::get_remote_arch_state): Adjust.
4811
4812 2018-05-22  Pedro Alves  <[email protected]>
4813
4814         * remote.c: Include <unordered_map>.
4815         (remote_state): Now a class.
4816         (remote_state) <get_remote_arch_state>: Declare method.
4817         <get_remote_arch_state>: New field.
4818         (remote_arch_state) <remote_arch_state>: Declare ctor.
4819         <regs>: Now a unique_ptr.
4820         (remote_gdbarch_data_handle): Delete.
4821         (get_remote_arch_state): Delete.
4822         (remote_state::get_remote_arch_state): New.
4823         (get_remote_state): Adjust to call remote_state's
4824         get_remote_arch_state method.
4825         (init_remote_state): Delete, bits factored out to ...
4826         (remote_arch_state::remote_arch_state): ... this new method.
4827         (get_remote_packet_size, get_memory_packet_size)
4828         (process_g_packet, remote_target::fetch_registers)
4829         (remote_target::prepare_to_store, store_registers_using_G)
4830         (remote_target::store_registers, remote_target::get_trace_status):
4831         Adjust to call remote_state's method.
4832         (_initialize_remote): Remove reference to
4833         remote_gdbarch_data_handle.
4834
4835 2018-05-22  Pedro Alves  <[email protected]>
4836
4837         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4838         pread>: New method declarations.
4839         (remote_target::open_1): Adjust.
4840         (readahead_cache_invalidate): Rename to ...
4841         (readahead_cache::invalidate): ... this, and adjust to be a class
4842         method.
4843         (readahead_cache_invalidate_fd): Rename to ...
4844         (readahead_cache::invalidate_fd): ... this, and adjust to be a
4845         class method.
4846         (remote_hostio_pwrite): Adjust.
4847         (remote_hostio_pread_from_cache): Rename to ...
4848         (readahead_cache::pread): ... this, and adjust to be a class
4849         method.
4850         (remote_hostio_close): Adjust.
4851
4852 2018-05-22  Pedro Alves  <[email protected]>
4853
4854         * remote.c (remote_hostio_close_cleanup): Delete.
4855         (class scoped_remote_fd): New.
4856         (remote_file_put, remote_file_get): Use it.
4857
4858 2018-05-22  Pedro Alves  <[email protected]>
4859
4860         (struct vCont_action_support): Use bool and initialize all fields.
4861         (struct readahead_cache): Initialize all fields.
4862         (remote_state): Use bool and initialize all fields.
4863         (remote_state::remote_state, remote_state::~remote_state): New.
4864         (new_remote_state): Delete.
4865         (_initialize_remote): Use new to allocate remote_state.
4866
4867 2018-05-22  Pedro Alves  <[email protected]>
4868             張俊芝  <[email protected]>
4869
4870         PR gdb/22973
4871         * c-exp.y: Include "c-support.h".
4872         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4873         of tolower.  Use c_ident_is_alpha to scan names.
4874         * c-lang.c: Include "c-support.h".
4875         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4876         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4877         * c-support.h: New file, with bits factored out from ...
4878         * cp-name-parser.y: ... this file.
4879         Include "c-support.h".
4880         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4881         c-support.h and renamed.
4882         (symbol_end, yylex): Adjust.
4883
4884 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
4885
4886         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4887         parameter type to CORE_ADDR.
4888         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4889         parameter type in declaration to CORE_ADDR.
4890         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4891         target_auxv_search to get AT_HWCAP and use the result to get the
4892         target description.
4893         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4894         to CORE_ADDR. Remove the cast of the return value to unsigned
4895         long. Fix error predicate of target_auxv_search.
4896         (ppc_linux_nat_target::read_description): Change the type of the
4897         hwcap variable to CORE_ADDR.
4898
4899 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
4900
4901         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4902         if the size of fpscr is larger than 32 bits.
4903
4904 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
4905
4906         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4907         (ppc32_linux_vsxregmap): New global.
4908         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4909         regcache_supply_regset, and regcache_collect_regset.
4910         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4911         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4912         (fetch_vsx_register, store_vsx_register): Remove.
4913         (fetch_vsx_registers): Add regno parameter. Get regset using
4914         ppc_linux_vsxregset. Use regset to supply registers.
4915         (store_vsx_registers): Add regno parameter. Get regset using
4916         ppc_linux_vsxregset. Use regset to collect registers.
4917         (fetch_register): Call fetch_vsx_registers instead of
4918         fetch_vsx_register.
4919         (store_register): Call store_vsx_registers instead of
4920         store_vsx_register.
4921         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4922         new regno parameter.
4923         (store_ppc_registers): Call store_vsx_registers with -1 for the
4924         new regno parameter.
4925         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4926         (ppc_collect_vsxregset): Remove.
4927
4928 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
4929
4930         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4931         offset fields.
4932         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4933         for vector register offset fields.
4934         (ppc64_fbsd_reg_offsets): Likewise.
4935         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4936         to vector register offset fields.
4937         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4938         to vector register offset fields.
4939         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4940         vector register offset fields.
4941         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4942         initializers for vector register offset fields.
4943         (rs6000_aix64_reg_offsets): Likewise.
4944         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4945         (ppc_supply_vrregset): Remove.
4946         (ppc_collect_vrregset): Remove.
4947         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4948         (ppc_linux_vrregset) : New function.
4949         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4950         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4951         (ppc32_linux_vrregset): Remove.
4952         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4953         and use result instead of ppc32_linux_vrregset.
4954         (ppc32_linux_reg_offsets): Remove initializers for vector register
4955         offset fields.
4956         (ppc64_linux_reg_offsets): Likewise.
4957         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4958         * ppc-linux-nat.c: Include regset.h.
4959         (gdb_vrregset_t): Adjust comment to account for little-endian
4960         mode.
4961         (supply_vrregset, fill_vrregset): Remove.
4962         (fetch_altivec_register, store_altivec_register): Remove.
4963         (fetch_altivec_registers): Add regno parameter. Get regset using
4964         ppc_linux_vrregset. Use regset to supply registers.
4965         (store_altivec_registers): Add regno parameter. Get regset using
4966         ppc_linux_vrregset. Use regset to collect registers.
4967         (fetch_register): Call fetch_altivec_registers instead of
4968         fetch_altivec_register.
4969         (store_register): Call store_altivec_registers instead of
4970         store_altivec_register.
4971         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4972         the new regno parameter.
4973         (store_ppc_registers): Call store_altivec_registers with -1 for
4974         the new regno parameter.
4975
4976 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
4977
4978         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4979         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4980         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4981         (gdb_vrregset_t): Change array type size to
4982         PPC_LINUX_SIZEOF_VRREGSET.
4983         (gdb_vsxregset_t): Change array type size to
4984         PPC_LINUX_SIZEOF_VSXREGSET.
4985         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4986         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4987         PPC_LINUX_SIZEOF_VSXREGSET.
4988
4989 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
4990
4991         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4992         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4993         nat/ppc-linux.c.
4994         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4995         ppc_linux_target_wordsize with tid.
4996         (ppc_linux_nat_target::read_description): Call ppc_linux_target
4997         wordsize with tid.
4998         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4999         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5000         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5001         tid parameter. Remove static specifier.
5002         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5003         (ppc_linux_target_wordsize): New declaration.
5004
5005 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
5006
5007         * arch/ppc-linux-common.c: New file.
5008         * arch/ppc-linux-common.h: New file.
5009         * arch/ppc-linux-tdesc.h: New file.
5010         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5011         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5012         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5013         arch/ppc-linux-tdesc.h.
5014         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5015         arch/ppc-linux-tdesc.h.
5016         (ppc_linux_nat_target::read_description): Remove target
5017         description matching code. Fill a ppc_linux_features struct and
5018         call ppc_linux_match_description with it. Move comment about ISA
5019         2.05 to ppc-linux-common.c.
5020         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5021         arch/ppc-linux-tdesc.h.
5022         (ppc_linux_core_read_description): Remove target description
5023         matching code. Fill a ppc_linux_features struct and call
5024         ppc_linux_match_description with it.
5025         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5026         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5027         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5028         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5029         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5030         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5031         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5032         (tdesc_powerpc_e500l): Remove.
5033
5034 2018-05-22  Joel Brobecker  <[email protected]>
5035
5036         * ada-lang.c (catch_assert_command): Pass empty string instead
5037         of NULL for excep_string argument.
5038
5039 2018-05-22  Maciej W. Rozycki  <[email protected]>
5040
5041         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5042         the width of the requested register exceeds the width of the
5043         `ptrace' data type.
5044
5045 2018-05-21  Tom Tromey  <[email protected]>
5046
5047         * printcmd.c (output_command): Remove.
5048         (output_command_const): Rename to output_command.
5049         * valprint.h (output_command): Rename from output_command_const.
5050         * tracepoint.c (trace_dump_actions): Call output_command.
5051
5052 2018-05-21  Tom Tromey  <[email protected]>
5053
5054         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5055         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5056         * ada-lang.h (create_ada_exception_catchpoint): Update.
5057         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5058         std::string.
5059         (create_excep_cond_exprs, ~ada_catchpoint)
5060         (should_stop_exception, print_one_exception)
5061         (print_mention_exception, print_recreate_exception): Update.
5062         (ada_get_next_arg): Remove.
5063         (catch_ada_exception_command_split): Use std::string.  Change type
5064         of "excep_string", "cond_string".
5065         (catch_ada_exception_command): Update.
5066         (create_ada_exception_catchpoint): Change type of excep_string.
5067         (ada_exception_sal): Remove excep_string parameter.
5068         (~ada_catchpoint): Remove.
5069
5070 2018-05-21  Tom Tromey  <[email protected]>
5071
5072         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5073         cleanup.
5074
5075 2018-05-21  Tom Tromey  <[email protected]>
5076
5077         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5078         Return unique_xmalloc_ptr.
5079         (print_it_exception): Update.
5080
5081 2018-05-21  Tom Tromey  <[email protected]>
5082
5083         * tracepoint.c (trace_dump_actions): Use std::string.
5084
5085 2018-05-21  Tom Tromey  <[email protected]>
5086
5087         * symfile.c (reread_symbols): Use std::string for original_name.
5088
5089 2018-05-21  Tom Tromey  <[email protected]>
5090
5091         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5092         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5093         constructor.
5094
5095 2018-05-20  Simon Marchi  <[email protected]>
5096
5097         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5098         instance to...
5099         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5100         * objfiles.c (get_objfile_bfd_data): Allocate
5101         objfile_per_bfd_storage with obstack_new when allocating on
5102         obstack.
5103
5104 2018-05-20  Simon Marchi  <[email protected]>
5105
5106         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5107         OBSTACK_ZALLOC.
5108         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5109         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5110         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5111         (add_pending): Likewise.
5112         (parse_symbol): Likewise.
5113         (parse_partial_symbols): Likewise.
5114         (psymtab_to_symtab_1): Likewise.
5115         (new_psymtab): Likewise.
5116         (elfmdebug_build_psymtabs): Likewise.
5117         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5118         * objfiles.c (get_objfile_bfd_data): Likewise.
5119         (objfile_register_static_link): Likewise.
5120         * psymtab.c (allocate_psymtab): Likewise.
5121         * stabsread.c (read_member_functions): Likewise.
5122         * xcoffread.c (xcoff_end_psymtab): Likewise.
5123
5124 2018-05-20  Simon Marchi  <[email protected]>
5125
5126         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5127         compiler supports std::is_trivially_constructible.
5128         * common/poison.h: Include obstack.h.
5129         (IsMallocable): Define to is_trivially_constructible if the
5130         compiler supports it, define to true_type otherwise.
5131         (xobnew): New.
5132         (XOBNEW): Redefine.
5133         (xobnewvec): New.
5134         (XOBNEWVEC): Redefine.
5135         * gdb_obstack.h (obstack_zalloc): New.
5136         (OBSTACK_ZALLOC): Redefine.
5137         (obstack_calloc): New.
5138         (OBSTACK_CALLOC): Redefine.
5139         (obstack_new): New.
5140         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5141         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5142         gdbarch.c.
5143         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5144         obstack_calloc/obstack_zalloc.
5145         (gdbarch_obstack_zalloc): Remove.
5146         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5147
5148 2018-05-19  Philippe Waroquiers  <[email protected]>
5149
5150         * stack.c (backtrace_command_1): Remove useless variable int i.
5151
5152 2018-05-19  Philippe Waroquiers  <[email protected]>
5153
5154         * stack.c (print_frame_info): Fix comment.
5155
5156 2018-05-18  Tom Tromey  <[email protected]>
5157
5158         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5159         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5160         (~dwarf2_per_objfile): Update
5161         (dwarf2_get_dwz_file): Use new.
5162         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5163         unique_ptr.
5164
5165 2018-05-18  Tom Tromey  <[email protected]>
5166
5167         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5168         unique_ptr.
5169         * dwarf2read.c (struct dwp_file): Add constructor and
5170         initializers.
5171         (open_and_init_dwp_file): Return a unique_ptr.
5172         (dwarf2_per_objfile, create_dwp_hash_table)
5173         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5174         (lookup_dwo_unit_in_dwp): Update.
5175         (open_and_init_dwp_file, get_dwp_file): Update.
5176
5177 2018-05-18  Tom Tromey  <[email protected]>
5178
5179         * dwarf2read.c (dwarf2_per_objfile): Update.
5180         (struct mapped_index): Add initializers.
5181         (dwarf2_read_index): Use new.
5182         (dw2_symtab_iter_init): Update.
5183         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5184         unique_ptr.
5185
5186 2018-05-18  Simon Marchi  <[email protected]>
5187
5188         * dwarf2read.c (mapped_index) <total_size>: Remove.
5189
5190 2018-05-18  Simon Marchi  <[email protected]>
5191
5192         * unittests/format_pieces-selftests.c (test_format_specifier):
5193         Add ARI comments.
5194
5195 2018-05-18  Tom Tromey  <[email protected]>
5196
5197         * c-typeprint.c (maybe_print_hole): New function.
5198         (c_print_type_struct_field_offset): Update.
5199         (c_type_print_base_struct_union): Call maybe_print_hole.
5200
5201 2018-05-17  Keith Seitz  <[email protected]>
5202
5203         * breakpoint.c (build_bpstat_chain): New function, moved from
5204         bpstat_stop_status.
5205         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5206         If no stop chain is passed, call build_bpstat_chain to build it.
5207         * breakpoint.h (build_bpstat_chain): Declare.
5208         (bpstat_stop_status): Move documentation here from breakpoint.c.
5209         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5210         build the stop chain and pass it to skip_inline_frames.
5211         Pass this stop chain to bpstat_stop_status.
5212         * inline-frame.c: Include breakpoint.h.
5213         (stopped_by_user_bp_inline_frame): New function.
5214         (skip_inline_frames): Add parameter `stop_chain'.
5215         Move documention to inline-frame.h.
5216         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5217         whether the frame should be elided.
5218         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5219         Add moved documentation and update for new parameter.
5220
5221 2018-05-17  Simon Marchi  <[email protected]>
5222
5223         PR cli/14975
5224         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5225         unittests/format_pieces-selftests.c.
5226         * common/format.h (format_piece) <operator==>: New.
5227         (format_pieces) <operator[]>: Remove.
5228         * common/format.c (format_pieces::format_pieces): Handle \e.
5229         * unittests/format_pieces-selftests.c: New.
5230
5231 2018-05-17  Tom Tromey  <[email protected]>
5232
5233         PR symtab/23010:
5234         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5235         (dw2_instantiate_symtab): Add skip_partial parameter.
5236         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5237         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5238         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5239         (dw2_expand_symtabs_matching_one)
5240         (dw2_find_pc_sect_compunit_symtab)
5241         (dw2_debug_names_lookup_symbol)
5242         (dw2_debug_names_expand_symtabs_for_function): Update.
5243         (init_cutu_and_read_dies): Add skip_partial parameter.
5244         (process_psymtab_comp_unit, build_type_psymtabs_1)
5245         (process_skeletonless_type_unit, load_partial_comp_unit)
5246         (psymtab_to_symtab_1): Update.
5247         (load_full_comp_unit): Add skip_partial parameter.
5248         (process_imported_unit_die, dwarf2_read_addr_index)
5249         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5250         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5251         (read_signatured_type): Update.
5252
5253 2018-05-17  Simon Marchi  <[email protected]>
5254
5255         * value.c (release_value): Remove unused variable.
5256         (record_latest_value): Likewise.
5257         (access_value_history): Likewise.
5258         (preserve_values): Likewise.
5259
5260 2018-05-17  Tom Tromey  <[email protected]>
5261
5262         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5263         Initialize.
5264
5265 2018-05-16  Maciej W. Rozycki  <[email protected]>
5266
5267         PR gdb/22286
5268         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5269         Also handle registers whose width is not a multiple of
5270         PTRACE_TYPE_RET.
5271         (linux_nat_trad_target::store_register): Likewise.
5272
5273 2018-05-16  Tom Tromey  <[email protected]>
5274
5275         * gdbcore.h (core_bfd): Redefine.
5276         * corelow.c (core_target::close): Update.
5277         (core_target_open): Update.
5278         * progspace.h (struct program_space) <cbfd>: Now a
5279         gdb_bfd_ref_ptr.
5280
5281 2018-05-16  Tom Tromey  <[email protected]>
5282
5283         PR cli/19551:
5284         * symfile-add-flags.h (enum symfile_add_flags)
5285         <SYMFILE_NOT_FILENAME>: New constant.
5286         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5287         objfile name from BFD.
5288         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5289         * minidebug.c (find_separate_debug_file_in_section): Put
5290         ".gnu_debugdata" into BFD's file name.
5291
5292 2018-05-16  Simon Marchi  <[email protected]>
5293
5294         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5295         Remove.
5296
5297 2018-05-15  Tamar Christina  <[email protected]>
5298
5299         PR binutils/21446
5300         * aarch64-tdep.c (aarch64_analyze_prologue,
5301         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5302         Indicate not interested in errors.
5303
5304 2018-05-15  Maciej W. Rozycki  <[email protected]>
5305
5306         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5307         Supply the MIPS_ZERO_REGNUM register.
5308
5309 2018-05-15  Maciej W. Rozycki  <[email protected]>
5310
5311         * mips-tdep.c (mask_address_var): Make variable static.
5312
5313 2018-05-14  Tom Tromey  <[email protected]>
5314
5315         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5316
5317 2018-05-11  Andrew Burgess  <[email protected]>
5318
5319         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5320         FXSAVE_ADDR for the mxcsr register.
5321
5322 2018-05-11  Max Filippov  <[email protected]>
5323
5324         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5325
5326 2018-05-11  Pedro Alves  <[email protected]>
5327
5328         * corelow.c (core_target) <core_target>: No longer inline.
5329         Initialize m_core_gdbarch, m_core_vec and build the section table
5330         here.
5331         <~core_target>: New.
5332         <core_gdbarch, get_core_register_section>: New methods.
5333         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5334         factored out from ...
5335         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5336         (core_ops): Delete.
5337         (sniff_core_bfd): Add gdbarch parameter.
5338         (core_close): Delete, merged into ...
5339         (core_target::close): ... here.  Delete self.
5340         (core_close_cleanup): Delete.
5341         (core_target_open): Allocate a core_target on the heap.  Use a
5342         unique_ptr instead of a cleanup.  Bits moved into the core_target
5343         ctor.  Adjust to use core_target methods instead of globals.
5344         (get_core_register_section): Rename to ...
5345         (core_target::get_core_register_section): ... this and adjust.
5346         (struct get_core_registers_cb_data): New.
5347         (get_core_registers_cb): Use it.  Use bool.
5348         (core_target::fetch_registers, core_target::files_info)
5349         (core_target::xfer_partial, core_target::read_description)
5350         (core_target::pid_to, core_target::thread_name): Adjust to
5351         reference class fields instead of globals.
5352         * target.h (struct target_ops_deleter, target_ops_up): New.
5353
5354 2018-05-11  Pedro Alves  <[email protected]>
5355
5356         * corefile.c (core_file_command): Move to corelow.c.
5357         * corelow.c (the_core_target): Delete.
5358         (core_file_command): Moved from corefile.c.  Check exec_bfd
5359         instead of the_core_target.  Use target_detach instead of calling
5360         into the_core_target directly.
5361         (maybe_say_no_core_file_now): New.
5362         (core_target::detach): Use it.
5363         (_initialize_corelow): Remove references to the_core_target.
5364         * gdbcore.h (the_core_target): Delete.
5365
5366 2018-05-11  Tom Tromey  <[email protected]>
5367             Pedro Alves  <[email protected]>
5368
5369         * corefile.c (core_bfd): Remove.
5370         * gdbcore.h (core_bfd): Now a macro.
5371         * progspace.h (struct program_space) <cbfd>: New field.
5372
5373 2018-05-11  Tom Tromey  <[email protected]>
5374
5375         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5376         gdb::def_vector.
5377
5378 2018-05-10  Tom Tromey  <[email protected]>
5379
5380         * configure: Rebuild.
5381         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5382
5383 2018-05-10  Joel Brobecker  <[email protected]>
5384
5385         PR server/23158:
5386         * regformats/regdat.sh: Adjust script, following the addition
5387         of the new expedite_regs parameter to init_target_desc.
5388
5389 2018-05-10  Omair Javaid  <[email protected]>
5390     
5391         PR gdb/23127
5392         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5393         set_gdbarch_significant_addr_bit.
5394         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5395         set_gdbarch_significant_addr_bit.
5396         * utils.c (address_significant): Update to sign extend addr.
5397
5398 2018-05-09  Max Filippov  <[email protected]>
5399
5400         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5401         (xtensa_linux_init_abi): Limit tdep->num_regs by
5402         tdep->num_nopriv_regs.
5403         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5404         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5405         not initialized.
5406
5407 2018-05-08  Simon Marchi  <[email protected]>
5408
5409         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5410
5411 2018-05-08  Andrew Burgess  <[email protected]>
5412
5413         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5414         (I387_MXCSR_INIT_VAL): New constant.
5415         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5416         buffer if it was supplied by the inferior.
5417         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5418         (i387_xsave_get_clear_bv): New function.
5419         (i387_supply_xsave): Only read x87 control registers from the
5420         xsave buffer if the feature is enabled, and the state will have
5421         been written, otherwise, provide a suitable default.
5422         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5423         including x87 control registers.  Update control registers if they
5424         have changed from the default value, and mark features as enabled
5425         as required.
5426         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5427
5428 2018-05-08  Ulrich Weigand  <[email protected]>
5429
5430         * spu-tdep.c (info_spu_event_command): Fix output formatting.
5431
5432 2018-05-07  Tom Tromey  <[email protected]>
5433
5434         * configure: Rebuild.
5435         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5436
5437 2018-05-07  Tom Tromey  <[email protected]>
5438
5439         PR tdep/20362:
5440         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5441         bit.  Use correct value for VDIV.
5442
5443 2018-05-04  Tom Tromey  <[email protected]>
5444
5445         * configure: Rebuild.
5446         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5447
5448 2018-05-04  Tom Tromey  <[email protected]>
5449
5450         * linux-record.c (record_linux_system_call) <case
5451         RECORD_SYS_RECVFROM>: Add "break".
5452
5453 2018-05-04  Tom Tromey  <[email protected]>
5454
5455         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5456         Add missing "break".
5457         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5458         Add missing "break".
5459
5460 2018-05-04  Tom Tromey  <[email protected]>
5461
5462         * rs6000-tdep.c (ppc_process_record_op4)
5463         (ppc_process_record_op63): Add fall-through comment.
5464
5465 2018-05-04  Tom Tromey  <[email protected]>
5466
5467         * i386-tdep.c (i386_process_record): Add fall-through comment.
5468
5469 2018-05-04  Tom Tromey  <[email protected]>
5470
5471         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5472         comment.
5473
5474 2018-05-04  Tom Tromey  <[email protected]>
5475
5476         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5477         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5478         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5479         comment.
5480         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5481         comment.
5482         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5483         comment.
5484
5485 2018-05-04  Tom Tromey  <[email protected]>
5486
5487         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5488
5489 2018-05-04  Tom Tromey  <[email protected]>
5490
5491         * s390-tdep.c (s390_process_record): Fix fall-through comments.
5492         * xcoffread.c (scan_xcoff_symtab): Move comment later.
5493         * symfile.c (section_is_mapped): Fix fall-through comment.
5494         * stabsread.c (define_symbol, read_member_functions): Fix
5495         fall-through comment.
5496         * s390-linux-tdep.c (s390_process_record): Fix fall-through
5497         comment.
5498         * remote.c (remote_wait_as): Fix fall-through comment.
5499         * p-exp.y (yylex): Fix fall-through comment.
5500         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5501         comment.
5502         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5503         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5504         * jv-exp.y (yylex): Fix fall-through comment.
5505         * go-exp.y (lex_one_token): Fix fall-through comment.
5506         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5507         fall-through comment.
5508         * f-exp.y (yylex): Fix fall-through comment.
5509         * dwarf2read.c (process_die): Fix fall-through comments.
5510         * dbxread.c (process_one_symbol): Fix fall-through comment.
5511         * d-exp.y (lex_one_token): Fix fall-through comment.
5512         * cp-name-parser.y (yylex): Fix fall-through comment.
5513         * coffread.c (coff_symtab_read): Fix fall-through comment.
5514         * c-exp.y (lex_one_token): Fix fall-through comment.
5515         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5516         comment.
5517         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5518         comment.
5519
5520 2018-05-04  Tom Tromey  <[email protected]>
5521
5522         PR python/22730:
5523         * NEWS: Mention gdb.execute change.
5524         * gdbcmd.h (execute_control_command): Don't declare.
5525         * python/python.c (execute_gdb_command): Use read_command_lines_1,
5526         execute_control_commands, execute_control_commands_to_string.
5527         * cli/cli-script.h (execute_control_commands)
5528         (execute_control_commands_to_string): Declare.
5529         (execute_control_command): Add from_tty parameter.
5530         * cli/cli-script.c (execute_control_commands)
5531         (execute_control_commands_to_string): New functions.
5532         (execute_user_command): Use execute_control_commands.
5533         (execute_control_command_1): Add "from_tty" parameter.  Update.
5534         (execute_control_command): Likewise.
5535
5536 2018-05-04  Tom Tromey  <[email protected]>
5537
5538         PR python/22731:
5539         * NEWS: Mention that breakpoint commands are writable.
5540         * python/py-breakpoint.c (bppy_set_commands): New function.
5541         (breakpoint_object_getset) <"commands">: Use it.
5542
5543 2018-05-04  Tom Tromey  <[email protected]>
5544
5545         * tracepoint.c (actions_command): Update.
5546         * mi/mi-cmd-break.c (mi_command_line_array)
5547         (mi_command_line_array_cnt, mi_command_line_array_ptr)
5548         (mi_read_next_line): Remove.
5549         (mi_cmd_break_commands): Update.
5550         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5551         function_view.
5552         * cli/cli-script.c (get_command_line): Update.
5553         (process_next_line): Use function_view.  Constify.
5554         (recurse_read_control_structure, read_command_lines)
5555         (read_command_lines_1): Change argument types to function_view.
5556         (do_define_command, document_command): Update.
5557         * breakpoint.h (check_tracepoint_command): Don't declare.
5558         * breakpoint.c (check_tracepoint_command): Remove.
5559         (commands_command_1, create_tracepoint_from_upload): Update.
5560
5561 2018-05-04  Tom Tromey  <[email protected]>
5562
5563         PR gdb/11750:
5564         * cli/cli-script.h (enum command_control_type) <define_control>:
5565         New constant.
5566         * cli/cli-script.c (multi_line_command_p): Handle define_control.
5567         (build_command_line, execute_control_command_1)
5568         (process_next_line): Likewise.
5569         (do_define_command): New function, extracted from define_command.
5570         (define_command): Use it.
5571
5572 2018-05-04  Tom Tromey  <[email protected]>
5573
5574         * tracepoint.c (actions_command): Update.
5575         * cli/cli-script.h (read_command_lines): Update.
5576         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5577         (MAX_TMPBUF): Remove define.
5578         (define_command): Use string_printf.
5579         (document_command): Likewise.
5580         * breakpoint.c (commands_command_1): Update.
5581
5582 2018-05-04  Tom Tromey  <[email protected]>
5583
5584         * top.c (execute_command): Update.
5585         * cli/cli-script.h (print_command_lines): Now varargs.
5586         * cli/cli-script.c (print_command_lines): Now varargs.
5587         (execute_control_command_1) <case while_control, case if_control>:
5588         Update.
5589
5590 2018-05-04  Tom Tromey  <[email protected]>
5591
5592         * tracepoint.c (all_tracepoint_actions): Rename from
5593         all_tracepoint_actions_and_cleanup.  Change return type.
5594         (actions_command, encode_actions_1, encode_actions)
5595         (trace_dump_actions, tdump_command): Update.
5596         * remote.c (remote_download_command_source): Update.
5597         * python/python.c (gdbpy_eval_from_control_command)
5598         (python_command, python_interactive_command): Update.
5599         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5600         * guile/guile.c (guile_command)
5601         (gdbscm_eval_from_control_command, guile_command): Update.
5602         * compile/compile.c (compile_code_command)
5603         (compile_print_command, compile_to_object): Update.
5604         * cli/cli-script.h (struct command_lines_deleter): New.
5605         (counted_command_line): New typedef.
5606         (struct command_line): Add constructor, destructor.
5607         <body_list>: Remove.
5608         <body_list_0, body_list_1>: New members.
5609         (command_line_up): Remove typedef.
5610         (read_command_lines, read_command_lines_1, get_command_line):
5611         Update.
5612         (copy_command_lines): Don't declare.
5613         * cli/cli-script.c (build_command_line): Use "new".
5614         (get_command_line): Return counted_command_line.
5615         (print_command_lines, execute_user_command)
5616         (execute_control_command_1, while_command, if_command): Update.
5617         (realloc_body_list): Remove.
5618         (process_next_line, recurse_read_control_structure): Update.
5619         (read_command_lines, read_command_lines_1): Return counted_command_line.
5620         (free_command_lines): Use "delete".
5621         (copy_command_lines): Remove.
5622         (define_command, document_command, show_user_1): Update.
5623         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5624         a counted_command_line.
5625         * breakpoint.h (counted_command_line): Remove typedef.
5626         (breakpoint_set_commands): Update.
5627         * breakpoint.c (check_no_tracepoint_commands)
5628         (validate_commands_for_breakpoint): Update.
5629         (breakpoint_set_commands): Change commands to be a
5630         counted_command_line.
5631         (commands_command_1, update_dprintf_command_list)
5632         (create_tracepoint_from_upload): Update.
5633
5634 2018-05-04  Tom Tromey  <[email protected]>
5635
5636         * cli/cli-decode.h (cmd_list_element): New constructor.
5637         (~cmd_list_element): New destructor.
5638         (struct cmd_list_element): Add initializers.
5639         * cli/cli-decode.c (do_add_cmd): Use "new".
5640         (delete_cmd): Use "delete".
5641
5642 2018-05-04  Jan Kratochvil  <[email protected]>
5643             Pedro Alves <[email protected]>
5644
5645         PR breakpoints/19806 and support for PR external/20207.
5646         * NEWS: Mention Aarch64 watchpoint improvements.
5647         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5648         watchpoints and PR external/20207 watchpoints.
5649         * nat/aarch64-linux-hw-point.c
5650         (kernel_supports_any_contiguous_range): New.
5651         (aarch64_watchpoint_offset): New.
5652         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5653         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5654         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5655         (aarch64_align_watchpoint): New parameters aligned_offset_p and
5656         next_addr_orig_p.  Support PR external/20207 watchpoints.
5657         (aarch64_downgrade_regs): New.
5658         (aarch64_dr_state_insert_one_point): New parameters offset and
5659         addr_orig.
5660         (aarch64_dr_state_remove_one_point): Likewise.
5661         (aarch64_handle_breakpoint): Update caller.
5662         (aarch64_handle_aligned_watchpoint): Likewise.
5663         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5664         aligned_offset.
5665         (aarch64_linux_set_debug_regs): Remove const from state.  Call
5666         aarch64_downgrade_regs.
5667         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5668         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5669         (DR_CONTROL_MASK): ... this.
5670         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5671         (unsigned int aarch64_watchpoint_offset): New prototype.
5672         (aarch64_linux_set_debug_regs): Remove const from state.
5673         * utils.c (align_up, align_down): Move to ...
5674         * common/common-utils.c (align_up, align_down): ... here.
5675         * utils.h (align_up, align_down): Move to ...
5676         * common/common-utils.h (align_up, align_down): ... here.
5677
5678 2018-05-04  Joel Brobecker  <[email protected]>
5679
5680         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5681         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5682         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5683         Re-implement to match the ABI as summarized in GCC's
5684         gcc/config/sparc/sparc.c.  All callers updated.
5685         (sparc32_store_arguments): Remove assertion.
5686
5687 2018-05-04  Tom Tromey  <[email protected]>
5688
5689         * printcmd.c: Don't include tui.h.
5690         (decode_format): Use skip_spaces.
5691
5692 2018-05-04  Tom Tromey  <[email protected]>
5693
5694         PR gdb/22619:
5695         * printcmd.c (last_count): New global.
5696         (x_command): Use saved count when repeating.
5697
5698 2018-05-04  Tom Tromey  <[email protected]>
5699
5700         * nto-procfs.c (do_closedir_cleanup): Remove.
5701         (procfs_pidlist): Use gdb_dir_up.
5702         * procfs.c (do_closedir_cleanup): Remove.
5703         (proc_update_threads): Use gdb_dir_up.
5704         * common/filestuff.h (struct gdb_dir_deleter): New.
5705         (gdb_dir_up): New typedef.
5706
5707 2018-05-04  Tom Tromey  <[email protected]>
5708
5709         * ada-lang.c (print_mention_exception): Use std::string.
5710
5711 2018-05-04  Tom Tromey  <[email protected]>
5712
5713         * ada-lang.c (create_excep_cond_exprs): Update.
5714         (ada_exception_catchpoint_cond_string): Use std::string.
5715
5716 2018-05-04  Tom Tromey  <[email protected]>
5717
5718         * ada-lang.c (xget_renaming_scope): Return std::string.
5719         (old_renaming_is_invisible): Update.
5720
5721 2018-05-04  Tom Tromey  <[email protected]>
5722
5723         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5724         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5725
5726 2018-05-04  Ulrich Weigand  <[email protected]>
5727
5728         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5729
5730 2018-05-04  Tom Tromey  <[email protected]>
5731
5732         * remote.c (remote_query_supported_append): Change type.
5733         (remote_check_symbols): Update.
5734
5735 2018-05-04  Paul Pluzhnikov  <[email protected]>
5736
5737         PR gdb/11420
5738         * configure.ac: Prepend libpython.
5739         * python/python-config.py: Likewise.
5740         * configure: Regenerate.
5741
5742 2018-05-03  Simon Marchi  <[email protected]>
5743
5744         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5745
5746 2018-05-03  Pedro Alves  <[email protected]>
5747
5748         * s390-linux-nat.c
5749         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5750         override.  Write 'true' instead of '1'.
5751         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5752         declaration.
5753
5754 2018-05-02  Pedro Alves  <[email protected]>
5755
5756         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5757         add_inf_child_target.
5758         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5759         add_inf_child_target.
5760         * aix-thread.c (aix_thread_target_info): New.
5761         (aix_thread_target) <shortname, longname, doc>: Delete.
5762         <info>: New.
5763         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5764         add_inf_child_target.
5765         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5766         add_inf_child_target.
5767         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5768         add_inf_child_target.
5769         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5770         add_inf_child_target.
5771         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5772         add_inf_child_target.
5773         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5774         add_inf_child_target.
5775         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5776         add_inf_child_target.
5777         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5778         add_inf_child_target.
5779         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5780         add_inf_child_target.
5781         * bfd-target.c (target_bfd_target_info): New.
5782         (target_bfd) <shortname, longname, doc>: Delete.
5783         <info>: New.
5784         * bsd-kvm.c (bsd_kvm_target_info): New.
5785         (bsd_kvm_target) <shortname, longname, doc>: Delete.
5786         <info>: New.
5787         (bsd_kvm_target::open): Rename to ...
5788         (bsd_kvm_target_open): ... this.  Adjust.
5789         * bsd-uthread.c (bsd_uthread_target_info): New.
5790         (bsd_uthread_target) <shortname, longname, doc>: Delete.
5791         <info>: New.
5792         * corefile.c (core_file_command): Adjust.
5793         * corelow.c (core_target_info): New.
5794         (core_target) <shortname, longname, doc>: Delete.
5795         <info>: New.
5796         (core_target::open): Rename to ...
5797         (core_target_open): ... this.  Adjust.
5798         * ctf.c (ctf_target_info): New.
5799         (ctf_target) <shortname, longname, doc>: Delete.
5800         <info>: New.
5801         (ctf_target::open): Rename to ...
5802         (ctf_target_open): ... this.
5803         (_initialize_ctf): Adjust.
5804         * exec.c (exec_target_info): New.
5805         (exec_target) <shortname, longname, doc>: Delete.
5806         <info>: New.
5807         (exec_target::open): Rename to ...
5808         (exec_target_open): ... this.
5809         * gdbcore.h (core_target_open): Declare.
5810         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5811         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5812         add_inf_child_target.
5813         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5814         add_inf_child_target.
5815         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5816         add_inf_child_target.
5817         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5818         add_inf_child_target.
5819         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5820         add_inf_child_target.
5821         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5822         add_inf_child_target.
5823         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5824         add_inf_child_target.
5825         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5826         add_inf_child_target.
5827         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5828         add_inf_child_target.
5829         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5830         add_inf_child_target.
5831         * inf-child.c (inf_child_target_info): New.
5832         (inf_child_target::info): New.
5833         (inf_child_open_target): Remove 'target' parameter.  Use
5834         get_native_target instead.
5835         (inf_child_target::open): Delete.
5836         (add_inf_child_target): New.
5837         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5838         Delete.
5839         <info>: New.
5840         (add_inf_child_target): Declare.
5841         (inf_child_open_target): Declare.
5842         * linux-thread-db.c (thread_db_target_info): New.
5843         (thread_db_target) <shortname, longname, doc>: Delete.
5844         <info>: New.
5845         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5846         add_inf_child_target.
5847         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5848         add_inf_child_target.
5849         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5850         add_inf_child_target.
5851         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5852         add_inf_child_target.
5853         * make-target-delegates (print_class): Adjust.
5854         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5855         add_inf_child_target.
5856         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5857         add_inf_child_target.
5858         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5859         add_inf_child_target.
5860         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5861         add_inf_child_target.
5862         * nto-procfs.c (nto_native_target_info): New.
5863         (nto_procfs_target_native) <shortname, longname, doc>:
5864         Delete.
5865         <info>: New.
5866         (nto_procfs_target_info): New.
5867         (nto_procfs_target_procfs) <shortname, longname, doc>:
5868         Delete.
5869         <info>: New.
5870         (init_procfs_targets): Adjust.
5871         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5872         add_inf_child_target.
5873         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5874         add_inf_child_target.
5875         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5876         add_inf_child_target.
5877         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5878         add_inf_child_target.
5879         * ravenscar-thread.c (ravenscar_target_info): New.
5880         (ravenscar_thread_target) <shortname, longname, doc>:
5881         Delete.
5882         <info>: New.
5883         * record-btrace.c (record_btrace_target_info):
5884         (record_btrace_target) <shortname, longname, doc>: Delete.
5885         <info>: New.
5886         (record_btrace_target::open): Rename to ...
5887         (record_btrace_target_open): ... this.  Adjust.
5888         * record-full.c (record_longname, record_doc): New.
5889         (record_full_base_target) <shortname, longname, doc>: Delete.
5890         <info>: New.
5891         (record_full_target_info): New.
5892         (record_full_target): <shortname>: Delete.
5893         <info>: New.
5894         (record_full_core_open_1, record_full_open_1): Update comments.
5895         (record_full_base_target::open): Rename to ...
5896         (record_full_open): ... this.
5897         (cmd_record_full_restore): Update.
5898         (_initialize_record_full): Update.
5899         * remote-sim.c (remote_sim_target_info): New.
5900         (gdbsim_target) <shortname, longname, doc>: Delete.
5901         <info>: New.
5902         (gdbsim_target::open): Rename to ...
5903         (gdbsim_target_open): ... this.
5904         (_initialize_remote_sim): Adjust.
5905         * remote.c (remote_doc): New.
5906         (remote_target_info): New.
5907         (remote_target) <shortname, longname, doc>: Delete.
5908         <info>: New.
5909         (extended_remote_target_info): New.
5910         (extended_remote_target) <shortname, longname, doc>: Delete.
5911         <info>: New.
5912         (remote_target::open_1): Make static.  Adjust.
5913         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5914         * s390-linux-nat.c (_initialize_s390_nat): Use
5915         add_inf_child_target.
5916         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5917         add_inf_child_target.
5918         * sol-thread.c (thread_db_target_info): New.
5919         (sol_thread_target) <shortname, longname, doc>: Delete.
5920         <info>: New.
5921         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5922         add_inf_child_target.
5923         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5924         add_inf_child_target.
5925         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5926         add_inf_child_target.
5927         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5928         add_inf_child_target.
5929         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5930         add_inf_child_target.
5931         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5932         add_inf_child_target.
5933         * spu-linux-nat.c (_initialize_spu_nat): Use
5934         add_inf_child_target.
5935         * spu-multiarch.c (spu_multiarch_target_info): New.
5936         (spu_multiarch_target) <shortname, longname, doc>: Delete.
5937         <info>: New.
5938         * target-delegates.c: Regenerate.
5939         * target.c: Include <unordered_map>.
5940         (target_ops_p): Delete.
5941         (DEF_VEC_P(target_ops_p)): Delete.
5942         (target_factories): New.
5943         (test_target_info): New.
5944         (test_target_ops::info): New.
5945         (open_target): Adjust to use target_factories.
5946         (add_target_with_completer): Rename to ...
5947         (add_target): ... this.  Change prototype.  Register target_info
5948         and open callback in target_factories.  Register target_info in
5949         command context instead of target_ops.
5950         (add_target): Delete old implementation.
5951         (add_deprecated_target_alias): Change prototype.  Adjust.
5952         (the_native_target): New.
5953         (set_native_target, get_native_target): New.
5954         (find_default_run_target): Use the_native_target.
5955         (find_attach_target, find_run_target): Simplify.
5956         (target_ops::open): Delete.
5957         (dummy_target_info): New.
5958         (dummy_target::shortname, dummy_target::longname)
5959         (dummy_target::doc): Delete.
5960         (dummy_target::info): New.
5961         (debug_target::shortname, debug_target::longname)
5962         (debug_target::doc): Delete.
5963         (debug_target::info): New.
5964         * target.h (struct target_info): New.
5965         (target_ops::~target_ops): Add comment.
5966         (target_ops::info): New.
5967         (target_ops::shortname, target_ops::longname, target_ops::doc): No
5968         longer virtual.  Implement in terms of target_info.
5969         (set_native_target, get_native_target): Declare.
5970         (target_open_ftype): New.
5971         (add_target, add_target_with_completer)
5972         (add_deprecated_target_alias): Change prototype.
5973         (test_target) <shortname, longname, doc>: Delete.
5974         <info>: New.
5975         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5976         add_inf_child_target.
5977         * tracefile-tfile.c (tfile_target_info): New.
5978         (tfile_target) <shortname, longname, doc>: Delete.
5979         <info>: New.
5980         (tfile_target::open): Rename to ...
5981         (tfile_target_open): ... this.
5982         (_initialize_tracefile_tfile): Adjust.
5983         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5984         add_inf_child_target.
5985         * windows-nat.c (_initialize_windows_nat): Use
5986         add_inf_child_target.
5987         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5988         add_inf_child_target.
5989
5990 2018-05-02  Pedro Alves  <[email protected]>
5991
5992         * linux-nat.h (linux_nat_target) <low_new_thread,
5993         low_delete_thread, low_new_fork, low_forget_process,
5994         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5995         New virtual methods.
5996         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5997         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5998         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5999         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6000         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6001         Delete.
6002         * linux-fork.c (delete_fork): Adjust to call low method.
6003         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6004         (linux_nat_new_fork, linux_nat_forget_process_hook)
6005         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6006         (linux_nat_status_is_event):
6007         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6008         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6009         to call low method.
6010         (sigtrap_is_event): Rename to ...
6011         (linux_nat_target::low_status_is_event): ... this.
6012         (linux_nat_set_status_is_event): Delete.
6013         (save_stop_reason, linux_nat_wait_1)
6014         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6015         low methods.
6016         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6017         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6018         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6019         (linux_nat_set_prepare_to_resume): Delete.
6020         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6021         low virtual methods.
6022         * amd64-linux-nat.c: Likewise.
6023         * arm-linux-nat.c: Likewise.
6024         * i386-linux-nat.c: Likewise.
6025         * ia64-linux-nat.c: Likewise.
6026         * mips-linux-nat.c: Likewise.
6027         * ppc-linux-nat.c: Likewise.
6028         * s390-linux-nat.c: Likewise.
6029         * sparc64-linux-nat.c: Likewise.
6030         * x86-linux-nat.c: Likewise.
6031         * x86-linux-nat.h: Include "nat/x86-linux.h".
6032         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6033         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6034         Override methods.
6035
6036 2018-05-02  Pedro Alves  <[email protected]>
6037
6038         * target.h (target_ops)
6039         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6040         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6041         stopped_by_watchpoint, have_continuable_watchpoint,
6042         stopped_data_address, watchpoint_addr_within_range,
6043         can_accel_watchpoint_condition, can_run, thread_alive,
6044         has_all_memory, has_memory, has_stack, has_registers,
6045         has_execution, can_async_p, is_async_p, supports_non_stop,
6046         always_non_stop_p, can_execute_reverse, supports_multi_process,
6047         supports_enable_disable_tracepoint,
6048         supports_disable_randomization, supports_string_tracing,
6049         supports_evaluation_of_breakpoint_conditions,
6050         can_run_breakpoint_commands, filesystem_is_local,
6051         can_download_tracepoint, get_trace_state_variable_value,
6052         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6053         record_is_replaying, record_will_replay,
6054         augmented_libraries_svr4_read>: Adjust to return bool.
6055         * aarch64-linux-nat.c: All implementations adjusted.
6056         * aix-thread.c: All implementations adjusted.
6057         * arm-linux-nat.c: All implementations adjusted.
6058         * breakpoint.c: All implementations adjusted.
6059         * bsd-kvm.c: All implementations adjusted.
6060         * bsd-uthread.c: All implementations adjusted.
6061         * corelow.c: All implementations adjusted.
6062         * ctf.c: All implementations adjusted.
6063         * darwin-nat.c: All implementations adjusted.
6064         * darwin-nat.h: All implementations adjusted.
6065         * exec.c: All implementations adjusted.
6066         * fbsd-nat.c: All implementations adjusted.
6067         * fbsd-nat.h: All implementations adjusted.
6068         * gnu-nat.c: All implementations adjusted.
6069         * gnu-nat.h: All implementations adjusted.
6070         * go32-nat.c: All implementations adjusted.
6071         * ia64-linux-nat.c: All implementations adjusted.
6072         * inf-child.c: All implementations adjusted.
6073         * inf-child.h: All implementations adjusted.
6074         * inf-ptrace.c: All implementations adjusted.
6075         * inf-ptrace.h: All implementations adjusted.
6076         * linux-nat.c: All implementations adjusted.
6077         * linux-nat.h: All implementations adjusted.
6078         * mips-linux-nat.c: All implementations adjusted.
6079         * nto-procfs.c: All implementations adjusted.
6080         * ppc-linux-nat.c: All implementations adjusted.
6081         * procfs.c: All implementations adjusted.
6082         * ravenscar-thread.c: All implementations adjusted.
6083         * record-btrace.c: All implementations adjusted.
6084         * record-full.c: All implementations adjusted.
6085         * remote-sim.c: All implementations adjusted.
6086         * remote.c: All implementations adjusted.
6087         * s390-linux-nat.c: All implementations adjusted.
6088         * sol-thread.c: All implementations adjusted.
6089         * spu-multiarch.c: All implementations adjusted.
6090         * target-delegates.c: All implementations adjusted.
6091         * target.c: All implementations adjusted.
6092         * target.h: All implementations adjusted.
6093         * tracefile-tfile.c: All implementations adjusted.
6094         * tracefile.c: All implementations adjusted.
6095         * tracefile.h: All implementations adjusted.
6096         * windows-nat.c: All implementations adjusted.
6097         * x86-linux-nat.h: All implementations adjusted.
6098         * x86-nat.h: All implementations adjusted.
6099
6100 2018-05-02  Pedro Alves  <[email protected]>
6101
6102         * make-target-delegates (scan_target_h): Don't trim lines here.
6103         Replace sequences of tabs and/or whitespace with a single
6104         whitespace.
6105         (top level, parsing methods): Trim each line before processing it
6106         here.
6107
6108 2018-05-02  Pedro Alves  <[email protected]>
6109             John Baldwin  <[email protected]>
6110
6111         * target.h (enum strata) <debug_stratum>: New.
6112         (struct target_ops) <all delegation methods>: Replace by C++
6113         virtual methods, and drop "to_" prefix.  All references updated
6114         throughout.
6115         <to_shortname, to_longname, to_doc, to_data,
6116         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6117         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6118         virtual methods.  All references updated throughout.
6119         <can_attach, supports_terminal_ours, can_create_inferior,
6120         get_thread_control_capabilities, attach_no_wait>: New
6121         virtual methods.
6122         <insert_breakpoint, remove_breakpoint>: Now
6123         TARGET_DEFAULT_NORETURN methods.
6124         <info_proc>: Now returns bool.
6125         <to_magic>: Delete.
6126         (OPS_MAGIC): Delete.
6127         (current_target): Delete.  All references replaced by references
6128         to ...
6129         (target_stack): ... this.  New.
6130         (target_shortname, target_longname): Adjust.
6131         (target_can_run): Now a function declaration.
6132         (default_child_has_all_memory, default_child_has_memory)
6133         (default_child_has_stack, default_child_has_registers)
6134         (default_child_has_execution): Remove target_ops parameter.
6135         (complete_target_initialization): Delete.
6136         (memory_breakpoint_target): New template class.
6137         (test_target_ops): Refactor as a C++ class with virtual methods.
6138         * make-target-delegates (NAME_PART): Tighten.
6139         (POINTER_PART, CP_SYMBOL): New.
6140         (SIMPLE_RETURN_PART): Reimplement.
6141         (VEC_RETURN_PART): Expect less.
6142         (RETURN_PART, VIRTUAL_PART): New.
6143         (METHOD): Adjust to C++ virtual methods.
6144         (scan_target_h): Remove reference to C99.
6145         (dname): Output "target_ops::" prefix.
6146         (write_function_header): Adjust to output a C++ class method.
6147         (write_declaration): New.
6148         (write_delegator): Adjust to output a C++ class method.
6149         (tdname): Output "dummy_target::" prefix.
6150         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6151         method.
6152         (tdefault_names, debug_names): Delete.
6153         (return_types, tdefaults, styles, argtypes_array): New.
6154         (top level): All methods are delegators.
6155         (print_class): New.
6156         (top level): Print dummy_target and debug_target classes.
6157         * target-delegates.c: Regenerate.
6158         * target-debug.h (target_debug_print_enum_info_proc_what)
6159         (target_debug_print_thread_control_capabilities)
6160         (target_debug_print_thread_info_p): New.
6161         * target.c (dummy_target): Delete.
6162         (the_dummy_target, the_debug_target): New.
6163         (target_stack): Now extern.
6164         (set_targetdebug): Push/unpush debug target.
6165         (default_child_has_all_memory, default_child_has_memory)
6166         (default_child_has_stack, default_child_has_registers)
6167         (default_child_has_execution): Remove target_ops parameter.
6168         (complete_target_initialization): Delete.
6169         (add_target_with_completer): No longer call
6170         complete_target_initialization.
6171         (target_supports_terminal_ours): Use regular delegation.
6172         (update_current_target): Delete.
6173         (push_target): No longer check magic number.  Don't call
6174         update_current_target.
6175         (unpush_target): Don't call update_current_target.
6176         (target_is_pushed): No longer check magic number.
6177         (target_require_runnable): Skip for all stratums over
6178         process_stratum.
6179         (target_ops::info_proc): New.
6180         (target_info_proc): Use find_target_at and
6181         find_default_run_target.
6182         (target_supports_disable_randomization): Use regular delegation.
6183         (target_get_osdata): Use find_target_at.
6184         (target_ops::open, target_ops::close, target_ops::can_attach)
6185         (target_ops::attach, target_ops::can_create_inferior)
6186         (target_ops::create_inferior, target_ops::can_run)
6187         (target_can_run): New.
6188         (default_fileio_target): Use regular delegation.
6189         (target_ops::fileio_open, target_ops::fileio_pwrite)
6190         (target_ops::fileio_pread, target_ops::fileio_fstat)
6191         (target_ops::fileio_close, target_ops::fileio_unlink)
6192         (target_ops::fileio_readlink): New.
6193         (target_fileio_open_1, target_fileio_unlink)
6194         (target_fileio_readlink): Always call the target method.  Handle
6195         FILEIO_ENOSYS.
6196         (return_zero, return_zero_has_execution): Delete.
6197         (init_dummy_target): Delete.
6198         (dummy_target::dummy_target, dummy_target::shortname)
6199         (dummy_target::longname, dummy_target::doc)
6200         (debug_target::debug_target, debug_target::shortname)
6201         (debug_target::longname, debug_target::doc): New.
6202         (target_supports_delete_record): Use regular delegation.
6203         (setup_target_debug): Delete.
6204         (maintenance_print_target_stack): Skip debug_stratum.
6205         (initialize_targets): Instantiate the_dummy_target and
6206         the_debug_target.
6207         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6208         use target_stack.
6209         (target_auxv_search, fprint_target_auxv): Adjust.
6210         (info_auxv_command): Adjust to use target_stack.
6211         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6212         * exceptions.c (print_flush): Handle a NULL target_stack.
6213         * regcache.c (target_ops_no_register): Refactor as class with
6214         virtual methods.
6215
6216         * exec.c (exec_target): New class.
6217         (exec_ops): Now an exec_target.
6218         (exec_open, exec_close_1, exec_get_section_table)
6219         (exec_xfer_partial, exec_files_info, exec_has_memory)
6220         (exec_make_note_section): Refactor as exec_target methods.
6221         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6222         Delete.
6223         (exec_target::find_memory_regions): New.
6224         (_initialize_exec): Don't call init_exec_ops.
6225         * gdbcore.h (exec_file_clear): Delete.
6226
6227         * corefile.c (core_target): Delete.
6228         (core_file_command): Adjust.
6229         * corelow.c (core_target): New class.
6230         (the_core_target): New.
6231         (core_close): Remove target_ops parameter.
6232         (core_close_cleanup): Adjust.
6233         (core_target::close): New.
6234         (core_open, core_detach, get_core_registers, core_files_info)
6235         (core_xfer_partial, core_thread_alive, core_read_description)
6236         (core_pid_to_str, core_thread_name, core_has_memory)
6237         (core_has_stack, core_has_registers, core_info_proc): Rework as
6238         core_target methods.
6239         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6240         (_initialize_corelow): Initialize the_core_target.
6241         * gdbcore.h (core_target): Delete.
6242         (the_core_target): New.
6243
6244         * ctf.c: (ctf_target): New class.
6245         (ctf_ops): Now a ctf_target.
6246         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6247         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6248         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6249         methods.
6250         (init_ctf_ops): Delete.
6251         (_initialize_ctf): Don't call it.
6252         * tracefile-tfile.c (tfile_target): New class.
6253         (tfile_ops): Now a tfile_target.
6254         (tfile_open, tfile_close, tfile_files_info)
6255         (tfile_get_tracepoint_status, tfile_trace_find)
6256         (tfile_fetch_registers, tfile_xfer_partial)
6257         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6258         Refactor as tfile_target methods.
6259         (tfile_xfer_partial_features): Remove target_ops parameter.
6260         (init_tfile_ops): Delete.
6261         (_initialize_tracefile_tfile): Don't call it.
6262         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6263         (tracefile_has_stack, tracefile_has_registers)
6264         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6265         tracefile_target methods.
6266         (init_tracefile_ops): Delete.
6267         (tracefile_target::tracefile_target): New.
6268         * tracefile.h: Include "target.h".
6269         (tracefile_target): New class.
6270         (init_tracefile_ops): Delete.
6271
6272         * spu-multiarch.c (spu_multiarch_target): New class.
6273         (spu_ops): Now a spu_multiarch_target.
6274         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6275         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6276         (spu_search_memory, spu_mourn_inferior): Refactor as
6277         spu_multiarch_target methods.
6278         (init_spu_ops): Delete.
6279         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6280         complete_target_initialization.
6281
6282         * ravenscar-thread.c (ravenscar_thread_target): New class.
6283         (ravenscar_ops): Now a ravenscar_thread_target.
6284         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6285         (ravenscar_thread_alive, ravenscar_pid_to_str)
6286         (ravenscar_fetch_registers, ravenscar_store_registers)
6287         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6288         (ravenscar_stopped_by_hw_breakpoint)
6289         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6290         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6291         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6292         methods.
6293         (init_ravenscar_thread_ops): Delete.
6294         (_initialize_ravenscar): Remove references to
6295         init_ravenscar_thread_ops and complete_target_initialization.
6296
6297         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6298         (bsd_uthread_target): New class.
6299         (bsd_uthread_ops): Now a bsd_uthread_target.
6300         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6301         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6302         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6303         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6304         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6305         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6306         (bsd_uthread_target): Delete function.
6307         (_initialize_bsd_uthread): Remove reference to
6308         complete_target_initialization.
6309
6310         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6311         (target_bfd): ... this new class.
6312         (target_bfd_xfer_partial, target_bfd_get_section_table)
6313         (target_bfd_close): Refactor as target_bfd methods.
6314         (target_bfd::~target_bfd): New.
6315         (target_bfd_reopen): Adjust.
6316         (target_bfd::close): New.
6317
6318         * record-btrace.c (record_btrace_target): New class.
6319         (record_btrace_ops): Now a record_btrace_target.
6320         (record_btrace_open, record_btrace_stop_recording)
6321         (record_btrace_disconnect, record_btrace_close)
6322         (record_btrace_async, record_btrace_info)
6323         (record_btrace_insn_history, record_btrace_insn_history_range)
6324         (record_btrace_insn_history_from, record_btrace_call_history)
6325         (record_btrace_call_history_range)
6326         (record_btrace_call_history_from, record_btrace_record_method)
6327         (record_btrace_is_replaying, record_btrace_will_replay)
6328         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6329         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6330         (record_btrace_store_registers, record_btrace_prepare_to_store)
6331         (record_btrace_to_get_unwinder)
6332         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6333         (record_btrace_commit_resume, record_btrace_wait)
6334         (record_btrace_stop, record_btrace_can_execute_reverse)
6335         (record_btrace_stopped_by_sw_breakpoint)
6336         (record_btrace_supports_stopped_by_sw_breakpoint)
6337         (record_btrace_stopped_by_hw_breakpoint)
6338         (record_btrace_supports_stopped_by_hw_breakpoint)
6339         (record_btrace_update_thread_list, record_btrace_thread_alive)
6340         (record_btrace_goto_begin, record_btrace_goto_end)
6341         (record_btrace_goto, record_btrace_stop_replaying_all)
6342         (record_btrace_execution_direction)
6343         (record_btrace_prepare_to_generate_core)
6344         (record_btrace_done_generating_core): Refactor as
6345         record_btrace_target methods.
6346         (init_record_btrace_ops): Delete.
6347         (_initialize_record_btrace): Remove reference to
6348         init_record_btrace_ops.
6349         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6350         the execution_direction global.
6351         (record_full_base_target, record_full_target)
6352         (record_full_core_target): New classes.
6353         (record_full_ops): Now a record_full_target.
6354         (record_full_core_ops): Now a record_full_core_target.
6355         (record_full_target::detach, record_full_target::disconnect)
6356         (record_full_core_target::disconnect)
6357         (record_full_target::mourn_inferior, record_full_target::kill):
6358         New.
6359         (record_full_open, record_full_close, record_full_async): Refactor
6360         as methods of the record_full_base_target class.
6361         (record_full_resume, record_full_commit_resume): Refactor
6362         as methods of the record_full_target class.
6363         (record_full_wait, record_full_stopped_by_watchpoint)
6364         (record_full_stopped_data_address)
6365         (record_full_stopped_by_sw_breakpoint)
6366         (record_full_supports_stopped_by_sw_breakpoint)
6367         (record_full_stopped_by_hw_breakpoint)
6368         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6369         methods of the record_full_base_target class.
6370         (record_full_store_registers, record_full_xfer_partial)
6371         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6372         Refactor as methods of the record_full_target class.
6373         (record_full_can_execute_reverse, record_full_get_bookmark)
6374         (record_full_goto_bookmark, record_full_execution_direction)
6375         (record_full_record_method, record_full_info, record_full_delete)
6376         (record_full_is_replaying, record_full_will_replay)
6377         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6378         (record_full_stop_replaying): Refactor as methods of the
6379         record_full_base_target class.
6380         (record_full_core_resume, record_full_core_kill)
6381         (record_full_core_fetch_registers)
6382         (record_full_core_prepare_to_store)
6383         (record_full_core_store_registers, record_full_core_xfer_partial)
6384         (record_full_core_insert_breakpoint)
6385         (record_full_core_remove_breakpoint)
6386         (record_full_core_has_execution): Refactor
6387         as methods of the record_full_core_target class.
6388         (record_full_base_target::supports_delete_record): New.
6389         (init_record_full_ops): Delete.
6390         (init_record_full_core_ops): Delete.
6391         (record_full_save): Refactor as method of the
6392         record_full_base_target class.
6393         (_initialize_record_full): Remove references to
6394         init_record_full_ops and init_record_full_core_ops.
6395
6396         * remote.c (remote_target, extended_remote_target): New classes.
6397         (remote_ops): Now a remote_target.
6398         (extended_remote_ops): Now an extended_remote_target.
6399         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6400         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6401         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6402         (remote_pass_signals, remote_set_syscall_catchpoint)
6403         (remote_program_signals, )
6404         (remote_thread_always_alive): Remove target_ops parameter.
6405         (remote_thread_alive, remote_thread_name)
6406         (remote_update_thread_list, remote_threads_extra_info)
6407         (remote_static_tracepoint_marker_at)
6408         (remote_static_tracepoint_markers_by_strid)
6409         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6410         (remote_open): Refactor as methods of remote_target.
6411         (extended_remote_open, extended_remote_detach)
6412         (extended_remote_attach, extended_remote_post_attach):
6413         (extended_remote_supports_disable_randomization)
6414         (extended_remote_create_inferior): : Refactor as method of
6415         extended_remote_target.
6416         (remote_set_permissions, remote_open_1, remote_detach)
6417         (remote_follow_fork, remote_follow_exec, remote_disconnect)
6418         (remote_resume, remote_commit_resume, remote_stop)
6419         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6420         (remote_terminal_ours, remote_wait, remote_fetch_registers)
6421         (remote_prepare_to_store, remote_store_registers)
6422         (remote_flash_erase, remote_flash_done, remote_files_info)
6423         (remote_kill, remote_mourn, remote_insert_breakpoint)
6424         (remote_remove_breakpoint, remote_insert_watchpoint)
6425         (remote_watchpoint_addr_within_range)
6426         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6427         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6428         (remote_supports_stopped_by_sw_breakpoint)
6429         (remote_stopped_by_hw_breakpoint)
6430         (remote_supports_stopped_by_hw_breakpoint)
6431         (remote_stopped_by_watchpoint, remote_stopped_data_address)
6432         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6433         (remote_verify_memory): Refactor as methods of remote_target.
6434         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6435         parameter.
6436         (remote_xfer_partial, remote_get_memory_xfer_limit)
6437         (remote_search_memory, remote_rcmd, remote_memory_map)
6438         (remote_pid_to_str, remote_get_thread_local_address)
6439         (remote_get_tib_address, remote_read_description): Refactor as
6440         methods of remote_target.
6441         (remote_target::fileio_open, remote_target::fileio_pwrite)
6442         (remote_target::fileio_pread, remote_target::fileio_close): New.
6443         (remote_hostio_readlink, remote_hostio_fstat)
6444         (remote_filesystem_is_local, remote_can_execute_reverse)
6445         (remote_supports_non_stop, remote_supports_disable_randomization)
6446         (remote_supports_multi_process, remote_supports_cond_breakpoints)
6447         (remote_supports_enable_disable_tracepoint)
6448         (remote_supports_string_tracing)
6449         (remote_can_run_breakpoint_commands, remote_trace_init)
6450         (remote_download_tracepoint, remote_can_download_tracepoint)
6451         (remote_download_trace_state_variable, remote_enable_tracepoint)
6452         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6453         (remote_trace_start, remote_get_trace_status)
6454         (remote_get_tracepoint_status, remote_trace_stop)
6455         (remote_trace_find, remote_get_trace_state_variable_value)
6456         (remote_save_trace_data, remote_get_raw_trace_data)
6457         (remote_set_disconnected_tracing, remote_core_of_thread)
6458         (remote_set_circular_trace_buffer, remote_traceframe_info)
6459         (remote_get_min_fast_tracepoint_insn_len)
6460         (remote_set_trace_buffer_size, remote_set_trace_notes)
6461         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6462         (remote_disable_btrace, remote_teardown_btrace)
6463         (remote_read_btrace, remote_btrace_conf)
6464         (remote_augmented_libraries_svr4_read, remote_load)
6465         (remote_pid_to_exec_file, remote_can_do_single_step)
6466         (remote_execution_direction, remote_thread_handle_to_thread_info):
6467         Refactor as methods of remote_target.
6468         (init_remote_ops, init_extended_remote_ops): Delete.
6469         (remote_can_async_p, remote_is_async_p, remote_async)
6470         (remote_thread_events, remote_upload_tracepoints)
6471         (remote_upload_trace_state_variables): Refactor as methods of
6472         remote_target.
6473         (_initialize_remote): Remove references to init_remote_ops and
6474         init_extended_remote_ops.
6475
6476         * remote-sim.c (gdbsim_target): New class.
6477         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6478         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6479         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6480         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6481         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6482         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6483         Refactor as methods of gdbsim_target.
6484         (gdbsim_ops): Now a gdbsim_target.
6485         (init_gdbsim_ops): Delete.
6486         (gdbsim_cntrl_c): Adjust.
6487         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6488
6489         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6490         (the_amd64_linux_nat_target): New.
6491         (amd64_linux_fetch_inferior_registers)
6492         (amd64_linux_store_inferior_registers): Refactor as methods of
6493         amd64_linux_nat_target.
6494         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
6495         * i386-linux-nat.c: Don't include "linux-nat.h".
6496         (i386_linux_nat_target): New class.
6497         (the_i386_linux_nat_target): New.
6498         (i386_linux_fetch_inferior_registers)
6499         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6500         as methods of i386_linux_nat_target.
6501         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
6502         * inf-child.c (inf_child_ops): Delete.
6503         (inf_child_fetch_inferior_registers)
6504         (inf_child_store_inferior_registers): Delete.
6505         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6506         methods of inf_child_target.
6507         (inf_child_target::supports_terminal_ours)
6508         (inf_child_target::terminal_init)
6509         (inf_child_target::terminal_inferior)
6510         (inf_child_target::terminal_ours_for_output)
6511         (inf_child_target::terminal_ours, inf_child_target::interrupt)
6512         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6513         New.
6514         (inf_child_open, inf_child_disconnect, inf_child_close)
6515         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6516         (inf_child_post_startup_inferior, inf_child_can_run)
6517         (inf_child_pid_to_exec_file): Refactor as methods of
6518         inf_child_target.
6519         (inf_child_follow_fork): Delete.
6520         (inf_child_target::can_create_inferior)
6521         (inf_child_target::can_attach): New.
6522         (inf_child_target::has_all_memory, inf_child_target::has_memory)
6523         (inf_child_target::has_stack, inf_child_target::has_registers)
6524         (inf_child_target::has_execution): New.
6525         (inf_child_fileio_open, inf_child_fileio_pwrite)
6526         (inf_child_fileio_pread, inf_child_fileio_fstat)
6527         (inf_child_fileio_close, inf_child_fileio_unlink)
6528         (inf_child_fileio_readlink, inf_child_use_agent)
6529         (inf_child_can_use_agent): Refactor as methods of
6530         inf_child_target.
6531         (return_zero, inf_child_target): Delete.
6532         (inf_child_target::inf_child_target): New.
6533         * inf-child.h: Include "target.h".
6534         (inf_child_target): Delete function prototype.
6535         (inf_child_target): New class.
6536         (inf_child_open_target, inf_child_mourn_inferior)
6537         (inf_child_maybe_unpush_target): Delete.
6538         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6539         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6540         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6541         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6542         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6543         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6544         (inf_ptrace_wait, inf_ptrace_xfer_partial)
6545         (inf_ptrace_thread_alive, inf_ptrace_files_info)
6546         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6547         methods of inf_ptrace_target.
6548         (inf_ptrace_target): Delete function.
6549         * inf-ptrace.h: Include "inf-child.h".
6550         (inf_ptrace_target): Delete function declaration.
6551         (inf_ptrace_target): New class.
6552         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6553         * linux-nat.c (linux_target): New.
6554         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6555         (linux_nat_target::~linux_nat_target): New.
6556         (linux_child_post_attach, linux_child_post_startup_inferior)
6557         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6558         (linux_child_remove_fork_catchpoint)
6559         (linux_child_insert_vfork_catchpoint)
6560         (linux_child_remove_vfork_catchpoint)
6561         (linux_child_insert_exec_catchpoint)
6562         (linux_child_remove_exec_catchpoint)
6563         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6564         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6565         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6566         (linux_nat_stopped_data_address)
6567         (linux_nat_stopped_by_sw_breakpoint)
6568         (linux_nat_supports_stopped_by_sw_breakpoint)
6569         (linux_nat_stopped_by_hw_breakpoint)
6570         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6571         (linux_nat_kill, linux_nat_mourn_inferior)
6572         (linux_nat_xfer_partial, linux_nat_thread_alive)
6573         (linux_nat_update_thread_list, linux_nat_pid_to_str)
6574         (linux_nat_thread_name, linux_child_pid_to_exec_file)
6575         (linux_child_static_tracepoint_markers_by_strid)
6576         (linux_nat_is_async_p, linux_nat_can_async_p)
6577         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6578         (linux_nat_supports_multi_process)
6579         (linux_nat_supports_disable_randomization, linux_nat_async)
6580         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6581         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6582         (linux_nat_fileio_open, linux_nat_fileio_readlink)
6583         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6584         methods of linux_nat_target.
6585         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6586         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6587         parameter.
6588         (check_stopped_by_watchpoint): Adjust.
6589         (linux_xfer_partial): Delete.
6590         (linux_target_install_ops, linux_target, linux_nat_add_target):
6591         Delete.
6592         (linux_nat_target::linux_nat_target): New.
6593         * linux-nat.h: Include "inf-ptrace.h".
6594         (linux_nat_target): New.
6595         (linux_target, linux_target_install_ops, linux_nat_add_target):
6596         Delete function declarations.
6597         (linux_target): Declare global.
6598         * linux-thread-db.c (thread_db_target): New.
6599         (thread_db_target::thread_db_target): New.
6600         (thread_db_ops): Delete.
6601         (the_thread_db_target): New.
6602         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6603         (thread_db_update_thread_list, thread_db_pid_to_str)
6604         (thread_db_extra_thread_info)
6605         (thread_db_thread_handle_to_thread_info)
6606         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6607         (thread_db_resume): Refactor as methods of thread_db_target.
6608         (init_thread_db_ops): Delete.
6609         (_initialize_thread_db): Remove reference to init_thread_db_ops.
6610         * x86-linux-nat.c: Don't include "linux-nat.h".
6611         (super_post_startup_inferior): Delete.
6612         (x86_linux_nat_target::~x86_linux_nat_target): New.
6613         (x86_linux_child_post_startup_inferior)
6614         (x86_linux_read_description, x86_linux_enable_btrace)
6615         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6616         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6617         methods of x86_linux_nat_target.
6618         (x86_linux_create_target): Delete.  Bits folded ...
6619         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
6620         pointer.
6621         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6622         (x86_linux_nat_target): New class.
6623         (x86_linux_create_target): Delete.
6624         (x86_linux_add_target): Now takes a linux_nat_target pointer.
6625         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6626         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6627         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6628         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6629         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6630         make extern.
6631         (x86_use_watchpoints): Delete.
6632         * x86-nat.h: Include "breakpoint.h" and "target.h".
6633         (x86_use_watchpoints): Delete.
6634         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6635         (x86_stopped_by_watchpoint, x86_stopped_data_address)
6636         (x86_insert_watchpoint, x86_remove_watchpoint)
6637         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6638         (x86_stopped_by_hw_breakpoint): New declarations.
6639         (x86_nat_target): New template class.
6640
6641         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6642         (the_ppc_linux_nat_target): New.
6643         (ppc_linux_fetch_inferior_registers)
6644         (ppc_linux_can_use_hw_breakpoint)
6645         (ppc_linux_region_ok_for_hw_watchpoint)
6646         (ppc_linux_ranged_break_num_registers)
6647         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6648         (ppc_linux_insert_mask_watchpoint)
6649         (ppc_linux_remove_mask_watchpoint)
6650         (ppc_linux_can_accel_watchpoint_condition)
6651         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6652         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6653         (ppc_linux_watchpoint_addr_within_range)
6654         (ppc_linux_masked_watch_num_registers)
6655         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6656         (ppc_linux_read_description): Refactor as methods of
6657         ppc_linux_nat_target.
6658         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
6659
6660         * procfs.c (procfs_xfer_partial): Delete forward declaration.
6661         (procfs_target): New class.
6662         (the_procfs_target): New.
6663         (procfs_target): Delete function.
6664         (procfs_auxv_parse, procfs_attach, procfs_detach)
6665         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6666         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6667         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6668         (procfs_create_inferior, procfs_update_thread_list)
6669         (procfs_thread_alive, procfs_pid_to_str)
6670         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6671         (procfs_stopped_data_address, procfs_insert_watchpoint)
6672         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6673         (proc_find_memory_regions, procfs_info_proc)
6674         (procfs_make_note_section): Refactor as methods of procfs_target.
6675         (_initialize_procfs): Adjust.
6676         * sol-thread.c (sol_thread_target): New class.
6677         (sol_thread_ops): Now a sol_thread_target.
6678         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6679         (sol_thread_fetch_registers, sol_thread_store_registers)
6680         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6681         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6682         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6683         (init_sol_thread_ops): Delete.
6684         (_initialize_sol_thread): Adjust.  Remove references to
6685         init_sol_thread_ops and complete_target_initialization.
6686
6687         * windows-nat.c (windows_nat_target): New class.
6688         (windows_fetch_inferior_registers)
6689         (windows_store_inferior_registers, windows_resume, windows_wait)
6690         (windows_attach, windows_detach, windows_pid_to_exec_file)
6691         (windows_files_info, windows_create_inferior)
6692         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6693         (windows_close, windows_pid_to_str, windows_xfer_partial)
6694         (windows_get_tib_address, windows_get_ada_task_ptid)
6695         (windows_thread_name, windows_thread_alive): Refactor as
6696         windows_nat_target methods.
6697         (do_initial_windows_stuff): Adjust.
6698         (windows_target): Delete function.
6699         (_initialize_windows_nat): Adjust.
6700
6701         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6702         (darwin_mourn_inferior, darwin_kill_inferior)
6703         (darwin_create_inferior, darwin_attach, darwin_detach)
6704         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6705         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6706         (darwin_supports_multi_process): Refactor as darwin_nat_target
6707         methods.
6708         (darwin_resume_to, darwin_files_info): Delete.
6709         (_initialize_darwin_inferior): Rename to ...
6710         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
6711         * darwin-nat.h: Include "inf-child.h".
6712         (darwin_nat_target): New class.
6713         (darwin_complete_target): Delete.
6714         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6715         (darwin_target): New.
6716         (i386_darwin_fetch_inferior_registers)
6717         (i386_darwin_store_inferior_registers): Refactor as methods of
6718         darwin_nat_target.
6719         (darwin_complete_target): Delete, with ...
6720         (_initialize_i386_darwin_nat): ... bits factored out here.
6721
6722         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6723         (the_alpha_linux_nat_target): New.
6724         (alpha_linux_register_u_offset): Refactor as
6725         alpha_linux_nat_target method.
6726         (_initialize_alpha_linux_nat): Adjust.
6727         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6728         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6729         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6730         methods of linux_nat_trad_target.
6731         (linux_trad_target): Delete.
6732         * linux-nat-trad.h (linux_trad_target): Delete function.
6733         (linux_nat_trad_target): New class.
6734         * mips-linux-nat.c (mips_linux_nat_target): New class.
6735         (super_fetch_registers, super_store_registers, super_close):
6736         Delete.
6737         (the_mips_linux_nat_target): New.
6738         (mips64_linux_regsets_fetch_registers)
6739         (mips64_linux_regsets_store_registers)
6740         (mips64_linux_fetch_registers, mips64_linux_store_registers)
6741         (mips_linux_register_u_offset, mips_linux_read_description)
6742         (mips_linux_can_use_hw_breakpoint)
6743         (mips_linux_stopped_by_watchpoint)
6744         (mips_linux_stopped_data_address)
6745         (mips_linux_region_ok_for_hw_watchpoint)
6746         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6747         (mips_linux_close): Refactor as methods of mips_linux_nat.
6748         (_initialize_mips_linux_nat): Adjust to C++ification.
6749
6750         * aix-thread.c (aix_thread_target): New class.
6751         (aix_thread_ops): Now an aix_thread_target.
6752         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6753         (aix_thread_fetch_registers, aix_thread_store_registers)
6754         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6755         (aix_thread_thread_alive, aix_thread_pid_to_str)
6756         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6757         Refactor as methods of aix_thread_target.
6758         (init_aix_thread_ops): Delete.
6759         (_initialize_aix_thread): Remove references to init_aix_thread_ops
6760         and complete_target_initialization.
6761         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6762         (rs6000_nat_target): New class.
6763         (the_rs6000_nat_target): New.
6764         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6765         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6766         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6767         (super_create_inferior): Delete.
6768         (_initialize_rs6000_nat): Adjust to C++ification.
6769
6770         * arm-linux-nat.c (arm_linux_nat_target): New class.
6771         (the_arm_linux_nat_target): New.
6772         (arm_linux_fetch_inferior_registers)
6773         (arm_linux_store_inferior_registers, arm_linux_read_description)
6774         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6775         (arm_linux_remove_hw_breakpoint)
6776         (arm_linux_region_ok_for_hw_watchpoint)
6777         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6778         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6779         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6780         arm_linux_nat_target.
6781         (_initialize_arm_linux_nat): Adjust to C++ification.
6782
6783         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6784         (the_aarch64_linux_nat_target): New.
6785         (aarch64_linux_fetch_inferior_registers)
6786         (aarch64_linux_store_inferior_registers)
6787         (aarch64_linux_child_post_startup_inferior)
6788         (aarch64_linux_read_description)
6789         (aarch64_linux_can_use_hw_breakpoint)
6790         (aarch64_linux_insert_hw_breakpoint)
6791         (aarch64_linux_remove_hw_breakpoint)
6792         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6793         (aarch64_linux_region_ok_for_hw_watchpoint)
6794         (aarch64_linux_stopped_data_address)
6795         (aarch64_linux_stopped_by_watchpoint)
6796         (aarch64_linux_watchpoint_addr_within_range)
6797         (aarch64_linux_can_do_single_step): Refactor as methods of
6798         aarch64_linux_nat_target.
6799         (super_post_startup_inferior): Delete.
6800         (_initialize_aarch64_linux_nat): Adjust to C++ification.
6801
6802         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6803         (the_hppa_linux_nat_target): New.
6804         (hppa_linux_fetch_inferior_registers)
6805         (hppa_linux_store_inferior_registers): Refactor as methods of
6806         hppa_linux_nat_target.
6807         (_initialize_hppa_linux_nat): Adjust to C++ification.
6808
6809         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6810         (the_ia64_linux_nat_target): New.
6811         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6812         (ia64_linux_stopped_data_address)
6813         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6814         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6815         ia64_linux_nat_target methods.
6816         (super_xfer_partial): Delete.
6817         (_initialize_ia64_linux_nat): Adjust to C++ification.
6818
6819         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6820         (the_m32r_linux_nat_target): New.
6821         (m32r_linux_fetch_inferior_registers)
6822         (m32r_linux_store_inferior_registers): Refactor as
6823         m32r_linux_nat_target methods.
6824         (_initialize_m32r_linux_nat): Adjust to C++ification.
6825
6826         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6827         (the_m68k_linux_nat_target): New.
6828         (m68k_linux_fetch_inferior_registers)
6829         (m68k_linux_store_inferior_registers): Refactor as
6830         m68k_linux_nat_target methods.
6831         (_initialize_m68k_linux_nat): Adjust to C++ification.
6832
6833         * s390-linux-nat.c (s390_linux_nat_target): New class.
6834         (the_s390_linux_nat_target): New.
6835         (s390_linux_fetch_inferior_registers)
6836         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6837         (s390_insert_watchpoint, s390_remove_watchpoint)
6838         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6839         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6840         (s390_auxv_parse, s390_read_description): Refactor as methods of
6841         s390_linux_nat_target.
6842         (_initialize_s390_nat): Adjust to C++ification.
6843
6844         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6845         (the_sparc_linux_nat_target): New.
6846         (_initialize_sparc_linux_nat): Adjust to C++ification.
6847         * sparc-nat.c (sparc_fetch_inferior_registers)
6848         (sparc_store_inferior_registers): Remove target_ops parameter.
6849         * sparc-nat.h (sparc_fetch_inferior_registers)
6850         (sparc_store_inferior_registers): Remove target_ops parameter.
6851         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6852         (the_sparc64_linux_nat_target): New.
6853         (_initialize_sparc64_linux_nat): Adjust to C++ification.
6854
6855         * spu-linux-nat.c (spu_linux_nat_target): New class.
6856         (the_spu_linux_nat_target): New.
6857         (spu_child_post_startup_inferior, spu_child_post_attach)
6858         (spu_child_wait, spu_fetch_inferior_registers)
6859         (spu_store_inferior_registers, spu_xfer_partial)
6860         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6861         methods.
6862         (_initialize_spu_nat): Adjust to C++ification.
6863
6864         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6865         (the_tilegx_linux_nat_target): New.
6866         (fetch_inferior_registers, store_inferior_registers):
6867         Refactor as methods.
6868         (_initialize_tile_linux_nat): Adjust to C++ification.
6869
6870         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6871         (the_xtensa_linux_nat_target): New.
6872         (xtensa_linux_fetch_inferior_registers)
6873         (xtensa_linux_store_inferior_registers): Refactor as
6874         xtensa_linux_nat_target methods.
6875         (_initialize_xtensa_linux_nat): Adjust to C++ification.
6876
6877         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6878         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6879         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6880         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6881         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6882         (fbsd_stopped_by_sw_breakpoint)
6883         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6884         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6885         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6886         (fbsd_post_startup_inferior, fbsd_post_attach)
6887         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6888         (fbsd_set_syscall_catchpoint)
6889         (super_xfer_partial, super_resume, super_wait)
6890         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6891         (fbsd_handle_debug_trap): Remove target_ops parameter.
6892         (fbsd_nat_add_target): Delete.
6893         * fbsd-nat.h: Include "inf-ptrace.h".
6894         (fbsd_nat_add_target): Delete.
6895         (USE_SIGTRAP_SIGINFO): Define.
6896         (fbsd_nat_target): New class.
6897
6898         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6899         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6900         (amd64bsd_target): Delete.
6901         * amd64-bsd-nat.h: New file.
6902         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6903         "x86-bsd-nat.h".
6904         (amd64_fbsd_nat_target): New class.
6905         (the_amd64_fbsd_nat_target): New.
6906         (amd64fbsd_read_description): Refactor as method of
6907         amd64_fbsd_nat_target.
6908         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6909         (_initialize_amd64fbsd_nat): Adjust to C++ification.
6910         * amd64-nat.h (amd64bsd_target): Delete function declaration.
6911         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6912         (i386bsd_store_inferior_registers): Remove target_ops parameter.
6913         (i386bsd_target): Delete.
6914         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6915         (i386bsd_fetch_inferior_registers)
6916         (i386bsd_store_inferior_registers): Declare.
6917         (i386_bsd_nat_target): New class.
6918         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6919         (the_i386_fbsd_nat_target): New.
6920         (i386fbsd_resume, i386fbsd_read_description): Refactor as
6921         i386_fbsd_nat_target methods.
6922         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6923         (_initialize_i386fbsd_nat): Adjust to C++ification.
6924         * x86-bsd-nat.c (super_mourn_inferior): Delete.
6925         (x86bsd_mourn_inferior, x86bsd_target): Delete.
6926         (_initialize_x86_bsd_nat): Adjust to C++ification.
6927         * x86-bsd-nat.h: Include "x86-nat.h".
6928         (x86bsd_target): Delete declaration.
6929         (x86bsd_nat_target): New class.
6930
6931         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6932         (the_aarch64_fbsd_nat_target): New.
6933         (aarch64_fbsd_fetch_inferior_registers)
6934         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6935         aarch64_fbsd_nat_target.
6936         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6937         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6938         (the_alpha_bsd_nat_target): New.
6939         (alphabsd_fetch_inferior_registers)
6940         (alphabsd_store_inferior_registers): Refactor as
6941         alpha_bsd_nat_target methods.
6942         (_initialize_alphabsd_nat): Refactor as methods of
6943         alpha_bsd_nat_target.
6944         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6945         (the_amd64_nbsd_nat_target): New.
6946         (_initialize_amd64nbsd_nat): Adjust to C++ification.
6947         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6948         (the_amd64_obsd_nat_target): New.
6949         (_initialize_amd64obsd_nat): Adjust to C++ification.
6950         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6951         (the_arm_fbsd_nat_target): New.
6952         (arm_fbsd_fetch_inferior_registers)
6953         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6954         (_initialize_arm_fbsd_nat): Refactor as methods of
6955         arm_fbsd_nat_target.
6956         (_initialize_arm_fbsd_nat): Adjust to C++ification.
6957         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6958         (the_arm_netbsd_nat_target): New.
6959         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6960         arm_netbsd_nat_target.
6961         (_initialize_arm_netbsd_nat): Adjust to C++ification.
6962         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6963         (the_hppa_nbsd_nat_target): New.
6964         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6965         hppa_nbsd_nat_target methods.
6966         (_initialize_hppanbsd_nat): Adjust to C++ification.
6967         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6968         (the_hppa_obsd_nat_target): New.
6969         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6970         methods of hppa_obsd_nat_target.
6971         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
6972         add_target.
6973         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6974         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
6975         add_target.
6976         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6977         (_initialize_i386obsd_nat): Use add_target.
6978         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6979         (the_m68k_bsd_nat_target): New.
6980         (m68kbsd_fetch_inferior_registers)
6981         (m68kbsd_store_inferior_registers): Refactor as methods of
6982         m68k_bsd_nat_target.
6983         (_initialize_m68kbsd_nat): Adjust to C++ification.
6984         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6985         (the_mips_fbsd_nat_target): New.
6986         (mips_fbsd_fetch_inferior_registers)
6987         (mips_fbsd_store_inferior_registers): Refactor as methods of
6988         mips_fbsd_nat_target.
6989         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
6990         add_target.
6991         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6992         (the_mips_nbsd_nat_target): New.
6993         (mipsnbsd_fetch_inferior_registers)
6994         (mipsnbsd_store_inferior_registers): Refactor as methods of
6995         mips_nbsd_nat_target.
6996         (_initialize_mipsnbsd_nat): Adjust to C++ification.
6997         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6998         (the_mips64_obsd_nat_target): New.
6999         (mips64obsd_fetch_inferior_registers)
7000         (mips64obsd_store_inferior_registers): Refactor as methods of
7001         mips64_obsd_nat_target.
7002         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7003         add_target.
7004         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7005         nbsd_nat_target.
7006         * nbsd-nat.h: Include "inf-ptrace.h".
7007         (nbsd_nat_target): New class.
7008         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7009         (obsd_wait): Refactor as methods of obsd_nat_target.
7010         (obsd_add_target): Delete.
7011         * obsd-nat.h: Include "inf-ptrace.h".
7012         (obsd_nat_target): New class.
7013         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7014         (the_ppc_fbsd_nat_target): New.
7015         (ppcfbsd_fetch_inferior_registers)
7016         (ppcfbsd_store_inferior_registers): Refactor as methods of
7017         ppc_fbsd_nat_target.
7018         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7019         add_target.
7020         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7021         (the_ppc_nbsd_nat_target): New.
7022         (ppcnbsd_fetch_inferior_registers)
7023         (ppcnbsd_store_inferior_registers): Refactor as methods of
7024         ppc_nbsd_nat_target.
7025         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7026         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7027         (the_ppc_obsd_nat_target): New.
7028         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7029         methods of ppc_obsd_nat_target.
7030         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7031         add_target.
7032         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7033         (the_sh_nbsd_nat_target): New.
7034         (shnbsd_fetch_inferior_registers)
7035         (shnbsd_store_inferior_registers): Refactor as methods of
7036         sh_nbsd_nat_target.
7037         (_initialize_shnbsd_nat): Adjust to C++ification.
7038         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7039         (inf_ptrace_xfer_partial): Delete.
7040         (sparc_xfer_partial, sparc_target): Delete.
7041         * sparc-nat.h (sparc_fetch_inferior_registers)
7042         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7043         (sparc_target): Delete function declaration.
7044         (sparc_target): New template class.
7045         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7046         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7047         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7048         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7049         add_target.
7050         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7051         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7052         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7053         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7054         add_target.
7055         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7056         (the_vax_bsd_nat_target): New.
7057         (vaxbsd_fetch_inferior_registers)
7058         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7059         methods.
7060         (_initialize_vaxbsd_nat): Adjust to C++ification.
7061
7062         * bsd-kvm.c (bsd_kvm_target): New class.
7063         (bsd_kvm_ops): Now a bsd_kvm_target.
7064         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7065         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7066         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7067         bsd_kvm_target.
7068         (bsd_kvm_return_one): Delete.
7069         (bsd_kvm_add_target): Adjust to C++ification.
7070
7071         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7072         (nto_procfs_target_procfs): New classes.
7073         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7074         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7075         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7076         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7077         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7078         (procfs_remove_hw_breakpoint, procfs_resume)
7079         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7080         (procfs_kill_inferior, procfs_store_registers)
7081         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7082         as methods of nto_procfs_target.
7083         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7084         (nto_native_ops): Delete.
7085         (procfs_open, procfs_native_open): Delete.
7086         (nto_native_ops): Now an nto_procfs_target_native.
7087         (init_procfs_targets): Adjust to C++ification.
7088         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7089         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7090         Refactor as methods of nto_procfs_target.
7091
7092         * go32-nat.c (go32_nat_target): New class.
7093         (the_go32_nat_target): New.
7094         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7095         (go32_store_registers, go32_xfer_partial, go32_files_info)
7096         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7097         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7098         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7099         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7100         (go32_target): Delete.
7101         (_initialize_go32_nat): Adjust to C++ification.
7102
7103         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7104         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7105         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7106         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7107         gnu_nat_target.
7108         (gnu_target): Delete.
7109         * gnu-nat.h (gnu_target): Delete.
7110         (gnu_nat_target): New class.
7111         * i386-gnu-nat.c (gnu_base_target): New.
7112         (i386_gnu_nat_target): New class.
7113         (the_i386_gnu_nat_target): New.
7114         (_initialize_i386gnu_nat): Adjust to C++ification.
7115
7116 2018-05-02  Pedro Alves  <[email protected]>
7117
7118         * bfd-target.c (target_bfd_xclose): Rename to ...
7119         (target_bfd_close): ... this.
7120         (target_bfd_reopen): Adjust.
7121         * target.c (target_close): Remove references to to_xclose.
7122         * target.h (target_ops::to_xclose): Delete.
7123         (target_ops::to_close): Update comments.
7124
7125 2018-05-02  Pedro Alves  <[email protected]>
7126
7127         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7128         "linux-nat.h".
7129         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7130         * inf-ptrace.c (inf_ptrace_register_u_offset)
7131         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7132         (inf_ptrace_store_register, inf_ptrace_store_registers)
7133         (inf_ptrace_trad_target): Move to ...
7134         * linux-nat-trad.c: ... this new file.
7135         * linux-nat-trad.h: New file.
7136         * linux-nat.c (linux_target_install_ops): Make extern.
7137         (linux_trad_target): Delete.
7138         * linux-nat.h (linux_trad_target): Delete declaration.
7139         (linux_target_install_ops): Declare.
7140         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7141         "linux-nat.h".
7142
7143 2018-05-02  Pedro Alves  <[email protected]>
7144
7145         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7146         procfs_target/add_target here.
7147         * procfs.c (procfs_target): Make static.
7148         (_initialize_procfs): Call add_target here.
7149         * procfs.h (struct target_ops): Remove forward declaration.
7150         (procfs_target): Remove declaration.
7151         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7152
7153 2018-05-02  Pedro Alves  <[email protected]>
7154
7155         * procfs.c (procfs_stopped_by_watchpoint)
7156         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7157         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7158         Forward declare.
7159         (procfs_use_watchpoints): Delete, move contents...
7160         (procfs_target): ... here.
7161         * procfs.h (procfs_use_watchpoints): Delete declaration.
7162         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7163         procfs_use_watchpoints.
7164         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7165         procfs_use_watchpoints.
7166
7167 2018-05-02  Tom Tromey  <[email protected]>
7168
7169         PR python/20084:
7170         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7171         and var_zuinteger_unlimited.
7172         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7173         and PARAM_ZUINTEGER_UNLIMITED.
7174         (set_parameter_value): Handle var_zuinteger and
7175         var_zuinteger_unlimited.
7176         (add_setshow_generic): Likewise.
7177         (parmpy_init): Likewise.
7178
7179 2018-04-28  Dan Robertson  <[email protected]>
7180
7181         PR rust/23124
7182         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7183         pointer is not null before dereferencing it.
7184
7185 2018-04-30  Tom Tromey  <[email protected]>
7186
7187         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7188         is_mi_like_p.
7189
7190 2018-04-30  Tom Tromey  <[email protected]>
7191
7192         * breakpoint.c (mention): Remove use of is_mi_like_p.
7193         (print_mention_ranged_breakpoint): Likewise.
7194         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7195         of is_mi_like_p.
7196
7197 2018-04-30  Tom Tromey  <[email protected]>
7198
7199         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7200
7201 2018-04-30  Tom Tromey  <[email protected]>
7202
7203         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7204         (info_spu_event_command): Remove some uses of is_mi_like_p.
7205
7206 2018-04-30  Tom Tromey  <[email protected]>
7207
7208         * python/py-framefilter.c (py_print_single_arg)
7209         (enumerate_locals, py_print_args, py_print_frame): Remove some
7210         uses of is_mi_like_p.
7211
7212 2018-04-30  Tom Tromey  <[email protected]>
7213
7214         * ui-out.c: Update.
7215         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7216         * ui-out.h (ui_out::is_mi_like_p): Now const.
7217         (ui_out::do_is_mi_like_p): Now const.
7218         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7219
7220 2018-04-30  Tom Tromey  <[email protected]>
7221
7222         * varobj.c (varobj_set_visualizer): Use new_reference.
7223         * python/python.c (gdbpy_decode_line): Use new_reference.
7224         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7225         new_reference.
7226
7227 2018-04-30  Tom Tromey  <[email protected]>
7228
7229         * varobj.c (install_new_value): Use new_reference.
7230         * value.h (value_incref): Return void.  Swap intro comment with
7231         value_decref.
7232         * value.c (set_value_parent): Use new_reference.
7233         (value_incref): Return void.  Update intro comment.
7234         (release_value): Use new_reference.
7235         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7236
7237 2018-04-30  Tom Tromey  <[email protected]>
7238
7239         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7240         * gdb_bfd.h (new_bfd_ref): Remove.
7241         (gdb_bfd_open): Update comment.
7242         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7243         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7244         (gdb_bfd_fdopenr): Use new_reference.
7245         * exec.c (exec_file_attach): Use new_reference.
7246
7247 2018-04-30  Tom Tromey  <[email protected]>
7248
7249         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7250         method.
7251
7252 2018-04-30  Tom Tromey  <[email protected]>
7253
7254         * jit.c (jit_read_code_entry): Use type_align.
7255         * i386-tdep.c (i386_gdbarch_init): Don't call
7256         set_gdbarch_long_long_align_bit.
7257         * gdbarch.sh: Remove long_long_align_bit.
7258         * gdbarch.c, gdbarch.h: Rebuild.
7259         * arc-tdep.c (arc_type_align): New function.
7260         (arc_gdbarch_init): Use arc_type_align.  Don't call
7261         set_gdbarch_long_long_align_bit.
7262
7263 2018-04-30  Tom Tromey  <[email protected]>
7264
7265         * rust-lang.c (rust_type_alignment): Remove.
7266         (rust_composite_type): Use type_align.
7267
7268 2018-04-30  Tom Tromey  <[email protected]>
7269
7270         * NEWS: Mention Type.align.
7271         * python/py-type.c (typy_get_alignof): New function.
7272         (type_object_getset): Add "alignof".
7273
7274 2018-04-30  Tom Tromey  <[email protected]>
7275
7276         PR exp/17095:
7277         * NEWS: Update.
7278         * std-operator.def (UNOP_ALIGNOF): New operator.
7279         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7280         New.
7281         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7282         * c-lang.c (c_op_print_tab): Add alignof.
7283         * c-exp.y (ALIGNOF): New token.
7284         (exp): Add "ALIGNOF" production.
7285         (ident_tokens): Add _Alignof and alignof.
7286
7287 2018-04-30  Tom Tromey  <[email protected]>
7288
7289         * i386-tdep.c (i386_type_align): New function.
7290         (i386_gdbarch_init): Update.
7291         * gdbarch.sh (type_align): New method.
7292         * gdbarch.c, gdbarch.h: Rebuild.
7293         * arch-utils.h (default_type_align): Declare.
7294         * arch-utils.c (default_type_align): New function.
7295         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7296         (struct type) <align_log2>: New field.
7297         <instance_flags>: Now a bitfield.
7298         (TYPE_RAW_ALIGN): New macro.
7299         (type_align, type_raw_align, set_type_align): Declare.
7300         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7301         functions.
7302         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7303         (get_alignment, maybe_set_alignment): New functions.
7304         (read_structure_type, read_enumeration_type, read_array_type)
7305         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7306         (read_subrange_type, read_base_type): Set type alignment.
7307
7308 2018-04-30  Simon Marchi  <[email protected]>
7309
7310         * dwarf2read.c (read_index_from_section): Use bool.
7311
7312 2018-04-29  Fabian Groffen  <[email protected]>
7313
7314         PR gdb/22950
7315         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7316         with #ifdef.
7317
7318 2018-04-29  John Reiser  <[email protected]>
7319
7320         PR build/22873
7321         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7322         last step, and do it atomically.
7323
7324 2018-04-27  Alexandre Oliva  <[email protected]>
7325
7326         * compile/compile-c-types.c (convert_int, convert_float):
7327         Update for C FE v1.
7328
7329 2018-04-27  Tom Tromey  <[email protected]>
7330
7331         PR rust/22545:
7332         * rust-lang.c (rust_inclusive_range_type_p): New function.
7333         (rust_range): Handle inclusive ranges.
7334         (rust_compute_range): Likewise.
7335         * rust-exp.y (struct rust_op) <inclusive>: New field.
7336         (DOTDOTEQ): New constant.
7337         (range_expr): Add "..=" productions.
7338         (operator_tokens): Add "..=" token.
7339         (ast_range): Add "inclusive" parameter.
7340         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7341         ranges.
7342         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7343         bounds values.
7344         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7345         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7346         Update comments.
7347         * expprint.c (print_subexp_standard): Handle new bounds values.
7348         (dump_subexp_body_standard): Likewise.
7349
7350 2018-04-27  Tom Tromey  <[email protected]>
7351
7352         * configure: Rebuild.
7353         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7354         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7355         "OVERRIDE".
7356         (class symbol_needs_eval_context): Likewise.
7357         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7358         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7359         "virtual".
7360         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7361         "override".
7362         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7363         * aarch64-tdep.c (instruction_reader::read): Use "override".
7364         (instruction_reader_test::read): Likewise.
7365         * arm-tdep.c (instruction_reader::read): Use "override".
7366         (instruction_reader_thumb::read): Likewise.
7367
7368 2018-04-26  Andrzej Kaczmarek  <[email protected]>
7369
7370         PR remote/9665
7371         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7372         instead of remote_send.
7373         (remote_send): Remove.
7374
7375 2018-04-26  Pedro Alves  <[email protected]>
7376
7377         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7378         find_function_start_sal instead of find_pc_line.
7379
7380 2018-04-26  Pedro Alves  <[email protected]>
7381
7382         * breakpoint.c (set_breakpoint_location_function): Handle
7383         mst_data_gnu_ifunc.
7384         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7385         * elfread.c (elf_symtab_read): Give data symbols with
7386         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7387         (elf_rel_plt_read): Update comment.
7388         * linespec.c (convert_linespec_to_sals): Handle
7389         mst_data_gnu_ifunc.
7390         (minsym_found): Handle mst_data_gnu_ifunc.
7391         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7392         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7393         * parse.c (find_minsym_type_and_address): Handle
7394         mst_data_gnu_ifunc.
7395         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7396         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7397         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7398         comment.
7399         <mst_data_gnu_ifunc>: New enumerator.
7400
7401 2018-04-26  Pedro Alves  <[email protected]>
7402
7403         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7404         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7405         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7406         Handle it.
7407         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7408         (lookup_minimal_symbol_by_pc): Adjust.
7409         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7410         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7411         * minsyms.h (lookup_msym_prefer): New enum.
7412         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7413         parameter by a lookup_msym_prefer parameter.
7414
7415 2018-04-26  Pedro Alves  <[email protected]>
7416
7417         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7418         ends in "@plt" instead of looking at the symbol's section.
7419
7420 2018-04-26  Pedro Alves  <[email protected]>
7421
7422         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
7423         all references.
7424         (find_pc_partial_function_gnu_ifunc): Rename to ...
7425         (find_pc_partial_function): ... this, and remove references to
7426         'is_gnu_ifunc_p'.
7427         (find_pc_partial_function): Delete old implementation.
7428         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7429
7430 2018-04-26  Pedro Alves  <[email protected]>
7431
7432         * linespec.c (struct bound_minimal_symbol_search_key): New.
7433         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
7434         skip first line if we found a GNU ifunc minimal symbol by name.
7435         (compare_msymbols): Change parameters to work with a destructured
7436         lhs minsym.
7437         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7438         functions.
7439
7440 2018-04-26  Pedro Alves  <[email protected]>
7441
7442         * breakpoint.c (set_breakpoint_location_function): Don't resolve
7443         ifunc targets here.  Instead, if we have an ifunc minsym, use its
7444         address/name.
7445         (add_location_to_breakpoint): Store the minsym and the objfile in
7446         the breakpoint location.
7447         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7448         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7449         Record the minsym in the sal.
7450         * symtab.h (symtab_and_line) <msymbol>: New field.
7451
7452 2018-04-26  Pedro Alves  <[email protected]>
7453
7454         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7455         unless we actually resolved the ifunc.
7456
7457 2018-04-26  Pedro Alves  <[email protected]>
7458
7459         * c-exp.y (variable production): Prefer ifunc minsyms over
7460         regular function symbols.
7461         * symtab.c (find_gnu_ifunc): New function.
7462         * minsyms.h (lookup_msym_prefer): New enum.
7463         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7464         parameter by a lookup_msym_prefer parameter.
7465         * symtab.h (find_gnu_ifunc): New declaration.
7466
7467 2018-04-26  Pedro Alves  <[email protected]>
7468
7469         * blockframe.c (find_gnu_ifunc_target_type): New function.
7470         (find_function_type): New.
7471         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7472         return a value with a memory address.
7473         (eval_call): For calls to GNU ifunc functions, try to find the
7474         type of the target function from the type that the resolver
7475         returns.
7476         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7477         symbols.
7478         * infcall.c (find_function_return_type): Delete.
7479         (find_function_addr): Add 'function_type' parameter.  For calls to
7480         GNU ifunc functions, try to find the type of the target function
7481         from the type that the resolver returns, and return it via
7482         FUNCTION_TYPE.
7483         (call_function_by_hand_dummy): Adjust to use the function type
7484         returned by find_function_addr.
7485         (find_function_addr): Add 'function_type' parameter and move
7486         description here.
7487         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7488         declarations.
7489
7490 2018-04-26  Pedro Alves  <[email protected]>
7491
7492         * c-exp.y (variable production): Skip finding an alias for ifunc
7493         symbols.
7494
7495 2018-04-26  Pedro Alves  <[email protected]>
7496
7497         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7498
7499 2018-04-25  Pedro Alves  <[email protected]>
7500
7501         * infcmd.c (kill_command): Print the pid as string, not the whole
7502         thread's ptid.  Add comment.  s/has been killed/killed/ in output
7503         message.
7504         * remote.c (remote_detach_1): Print the pid as string, not the
7505         whole thread's ptid.
7506
7507 2018-04-24  Jan Kratochvil  <[email protected]>
7508             Sergio Durigan Junior  <[email protected]>
7509             Pedro Alves  <[email protected]>
7510
7511         * infcmd.c (kill_command): Print message when inferior has
7512         been killed.
7513         * inferior.c (print_inferior_events): Remove 'static'.  Set as
7514         '1'.
7515         (add_inferior): Improve message printed when
7516         'print_inferior_events' is on.
7517         (exit_inferior): Remove message printed when
7518         'print_inferior_events' is on.
7519         (detach_inferior): Improve message printed when
7520         'print_inferior_events' is on.
7521         (initialize_inferiors): Use 'add_inferior_silent' to set
7522         'current_inferior_'.
7523         * inferior.h (print_inferior_events): Declare here as
7524         'extern'.
7525         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7526         '[Detaching...]' messages when 'print_inferior_events' is on.
7527         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
7528         as prefix/suffix for messages.  Remove periods.  Fix erroneous
7529         'Detaching after fork from child...', replace it by '... from
7530         parent...'.
7531         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7532         prefix/suffix when printing 'Detaching...' messages.  Print
7533         them when 'print_inferior_events' is on.
7534         * remote.c (remote_detach_1): Print message when detaching
7535         from inferior and '!is_fork_parent'.
7536
7537 2018-04-24  Tom Tromey  <[email protected]>
7538
7539         * cli-out.h: Reindent.
7540
7541 2018-04-24  Tom Tromey  <[email protected]>
7542
7543         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7544         (cli_ui_out::do_field_string): Use fputs_filtered.
7545         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7546
7547 2018-04-23  Tom Tromey  <[email protected]>
7548
7549         * guile/scm-frame.c (gdbscm_frame_read_var): Use
7550         gdb::unique_xmalloc_ptr.
7551
7552 2018-04-23  Tom Tromey  <[email protected]>
7553
7554         * configure: Rebuild.
7555
7556 2018-04-22  Rajendra SY  <[email protected]>
7557
7558         PR gdb/23095
7559         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7560         prepare_for_testing.  Set normal_bp to r_debug_state if target
7561         is bsd.
7562
7563 2018-04-21  Pedro Alves  <[email protected]>
7564             Rajendra SY  <[email protected]>
7565
7566         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7567         * remote.c (extended_remote_attach): In all-stop mode, mark the
7568         thread as executing.
7569
7570 2018-04-19  Philippe Waroquiers  <[email protected]>
7571
7572         * thread.c (thread_apply_all_command): Fix comment.
7573         (thread_command): Fix comment.
7574
7575 2018-04-10  Alan Hayward  <[email protected]>
7576
7577         * common/tdesc.h (tdesc_create_feature): Remove xml filename
7578         parameter.
7579         * features/aarch64-core.c (create_feature_aarch64_core):
7580         Regenerate.
7581         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7582         Likewise.
7583         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7584         Likewise.
7585         * features/i386/32bit-avx512.c
7586         (create_feature_i386_32bit_avx512): Likewise.
7587         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7588         Likewise.
7589         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7590         Likewise.
7591         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7592         Likewise.
7593         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7594         Likewise.
7595         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7596         Likewise.
7597         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7598         Likewise.
7599         * features/i386/64bit-avx512.c
7600         (create_feature_i386_64bit_avx512): Likewise.
7601         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7602         Likewise.
7603         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7604         Likewise.
7605         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7606         Likewise.
7607         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7608         Likewise.
7609         * features/i386/64bit-segments.c
7610         (create_feature_i386_64bit_segments): Likewise.
7611         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7612         Likewise.
7613         * features/i386/x32-core.c
7614         (create_feature_i386_x32_core): Likewise.
7615         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7616         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7617         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7618         * target-descriptions.c: In generated code, don't pass xml
7619         filename.
7620
7621 2018-04-18  Alan Hayward  <[email protected]>
7622
7623         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7624         (print_xml_feature::visit_post): Likewise.
7625         (print_xml_feature::visit): Likewise.
7626         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7627         (print_xml_feature): Add new class.
7628         * regformats/regdat.sh: Null xmltarget on feature targets.
7629         * target-descriptions.c (struct target_desc): Add xmltarget.
7630         (maintenance_check_tdesc_xml_convert): Add unittest function.
7631         (tdesc_get_features_xml): Add function to get xml.
7632         (maintenance_check_xml_descriptions): Test xml generation.
7633         * xml-tdesc.c (string_read_description_xml): Add function.
7634         * xml-tdesc.h (string_read_description_xml): Add declaration.
7635
7636 2018-04-18  Alan Hayward  <[email protected]>
7637
7638         * features/Makefile: Add feature marker to targets with new style
7639         target descriptions.
7640         * regformats/aarch64.dat: Regenerate.
7641         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7642         * regformats/i386/amd64-avx-linux.dat: Likewise.
7643         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7644         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7645         * regformats/i386/amd64-linux.dat: Likewise.
7646         * regformats/i386/amd64-mpx-linux.dat: Likewise.
7647         * regformats/i386/amd64.dat: Likewise.
7648         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7649         * regformats/i386/i386-avx-linux.dat: Likewise.
7650         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7651         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7652         * regformats/i386/i386-linux.dat: Likewise.
7653         * regformats/i386/i386-mmx-linux.dat: Likewise.
7654         * regformats/i386/i386-mpx-linux.dat: Likewise.
7655         * regformats/i386/i386.dat: Likewise.
7656         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7657         * regformats/i386/x32-avx-linux.dat: Likewise.
7658         * regformats/i386/x32-linux.dat: Likewise.
7659         * regformats/tic6x-c62x-linux.dat: Likewise.
7660         * regformats/tic6x-c64x-linux.dat: Likewise.
7661         * regformats/tic6x-c64xp-linux.dat: Likewise.
7662         * regformats/regdat.sh: Parse feature marker.
7663
7664 2018-04-18  Alan Hayward  <[email protected]>
7665
7666         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7667         (tdesc_osabi_name): Likewise.
7668         * target-descriptions.c (tdesc_architecture_name): Add new
7669         function.
7670         (tdesc_osabi_name): Likewise.
7671
7672 2018-04-18  Alan Hayward  <[email protected]>
7673
7674         * common/tdesc.c (tdesc_predefined_type): Move to here.
7675         (tdesc_named_type): Likewise.
7676         (tdesc_create_vector): Likewise.
7677         (tdesc_create_struct): Likewise.
7678         (tdesc_set_struct_size): Likewise.
7679         (tdesc_create_union): Likewise.
7680         (tdesc_create_flags): Likewise.
7681         (tdesc_create_enum): Likewise.
7682         (tdesc_add_field): Likewise.
7683         (tdesc_add_typed_bitfield): Likewise.
7684         (tdesc_add_bitfield): Likewise.
7685         (tdesc_add_flag): Likewise.
7686         (tdesc_add_enum_value): Likewise.
7687         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7688         (struct tdesc_type_vector): Likewise.
7689         (struct tdesc_type_field): Likewise.
7690         (struct tdesc_type_with_fields): Likewise.
7691         (tdesc_create_enum): Add declaration.
7692         (tdesc_add_typed_bitfield): Likewise.
7693         (tdesc_add_enum_value): Likewise.
7694         * target-descriptions.c (tdesc_type_field): Move from here.
7695         (tdesc_type_builtin): Likewise.
7696         (tdesc_type_vector): Likewise.
7697         (tdesc_type_with_fields): Likewise.
7698         (tdesc_predefined_types): Likewise.
7699         (tdesc_named_type): Likewise.
7700         (tdesc_create_vector): Likewise.
7701         (tdesc_create_struct): Likewise.
7702         (tdesc_set_struct_size): Likewise.
7703         (tdesc_create_union): Likewise.
7704         (tdesc_create_flags): Likewise.
7705         (tdesc_create_enum): Likewise.
7706         (tdesc_add_field): Likewise.
7707         (tdesc_add_typed_bitfield): Likewise.
7708         (tdesc_add_bitfield): Likewise.
7709         (tdesc_add_flag): Likewise.
7710         (tdesc_add_enum_value): Likewise.
7711         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7712         (tdesc_add_typed_bitfield): Likewise.
7713         (tdesc_add_enum_value): Likewise.
7714
7715 2018-04-18  Alan Hayward  <[email protected]>
7716
7717         * common/tdesc.c (tdesc_feature::accept): Move to here.
7718         (tdesc_feature::operator==): Likewise.
7719         (tdesc_create_reg): Likewise.
7720         * common/tdesc.h (tdesc_type_kind): Likewise.
7721         (struct tdesc_type): Likewise.
7722         (struct tdesc_feature): Likewise.
7723         * regformats/regdat.sh: Create a feature.
7724         * target-descriptions.c (tdesc_type_kind): Move from here.
7725         (tdesc_type): Likewise.
7726         (tdesc_type_up): Likewise.
7727         (tdesc_feature): Likewise.
7728         (tdesc_create_reg): Likewise.
7729
7730 2018-04-18  Alan Hayward  <[email protected]>
7731
7732         * Makefile.in: Add arch/tdesc.c
7733         * common/tdesc.c: New file.
7734         * common/tdesc.h (tdesc_element_visitor): Move to here.
7735         (tdesc_element): Likewise.
7736         (tdesc_reg): Likewise.
7737         (tdesc_reg_up): Likewise.
7738         * regformats/regdef.h (reg): Add offset to constructors.
7739         * target-descriptions.c (tdesc_element_visitor): Move from here.
7740         (tdesc_element): Likewise.
7741         (tdesc_reg): Likewise.
7742         (tdesc_reg_up): Likewise.
7743
7744 2018-04-17  Tom Tromey  <[email protected]>
7745
7746         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7747         discriminant field.
7748
7749 2018-04-17  Tom Tromey  <[email protected]>
7750
7751         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7752
7753 2018-04-17  Andreas Arnez  <[email protected]>
7754
7755         * symtab.c (print_symbol_info): Skip printing filename and line
7756         number when `last' is NULL.
7757         (symtab_symbol_info): Use empty string instead of NULL for first
7758         invocation of print_symbol_info.
7759         (rbreak_command): Pass NULL to `last' parameter of
7760         print_symbol_info.
7761
7762 2018-04-16  Simon Marchi  <[email protected]>
7763
7764         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7765         instead of nullptr.
7766
7767 2018-04-16  Pedro Alves  <[email protected]>
7768
7769         * MAINTAINERS (sh): Remove.
7770         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7771         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7772         (ALLDEPFILES): Remove sh64-tdep.c.
7773         * NEWS: Mentions that support for SH-5/SH64 is removed.
7774         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7775         (sh*-*-openbsd*): Ditto.
7776         (sh64-*-elf*): Remove.
7777         (sh*): Remove.
7778         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7779         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7780         * sh-tdep.c: No longer include "sh64-tdep.h".
7781         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7782         * sh64-tdep.c, sh64-tdep.h: Remove files.
7783
7784 2018-04-16  Pedro Alves  <[email protected]>
7785
7786         * MAINTAINERS: Remove m88k.
7787         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7788         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7789         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7790         * NEWS: Mention that support for m88k was removed.
7791         * configure.host (m88*-*-*): Remove support.
7792         * configure.nat (m88k-*-*): Remove support.
7793         * configure.tgt (m88*-*-openbsd*): Remove.
7794         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7795
7796 2018-04-15  Simon Marchi  <[email protected]>
7797
7798         * configure.tgt (x86_tobjs): New variable.
7799         (amd64_tobjs, i386_tobjs): Use it.
7800
7801 2018-04-13  Andreas Arnez  <[email protected]>
7802
7803         * symtab.c (print_symbol_info): Precede the symbol definition by
7804         the line number when available.
7805         * NEWS: Advertise this enhancement.
7806
7807 2018-04-13  Markus Metzger  <[email protected]>
7808
7809         * NEWS (New options): announce set/show record btrace cpu.
7810         * btrace.c: Include record-btrace.h.
7811         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7812         the vendor is unknown.
7813         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
7814         Maybe overwrite the btrace configuration's cpu.
7815         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
7816         (btrace_fetch): Add cpu parameter.  Update callers.
7817         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7818         Maybe overwrite the btrace configuration's cpu.  Skip enabling
7819         errata workarounds if the vendor is unknown.
7820         * python/py-record-btrace.c: Include record-btrace.h.
7821         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7822         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7823         * record-btrace.c (record_btrace_cpu_state_kind): New.
7824         (record_btrace_cpu): New.
7825         (set_record_btrace_cpu_cmdlist): New.
7826         (record_btrace_get_cpu): New.
7827         (require_btrace_thread, record_btrace_info)
7828         (record_btrace_resume_thread): Call record_btrace_get_cpu.
7829         (cmd_set_record_btrace_cpu_none): New.
7830         (cmd_set_record_btrace_cpu_auto): New.
7831         (cmd_set_record_btrace_cpu): New.
7832         (cmd_show_record_btrace_cpu): New.
7833         (_initialize_record_btrace): Initialize set/show record btrace cpu
7834         commands.
7835         * record-btrace.h (record_btrace_get_cpu): New.
7836
7837 2018-04-13  Markus Metzger  <[email protected]>
7838
7839         * record.c (set_record_command): Fix typo in message.
7840
7841 2018-04-13  Markus Metzger  <[email protected]>
7842
7843         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7844
7845 2018-04-13  Markus Metzger  <[email protected]>
7846
7847         * infrun.c (process_event_stop_test): Call
7848         gdbarch_in_indirect_branch_thunk.
7849         * gdbarch.sh (in_indirect_branch_thunk): New.
7850         * gdbarch.c: Regenerated.
7851         * gdbarch.h: Regenerated.
7852         * x86-tdep.h: New.
7853         * x86-tdep.c: New.
7854         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7855         (HFILES_NO_SRCDIR): Add x86-tdep.h.
7856         (ALLDEPFILES): Add x86-tdep.c.
7857         * arch-utils.h (default_in_indirect_branch_thunk): New.
7858         * arch-utils.c (default_in_indirect_branch_thunk): New.
7859         * i386-tdep: Include x86-tdep.h.
7860         (i386_in_indirect_branch_thunk): New.
7861         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7862         function.
7863         * amd64-tdep: Include x86-tdep.h.
7864         (amd64_in_indirect_branch_thunk): New.
7865         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7866
7867 2018-04-12  Jan Kratochvil  <[email protected]>
7868
7869         PR gdb/23053
7870         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7871         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7872         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7873         regression.
7874
7875 2018-04-12  Tom Tromey  <[email protected]>
7876
7877         * rust-lang.c (rust_print_struct_def): Remove univariant code.
7878         (rust_evaluate_subexp): Likewise.
7879
7880 2018-04-12  Pedro Alves  <[email protected]>
7881
7882         * procfs.c (procfs_detach): Make forward declaration's prototype
7883         match definition's protototype.
7884         (proc_get_LDT_entry): Remove stale do_cleanups call.
7885
7886 2018-04-12  Pedro Alves  <[email protected]>
7887
7888         * target.h (target_ops::to_has_exited): Delete.
7889         (target_has_exited): Delete.
7890         * target-delegates.c: Regenerate.
7891
7892 2018-04-11  Pedro Alves  <[email protected]>
7893
7894         * target.c (fileio_fh_t::t): Add comment.
7895         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7896         (target_fileio_close): Handle a NULL target.
7897         (invalidate_fileio_fh): New.
7898         (target_close): Call it.
7899         * remote.c (remote_hostio_send_command): No longer check whether
7900         remote_desc is open.
7901
7902 2018-04-11  Pedro Alves  <[email protected]>
7903
7904         * target.c (fileio_fh_t): Make it a named struct instead of a
7905         typedef.
7906         (fileio_fh_t::is_closed): New method.
7907         (DEF_VEC_O (fileio_fh_t)): Remove.
7908         (fileio_fhandles): Now a std::vector.
7909         (is_closed_fileio_fh): Delete.
7910         (acquire_fileio_fd): Adjust.  Rename parameters.
7911         (release_fileio_fd): Adjust.
7912         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7913         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7914         (target_fileio_close): Adjust.
7915
7916 2018-04-10  Simon Marchi  <[email protected]>
7917
7918         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7919         index.
7920
7921 2018-04-10  Pedro Alves  <[email protected]>
7922
7923         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7924         (scoped_finish_thread_state): New class.
7925         * infcmd.c (run_command_1): Use it instead of finish_thread_state
7926         cleanup.
7927         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7928         (fetch_inferior_event, normal_stop): Likewise.
7929         * thread.c (finish_thread_state_cleanup): Delete.
7930
7931 2018-04-09  Simon Marchi  <[email protected]>
7932             Pedro Alves  <[email protected]>
7933
7934         * value.c: Include "selftest.h" and "common/array-view.h".
7935         (struct range) <operator ==>: New.
7936         (test_ranges_contain): New.
7937         (check_ranges_vector): New.
7938         (test_insert_into_bit_range_vector): New.
7939         (_initialize_values): Register selftests.
7940         * common/array-view.h (operator==, operator!=): New.
7941
7942 2018-04-09  Simon Marchi  <[email protected]>
7943
7944         * common/gdb_vecs.h (unordered_remove): Add overload that takes
7945         an iterator.
7946         * inline-frame.c: Include <algorithm>.
7947         (struct inline_state): Add constructor.
7948         (inline_state_s): Remove.
7949         (DEF_VEC_O(inline_state_s)): Remove.
7950         (inline_states): Change type to std::vector.
7951         (find_inline_frame_state): Adjust to std::vector.
7952         (allocate_inline_frame_state): Remove.
7953         (clear_inline_frame_state): Adjust to std::vector.
7954         (skip_inline_frames): Adjust to std::vector.
7955
7956 2018-04-09  Simon Marchi  <[email protected]>
7957
7958         * tracepoint.h (struct trace_state_variable): Add constructor.
7959         <name>: Change type to std::string.
7960         * tracepoint.c (tsv_s): Remove.
7961         (DEF_VEC_O(tsv_s)): Remove.
7962         (tvariables): Change to std::vector.
7963         (create_trace_state_variable): Adjust to std::vector.
7964         (find_trace_state_variable): Likewise.
7965         (find_trace_state_variable_by_number): Likewise.
7966         (delete_trace_state_variable): Likewise.
7967         (trace_variable_command): Adjust to std::string.
7968         (delete_trace_variable_command): Likewise.
7969         (tvariables_info_1): Adjust to std::vector.
7970         (save_trace_state_variables): Likewise.
7971         (start_tracing): Likewise.
7972         (merge_uploaded_trace_state_variables): Adjust to std::vector
7973         and std::string.
7974         * target.h (struct target_ops)
7975         <to_download_trace_state_variable>: Pass reference to
7976         trace_state_variable.
7977         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7978         * target-delegates.c: Re-generate.
7979         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7980         (mi_tsv_deleted): Likewise.
7981         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7982         * remote.c (remote_download_trace_state_variable): Change
7983         pointer to reference and adjust.
7984         * make-target-delegates (parse_argtypes): Handle references.
7985         (write_function_header): Likewise.
7986         (munge_type): Likewise.
7987
7988 2018-04-09  Simon Marchi  <[email protected]>
7989
7990         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7991         string_view-selftests.c.
7992         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7993         testsuite.
7994         * unittests/basic_string_view/cons/char/1.cc: Likewise.
7995         * unittests/basic_string_view/cons/char/2.cc: Likewise.
7996         * unittests/basic_string_view/cons/char/3.cc: Likewise.
7997         * unittests/basic_string_view/element_access/char/1.cc:
7998         Likewise.
7999         * unittests/basic_string_view/element_access/char/empty.cc:
8000         Likewise.
8001         * unittests/basic_string_view/element_access/char/front_back.cc:
8002         Likewise.
8003         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8004         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8005         Likewise.
8006         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8007         Likewise.
8008         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8009         Likewise.
8010         * unittests/basic_string_view/operations/compare/char/1.cc:
8011         Likewise.
8012         * unittests/basic_string_view/operations/compare/char/13650.cc:
8013         Likewise.
8014         * unittests/basic_string_view/operations/copy/char/1.cc:
8015         Likewise.
8016         * unittests/basic_string_view/operations/data/char/1.cc:
8017         Likewise.
8018         * unittests/basic_string_view/operations/find/char/1.cc:
8019         Likewise.
8020         * unittests/basic_string_view/operations/find/char/2.cc:
8021         Likewise.
8022         * unittests/basic_string_view/operations/find/char/3.cc:
8023         Likewise.
8024         * unittests/basic_string_view/operations/find/char/4.cc:
8025         Likewise.
8026         * unittests/basic_string_view/operations/rfind/char/1.cc:
8027         Likewise.
8028         * unittests/basic_string_view/operations/rfind/char/2.cc:
8029         Likewise.
8030         * unittests/basic_string_view/operations/rfind/char/3.cc:
8031         Likewise.
8032         * unittests/basic_string_view/operations/substr/char/1.cc:
8033         Likewise.
8034         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8035         * unittests/string_view-selftests.c: New file.
8036
8037 2018-04-09  Simon Marchi  <[email protected]>
8038
8039         * unittests/basic_string_view/capacity/1.cc: New file.
8040         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8041         * unittests/basic_string_view/cons/char/1.cc: New file.
8042         * unittests/basic_string_view/cons/char/2.cc: New file.
8043         * unittests/basic_string_view/cons/char/3.cc: New file.
8044         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8045         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8046         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8047         * unittests/basic_string_view/element_access/char/1.cc: New file.
8048         * unittests/basic_string_view/element_access/char/2.cc: New file.
8049         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8050         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8051         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8052         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8053         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8054         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8055         * unittests/basic_string_view/include.cc: New file.
8056         * unittests/basic_string_view/inserters/char/1.cc: New file.
8057         * unittests/basic_string_view/inserters/char/2.cc: New file.
8058         * unittests/basic_string_view/inserters/char/3.cc: New file.
8059         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8060         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8061         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8062         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8063         * unittests/basic_string_view/literals/types.cc: New file.
8064         * unittests/basic_string_view/literals/values.cc: New file.
8065         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8066         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8067         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8068         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8069         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8070         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8071         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8072         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8073         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8074         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8075         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8076         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8077         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8078         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8079         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8080         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8081         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8082         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8083         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8084         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8085         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8086         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8087         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8088         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8089         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8090         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8091         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8092         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8093         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8094         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8095         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8096         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8097         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8098         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8099         * unittests/basic_string_view/operators/char/2.cc: New file.
8100         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8101         * unittests/basic_string_view/range_access/char/1.cc: New file.
8102         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8103         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8104         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8105         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8106         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8107         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8108         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8109         * unittests/basic_string_view/typedefs.cc: New file.
8110         * unittests/basic_string_view/types/1.cc: New file.
8111
8112 2018-04-09  Simon Marchi  <[email protected]>
8113
8114         * common/gdb_string_view.h: Remove libstdc++ implementation
8115         details, adjust to gdb reality.
8116         * common/gdb_string_view.tcc: Likewise.
8117         * cli/cli-script.c (struct string_view): Remove.
8118         (user_args) <m_args>: Change element type to gdb::string_view.
8119         (user_args::insert_args): Adjust.
8120
8121 2018-04-09  Simon Marchi  <[email protected]>
8122
8123         * common/gdb_string_view.h: New file.
8124         * common/gdb_string_view.tcc: New file.
8125
8126 2018-04-09  Simon Marchi  <[email protected]>
8127
8128         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8129         * configure: Re-generate.
8130
8131 2018-04-09  Pedro Alves  <[email protected]>
8132
8133         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8134         (set_target_gdbarch): Call
8135         gdb::observers::architecture_changed.notify instead of
8136         observer_notify_architecture_changed.
8137
8138 2018-04-07  Simon Marchi  <[email protected]>
8139
8140         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8141         (do_restore_current_traceframe_cleanup): Remove.
8142         (restore_current_traceframe_cleanup_dtor): Remove.
8143         (make_cleanup_restore_current_traceframe): Remove.
8144         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8145         New.
8146         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8147         * infrun.c (fetch_inferior_event): Use
8148         scoped_restore_current_traceframe.
8149
8150 2018-04-07  Simon Marchi  <[email protected]>
8151
8152         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8153         Remove.
8154         <n_allocated_type_units>: Remove.
8155         <all_type_units>: Change to std::vector.
8156         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8157         to std::vector change.
8158         (dwarf2_per_objfile::get_cutu): Likewise.
8159         (dwarf2_per_objfile::get_tu): Likewise.
8160         (create_signatured_type_table_from_index): Likewise.
8161         (create_signatured_type_table_from_debug_names): Likewise.
8162         (dw2_symtab_iter_next): Likewise.
8163         (dw2_print_stats): Likewise.
8164         (dw2_expand_all_symtabs): Likewise.
8165         (dw2_expand_marked_cus): Likewise.
8166         (dw2_debug_names_iterator::next): Likewise.
8167         (dwarf2_initialize_objfile): Likewise.
8168         (add_signatured_type_cu_to_table): Likewise.
8169         (create_all_type_units): Likewise.
8170         (add_type_unit): Likewise.
8171         (struct tu_abbrev_offset): Add constructor.
8172         (build_type_psymtabs_1): Adjust to std::vector change.
8173         (print_tu_stats): Likewise.
8174         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8175         (write_debug_names): Likewise.
8176
8177 2018-04-07  Simon Marchi  <[email protected]>
8178
8179         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8180         Make an std::vector.
8181         <n_comp_units>: Remove.
8182         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8183         to std::vector change.
8184         (dwarf2_per_objfile::get_cutu): Likewise.
8185         (dwarf2_per_objfile::get_cu): Likewise.
8186         (create_cus_from_index): Likewise.
8187         (create_addrmap_from_index): Likewise.
8188         (create_addrmap_from_aranges): Likewise.
8189         (dwarf2_read_index): Likewise.
8190         (dw2_find_last_source_symtab): Likewise.
8191         (dw2_map_symtabs_matching_filename): Likewise.
8192         (dw2_symtab_iter_next): Likewise.
8193         (dw2_print_stats): Likewise.
8194         (dw2_expand_all_symtabs): Likewise.
8195         (dw2_expand_symtabs_with_fullname): Likewise.
8196         (dw2_expand_marked_cus): Likewise.
8197         (dw2_map_symbol_filenames): Likewise.
8198         (create_cus_from_debug_names): Likewise.
8199         (dwarf2_read_debug_names): Likewise.
8200         (dw2_debug_names_iterator::next): Likewise.
8201         (dwarf2_initialize_objfile): Likewise.
8202         (set_partial_user): Likewise.
8203         (dwarf2_build_psymtabs_hard): Likewise.
8204         (read_comp_units_from_section): Remove arguments, adjust to
8205         std::vector change.
8206         (create_all_comp_units): Adjust to std::vector and
8207         read_comp_units_from_section changes.
8208         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8209         change.
8210         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8211         (psyms_seen_size): Likewise.
8212         (write_gdbindex): Likewise.
8213         (write_debug_names): Likewise.
8214
8215 2018-04-07  Simon Marchi  <[email protected]>
8216
8217         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8218         with dwarf2_per_objfile.
8219         (create_cus_from_index): Likewise.
8220         (create_signatured_type_table_from_index): Likewise.
8221         (dwarf2_read_index): Likewise.
8222         (dwarf2_initialize_objfile): Likewise.
8223         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8224         per_cu rather than get_dwarf2_per_objfile.
8225
8226 2018-04-07  Simon Marchi  <[email protected]>
8227
8228         * dwarf2read.h (struct signatured_type): Forward declare.
8229         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8230         New methods.
8231         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8232         (dw2_get_cutu): ...this.
8233         (dwarf2_per_objfile::get_cu): Rename from...
8234         (dw2_get_cu): ...this.
8235         (dwarf2_per_objfile::get_tu): New.
8236         (create_addrmap_from_index): Adjust.
8237         (create_addrmap_from_aranges): Adjust.
8238         (dw2_find_last_source_symtab): Adjust.
8239         (dw2_map_symtabs_matching_filename): Adjust.
8240         (dw2_symtab_iter_next): Adjust.
8241         (dw2_print_stats): Adjust.
8242         (dw2_expand_all_symtabs): Adjust.
8243         (dw2_expand_symtabs_with_fullname): Adjust.
8244         (dw2_expand_marked_cus): Adjust.
8245         (dw_expand_symtabs_matching_file_matcher): Adjust.
8246         (dw2_map_symbol_filenames): Adjust.
8247         (dw2_debug_names_iterator::next): Adjust.
8248         (dwarf2_initialize_objfile): Adjust.
8249         (set_partial_user): Adjust.
8250         (dwarf2_build_psymtabs_hard): Adjust.
8251
8252 2018-04-07  Simon Marchi  <[email protected]>
8253
8254         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8255         Remove unused variables.
8256         (dw2_map_symtabs_matching_filename): Likewise.
8257         (dwarf2_record_block_ranges): Likewise.
8258         (dwarf2_read_addr_index): Likewise.
8259         (follow_die_offset): Likewise.
8260
8261 2018-04-07  Simon Marchi  <[email protected]>
8262
8263         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8264         to symbol_file_add_main.
8265
8266 2018-04-07  Simon Marchi  <[email protected]>
8267
8268         PR mi/22299
8269         * mi/mi-console.c (do_fputc_async_safe): New.
8270         (mi_console_file::write_async_safe): New.
8271         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8272         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8273         New.
8274         * ui-file.c (ui_file::putstrn): Adjust call to
8275         fputstrn_unfiltered.
8276         * utils.c (printchar): Replace do_fputs and do_fprintf
8277         parameters by do_fputc.
8278         (fputstr_filtered): Adjust call to printchar.
8279         (fputstr_unfiltered): Likewise.
8280         (fputstrn_filtered): Likewise.
8281         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8282         printchar.
8283         * utils.h (do_fputc_ftype): New typedef.
8284         (fputstrn_unfiltered): Add do_fputc parameter.
8285
8286 2018-04-07  Simon Marchi  <[email protected]>
8287
8288         * regformats/i386/i386-avx.dat: Remove.
8289
8290 2018-04-07  Simon Marchi  <[email protected]>
8291
8292         PR gdb/22979
8293         * amd64-tdep.c (amd64_none_init_abi): New function.
8294         (amd64_x32_none_init_abi): New function.
8295         (_initialize_amd64_tdep): Register handlers for x86-64 and
8296         x64_32 with GDB_OSABI_NONE.
8297         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8298         GDB_OSABI_NONE osabi.
8299
8300 2018-04-07  Simon Marchi  <[email protected]>
8301
8302         PR gdb/22980
8303         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8304         GDB_OSABI_NONE.
8305         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8306         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8307
8308 2018-04-07  Simon Marchi  <[email protected]>
8309
8310         * common/byte-vector.h (char_vector): New type.
8311         * target.h (target_read_alloc): Return
8312         gdb::optional<byte_vector>.
8313         (target_read_stralloc): Return gdb::optional<char_vector>.
8314         (target_get_osdata): Return gdb::optional<char_vector>.
8315         * target.c (target_read_alloc_1): Templatize.  Replacement
8316         manual memory management with vector.
8317         (target_read_alloc): Change return type, adjust.
8318         (target_read_stralloc): Change return type, adjust.
8319         (target_get_osdata): Change return type, adjust.
8320         * auxv.c (struct auxv_info) <length>: Remove.
8321         <data>: Change type to gdb::optional<byte_vector>.
8322         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8323         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8324         (target_auxv_search): Adjust.
8325         (fprint_target_auxv): Adjust.
8326         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8327         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8328         (linux_make_corefile_notes): Adjust.
8329         * osdata.c (get_osdata): Adjust.
8330         * remote.c (remote_get_threads_with_qxfer): Adjust.
8331         (remote_memory_map): Adjust.
8332         (remote_traceframe_info): Adjust.
8333         (btrace_read_config): Adjust.
8334         (remote_read_btrace): Adjust.
8335         (remote_pid_to_exec_file): Adjust.
8336         * solib-aix.c (solib_aix_get_library_list): Adjust.
8337         * solib-dsbt.c (decode_loadmap): Don't free buf.
8338         (dsbt_get_initial_loadmaps): Adjust.
8339         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8340         * solib-target.c (solib_target_current_sos): Adjust.
8341         * tracepoint.c (sdata_make_value): Adjust.
8342         * xml-support.c (xinclude_start_include): Adjust.
8343         (xml_fetch_content_from_file): Adjust.
8344         * xml-support.h (xml_fetch_another): Change return type.
8345         (xml_fetch_content_from_file): Change return type.
8346         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8347         * xml-tdesc.c (file_read_description_xml): Adjust.
8348         (fetch_available_features_from_target): Change return type.
8349         (target_fetch_description_xml): Adjust.
8350         (target_read_description_xml): Adjust.
8351
8352 2018-04-06  Tom Tromey  <[email protected]>
8353
8354         * value.c (~value): Update.
8355         (struct value) <contents>: Now unique_xmalloc_ptr.
8356         (value_contents_bits_eq, allocate_value_contents)
8357         (value_contents_raw, value_contents_all_raw)
8358         (value_contents_for_printing, value_contents_for_printing_const)
8359         (set_value_enclosing_type): Update.
8360
8361 2018-04-06  Tom Tromey  <[email protected]>
8362
8363         * value.c (range_s): Remove typedef, VEC.
8364         (struct range): Add operator<.
8365         (range_lessthan): Remove.
8366         (ranges_contain): Change type.
8367         (~value): Update.
8368         (struct value) <unavailable, optimized_out>: Now std::vector.
8369         (value_entirely_available)
8370         (value_entirely_covered_by_range_vector)
8371         (value_entirely_unavailable, value_entirely_optimized_out):
8372         Update.
8373         (insert_into_bit_range_vector): Change argument type.
8374         (find_first_range_overlap): Likewise.
8375         (struct ranges_and_idx, value_contents_bits_eq)
8376         (require_not_optimized_out, require_available): Update.
8377         (ranges_copy_adjusted): Change argument types.
8378         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8379
8380 2018-04-06  Tom Tromey  <[email protected]>
8381
8382         * value.c (~value): Update.
8383         (struct value) <parent>: Now a value_ref_ptr.
8384         (value_parent, set_value_parent, value_address, value_copy):
8385         Update.
8386
8387 2018-04-06  Tom Tromey  <[email protected]>
8388
8389         * value.c (struct value): Add constructor, destructor, and member
8390         initializers.
8391         (allocate_value_lazy, value_decref): Update.
8392
8393 2018-04-06  Tom Tromey  <[email protected]>
8394
8395         * value.c (struct value) <released, next>: Remove.
8396         (all_values): Now a std::vector.
8397         (allocate_value_lazy): Update.
8398         (value_next): Remove.
8399         (value_mark, value_free_to_mark, release_value)
8400         (value_release_to_mark): Update.
8401
8402 2018-04-06  Tom Tromey  <[email protected]>
8403
8404         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8405         (free_value_chain): Remove.
8406         * value.c (free_value_chain): Remove.
8407         (value_release_to_mark): Return a std::vector.
8408         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8409         std::vector.
8410         (check_condition): Update.
8411         * eval.c (fetch_subexp_value): Change "val_chain" to a
8412         std::vector.
8413         * breakpoint.c (update_watchpoint): Update.
8414         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8415
8416 2018-04-06  Tom Tromey  <[email protected]>
8417
8418         * value.h (free_all_values): Remove.
8419         * value.c (free_all_values): Remove.
8420
8421 2018-04-06  Tom Tromey  <[email protected]>
8422
8423         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8424         (value_history_chain, value_history_count): Remove.
8425         (value_history): New global.
8426         (record_latest_value, access_value_history, show_values)
8427         (preserve_values): Update.
8428
8429 2018-04-06  Tom Tromey  <[email protected]>
8430
8431         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8432         * varobj.c (varobj_set_display_format, varobj_set_value)
8433         (install_default_visualizer, construct_visualizer)
8434         (install_new_value, ~varobj, varobj_get_value_type)
8435         (my_value_of_variable, varobj_editable_p): Update.
8436         * c-varobj.c (c_describe_child, c_value_of_variable)
8437         (cplus_number_of_children, cplus_describe_child): Update.
8438         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8439         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8440         (ada_value_of_variable, ada_value_is_changeable_p): Update.
8441
8442 2018-04-06  Tom Tromey  <[email protected]>
8443
8444         * printcmd.c (last_examine_address): Change type to
8445         value_ref_ptr.
8446         (do_examine, x_command): Update.
8447
8448 2018-04-06  Tom Tromey  <[email protected]>
8449
8450         * value.c (release_value): Update.
8451         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8452         (struct bpstats) <val>: Now a value_ref_ptr.
8453         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8454         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8455         (~watchpoint, print_it_watchpoint, watch_command_1)
8456         (invalidate_bp_value_on_memory_change): Update.
8457
8458 2018-04-06  Tom Tromey  <[email protected]>
8459
8460         * varobj.c (varobj_clear_saved_item)
8461         (update_dynamic_varobj_children, install_new_value, ~varobj):
8462         Update.
8463         * value.h (value_incref): Move declaration earlier.
8464         (value_decref): Rename from value_free.
8465         (struct value_ref_policy): New.
8466         (value_ref_ptr): New typedef.
8467         (struct value_deleter): Remove.
8468         (gdb_value_up): Remove typedef.
8469         (release_value): Change return type.
8470         (release_value_or_incref): Remove.
8471         * value.c (set_value_parent): Update.
8472         (value_incref): Change return type.
8473         (value_decref): Rename from value_free.
8474         (value_free_to_mark, free_all_values, free_value_chain): Update.
8475         (release_value): Return value_ref_ptr.
8476         (release_value_or_incref): Remove.
8477         (record_latest_value, set_internalvar, clear_internalvar):
8478         Update.
8479         * stack.c (info_frame_command): Don't call value_free.
8480         * python/py-value.c (valpy_dealloc, valpy_new)
8481         (value_to_value_object): Update.
8482         * printcmd.c (do_examine): Update.
8483         * opencl-lang.c (lval_func_free_closure): Update.
8484         * mi/mi-main.c (register_changed_p): Don't call value_free.
8485         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8486         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8487         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8488         value_free.
8489         * guile/scm-value.c (vlscm_free_value_smob)
8490         (vlscm_scm_from_value): Update.
8491         * frame.c (frame_register_unwind, frame_unwind_register_signed)
8492         (frame_unwind_register_unsigned, get_frame_register_bytes)
8493         (put_frame_register_bytes): Don't call value_free.
8494         * findvar.c (address_from_register): Don't call value_free.
8495         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8496         * dwarf2loc.c (entry_data_value_free_closure)
8497         (value_of_dwarf_reg_entry, free_pieced_value_closure)
8498         (dwarf2_evaluate_loc_desc_full): Update.
8499         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8500         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8501         (~watchpoint, watch_command_1)
8502         (invalidate_bp_value_on_memory_change): Update.
8503         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8504
8505 2018-04-06  Simon Marchi  <[email protected]>
8506
8507         PR gdb/23022
8508         * warning.m4: Add -Wno-error=deprecated-register.
8509         * configure: Re-generate.
8510
8511 2018-04-05  Tom Tromey  <[email protected]>
8512
8513         * linespec.h: Remove include of "vec.h".
8514
8515 2018-04-05  Tom Tromey  <[email protected]>
8516
8517         * linespec.c (typep): Remove typedef.
8518         (find_methods, find_superclass_methods): Take a std::vector.
8519         (find_method): Use std::vector.
8520
8521 2018-04-05  Tom Tromey  <[email protected]>
8522
8523         * utils.c (compare_strings): Remove.
8524         * utils.h (compare_strings): Remove.
8525         * objc-lang.h (find_imps): Update.
8526         * objc-lang.c (find_methods): Take a std::vector.
8527         (uniquify_strings, find_imps): Likewise.
8528         * linespec.c (find_methods): Take a std::vector.
8529         (decode_objc): Use std::vector.
8530         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8531         a std::vector.
8532         (find_method, find_function_symbols): Use std::vector.
8533
8534 2018-04-05  Tom Tromey  <[email protected]>
8535
8536         * completer.c (completion_tracker::completion_tracker): Remove
8537         cast.
8538         (completion_tracker::discard_completions): Likewise.
8539         * breakpoint.c (ambiguous_names_p): Remove cast.
8540         * ada-lang.c (_initialize_ada_language): Remove cast.
8541         * utils.h (streq): Update.
8542         (streq_hash): Add new declaration.
8543         * utils.c (streq): Return bool.
8544         (streq_hash): New function.
8545
8546 2018-04-05  Tom Tromey  <[email protected]>
8547
8548         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8549         Remove a string copy.
8550
8551 2018-04-05  Tom Tromey  <[email protected]>
8552
8553         * linespec.c (filter_results): Use std::vector.
8554         (decode_line_2, decode_line_full): Update.
8555
8556 2018-04-05  Tom Tromey  <[email protected]>
8557
8558         * linespec.c (canonical_to_fullform): Return std::string.
8559         (filter_results): Update.
8560         (struct decode_line_2_item): Add constructor.
8561         <fullform, displayform>: Now std::string.
8562         (decode_line_2_compare_items): Now a std::sort comparator.
8563         (decode_line_2): Update.
8564
8565 2018-04-05  Tom Tromey  <[email protected]>
8566
8567         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8568         (unexpected_linespec_error): Update.
8569         (linespec_parse_basic, parse_linespec): Update.
8570
8571 2018-04-05  Tom Tromey  <[email protected]>
8572
8573         * linespec.c (linespec_parse_basic): Reindent.
8574
8575 2018-04-05  Tom Tromey  <[email protected]>
8576
8577         * minsyms.h (iterate_over_minimal_symbols): Update.
8578         * minsyms.c (iterate_over_minimal_symbols): Take a
8579         gdb::function_view.
8580         * linespec.c (struct collect_minsyms): Remove.
8581         (compare_msyms): Now a std::sort comparator.
8582         (add_minsym): Add parameters.
8583         (search_minsyms_for_name): Update.  Use std::vector.
8584
8585 2018-04-03  Tom Tromey  <[email protected]>
8586
8587         * mipsread.c (read_alphacoff_dynamic_symtab): Use
8588         gdb::byte_vector.
8589
8590 2018-04-02  Weimin Pan  <[email protected]>
8591
8592         * MAINTAINERS (Write After Approval): Add Weimin Pan.
8593
8594 2018-04-02  Weimin Pan  <[email protected]>
8595
8596         PR gdb/16959
8597         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
8598         printing static type.
8599
8600 2018-04-01  Tom Tromey  <[email protected]>
8601
8602         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8603         (rs6000_xfer_shared_libraries): Update.
8604
8605 2018-04-01  Simon Marchi  <[email protected]>
8606
8607         * common/gdb_vecs.h (char_ptr): Remove.
8608         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8609
8610 2018-03-30  Simon Marchi  <[email protected]>
8611
8612         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8613         with std::vector.
8614         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8615
8616 2018-03-30  Simon Marchi  <[email protected]>
8617
8618         * tracepoint.h (struct uploaded_tp): Initialize fields.
8619         <actions, step_actions, cmd_strings>: Change type to
8620         std::vector<char *>.
8621         * tracepoint.c (get_uploaded_tp): Allocate with new.
8622         (free_uploaded_tps): Free with delete.
8623         (parse_tracepoint_definition): Adjust to std::vector change.
8624         * breakpoint.c (read_uploaded_action): Likewise.
8625         (create_tracepoint_from_upload): Likewise.
8626         * ctf.c (ctf_write_uploaded_tp): Likewise.
8627         (SET_ARRAY_FIELD): Likewise.
8628         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8629
8630 2018-03-30  Tom Tromey  <[email protected]>
8631
8632         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
8633         std::unique_ptr.
8634         (svr4_keep_data_in_core): Update.
8635         (svr4_read_so_list): Update.
8636
8637 2018-03-30  Tom Tromey  <[email protected]>
8638
8639         * windows-nat.c (handle_output_debug_string, handle_exception):
8640         Update.
8641         * target.h (target_read_string): Update.
8642         * target.c (target_read_string): Change "string" to
8643         unique_xmalloc_ptr.
8644         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8645         Update.
8646         * solib-frv.c (frv_current_sos): Update.
8647         * solib-dsbt.c (dsbt_current_sos): Update.
8648         * solib-darwin.c (darwin_current_sos): Update.
8649         * linux-thread-db.c (inferior_has_bug): Update.
8650         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8651         Update.  Remove alloca.
8652         * ada-lang.c (ada_main_name): Update.
8653
8654 2018-03-30  Tom Tromey  <[email protected]>
8655
8656         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8657         (struct dwo_file_deleter): New.
8658         (dwo_file_up): New typedef.
8659         (open_and_init_dwo_file): Use dwo_file_up.
8660         (free_dwo_file_cleanup): Remove.
8661
8662 2018-03-30  Tom Tromey  <[email protected]>
8663
8664         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8665         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8666
8667 2018-03-30  Tom Tromey  <[email protected]>
8668
8669         * dwarf2read.c (class free_cached_comp_units): New class.
8670         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8671         (free_cached_comp_units): Remove function.
8672
8673 2018-03-30  Tom Tromey  <[email protected]>
8674
8675         * utils.h (make_cleanup_unpush_target): Remove.
8676         * inf-ptrace.c (struct target_unpusher): New.
8677         (target_unpush_up) New typedef.
8678         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8679         target_unpush_up.
8680         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8681
8682 2018-03-27  Tom Tromey  <[email protected]>
8683
8684         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8685
8686 2018-03-27  Pedro Alves  <[email protected]>
8687             Tom Tromey  <[email protected]>
8688
8689         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8690         destructor.  Now a class.
8691         (gdb_readline_wrapper_cleanup): Remove function.
8692         (gdb_readline_wrapper): Remove cleanups.
8693
8694 2018-03-27  Tom Tromey  <[email protected]>
8695
8696         * typeprint.h (struct type_print_options) <local_typedefs,
8697         global_typedefs>: Remove "struct" keyword.
8698         (class typedef_hash_table): New class.
8699         (recursively_update_typedef_hash, add_template_parameters)
8700         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8701         (find_typedef_in_hash): Don't declare.
8702         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8703         (typedef_hash_table::recursively_update): Rename from
8704         recursively_update_typedef_hash.  Now a member.
8705         (typedef_hash_table::add_template_parameters): Rename from
8706         add_template_parameters.  Now a member.
8707         (typedef_hash_table::typedef_hash_table): Now a constructor;
8708         rename from create_typedef_hash.
8709         (typedef_hash_table::~typedef_hash_table): Now a destructor;
8710         rename from free_typedef_hash.
8711         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8712         (do_free_global_table): Remove.
8713         (typedef_hash_table::typedef_hash_table): New constructor; renamed
8714         from copy_type_recursive.
8715         (create_global_typedef_table): Remove.
8716         (typedef_hash_table::find_global_typedef): Now a member of
8717         typedef_hash_table.
8718         (typedef_hash_table::find_typedef): Rename from
8719         find_typedef_in_hash; now a member.
8720         (whatis_exp): Update.
8721         * extension.h (struct ext_lang_type_printers): Add constructor and
8722         destructor.
8723         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8724         declare.
8725         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8726         Now a constructor; rename from start_ext_lang_type_printers.
8727         (ext_lang_type_printers): Now a destructor; rename from
8728         free_ext_lang_type_printers.
8729         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8730         Update.
8731         (c_type_print_base_struct_union): Update.  Remove cleanups.
8732
8733 2018-03-27  Tom Tromey  <[email protected]>
8734
8735         * dwarf-index-write.c: Include <cmath>.
8736
8737 2018-03-27  Joel Brobecker  <[email protected]>
8738
8739         * NEWS: Add entry describing new "set|show varsize-limit" command.
8740         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8741         command.
8742         * printcmd.c (_initialize_printcmd): Add "set var" alias of
8743         "set variable".
8744
8745 2018-03-27  Simon Marchi  <[email protected]>
8746
8747         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8748         dwarf-index-write.c
8749         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8750         * dwarf-index-common.c: New file.
8751         * dwarf-index-common.h: New file.
8752         * dwarf-index-write.c: New file.
8753         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8754         (struct dwarf2_section_info): Move from here.
8755         (dwarf2_section_info_def): Likewise.
8756         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8757         (offset_type): Likewise.
8758         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8759         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8760         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8761         (byte_swap): Likewise.
8762         (MAYBE_SWAP): Likewise.
8763         (dwarf2_per_cu_ptr): Likewise.
8764         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8765         (struct tu_stats): Likewise.
8766         (struct dwarf2_per_objfile): Likewise.
8767         (struct dwarf2_per_cu_data): Likewise.
8768         (struct signatured_type): Likewise.
8769         (sig_type_ptr): Likewise.
8770         (DEF_VEC_P (sig_type_ptr)): Likewise.
8771         (INDEX4_SUFFIX): Likewise.
8772         (INDEX5_SUFFIX): Likewise.
8773         (DEBUG_STR_SUFFIX): Likewise.
8774         (dwarf2_read_section): Make non-static.
8775         (mapped_index_string_hash): Move from here.
8776         (dwarf5_djb_hash): Likewise.
8777         (file_write): Likewise.
8778         (class data_buf): Likewise.
8779         (struct symtab_index_entry): Likewise.
8780         (struct mapped_symtab): Likewise.
8781         (find_slot): Likewise.
8782         (hash_expand): Likewise.
8783         (add_index_entry): Likewise.
8784         (uniquify_cu_indices): Likewise.
8785         (class c_str_view): Likewise.
8786         (class c_str_view_hasher): Likewise.
8787         (class vector_hasher): Likewise.
8788         (write_hash_table): Likewise.
8789         (psym_index_map): Likewise.
8790         (struct addrmap_index_data): Likewise.
8791         (add_address_entry): Likewise.
8792         (add_address_entry_worker): Likewise.
8793         (write_address_map): Likewise.
8794         (symbol_kind): Likewise.
8795         (write_psymbols): Likewise.
8796         (struct signatured_type_index_data): Likewise.
8797         (write_one_signatured_type): Likewise.
8798         (recursively_count_psymbols): Likewise.
8799         (recursively_write_psymbols): Likewise.
8800         (class debug_names): Likewise.
8801         (check_dwarf64_offsets): Likewise.
8802         (psyms_seen_size): Likewise.
8803         (write_gdbindex): Likewise.
8804         (write_debug_names): Likewise.
8805         (assert_file_size): Likewise.
8806         (write_psymtabs_to_index): Likewise.
8807         (save_gdb_index_command): Likewise.
8808         (_initialize_dwarf2_read): Don't register the "save gdb-index"
8809         command.
8810         * dwarf2read.h: New file.
8811
8812 2018-03-27  Joel Brobecker  <[email protected]>
8813
8814         PR gdb/22670
8815         * dwarf2read.c (dwarf2_physname): Do not return the demangled
8816         symbol name if the CU's language stores symbol names in linkage
8817         format.
8818         * language.h (struct language_defn)
8819         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
8820         all instances of this struct.
8821
8822 2018-03-26  Tom Tromey  <[email protected]>
8823
8824         * stack.c (backtrace_command_1): Remove verbose code.
8825
8826 2018-03-26  Tom Tromey  <[email protected]>
8827
8828         * python/py-framefilter.c (py_print_type): Don't catch
8829         exceptions.  Return void.
8830         (py_print_value): Likewise.
8831         (py_print_single_arg): Likewise.
8832         (enumerate_args): Don't catch exceptions.
8833         (py_print_args): Likewise.
8834         (py_print_frame): Likewise.
8835         (gdbpy_apply_frame_filter): Catch exceptions here.
8836
8837 2018-03-26  Tom Tromey  <[email protected]>
8838
8839         * stack.c (_initialize_stack): Remove trailing newlines from help
8840         text.  Add "Usage" line to "backtrace" help.
8841
8842 2018-03-26  Tom Tromey  <[email protected]>
8843
8844         PR python/16486:
8845         * python/py-framefilter.c (py_print_args): Call wrap_hint.
8846
8847 2018-03-26  Tom Tromey  <[email protected]>
8848
8849         * python/py-framefilter.c (py_print_single_arg): Return
8850         EXT_LANG_BT_ERROR from catch.
8851
8852 2018-03-26  Tom Tromey  <[email protected]>
8853
8854         PR backtrace/15584:
8855         * stack.c (backtrace_command_1): Move some code into no-filters
8856         "if".
8857
8858 2018-03-26  Tom Tromey  <[email protected]>
8859
8860         * python/py-framefilter.c (throw_quit_or_print_exception): New
8861         function.
8862         (gdbpy_apply_frame_filter): Use it.
8863
8864 2018-03-26  Tom Tromey  <[email protected]>
8865
8866         PR cli/17716:
8867         * python/py-framefilter.c (py_print_type, py_print_value)
8868         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8869         RETURN_MASK_ERROR.
8870
8871 2018-03-26  Tom Tromey  <[email protected]>
8872
8873         * python/py-framefilter.c (enumerate_args): Use
8874         gdb::unique_xmalloc_ptr.
8875
8876 2018-03-26  Tom Tromey  <[email protected]>
8877
8878         * python/py-framefilter.c (py_print_frame): Return
8879         EXT_LANG_BT_OK.
8880         (gdbpy_apply_frame_filter): Update comment.
8881         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8882         Remove.
8883         <EXT_LANG_BT_NO_FILTERS>: Change value.
8884
8885 2018-03-26  Tom Tromey  <[email protected]>
8886
8887         PR backtrace/15582:
8888         * stack.c (backtrace_command): Parse "hide" argument.
8889         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8890         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8891         constant.
8892
8893 2018-03-26  Tom Tromey  <[email protected]>
8894
8895         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8896         add "flags".
8897         (backtrace_command): Remove "fulltrace", add "flags".
8898
8899 2018-03-26  Tom Tromey  <[email protected]>
8900
8901         * stack.c (backtrace_command): Rewrite command line parsing.
8902
8903 2018-03-26  Simon Marchi  <[email protected]>
8904
8905         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8906
8907 2018-03-26  Simon Marchi  <[email protected]>
8908
8909         * filename-seen-cache.h: Add include guard.
8910
8911 2018-03-26  Keith Seitz  <[email protected]>
8912
8913         * symfile.c (place_section): Remove "struct" from section_addr_info
8914         in comment.
8915         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8916         "struct" keyword from section_addr_info.
8917
8918 2018-03-26  Alan Hayward  <[email protected]>
8919
8920         * regformats/regdef.h (reg): Add constructors.
8921
8922 2018-03-25  Pedro Alves  <[email protected]>
8923
8924         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8925         if then/else bodies in var_func_name extraction.
8926
8927 2018-03-23  Weimin Pan  <[email protected]>
8928
8929         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8930         lookup_minimal_symbol() to find symbol entry.
8931         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8932
8933 2018-03-23  Keith Seitz  <[email protected]>
8934
8935         PR c++/22968
8936         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8937         nested type definitions for C++, too.
8938
8939 2018-03-23  Tom Tromey  <[email protected]>
8940
8941         * machoread.c (struct oso_el): Add a constructor.  Don't define as
8942         a typedef.
8943         (macho_register_oso): Remove.
8944         (macho_symtab_read): Take a std::vector.
8945         (oso_el_compare_name): Now a std::sort comparator.
8946         (macho_symfile_read_all_oso): Take a std::vector.
8947         (macho_symfile_read): Use std::vector.  Remove cleanups.
8948
8949 2018-03-22  Tom Tromey  <[email protected]>
8950
8951         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8952         (record_full_goto_bookmark): Use std::string.
8953
8954 2018-03-22  Pedro Franco de Carvalho  <[email protected]>
8955
8956         PR tdep/18295
8957         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8958         a single mask.
8959
8960 2018-03-22  Pedro Franco de Carvalho  <[email protected]>
8961
8962         * rs6000-tdep.c (store_insn_p): New function.
8963         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8964         and cr_reg to their unshifted values. Use store_insn_p to
8965         match LR saves using either R1 or fdata->alloca_reg. Use
8966         store_insn_p to match CR saves. Set alloca_reg_offset
8967         when alloca_reg and framep are set. Remove lr_reg shift
8968         when assigning to fdata->lr_register.
8969
8970 2018-03-22  Andreas Arnez  <[email protected]>
8971
8972         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8973         command line args instead of emitting a warning.
8974
8975 2018-03-22  Simon Marchi  <[email protected]>
8976
8977         * tracepoint.h (struct static_tracepoint_marker): Initialize
8978         fields, define default constructor, move constructor and move
8979         assignment, disable the rest.
8980         <str_id, extra>: Make std::string.
8981         (release_static_tracepoint_marker): Remove.
8982         (free_current_marker): Remove.
8983         * tracepoint.c (free_current_marker): Remove.
8984         (parse_static_tracepoint_marker_definition): Adjust to
8985         std::string, use new hex2str overload.
8986         (release_static_tracepoint_marker): Remove.
8987         (print_one_static_tracepoint_marker): Get marker by reference
8988         and adjust to std::string.
8989         (info_static_tracepoint_markers_command): Adjust to std::vector
8990         changes
8991         * target.h (static_tracepoint_marker_p): Remove typedef.
8992         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8993         (struct target_ops) <to_static_tracepoint_marker_at>: Return
8994         bool.
8995         <to_static_tracepoint_markers_by_strid>: Return std::vector.
8996         * target-debug.h
8997         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8998         (target_debug_print_std_vector_static_tracepoint_marker): New.
8999         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9000         to...
9001         (target_debug_print_static_tracepoint_marker_p): ... this.
9002         * target-delegates.c: Re-generate.
9003         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9004         Make std::string.
9005         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9006         (decode_static_tracepoint_spec): Adjust to std::vector.
9007         (tracepoint_print_one_detail): Adjust to std::string.
9008         (strace_marker_decode_location): Adjust to std::string.
9009         (update_static_tracepoint): Adjust to std::string, remove call
9010         to release_static_tracepoint_marker.
9011         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9012         Adjust to std::vector.
9013         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9014         (remote_static_tracepoint_markers_by_strid): Adjust to
9015         std::vector.
9016         * common/rsp-low.h (hex2str): New overload with explicit count
9017         of bytes.
9018         * common/rsp-low.c (hex2str): New overload with explicit count
9019         of bytes.
9020         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9021         (_initialize_rsp_low_selftests): Add test_hex2str test.
9022         * unittests/tracepoint-selftests.c
9023         (test_parse_static_tracepoint_marker_definition): Adjust to
9024         std::string.
9025
9026 2018-03-22  Simon Marchi  <[email protected]>
9027
9028         * tracepoint.c (parse_static_tracepoint_marker_definition):
9029         Consider case where the definition is followed by more
9030         definitions.
9031         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9032         tracepoint-selftests.c.
9033         * unittests/tracepoint-selftests.c: New.
9034
9035 2018-03-21  Pedro Franco de Carvalho  <[email protected]>
9036
9037         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9038         Carvalho.
9039
9040 2018-03-20  Stephen Roberts  <[email protected]>
9041
9042         * symtab.c (find_pc_sect_line): fixed indentation.
9043
9044 2018-03-20  Stephen Roberts  <[email protected]>
9045
9046         * symtab.c (find_pc_sect_line): now uses binary search.
9047
9048 2018-03-19  Tom Tromey  <[email protected]>
9049
9050         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9051         "IDENT" production.
9052
9053 2018-03-19  Pedro Alves  <[email protected]>
9054             Tom Tromey  <[email protected]>
9055
9056         * unittests/observable-selftests.c: New file.
9057         * common/observable.h: New file.
9058         * observable.h: New file.
9059         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9060         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9061         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9062         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9063         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9064         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9065         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9066         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9067         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9068         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9069         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9070         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9071         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9072         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9073         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9074         tui/tui-interp.c, valops.c: Update all users.
9075         * tui/tui-hooks.c (tui_bp_created_observer)
9076         (tui_bp_deleted_observer, tui_bp_modified_observer)
9077         (tui_inferior_exit_observer, tui_before_prompt_observer)
9078         (tui_normal_stop_observer, tui_register_changed_observer):
9079         Remove.
9080         (tui_observers_token): New global.
9081         (attach_or_detach, tui_attach_detach_observers): New functions.
9082         (tui_install_hooks, tui_remove_hooks): Use
9083         tui_attach_detach_observers.
9084         * record-btrace.c (record_btrace_thread_observer): Remove.
9085         (record_btrace_thread_observer_token): New global.
9086         * observer.sh: Remove.
9087         * observer.c: Rename to observable.c.
9088         * observable.c (namespace gdb_observers): Define new objects.
9089         (observer_debug): Move into gdb_observers namespace.
9090         (struct observer, struct observer_list, xalloc_observer_list_node)
9091         (xfree_observer_list_node, generic_observer_attach)
9092         (generic_observer_detach, generic_observer_notify): Remove.
9093         (_initialize_observer): Update.
9094         Don't include observer.inc.
9095         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9096         (clean mostlyclean): Likewise.
9097         (observer.h, observer.inc): Remove targets.
9098         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9099         (COMMON_SFILES): Use observable.c, not observer.c.
9100         * .gitignore: Remove observer.h.
9101
9102 2018-03-18  Tom Tromey  <[email protected]>
9103
9104         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9105         gdb::def_vector.
9106         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9107
9108 2018-03-17  Tom Tromey  <[email protected]>
9109
9110         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9111
9112 2018-03-17  Tom Tromey  <[email protected]>
9113
9114         * target.c (class scoped_target_fd): New.
9115         (target_fileio_close_cleanup): Remove.
9116         (target_fileio_read_alloc_1): Use scoped_target_fd.
9117
9118 2018-03-16  Simon Marchi  <[email protected]>
9119
9120         * silent-rules.mk: New.
9121         * Makefile.in: Include silent-rules.mk
9122         (srcdir, VPATH, top_srcdir): Move up.
9123         (COMPILE): Add ECHO_CXX.
9124         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9125         (init.c): Add ECHO_INIT_C.
9126         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9127         (version.c): Add ECHO_GEN.
9128         (printcmd.o): Add ECHO_CXX.
9129         (target-float.o): Add ECHO_CXX.
9130         (ada-exp.o): Add ECHO_CXX.
9131         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9132         (insight$(EXEEXT)): Add ECHO_CXXLD.
9133         * gnulib/configure.ac: Add AM_SILENT_RULES.
9134         * gnulib/aclocal.m4: Re-generate.
9135         * gnulib/configure: Re-generate.
9136         * gnulib/import/Makefile.in: Re-generate.
9137
9138 2018-03-16  Tom Tromey  <[email protected]>
9139
9140         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9141         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9142         * utils.c (do_free_section_addr_info)
9143         (make_cleanup_free_section_addr_info): Remove.
9144         * symfile.h (struct other_sections): Add constructor.
9145         (struct section_addr_info): Remove.
9146         (section_addr_info): New typedef.
9147         (struct sym_fns) <sym_offsets>: Change type of parameter.
9148         (build_section_addr_info_from_objfile)
9149         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9150         (default_symfile_offsets, symbol_file_add)
9151         (symbol_file_add_from_bfd)
9152         (build_section_addr_info_from_section_table): Update.
9153         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9154         * symfile.c (alloc_section_addr_info): Remove.
9155         (build_section_addr_info_from_section_table): Change return type.
9156         Update.
9157         (build_section_addr_info_from_bfd)
9158         (build_section_addr_info_from_objfile): Likewise.
9159         (free_section_addr_info): Remove.
9160         (relative_addr_info_to_section_offsets): Change type of "addrs".
9161         (addrs_section_compar): Now a std::sort comparator.
9162         (addrs_section_sort): Change return type.
9163         (addr_info_make_relative): Change type of "addrs".  Update.
9164         (default_symfile_offsets, syms_from_objfile_1)
9165         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9166         (symbol_file_add_separate): Update.
9167         (symbol_file_add): Change type of "addrs".  Update.
9168         (add_symbol_file_command): Update.  Remove cleanups.
9169         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9170         cleanups.
9171         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9172         * solib.c (solib_read_symbols): Update.
9173         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9174         * machoread.c (macho_symfile_offsets): Update.
9175         * jit.c (jit_bfd_try_read_symtab): Update.
9176
9177 2018-03-15  Simon Marchi  <[email protected]>
9178
9179         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9180         unittests/utils-selftests.c.
9181         * unittests/utils-selftests.c: New file.
9182
9183 2018-03-14  Tom Tromey  <[email protected]>
9184
9185         PR cli/14977:
9186         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9187         for NULL.
9188
9189 2018-03-14  Tom Tromey  <[email protected]>
9190
9191         PR cli/19918:
9192         * printcmd.c (printf_pointer): Allow "-" in format.
9193
9194 2018-03-14  Tom Tromey  <[email protected]>
9195
9196         * printcmd.c (_initialize_printcmd): Add usage to printf.
9197
9198 2018-03-14  Yao Qi  <[email protected]>
9199
9200         * MAINTAINERS: Update my email address.
9201
9202 2018-03-13  Tom Tromey  <[email protected]>
9203
9204         * machoread.c (macho_check_dsym): Change filenamep to a
9205         std::string*.
9206         (macho_symfile_read): Update.
9207         * symfile.c (load_command): Use std::string.
9208
9209 2018-03-12  Andrew Burgess  <[email protected]>
9210
9211         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9212         to error message string.
9213         (riscv_register_name): Use xsnprintf instead of sprintf.
9214         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9215         internal_error.
9216         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9217         error.
9218         (riscv_push_dummy_call): Likewise.
9219
9220 2018-03-12  Tom Tromey  <[email protected]>
9221
9222         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9223         Use gdb::byte_vector.
9224         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9225
9226 2018-03-12  Yao Qi  <[email protected]>
9227
9228         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9229         parameter type to readable_regcache.
9230         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9231         the declaration.
9232
9233 2018-03-11  Tom Tromey  <[email protected]>
9234
9235         * dwarf2read.c (struct nextfield): Add initializers.
9236         (struct nextfnfield): Remove.
9237         (struct fnfieldlist): Add initializers.  Remove "length" and
9238         "head", use std::vector.
9239         (struct decl_field_list): Remove.
9240         (struct field_info): Add initializers.
9241         <fields, baseclasses>: Now std::vector.
9242         <nbaseclasses, nfnfields, typedef_field_list_count,
9243         nested_types_list_count>: Remove.
9244         (dwarf2_add_field, dwarf2_add_type_defn)
9245         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9246         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9247         (process_structure_scope): Update.
9248
9249 2018-03-11  Tom Tromey  <[email protected]>
9250
9251         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9252         for use by std::sort.
9253         (build_type_psymtabs_1): Use std::vector.
9254
9255 2018-03-09  Eli Zaretskii  <[email protected]>
9256
9257         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9258         and LIBMPFR in the printed configuration.
9259
9260 2018-03-08  Tom Tromey  <[email protected]>
9261
9262         * source.c (get_filename_and_charpos): Use scoped_fd.
9263         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9264         (procfs_pidlist): Likewise.
9265         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9266         (iterate_over_mappings): Likewise.
9267
9268 2018-03-08  Tom Tromey  <[email protected]>
9269
9270         * infcall.c (struct call_return_meta_info)
9271         <stack_temporaries_enabled>: Remove.
9272         (get_call_return_value, call_function_by_hand_dummy): Update.
9273         * thread.c (disable_thread_stack_temporaries): Remove.
9274         (enable_thread_stack_temporaries): Remove.
9275         (thread_stack_temporaries_enabled_p): Return bool.
9276         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9277         (get_last_thread_stack_temporary): Update.
9278         * eval.c (evaluate_subexp): Update.
9279         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9280         class, not a function.
9281         (value_ptr, value_vec): Remove typedefs.
9282         (class thread_info) <stack_temporaries_enabled>: Now bool.
9283         <stack_temporaries>: Now a std::vector.
9284         (thread_stack_temporaries_enabled_p)
9285         (value_in_thread_stack_temporaries): Return bool.
9286
9287 2018-03-08  Simon Marchi  <[email protected]>
9288
9289         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9290         (getpkt_or_notif_sane_1): Likewise.
9291
9292 2018-03-08  Simon Marchi  <[email protected]>
9293
9294         * build-id.c (build_id_to_debug_bfd): Use std::string.
9295
9296 2018-03-08  Simon Marchi  <[email protected]>
9297
9298         * build-id.c (find_separate_debug_file_by_buildid): Return
9299         std::string.
9300         * build-id.h (find_separate_debug_file_by_buildid): Return
9301         std::string.
9302         * coffread.c (coff_symfile_read): Adjust to std::string.
9303         * elfread.c (elf_symfile_read): Adjust to std::string.
9304         * symfile.c (separate_debug_file_exists): Change parameter to
9305         std::string.
9306         (find_separate_debug_file): Return std::string.
9307         (find_separate_debug_file_by_debuglink): Return std::string.
9308         * symfile.h (find_separate_debug_file_by_debuglink): Return
9309         std::string.
9310
9311 2018-03-08  Simon Marchi  <[email protected]>
9312
9313         * common/xml-utils.c (xml_escape_text): Move code to...
9314         (xml_escape_text_append): ... this new function.
9315         * common/xml-utils.h (xml_escape_text_append): New declaration.
9316         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9317         New function.
9318         (_initialize_xml_utils): register test_xml_escape_text_append as
9319         a selftest.
9320
9321 2018-03-07  Alan Hayward  <[email protected]>
9322
9323         * defs.h: Remove MAX_REGISTER_SIZE.
9324         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9325         asserts.
9326         * python/py-unwind.c (pyuw_sniffer): Likewise.
9327
9328 2018-03-07  Tom Tromey  <[email protected]>
9329
9330         * linux-tdep.c (linux_info_proc): Update.
9331         * target.h (struct target_ops) <to_fileio_readlink>: Return
9332         optional<string>.
9333         (target_fileio_readlink): Return optional<string>.
9334         * remote.c (remote_hostio_readlink): Return optional<string>.
9335         * inf-child.c (inf_child_fileio_readlink): Return
9336         optional<string>.
9337         * target.c (target_fileio_readlink): Return optional<string>.
9338
9339 2018-03-07  Andrew Burgess  <[email protected]>
9340
9341         * regcache.c (cooked_read_test): Add riscv to the list of
9342         architectures that have a save_reggroup.
9343
9344 2018-03-07  Andreas Arnez  <[email protected]>
9345
9346         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9347         value is not a dynamic class object.
9348
9349 2018-03-06  Tom Tromey  <[email protected]>
9350
9351         * rust-exp.y: Formatting fixes.
9352
9353 2018-03-06  Andrew Burgess  <[email protected]>
9354
9355         * riscv-tdep.c (riscv_register_name): Remove target description
9356         support.
9357         (riscv_gdbarch_init): Remove target description check.
9358
9359 2018-03-06  Andrew Burgess  <[email protected]>
9360
9361         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9362         comment.
9363         * riscv-tdep.h: Likewise.
9364
9365 2018-03-06  Andrew Burgess  <[email protected]>
9366
9367         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9368         (riscv_pseudo_register_write): Delete.
9369         (riscv_gdbarch_init): Remove all use of pseudo registers.
9370
9371 2018-03-06  Simon Marchi  <[email protected]>
9372
9373         * record-btrace.c (btrace_print_lines): Replace cleanup
9374         parameter with RAII equivalents.
9375         (btrace_insn_history): Replace cleanup with RAII equivalents.
9376         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9377         make_cleanup_ui_out_tuple_begin_end): Remove.
9378         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9379         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9380         make_cleanup_ui_out_list_begin_end): Remove.
9381
9382 2018-03-06  Simon Marchi  <[email protected]>
9383
9384         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9385         parameter types to std::vector.  Use bool.
9386         (record_btrace_wait): Replace VEC(tp_t) with
9387         std::vector<thread_info *>.
9388         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9389
9390 2018-03-06  Simon Marchi  <[email protected]>
9391
9392         * record-btrace.c (record_btrace_disable_callback): Remove.
9393         (struct scoped_btrace_disable): New.
9394         (record_btrace_open): Use scoped_btrace_disable.
9395
9396 2018-03-06  Andrew Burgess  <[email protected]>
9397
9398         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9399         reading values from registers.
9400
9401 2018-03-06  Andrew Burgess  <[email protected]>
9402
9403         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9404         where appropriate.
9405
9406 2018-03-06  Andrew Burgess  <[email protected]>
9407
9408         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9409         change parameter type.  Use GDB's print functions, and use
9410         core_addr_to_string where appropriate.
9411         (riscv_push_dummy_call): Use core_addr_to_string where
9412         appropriate, update call to riscv_print_arg_location, and reindent
9413         a few lines.
9414         (riscv_return_value): Update call to riscv_print_arg_location.
9415
9416 2018-03-06  Andrew Burgess  <[email protected]>
9417             Tim Newsome <[email protected]>
9418             Albert Ou <[email protected]>
9419             Darius Rad <[email protected]>
9420
9421         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9422         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9423         (ALLDEPFILES): Add riscv-tdep.c
9424         * configure.tgt: Add riscv support.
9425         * riscv-tdep.c: New file.
9426         * riscv-tdep.h: New file.
9427         * NEWS: Mention new target.
9428         * MAINTAINERS: Add entry for riscv.
9429
9430 2018-03-06  Andrew Burgess  <[email protected]>
9431
9432         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9433         fields within aggregates.
9434
9435 2018-03-04  Simon Marchi  <[email protected]>
9436
9437         * record-btrace.c (btrace_print_lines): Change type of flags to
9438         gdb_disassembly_flags.
9439
9440 2018-03-04  John Baldwin  <[email protected]>
9441
9442         * fbsd-nat.c: Include "inf-ptrace.h".
9443         (USE_SIGTRAP_SIGINFO): Conditionally define.
9444         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9445         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9446         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9447         function.
9448         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9449         Likewise.
9450         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9451         Likewise.
9452         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9453         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9454         "supports_stopped_by_hw_breakpoint" target methods.
9455
9456 2018-03-04  John Baldwin  <[email protected]>
9457
9458         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9459         * fbsd-nat.c (debug_fbsd_nat): New variable.
9460         (show_fbsd_nat_debug): New function.
9461         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9462         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9463
9464 2018-03-04  John Baldwin  <[email protected]>
9465
9466         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9467         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9468         prototype.
9469         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9470         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9471         method.
9472
9473 2018-03-02  Simon Marchi  <[email protected]>
9474
9475         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9476         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9477
9478 2018-03-02  Simon Marchi  <[email protected]>
9479
9480         * charset.c (struct charset_vector): New.
9481         (charsets): Change type to charset_vector.
9482         (find_charset_names): Adjust.
9483         (add_one): Adjust.
9484         (_initialize_charset): Adjust.
9485
9486 2018-03-02  Simon Marchi  <[email protected]>
9487
9488         * progspace.h (struct program_space) <deleted_solibs>: Change
9489         type to std::vector<std::string>.
9490         * progspace.c (clear_program_space_solib_cache): Adjust.
9491         * breakpoint.c (print_solib_event): Adjust.
9492         (check_status_catch_solib): Adjust.
9493         * solib.c (update_solib_list): Adjust.
9494         * ui-out.h (class ui_out) <field_string>: New overload.
9495         * ui-out.c (ui_out::field_string): New overload.
9496
9497 2018-03-02  Simon Marchi  <[email protected]>
9498
9499         * progspace.h (struct program_space): Add constructor and
9500         destructor, initialize fields.
9501         (add_program_space): Remove.
9502         * progspace.c (add_program_space): Rename to...
9503         (program_space::program_space): ... this.
9504         (release_program_space): Rename to...
9505         (program_space::~program_space): ... this.
9506         (delete_program_space): Use delete to delete program_space.
9507         (initialize_progspace): Use new to allocate program_space.
9508         * inferior.c (add_inferior_with_spaces): Likewise.
9509         (clone_inferior_command): Likewise.
9510         * infrun.c (follow_fork_inferior): Likewise.
9511         (handle_vfork_child_exec_or_exit): Likewise.
9512
9513 2018-03-02  Simon Marchi  <[email protected]>
9514
9515         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9516         (delim_string_to_char_ptr_vec): Return std::vector of
9517         gdb::unique_xmalloc_ptr.
9518         (dirnames_to_char_ptr_vec_append): Take std::vector of
9519         gdb::unique_xmalloc_ptr.
9520         (dirnames_to_char_ptr_vec): Return std::vector of
9521         gdb::unique_xmalloc_ptr.
9522         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9523         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9524         (delim_string_to_char_ptr_vec): Return an std::vector of
9525         gdb::unique_xmalloc_ptr, adjust the code.
9526         (dirnames_to_char_ptr_vec_append): Take an std::vector of
9527         gdb::unique_xmalloc_ptr, adjust the code.
9528         (dirnames_to_char_ptr_vec): Return an std::vector of
9529         gdb::unique_xmalloc_ptr, adjust the code.
9530         * auto-load.c (auto_load_safe_path_vec): Change type to
9531         std::vector of gdb::unique_xmalloc_ptr.
9532         (auto_load_expand_dir_vars): Return an std::vector of
9533         gdb::unique_xmalloc_ptr, adjust the code.
9534         (auto_load_safe_path_vec_update): Adjust.
9535         (filename_is_in_auto_load_safe_path_vec): Adjust.
9536         (auto_load_objfile_script_1): Adjust.
9537         * build-id.c (build_id_to_debug_bfd): Adjust.
9538         * linux-thread-db.c (thread_db_load_search): Adjust.
9539         * source.c (add_path): Adjust.
9540         (openp): Adjust.
9541         * symfile.c (find_separate_debug_file): Adjust.
9542         * utils.c (do_free_char_ptr_vec): Remove.
9543         (make_cleanup_free_char_ptr_vec): Remove.
9544
9545 2018-03-01  Sergio Durigan Junior  <[email protected]>
9546
9547         PR gdb/22907
9548         * common/pathstuff.c: Conditionally include "<windows.h>".
9549
9550 2018-03-01  Georg Sauthoff  <[email protected]>
9551
9552         PR gdb/22888
9553         * gcore.in: Quote variables and switch interpreter to bash.
9554
9555 2018-03-01  Tom Tromey  <[email protected]>
9556
9557         * dwarf2read.c (alloc_discriminant_info): Fix default_index
9558         assertion.  Add assertion for discriminant_index.
9559         (quirk_rust_enum): Use correct base type name in univariant case.
9560
9561 2018-03-01  Simon Marchi  <[email protected]>
9562
9563         * record.c (get_call_history_modifiers): Return a
9564         record_print_flags.
9565         (cmd_record_call_history): Adjust.
9566         * record-btrace.c (record_btrace_call_history): Adjust.
9567         (record_btrace_call_history_range): Adjust.
9568         (record_btrace_call_history_from): Adjust.
9569         * target-debug.h (target_debug_print_record_print_flags): New.
9570         * target-delegates.c: Re-generate.
9571         * target.c (target_call_history): Change flags type.
9572         (target_call_history_from): Likewise.
9573         (target_call_history_range): Likewise.
9574         * target.h (struct target_ops) <target_call_history>: Likewise.
9575         (target_call_history_from): Likewise.
9576         (target_call_history_range): Likewise.
9577
9578 2018-02-28  Sergio Durigan Junior  <[email protected]>
9579             Simon Marchi  <[email protected]>
9580
9581         * common/common-utils.c: Include "sys/stat.h".
9582         (is_regular_file): Move here from "source.c"; change return
9583         type to "bool".
9584         * common/common-utils.h (is_regular_file): New prototype.
9585         * common/pathstuff.c (contains_dir_separator): New function.
9586         * common/pathstuff.h (contains_dir_separator): New prototype.
9587         * source.c: Don't include "sys/stat.h".
9588         (is_regular_file): Move to "common/common-utils.c".
9589
9590 2018-02-28  Sergio Durigan Junior  <[email protected]>
9591
9592         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9593         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9594         * auto-load.c: Include "common/pathstuff.h".
9595         * common/common-def.h (current_directory): Move here.
9596         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9597         function.
9598         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9599         prototype.
9600         * common/pathstuff.c: New file.
9601         * common/pathstuff.h: New file.
9602         * compile/compile.c: Include "common/pathstuff.h".
9603         * defs.h (current_directory): Move to "common/common-defs.h".
9604         * dwarf2read.c: Include "common/pathstuff.h".
9605         * exec.c: Likewise.
9606         * guile/scm-safe-call.c: Likewise.
9607         * linux-thread-db.c: Likewise.
9608         * main.c: Likewise.
9609         * nto-tdep.c: Likewise.
9610         * objfiles.c: Likewise.
9611         * source.c: Likewise.
9612         * symtab.c: Likewise.
9613         * utils.c: Include "common/pathstuff.h".
9614         (gdb_realpath): Move to "common/pathstuff.c".
9615         (gdb_realpath_keepfile): Likewise.
9616         (gdb_abspath): Likewise.
9617         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9618         (gdb_realpath_keepfile): Likewise.
9619         (gdb_abspath): Likewise.
9620
9621 2018-02-28  John Baldwin  <[email protected]>
9622
9623         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9624         wildcard process pid for super_resume for kernels with a
9625         specific bug.
9626
9627 2018-02-27  Phil Muldoon  <[email protected]>
9628
9629         * compile/compile.c (get_args): Add additional comments
9630         explaining function.
9631
9632 2018-02-27  Simon Marchi  <[email protected]>
9633             Tom Tromey  <[email protected]>
9634
9635         * target.h (memory_write_request_s): Remove typedef.  Don't define
9636         VEC.
9637         (target_write_memory_blocks): Change argument to std::vector.
9638         (struct memory_write_request): Add constructor.
9639         * target-memory.c (compare_block_starting_address): Return bool.
9640         Change argument types.
9641         (claim_memory): Change arguments to use std::vector.
9642         (split_regular_and_flash_blocks, blocks_to_erase)
9643         (compute_garbled_blocks): Likewise.
9644         (cleanup_request_data, cleanup_write_requests_vector): Remove.
9645         (target_write_memory_blocks): Change argument to std::vector.
9646         * symfile.c (struct load_section_data): Add constructor and
9647         destructor.  Use std::vector for "requests".
9648         (struct load_progress_data): Add initializers.
9649         (load_section_callback): Update.  Use "new".
9650         (clear_memory_write_data): Remove.
9651         (generic_load): Update.
9652
9653 2018-02-27  Alan Hayward  <[email protected]>
9654
9655         * arch/aarch64.h: Use common/tdesc.h.
9656
9657 2018-02-26  Maciej W. Rozycki  <[email protected]>
9658
9659         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9660         architecture with a 64-bit ABI.
9661
9662 2018-02-26  Maciej W. Rozycki  <[email protected]>
9663
9664         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9665         ahead of target description loading.
9666
9667 2018-02-26  Tom Tromey  <[email protected]>
9668
9669         * stack.c (backtrace_command_1): Update.
9670         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9671         of "flags".
9672         * python/py-framefilter.c (py_print_frame)
9673         (gdbpy_apply_frame_filter): Change type of "flags".
9674         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9675         of "flags".
9676         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9677         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9678         * extension.h (enum frame_filter_flag): Rename from
9679         frame_filter_flags.
9680         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9681         (apply_ext_lang_frame_filter): Change type of "flags".
9682         * extension.c (apply_ext_lang_frame_filter): Change type of
9683         "flags".
9684         * extension-priv.h (struct extension_language_ops)
9685         <apply_frame_filter>: Change type of "flags".
9686
9687 2018-02-26  Tom Tromey  <[email protected]>
9688
9689         PR python/16497:
9690         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
9691         off-by-one in py_end computation.
9692         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9693         PRINT_MORE_FRAMES.
9694         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9695         constant.
9696
9697 2018-02-26  Tom Tromey  <[email protected]>
9698
9699         * dwarf2read.c (struct variant_field): New.
9700         (struct nextfield) <variant>: New field.
9701         (dwarf2_add_field): Handle DW_TAG_variant_part.
9702         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9703         discriminated union.
9704         (read_structure_type): Handle DW_TAG_variant_part.
9705         (handle_struct_member_die): New function, extracted from
9706         process_structure_scope.  Handle DW_TAG_variant.
9707         (process_structure_scope): Handle discriminated unions.  Call
9708         handle_struct_member_die.
9709
9710 2018-02-26  Tom Tromey  <[email protected]>
9711
9712         * rust-lang.h (rust_last_path_segment): Declare.
9713         * rust-lang.c (rust_last_path_segment): Now public.  Change
9714         contract.
9715         (struct disr_info): Remove.
9716         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9717         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9718         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9719         (rust_enum_p, rust_enum_variant): New function.
9720         (rust_underscore_fields): Remove "offset" parameter.
9721         (rust_print_enum): New function.
9722         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9723         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9724         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
9725         enums.
9726         (rust_internal_print_type): New function, from rust_print_type.
9727         Remove enum code.
9728         (rust_print_type): Call rust_internal_print_type.
9729         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9730         Update enum handling.
9731         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9732         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9733         (rust_union_quirks): New functions.
9734         (process_full_comp_unit, process_full_type_unit): Call
9735         rust_union_quirks.
9736         (process_structure_scope): Update rust_unions if necessary.
9737
9738 2018-02-26  Tom Tromey  <[email protected]>
9739
9740         * value.h (value_union_variant): Declare.
9741         * valops.c (value_union_variant): New function.
9742         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9743         (struct discriminant_info): New.
9744         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9745         enumerator.
9746         (struct main_type) <flag_discriminated_union>: New field.
9747
9748 2018-02-26  Tom Tromey  <[email protected]>
9749
9750         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9751         unittests/unpack-selftests.c.
9752         * unittests/unpack-selftests.c: New file.
9753         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9754
9755 2018-02-26  Yao Qi  <[email protected]>
9756
9757         * dwarf2read.c (struct partial_die_info) <read>: New method.
9758         (read_partial_die): Remove the declaration.
9759         (load_partial_dies): Update.
9760         (partial_die_info::partial_die_info):
9761         (read_partial_die): Change it to partial_die_info::read.
9762
9763 2018-02-26  Yao Qi  <[email protected]>
9764
9765         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9766         (fixup_partial_die): Remove declaration.
9767         (scan_partial_symbols): Update.
9768         (partial_die_parent_scope): Likewise.
9769         (partial_die_full_name): Likewise.
9770         (fixup_partial_die): Change it to partial_die_info::fixup.
9771
9772 2018-02-26  Yao Qi  <[email protected]>
9773
9774         * dwarf2read.c (read_partial_die): Update the declaration.
9775         (load_partial_dies): Caller update.
9776         (read_partial_die): Remove one argument abbrev_len.
9777
9778 2018-02-26  Yao Qi  <[email protected]>
9779
9780         * dwarf2read.c (struct partial_die_info): Add ctor, delete
9781         assignment operator.
9782         (load_partial_dies): Use ctor and copy ctor.
9783         (read_partial_die): Update.
9784         (dwarf2_cu::find_partial_die): Use ctor.
9785
9786 2018-02-26  Yao Qi  <[email protected]>
9787
9788         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9789         (find_partial_die_in_comp_unit): Change it to
9790         dwarf2_cu::find_partial_die.
9791         (find_partial_die): Update.
9792
9793 2018-02-26  Yao Qi  <[email protected]>
9794
9795         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9796         is NULL.
9797
9798 2018-02-26  Yao Qi  <[email protected]>
9799
9800         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9801
9802 2018-02-26  Alan Hayward  <[email protected]>
9803
9804         * arch/amd64.h: Use common/tdesc.h.
9805         * arch/i386.c: Likewise.
9806         * arch/i386.h: Likewise.
9807         * arch/tic6x.c: Likewise.
9808         * arch/tdesc.h: Move file from here...
9809         * common/tdesc.h: ...to here.
9810         * features/aarch64-core.c: Regenerate.
9811         * features/aarch64-fpu.c: Regenerate.
9812         * features/i386/32bit-avx.c: Regenerate.
9813         * features/i386/32bit-avx512.c: Regenerate.
9814         * features/i386/32bit-core.c: Regenerate.
9815         * features/i386/32bit-linux.c: Regenerate.
9816         * features/i386/32bit-mpx.c: Regenerate.
9817         * features/i386/32bit-pkeys.c: Regenerate.
9818         * features/i386/32bit-sse.c: Regenerate.
9819         * features/i386/64bit-avx.c: Regenerate.
9820         * features/i386/64bit-avx512.c: Regenerate.
9821         * features/i386/64bit-core.c: Regenerate.
9822         * features/i386/64bit-linux.c: Regenerate.
9823         * features/i386/64bit-mpx.c: Regenerate.
9824         * features/i386/64bit-pkeys.c: Regenerate.
9825         * features/i386/64bit-segments.c: Regenerate.
9826         * features/i386/64bit-sse.c: Regenerate.
9827         * features/i386/x32-core.c: Regenerate.
9828         * features/tic6x-c6xp.c: Regenerate.
9829         * features/tic6x-core.c: Regenerate.
9830         * features/tic6x-gp.c: Regenerate.
9831         * target-descriptions.c: Use common/tdesc.h.
9832         * target-descriptions.h: Likewise.
9833
9834 2018-02-24  Tom Tromey  <[email protected]>
9835
9836         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9837         (try_thread_db_load_from_dir, thread_db_load_search): Use
9838         std::string.
9839         (info_auto_load_libthread_db_compare): Return bool.  Change
9840         argument types.
9841         (info_auto_load_libthread_db): Use std::vector, std::string.
9842         Remove cleanups.
9843
9844 2018-02-24  Tom Tromey  <[email protected]>
9845
9846         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9847         std::string.
9848         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9849         std::string*.
9850         * gdbarch.c: Rebuild.
9851         * gdbarch.h: Rebuild.
9852         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9853         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9854         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9855         std::string*.
9856
9857 2018-02-23  Simon Marchi  <[email protected]>
9858
9859         * gdbtypes.h (sect_offset): Change type to uint64_t.
9860         (sect_offset_str): New function.
9861         * dwarf2read.c (create_addrmap_from_aranges): Use
9862         sect_offset_str.
9863         (error_check_comp_unit_head): Likewise.
9864         (create_debug_type_hash_table): Likewise.
9865         (read_cutu_die_from_dwo): Likewise.
9866         (init_cutu_and_read_dies): Likewise.
9867         (init_cutu_and_read_dies_no_follow): Likewise.
9868         (process_psymtab_comp_unit_reader): Likewise.
9869         (partial_die_parent_scope): Likewise.
9870         (peek_die_abbrev): Likewise.
9871         (process_queue): Likewise.
9872         (dwarf2_physname): Likewise.
9873         (read_namespace_alias): Likewise.
9874         (read_import_statement): Likewise.
9875         (create_dwo_cu_reader): Likewise.
9876         (create_cus_hash_table): Likewise.
9877         (lookup_dwo_cutu): Likewise.
9878         (inherit_abstract_dies): Likewise.
9879         (read_func_scope): Likewise.
9880         (read_call_site_scope): Likewise.
9881         (dwarf2_add_member_fn): Likewise.
9882         (read_common_block): Likewise.
9883         (read_module_type): Likewise.
9884         (read_typedef): Likewise.
9885         (read_subrange_type): Likewise.
9886         (load_partial_dies): Likewise.
9887         (read_partial_die): Likewise.
9888         (find_partial_die): Likewise.
9889         (read_str_index): Likewise.
9890         (dwarf2_string_attr): Likewise.
9891         (build_error_marker_type): Likewise.
9892         (lookup_die_type): Likewise.
9893         (dump_die_shallow): Likewise.
9894         (follow_die_ref): Likewise.
9895         (dwarf2_fetch_die_loc_sect_off): Likewise.
9896         (dwarf2_fetch_constant_bytes): Likewise.
9897         (follow_die_sig): Likewise.
9898         (get_signatured_type): Likewise.
9899         (get_DW_AT_signature_type): Likewise.
9900         (dwarf2_find_containing_comp_unit): Likewise.
9901         (set_die_type): Likewise.
9902
9903 2018-02-21  John Baldwin  <[email protected]>
9904
9905         * arch/aarch64.c: Include "common-defs.h".
9906         * arch/amd64.c: Likewise.
9907         * arch/i386.c: Likewise.
9908
9909 2018-02-21  Tom Tromey  <[email protected]>
9910
9911         * value.h: (extract_field_op): Update.
9912         * eval.c (extract_field_op): Return a const char *.
9913         * expression.h (parse_expression_for_completion): Update.
9914         * completer.c (complete_expression): Update.
9915         (add_struct_fields): Make fieldname const.
9916         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9917         (mark_completion_tag, parse_exp_in_context_1): Update.
9918         (parse_expression_for_completion): Change "name" to
9919         unique_xmalloc_ptr*.
9920
9921 2018-02-21  Tom Tromey  <[email protected]>
9922
9923         * infcall.c (call_function_by_hand_dummy): Use std::vector.
9924
9925 2018-02-21  Yao Qi  <[email protected]>
9926
9927         * avr-tdep.c (avr_read_pc): Change parameter type to
9928         readable_regcache.
9929         * gdbarch.sh (read_pc): Likewise.
9930         * gdbarch.c: Re-generated.
9931         * gdbarch.h: Re-generated.
9932         * hppa-tdep.c (hppa_read_pc): Change parameter type to
9933         readable_regcache.
9934         * ia64-tdep.c (ia64_read_pc): Likewise.
9935         * mips-tdep.c (mips_read_pc): Likewise.
9936         * spu-tdep.c (spu_read_pc): Likewise.
9937
9938 2018-02-21  Yao Qi  <[email protected]>
9939
9940         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9941         * regcache-dump.c: New file.
9942         * regcache.c: Move register_dump to regcache-dump.c.
9943         (maintenance_print_registers): Likewise.
9944         (maintenance_print_raw_registers): Likewise.
9945         (maintenance_print_cooked_registers): Likewise.
9946         (maintenance_print_register_groups): Likewise.
9947         (maintenance_print_remote_registers): Likewise.
9948         (_initialize_regcache): Likewise.
9949         * regcache.h (register_dump): Moved from regcache.c.
9950
9951 2018-02-21  Yao Qi  <[email protected]>
9952
9953         * regcache.c (regcache::regcache): Update.
9954         (regcache::invalidate): Move it to detached_regcache::invalidate.
9955         (get_thread_arch_aspace_regcache): Update.
9956         (regcache::raw_update): Update.
9957         (regcache::cooked_read): Remove some code.
9958         (regcache::cooked_read_value): Likewise.
9959         (regcache::raw_write): Remove assert on m_readonly_p.
9960         (regcache::raw_supply_integer): Move it to
9961         detached_regcache::raw_supply_integer.
9962         (regcache::raw_supply_zeroed): Likewise.
9963         * regcache.h (detached_regcache) <raw_supply_integer>: New
9964         declaration.
9965         <raw_supply_zeroed, invalidate>: Likewise.
9966         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9967         <invalidate>: Likewise.
9968         <m_readonly_p>: Removed.
9969
9970 2018-02-21  Yao Qi  <[email protected]>
9971
9972         * infcmd.c (get_return_value): Let stop_regs point to
9973         get_current_regcache.
9974         * regcache.c (regcache::regcache): Remove.
9975         (register_dump_reg_buffer): New class.
9976         (regcache_print): Adjust.
9977         * regcache.h (regcache): Remove constructors.
9978
9979 2018-02-21  Yao Qi  <[email protected]>
9980
9981         * regcache.c (class register_dump): New class.
9982         (register_dump_regcache, register_dump_none): New class.
9983         (register_dump_remote, register_dump_groups): New class.
9984         (regcache_print): Update.
9985         * regcache.h (regcache_dump_what): Move it to regcache.c.
9986         (regcache) <dump>: Remove.
9987
9988 2018-02-21  Yao Qi  <[email protected]>
9989
9990         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9991          reg_buffer_rw *.
9992         (jit_unwind_reg_set_impl): Call raw_supply.
9993         (jit_frame_sniffer): Use reg_buffer_rw.
9994         * record-full.c (record_full_core_regbuf): Change its type.
9995         (record_full_core_open_1): Use reg_buffer_rw.
9996         (record_full_close): Likewise.
9997         (record_full_core_fetch_registers): Use regcache->raw_supply.
9998         (record_full_core_store_registers): Likewise.
9999         * regcache.c (regcache::get_register_status): Move it to
10000         reg_buffer.
10001         (regcache_raw_set_cached_value): Remove.
10002         (regcache::raw_set_cached_value): Remove.
10003         (regcache::raw_write): Call raw_supply.
10004         (regcache::raw_supply): Move it to reg_buffer_rw.
10005         * regcache.h (regcache_raw_set_cached_value): Remove.
10006         (reg_buffer_rw): New class.
10007
10008 2018-02-21  Yao Qi  <[email protected]>
10009
10010         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10011         readonly_detached_regcache.
10012         (dummy_frame_prev_register): Use regcache->cooked_read.
10013         * frame.c (frame_save_as_regcache): Change return type.
10014         (frame_pop): Update.
10015         * frame.h (frame_save_as_regcache): Update declaration.
10016         * inferior.h (get_infcall_suspend_state_regcache): Update
10017         declaration.
10018         * infrun.c (infcall_suspend_state) <registers>: use
10019         readonly_detached_regcache.
10020         (save_infcall_suspend_state): Don't use regcache_dup.
10021         (get_infcall_suspend_state_regcache): Change return type.
10022         * linux-fork.c (struct fork_info) <savedregs>: Change to
10023         readonly_detached_regcache.
10024         <pc>: New field.
10025         (fork_save_infrun_state): Don't use regcache_dup.
10026         (info_checkpoints_command): Adjust.
10027         * mi/mi-main.c (register_changed_p): Update declaration.
10028         (mi_cmd_data_list_changed_registers): Use
10029         readonly_detached_regcache.
10030         (register_changed_p): Change parameter type to
10031         readonly_detached_regcache.
10032         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10033         readonly_detached_regcache.
10034         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10035         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10036         New.
10037         (regcache::save): Move it to reg_buffer.
10038         (regcache::restore): Change parameter type.
10039         (regcache_dup): Remove.
10040         * regcache.h (reg_buffer) <save>: New method.
10041         (readonly_detached_regcache): New class.
10042         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10043         readonly_detached_regcache.
10044         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10045
10046 2018-02-21  Yao Qi  <[email protected]>
10047
10048         * frame.c (frame_save_as_regcache): Use regcache method save.
10049         (frame_pop): Use regcache method restore.
10050         * infrun.c (restore_infcall_suspend_state): Likewise.
10051         * linux-fork.c (fork_load_infrun_state): Likewise.
10052         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10053         save.
10054         * regcache.c (regcache_save): Remove.
10055         (regcache::restore): More asserts.
10056         (regcache_cpy): Remove.
10057         * regcache.h (regcache_save): Remove the declaration.
10058         (regcache::restore): Move from private to public.
10059         Remove the friend declaration of regcache_cpy.
10060         (regcache_cpy): Remove declaration.
10061
10062 2018-02-21  Yao Qi  <[email protected]>
10063
10064         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10065         parameter type to 'readable_regcache *'.
10066         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10067         * arm-tdep.c (arm_neon_quad_read): Likewise.
10068         (arm_pseudo_read): Likewise.
10069         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10070         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10071         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10072         * gdbarch.c: Re-generated.
10073         * gdbarch.h: Re-generated.
10074         * gdbarch.sh (pseudo_register_read): Change parameter type to
10075         'readable_regcache *'.
10076         (pseudo_register_read_value): Likewise.
10077         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10078         (h8300_pseudo_register_read): Likewise.
10079         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10080         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10081         (i386_pseudo_register_read_into_value): Likewise.
10082         (i386_pseudo_register_read_value): Likewise.
10083         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10084         declaration.
10085         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10086         * m32c-tdep.c (m32c_raw_read): Likewise.
10087         (m32c_read_flg): Likewise.
10088         (m32c_banked_register): Likewise.
10089         (m32c_banked_read): Likewise.
10090         (m32c_sb_read): Likewise.
10091         (m32c_part_read): Likewise.
10092         (m32c_cat_read): Likewise.
10093         (m32c_r3r2r1r0_read): Likewise.
10094         (m32c_pseudo_register_read): Likewise.
10095         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10096         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10097         (mep_pseudo_cr64_read): Likewise.
10098         (mep_pseudo_register_read): Likewise.
10099         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10100         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10101         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10102         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10103         (regcache::cooked_read): Likewise.
10104         (regcache::cooked_read_value): Likewise.
10105         (regcache_cooked_read_signed):
10106         (regcache::cooked_read): Likewise.
10107         * regcache.h (readable_regcache): New class.
10108         (regcache): Inherit readable_regcache.  Move some methods to
10109         readable_regcache.
10110         * rl78-tdep.c (rl78_pseudo_register_read): Change
10111         parameter type to 'readable_regcache *'.
10112         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10113         (e500_pseudo_register_read): Change parameter type to
10114         'readable_regcache *'.
10115         (dfp_pseudo_register_read): Likewise.
10116         (vsx_pseudo_register_read): Likewise.
10117         (efpr_pseudo_register_read): Likewise.
10118         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10119         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10120         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10121         (sh64_pseudo_register_read): Likewise.
10122         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10123         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10124         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10125         (spu_pseudo_register_read): Likewise.
10126         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10127         (xtensa_pseudo_register_read): Likewise.
10128
10129 2018-02-21  Yao Qi  <[email protected]>
10130
10131         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10132         (regcache::arch): Move it to reg_buffer::arch.
10133         (regcache::register_buffer): Likewise.
10134         (regcache::assert_regnum): Likewise.
10135         (regcache::num_raw_registers): Likewise.
10136         * regcache.h (reg_buffer): New class.
10137         (regcache): Inherit reg_buffer.
10138
10139 2018-02-20  Simon Marchi  <[email protected]>
10140
10141         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10142         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10143
10144 2018-02-20  Markus Metzger  <[email protected]>
10145
10146         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10147
10148 2018-02-19  Alan Hayward  <[email protected]>
10149
10150         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10151         (SFILES): Remove common/*.c files.
10152         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10153         * common/common.host: Add common reference.
10154         * configure.ac: Likewise.
10155         * configure: Regenerate.
10156
10157 2018-02-16  Yao Qi  <[email protected]>
10158
10159         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10160         (block_initialize_namespace): Use new.
10161         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10162         (dwarf2_free_objfile): Use delete.
10163         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10164         (copy_type_recursive): Use new.
10165         * gdb_obstack.h (allocate_on_obstack): New.
10166
10167 2018-02-15  Yao Qi  <[email protected]>
10168
10169         PR gdb/22849
10170         * inferior.c (exit_inferior_1): Reset inf->control.
10171
10172 2018-02-15  Joel Brobecker  <[email protected]>
10173
10174         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10175         declaration.
10176
10177 2018-02-14  Pedro Alves  <[email protected]>
10178
10179         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10180         frame_cleanup_after_sniffer on exception.
10181
10182 2018-02-14  Tom Tromey  <[email protected]>
10183
10184         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10185         const.
10186         (solib_bfd_open): Make pathname const.
10187         * solib.c (solib_bfd_open): Make pathname const.
10188         * solib-spu.c (spu_bfd_fopen): Make name const.
10189         (spu_bfd_open): Make pathname const.
10190         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10191         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10192
10193 2018-02-14  Tom Tromey  <[email protected]>
10194
10195         * symfile.c (symfile_bfd_open): Update.
10196         * source.h (openp, source_full_path_of, find_and_open_source):
10197         Change argument type to unique_xmalloc_ptr.
10198         * source.c (openp): Take a unique_xmalloc_ptr.
10199         (source_full_path_of, find_and_open_source): Likewise.
10200         (open_source_file, symtab_to_fullname): Update.
10201         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10202         unique_xmalloc_ptr.
10203         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10204         (exec_file_find): Update.
10205         * psymtab.c (psymtab_to_fullname): Update.
10206         * nto-tdep.h (nto_find_and_open_solib): Update.
10207         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10208         unique_xmalloc_ptr.
10209         * exec.c (exec_file_attach): Update.
10210         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10211         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10212
10213 2018-02-14  Tom Tromey  <[email protected]>
10214
10215         * solib.c: Include source.h.
10216         * nto-tdep.c: Include source.h.
10217         * mi/mi-cmd-env.c: Include source.h.
10218         * infcmd.c: Include source.h.
10219         * exec.c: Include source.h.
10220         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10221         (add_path, directory_switch, source_path, init_source_path): Move
10222         declarations...
10223         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10224         (add_path, directory_switch, source_path, init_source_path):
10225         ...here.
10226
10227 2018-02-14  Tom Tromey  <[email protected]>
10228
10229         * solist.h (exec_file_find, solib_find): Return
10230         unique_xmalloc_ptr.
10231         (solib_bfd_fopen): Take a const char *.
10232         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10233         (exec_file_find, solib_find): Likewise.
10234         (solib_bfd_fopen): Do not take ownership of "pathname".
10235         (solib_bfd_open): Use unique_xmalloc_ptr.
10236         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10237         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10238         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10239         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10240
10241 2018-02-14  Joel Brobecker  <[email protected]>
10242
10243         * ada-lang.c (name_match_type_from_name): Remove reference to
10244         ada_name_for_lookup in function's documentation.
10245         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10246
10247 2018-02-13  Simon Marchi  <[email protected]>
10248
10249         * defs.h (enum openp_flags): New enum.
10250         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10251         Move to enum openp_flags.
10252         (openp_flags): New enum flags.
10253         (openp): Change parameter type to openp_flags.
10254         * source.c (openp): Change parameter type to openp_flags.
10255         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10256         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10257
10258 2018-02-13  Simon Marchi  <[email protected]>
10259
10260         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10261         per-command.
10262
10263 2018-02-12  Andrew Burgess  <[email protected]>
10264
10265         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10266         into...
10267         (class dwarf2_queue_guard): ...the destructor of this new class.
10268         (dw2_do_instantiate_symtab): Create instance of the new class
10269         dwarf2_queue_guard, remove cleanup.
10270
10271 2018-02-09  Tom Tromey  <[email protected]>
10272
10273         * source.c (find_source_lines): Don't reference past the end of
10274         the vector.
10275
10276 2018-02-09  Markus Metzger  <[email protected]>
10277
10278         * remote.c (remote_btrace_maybe_reopen): Change error message.
10279         * btrace.c (btrace_enable): Likewise.
10280         (parse_xml_btrace): Likewise.
10281         (parse_xml_btrace_conf): Likewise.
10282
10283 2018-02-09  Markus Metzger  <[email protected]>
10284
10285         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10286         (linux_enable_pt, linux_enable_bts): Call
10287         diagnose_perf_event_open_fail.
10288
10289 2018-02-09  Markus Metzger  <[email protected]>
10290
10291         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10292         Remove parameter and change return type.  Update callers.  Move it.
10293         (linux_enable_bts, linux_enable_pt): Improve error message.
10294         (linux_enable_pt): Remove zero buffer size check.
10295         (linux_enable_btrace): Improve error messages.  Remove NULL return
10296         check.
10297
10298 2018-02-09  Markus Metzger  <[email protected]>
10299
10300         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10301         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10302         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10303         (linux_supports_pt, linux_supports_btrace): Remove.
10304         (linux_enable_bts): Call cpu_supports_bts.
10305         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10306         * remote.c (remote_supports_btrace): Remove.
10307         (init_remote_ops): Remove remote_supports_btrace.
10308         * target-delegates.c: Regenerated.
10309         * target.c (target_supports_btrace): Remove.
10310         * target.h (target_ops) <to_supports_btrace>: Remove
10311         (target_supports_btrace): Remove.
10312         * x86-linux-nat.c (x86_linux_create_target): Remove
10313         linux_supports_btrace.
10314
10315 2018-02-09  Markus Metzger  <[email protected]>
10316
10317         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10318         btrace failed.
10319         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10320         exception and use message in own exception.
10321
10322 2018-02-09  Markus Metzger  <[email protected]>
10323
10324         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10325         (perf_event_pt_event_type): Use gdb_file_up.
10326         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10327         scoped_fd, and scoped_mmap.
10328
10329 2018-02-09  Markus Metzger  <[email protected]>
10330
10331         * common/scoped_mmap.h: New.
10332         * unittests/scoped_mmap-selftest.c: New.
10333         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10334         unittests/scoped_mmap-selftest.c.
10335
10336 2018-02-09  Markus Metzger  <[email protected]>
10337
10338         * common/scoped_fd.h: New.
10339         * unittests/scoped_fd-selftest.c: New.
10340         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10341         unittests/scoped_fd-selftest.c.
10342
10343 2018-02-09  Tom Tromey  <[email protected]>
10344
10345         * auto-load.c (auto_load_section_scripts): Use
10346         gdb::unique_xmalloc_ptr.
10347
10348 2018-02-09  Tom Tromey  <[email protected]>
10349
10350         * auto-load.c (execute_script_contents): Use std::string.
10351
10352 2018-02-09  Joel Brobecker  <[email protected]>
10353
10354         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10355         Python function, rather than a new command.
10356
10357 2018-02-08  Tom Tromey  <[email protected]>
10358
10359         * solib.c (solib_find_1): Use std::string.
10360         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10361
10362 2018-02-08  Tom Tromey  <[email protected]>
10363
10364         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10365
10366 2018-02-08  Tom Tromey  <[email protected]>
10367
10368         * source.c (find_source_lines): Use gdb::def_vector.
10369
10370 2018-02-08  Tom Tromey  <[email protected]>
10371
10372         * macrocmd.c (struct temporary_macro_definition): New.
10373         (macro_define_command): Use temporary_macro_definition.  Remove
10374         cleanups.
10375         (free_macro_definition_ptr): Remove.
10376
10377 2018-02-08  Tom Tromey  <[email protected]>
10378
10379         * macroexp.c (maybe_expand): Use std::string.
10380
10381 2018-02-08  Tom Tromey  <[email protected]>
10382
10383         * macroexp.c (struct macro_buffer): Add initializers for some
10384         members.
10385         (init_buffer, init_shared_buffer, free_buffer)
10386         (free_buffer_return_text): Remove.
10387         (macro_buffer): New constructors.
10388         (~macro_buffer): New destructor.
10389         (macro_buffer::set_shared): New method.
10390         (macro_buffer::resize_buffer, macro_buffer::appendc)
10391         (macro_buffer::appendmem): Now methods, not free functions.
10392         (set_token, append_tokens_without_splicing, stringify)
10393         (macro_stringify): Update.
10394         (gather_arguments): Change return type.  Remove argc_p argument,
10395         add args_ptr argument.  Use std::vector.
10396         (substitute_args): Remove argc argument.  Accept std::vector.
10397         (expand): Update.  Use std::vector.
10398         (scan, macro_expand, macro_expand_next): Update.
10399
10400 2018-02-08  Tom Tromey  <[email protected]>
10401
10402         * symtab.c (default_collect_symbol_completion_matches_break_on):
10403         Use unique_xmalloc_ptr.
10404         * macroscope.h: (sal_macro_scope, user_macro_scope)
10405         (default_macro_scope): Return unique_xmalloc_ptr.
10406         * macroscope.c (sal_macro_scope, user_macro_scope)
10407         (default_macro_scope): Return unique_xmalloc_ptr.
10408         * macroexp.h (macro_expand, macro_expand_once): Return
10409         unique_xmalloc_ptr.
10410         * macroexp.c (macro_expand, macro_expand_once): Return
10411         unique_xmalloc_ptr.
10412         * macrocmd.c (macro_expand_command, macro_expand_once_command)
10413         (info_macro_command, info_macros_command): Use
10414         unique_xmalloc_ptr.
10415         * compile/compile-c-support.c (write_macro_definitions): Use
10416         unique_xmalloc_ptr.
10417         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10418
10419 2018-02-07  Simon Marchi  <[email protected]>
10420
10421         * value.c (value_static_field): Assign field type instead of
10422         containing type when returning an optimized out value.
10423
10424 2018-02-06  Yao Qi  <[email protected]>
10425
10426         * ft32-tdep.c (ft32_read_pc): Remove.
10427         (ft32_write_pc): Remove.
10428         (ft32_gdbarch_init): Update.
10429         * m32r-tdep.c (m32r_read_pc): Remove.
10430         (m32r_gdbarch_init): Update.
10431         * mep-tdep.c (mep_read_pc): Remove.
10432         (mep_gdbarch_init): Update.
10433         * microblaze-tdep.c (microblaze_write_pc): Remove.
10434         (microblaze_gdbarch_init): Update.
10435         * mn10300-tdep.c (mn10300_read_pc): Remove.
10436         (mn10300_write_pc): Remove.
10437         (mn10300_gdbarch_init): Update.
10438         * moxie-tdep.c (moxie_read_pc): Remove.
10439         (moxie_write_pc): Remove.
10440         (moxie_gdbarch_init): Update.
10441
10442 2018-02-06  Yao Qi  <[email protected]>
10443
10444         * expprint.c (print_subexp_standard): Handle
10445         OP_F77_UNDETERMINED_ARGLIST.
10446         (dump_subexp_body_standard): Likewise.
10447
10448 2018-02-05  Alan Hayward  <[email protected]>
10449
10450         * target-descriptions.c (tdesc_element_visitor) Add empty
10451         implementations.
10452         (tdesc_type): Move make_gdb_type from here.
10453         (tdesc_type_builtin): Likewise.
10454         (tdesc_type_vector): Likewise.
10455         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10456         (make_gdb_type_struct): Move from tdesc_type_with_fields.
10457         (make_gdb_type_union): Likewise.
10458         (make_gdb_type_flags): Likewise.
10459         (make_gdb_type_enum): Likewise.
10460         (make_gdb_type): New function.
10461         (tdesc_register_type): Use static make_gdb_type.
10462
10463 2018-02-05  Ruslan Kabatsayev <[email protected]>
10464
10465         * infcmd.c (default_print_one_register_info): Align natural-format
10466         column values consistently one under another.
10467         (pad_to_column): New function.
10468
10469 2018-02-05  Joel Brobecker  <[email protected]>
10470
10471         * dwarf2read.c (dwarf2_physname): Move commment.
10472
10473 2018-02-01  Leszek Swirski  <[email protected]>
10474
10475         * varobj.c (varobj_formatted_print_options): Allow recursive
10476         pretty printing if pretty printing is enabled.
10477
10478 2018-02-01  Leszek Swirski  <[email protected]>
10479
10480         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10481         names after a structop as a filename.
10482
10483 2018-02-01  Yao Qi  <[email protected]>
10484
10485         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10486         (arm_record_coproc_data_proc): Likewise.
10487
10488 2018-02-01  Yao Qi  <[email protected]>
10489
10490         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10491
10492 2018-01-31  Nikola Prica  <[email protected]>
10493
10494         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10495         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10496
10497 2018-01-31  Pedro Alves  <[email protected]>
10498
10499         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10500         * inflow.c (child_terminal_save_inferior): Wrap reference to
10501         tcgetpgrp in HAVE_TERMIOS_H.
10502         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10503         _WIN32.
10504         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10505         always iterate over all inferiors.
10506         (gdbsim_cntrl_c): Adjust.
10507         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10508
10509 2018-01-31  Joel Brobecker  <[email protected]>
10510
10511         * gdbtypes.c (lookup_array_range_type): Make sure the array's
10512         index type is objfile-owned if the element type is as well.
10513
10514 2018-01-31  Joel Brobecker  <[email protected]>
10515
10516         GDB 8.1 released.
10517
10518 2018-01-30  Philipp Rudo  <[email protected]>
10519
10520         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10521         "features/s390x-linux64.c".
10522         (_initialize_s390_linux_tdep): Remove initialization of tdescs
10523         s390_linux32 and s390x_linux64.
10524         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10525         default tdesc.
10526         * s390-tdep.c: Include "features/s390-linux32.c" and
10527         "features/s390x-linux64.c".
10528         (s390_tdesc_valid): Add check for tdesc_has_registers.
10529         (s390_gdbarch_init): Make sure there is always a valid tdesc.
10530         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10531         tdesc_s390x_linux64.
10532         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10533         tdesc_s390x_linux64 to...
10534         * s390-tdep.h: ...here.
10535
10536 2018-01-30  Pedro Alves  <[email protected]>
10537
10538         PR gdb/13211
10539         * config.in, configure: Regenerate.
10540         * configure.ac: Check for getpgid.
10541         * go32-nat.c (go32_pass_ctrlc): New.
10542         (go32_target): Install it.
10543         * inf-child.c (inf_child_target): Install
10544         child_terminal_save_inferior, child_pass_ctrlc and
10545         child_interrupt.
10546         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10547         (inf_ptrace_target): No longer install it.
10548         * infcmd.c (interrupt_target_1): Adjust.
10549         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10550         (child_interrupt): Declare.
10551         (inferior::terminal_state): New.
10552         * inflow.c (struct terminal_info): Update comments.
10553         (inferior_process_group): Delete.
10554         (terminal_is_ours): Delete.
10555         (gdb_tty_state): New.
10556         (child_terminal_init): Adjust.
10557         (is_gdb_terminal, sharing_input_terminal_1)
10558         (sharing_input_terminal): New functions.
10559         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
10560         Set the process's actual process group in the foreground if
10561         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
10562         mark terminal as the inferior's if not sharing GDB's terminal.
10563         Don't check attach_flag.
10564         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10565         pass down a target_terminal_state.
10566         (child_terminal_save_inferior): New, factored out from ...
10567         (child_terminal_ours_1): ... this.  Handle
10568         target_terminal_state::is_ours_for_output.
10569         (child_interrupt, child_pass_ctrlc): New.
10570         (inflow_inferior_exit): Clear the inferior's terminal_state.
10571         (copy_terminal_info): Copy the inferior's terminal state.
10572         (_initialize_inflow): Remove reference to terminal_is_ours.
10573         * inflow.h (inferior_process_group): Delete.
10574         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10575         * procfs.c (procfs_target): Don't install procfs_interrupt.
10576         (procfs_interrupt): Delete.
10577         * remote.c (remote_serial_quit_handler): Adjust.
10578         (remote_interrupt): Remove ptid parameter.  Adjust.
10579         * target-delegates.c: Regenerate.
10580         * target.c: Include "terminal.h".
10581         (target_terminal::terminal_state): Rename to ...
10582         (target_terminal::m_terminal_state): ... this.
10583         (target_terminal::init): Adjust.
10584         (target_terminal::inferior): Adjust to per-inferior
10585         terminal_state.
10586         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10587         (target_terminal::ours, target_terminal::ours_for_output): Use
10588         target_terminal_is_ours_kind.
10589         (target_interrupt): Remove ptid parameter.  Adjust.
10590         (default_target_pass_ctrlc): Adjust.
10591         * target.h (target_ops::to_terminal_save_inferior): New field.
10592         (target_ops::to_interrupt): Remove ptid_t parameter.
10593         (target_interrupt): Remove ptid_t parameter.  Update comment.
10594         (target_pass_ctrlc): Update comment.
10595         * target/target.h (target_terminal_state): New scoped enum,
10596         factored out of ...
10597         (target_terminal::terminal_state): ... here.
10598         (target_terminal::inferior): Update comments.
10599         (target_terminal::restore_inferior): New.
10600         (target_terminal::is_inferior, target_terminal::is_ours)
10601         (target_terminal::is_ours_for_output): Adjust.
10602         (target_terminal::scoped_restore_terminal_state): Adjust to
10603         rename, and call restore_inferior() instead of inferior().
10604         (target_terminal::scoped_restore_terminal_state::m_state): Change
10605         type.
10606         (target_terminal::terminal_state): Rename to ...
10607         (target_terminal::m_terminal_state): ... this and change type.
10608
10609 2018-01-30  Pedro Alves  <[email protected]>
10610
10611         * linux-nat.c (wait_for_signal): New function.
10612         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10613         directly.
10614         (async_terminal_is_ours)
10615         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10616         (linux_nat_add_target): Don't override
10617         to_terminal_inferior/to_terminal_ours.
10618
10619 2018-01-29  Sergio Durigan Junior  <[email protected]>
10620
10621         * remote.c (remote_follow_fork): Don't call "detach_inferior".
10622
10623 2018-01-28  Simon Marchi  <[email protected]>
10624
10625         * dwarf2read.c (free_dwo_files): Add forward-declaration.
10626         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10627         dwarf2_per_objfile_free here.
10628         (dwarf2_per_objfile_free): Remove.
10629         (_initialize_dwarf2_read): Don't register
10630         dwarf2_per_objfile_free as a registry cleanup.
10631
10632 2018-01-27  Eli Zaretskii  <[email protected]>
10633
10634         Avoid compilation errors in MinGW native builds
10635
10636         The error is triggered by including python-internal.h, and the
10637         error message is:
10638
10639              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10640                       from build-gnulib/import/math.h:27,
10641                       from d:/usr/Python26/include/pyport.h:235,
10642                       from d:/usr/Python26/include/Python.h:58,
10643                       from python/python-internal.h:94,
10644                       from python/py-arch.c:24:
10645              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10646         using ::hypot;
10647                 ^~~~~
10648
10649         This happens because Python headers define 'hypot' to expand t
10650         '_hypot' in the Windows builds.
10651         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10652         'hypoth'.  This avoids a compilation error.
10653
10654 2018-01-26  Alan Hayward  <[email protected]>
10655
10656         * MAINTAINERS (Write After Approval): Fix ordering.
10657
10658 2018-01-26  Alan Hayward  <[email protected]>
10659
10660         * MAINTAINERS (Write After Approval): Add Alan Hayward.
10661
10662 2018-01-26  Alan Modra  <[email protected]>
10663
10664         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10665         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10666         Remove nop.  Make const.  Comment.
10667         (powerpc32_plt_stub_so_2): New.
10668         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10669         Correct count.  Update uses.
10670         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10671         Move common code reading PLT entry word.  Correct
10672         powerpc32_plt_stub PLT address calculation.
10673         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10674         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10675         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10676         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10677         (ppc64_standard_linkage8): Likewise.
10678         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10679         Correct insns description.
10680         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10681
10682 2018-01-24  Pedro Alves  <[email protected]>
10683
10684         GCC PR libstdc++/83906
10685         * gdbtypes.c (operator==(const dynamic_prop &,
10686         const dynamic_prop &)): New.
10687         (operator==(const range_bounds &, const range_bounds &)): New.
10688         (check_types_equal): Use them instead of memcmp.
10689         * gdbtypes.h (operator==(const dynamic_prop &,
10690         const dynamic_prop &)): Declare.
10691         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10692         (operator==(const range_bounds &, const range_bounds &)): Declare.
10693         (operator!=(const range_bounds &, const range_bounds &)): Declare.
10694
10695 2018-01-23  Philipp Rudo  <[email protected]>
10696
10697         * s390-linux-tdep.c (s390_record_address_mask)
10698         (s390_record_calc_disp_common, s390_record_calc_disp)
10699         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10700         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10701         (s390_process_record): Move to s390-tdep.c.
10702         (s390_linux_init_abi_any): Adjust.
10703         * s390-tdep.c (s390_record_address_mask)
10704         (s390_record_calc_disp_common, s390_record_calc_disp)
10705         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10706         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10707         (s390_process_record): Moved from s390-linux-tdep.c
10708         (s390_gdbarch_init): Adjust.
10709
10710 2018-01-23  Philipp Rudo  <[email protected]>
10711
10712         * s390-linux-nat.c (s390-tdep.h): New include.
10713         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10714         (HFILES_NO_SRCDIR): Add s390-tdep.h.
10715         (ALLDEPFILES): Add s390-tdep.c.
10716         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10717         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10718         * s390-tdep.h: ...this.  New file.
10719         * s390-linux-tdep.c (s390-tdep.h): New include.
10720         (_initialize_s390_tdep): Rename to...
10721         (_initialize_s390_linux_tdep): ...this and adjust.
10722         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10723         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10724         s390-tdep.h.
10725         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10726         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10727         (s390_is_partial_instruction, s390_software_single_step)
10728         (is_non_branch_ril, s390_displaced_step_copy_insn)
10729         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10730         (s390_prologue_data, s390_addr, s390_store, s390_load)
10731         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10732         (s390_register_call_saved, s390_guess_tracepoint_registers)
10733         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10734         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10735         (s390_pseudo_register_name, s390_pseudo_register_type)
10736         (s390_pseudo_register_read, s390_pseudo_register_write)
10737         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10738         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10739         (s390_addr_bits_remove, s390_address_class_type_flags)
10740         (s390_address_class_type_flags_to_name)
10741         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10742         (s390_function_arg_float, s390_function_arg_vector)
10743         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10744         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10745         (s390_frame_align, s390_register_return_value, s390_return_value)
10746         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10747         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10748         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10749         (s390_trad_frame_prev_register, s390_unwind_cache)
10750         (s390_prologue_frame_unwind_cache)
10751         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10752         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10753         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10754         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10755         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10756         (s390_frame_base_address, s390_local_base_address)
10757         (s390_frame_base, s390_gcc_target_options)
10758         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10759         (s390_validate_reg_range, s390_tdesc_valid)
10760         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10761         * s390-tdep.c: ...this.  New file.
10762
10763 2018-01-23  Philipp Rudo  <[email protected]>
10764
10765         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10766         (s390_process_record, s390_gdbarch_tdep_alloc)
10767         (s390_linux_init_abi_any): Use/set new hook.
10768
10769 2018-01-23  Philipp Rudo  <[email protected]>
10770
10771         * s390-linux-tdep.c (osabi.h): New include.
10772         (s390_linux_init_abi_31, s390_linux_init_abi_64)
10773         (s390_linux_init_abi_any): New functions.
10774         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10775
10776 2018-01-23  Philipp Rudo  <[email protected]>
10777
10778         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10779         tdesc_has_registers check
10780
10781 2018-01-23  Philipp Rudo  <[email protected]>
10782
10783         * s390-linux-tdep.c (s390_tdesc_valid): New function.
10784         (s390_validate_reg_range): New macro.
10785         (s390_gdbarch_init): Adjust.
10786
10787 2018-01-23  Philipp Rudo  <[email protected]>
10788
10789         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10790         (s390_gdbarch_tdep_alloc): Adjust.
10791         (s390_gdbarch_init): Adjust.
10792
10793 2018-01-23  Philipp Rudo  <[email protected]>
10794
10795         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10796         <have_tdb>: Change type to bool.
10797         (s390_gdbarch_tdep_alloc): Adjust.
10798         (s390_gdbarch_init): Adjust.
10799
10800 2018-01-23  Philipp Rudo  <[email protected]>
10801
10802         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10803         (gdbarch_tdep) <have_upper, have_vx>: New fields.
10804         (s390_gdbarch_tdep_alloc): New function.
10805         (s390_gdbarch_init): Allocate tdep at start and use its fields
10806         instead of separate variables.
10807
10808 2018-01-23  Philipp Rudo  <[email protected]>
10809
10810         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10811         when looking for cached gdbarch and add comment for remaining.
10812
10813 2018-01-22  Pedro Alves  <[email protected]>
10814             Sergio Durigan Junior  <[email protected]>
10815
10816         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10817         case.
10818
10819 2018-01-22  Maciej W. Rozycki  <[email protected]>
10820
10821         * MAINTAINERS: Update my company e-mail address.
10822
10823 2018-01-22  Yao Qi  <[email protected]>
10824
10825         * regcache.c (cooked_write_test): New function.
10826         (_initialize_regcache): Register the test.
10827
10828 2018-01-22  Yao Qi  <[email protected]>
10829
10830         * ia64-tdep.c (ia64_pseudo_register_read): Call
10831         regcache->cooked_read instead of regcache_cooked_read_unsigned.
10832         * m32c-tdep.c (m32c_cat_read): Likewise.
10833         (m32c_r3r2r1r0_read): Likewise.
10834         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10835         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10836
10837 2018-01-22  Yao Qi  <[email protected]>
10838
10839         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10840         method raw_read instead of regcache_raw_read.
10841         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10842         * arm-tdep.c (arm_neon_quad_read): Likewise.
10843         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10844         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10845         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10846         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10847         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10848         (i386_pseudo_register_read_into_value): Likewise.
10849         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10850         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10851         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10852         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10853         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10854         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
10855         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10856         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
10857         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10858
10859 2018-01-22  Yao Qi  <[email protected]>
10860
10861         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10862         * configure.tgt: Remove target mt.
10863         * mt-tdep.c: Remove.
10864         * regcache.c (cooked_read_test): Remove the check for mt.
10865
10866 2018-01-22  Yao Qi  <[email protected]>
10867
10868         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10869         instead of gdbarch_pseudo_register_read_value.
10870
10871 2018-01-22  Joel Brobecker  <[email protected]>
10872
10873         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10874         language is Ada.
10875
10876 2018-01-22  Joel Brobecker  <[email protected]>
10877
10878         * linespec.c (create_sals_line_offset): Remove code that preserved
10879         the symtab_and_line's line number.
10880
10881 2018-01-21  Andrew Burgess  <[email protected]>
10882
10883         * varobj.c (varobj_create): Don't set valid_block when creating a
10884         floating varobj.
10885
10886 2018-01-21  Andrew Burgess  <[email protected]>
10887
10888         * varobj.c (varobj_create): Remove out of date comment.
10889
10890 2018-01-21  Andrew Burgess  <[email protected]>
10891
10892         PR mi/20395
10893         * ada-exp.y (write_var_from_sym): Pass extra parameter when
10894         updating innermost block.
10895         * parse.c (innermost_block_tracker::update): Take extra type
10896         parameter, and check types match before updating innermost block.
10897         (write_dollar_variable): Update innermost block for registers.
10898         * parser-defs.h (enum innermost_block_tracker_type): New enum.
10899         (innermost_block_tracker::innermost_block_tracker): Initialise
10900         m_types member.
10901         (innermost_block_tracker::reset): Take type parameter.
10902         (innermost_block_tracker::update): Take type parameter, and pass
10903         type through as needed.
10904         (innermost_block_tracker::m_types): New member.
10905         * varobj.c (varobj_create): Pass type when reseting innermost
10906         block.
10907
10908 2018-01-21  Andrew Burgess  <[email protected]>
10909
10910         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10911         * ada-lang.c (resolve_subexp): Likewise.
10912         * breakpoint.c (set_breakpoint_condition) Likewise.
10913         (watch_command_1) Likewise.
10914         * c-exp.y (variable): Likewise.
10915         * d-exp.y (PrimaryExpression): Likewise.
10916         * f-exp.y (variable): Likewise.
10917         * go-exp.y (variable): Likewise.
10918         * m2-exp.y (variable): Likewise.
10919         * objfiles.c (objfile::~objfile): Likewise.
10920         * p-exp.y (variable): Likewise.
10921         * parse.c (innermost_block): Change type.
10922         * parser-defs.h (class innermost_block_tracker): New.
10923         (innermost_block): Change to innermost_block_tracker.
10924         * printcmd.c (display_command): Switch to innermost_block API.
10925         (do_one_display): Likewise.
10926         * rust-exp.y (do_one_display): Likewise.
10927         * symfile.c (clear_symtab_users): Likewise.
10928         * varobj.c (varobj_create): Switch to innermost_block API, replace
10929         use of innermost_block with block stored on varobj object.
10930
10931 2018-01-21  Andrew Burgess  <[email protected]>
10932
10933         * expression.h (innermost_block): Remove declaration.
10934         * varobj.c: Add 'parser-defs.h' include.
10935
10936 2018-01-19  Tom Tromey  <[email protected]>
10937
10938         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10939         symbols in the static and global blocks.
10940
10941 2018-01-19  James Clarke  <[email protected]>
10942
10943         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10944         gdb_ptrace.h, and move including gdb_wait.h ...
10945         * nat/linux-ptrace.h: ... to here.
10946
10947 2018-01-19  Simon Marchi  <[email protected]>
10948
10949         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10950         inf_ptrace_detach_success.
10951         (inf_ptrace_detach_success): Add inferior parameter, use it
10952         instead of inferior_ptid, pass it to detach_inferior.
10953         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10954         parameter.
10955         * inferior.c (detach_inferior): Add overload that takes an
10956         inferior object.
10957         * inferior.h (detach_inferior): Likewise.
10958         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10959         use inferior_ptid, adjust call to inf_ptrace_detach_success.
10960         * linux-thread-db.c (thread_db_detach): Use inf parameter.
10961
10962 2018-01-19  Simon Marchi  <[email protected]>
10963
10964         * target.h (struct target_ops) <to_detach>: Add inferior
10965         parameter.
10966         (target_detach): Likewise.
10967         * target.c (dispose_inferior): Pass inferior down.
10968         (target_detach): Pass inferior down.  Assert that it is equal to
10969         the current inferior.
10970         * aix-thread.c (aix_thread_detach): Pass inferior down.
10971         * corefile.c (core_file_command): Pass current_inferior() down.
10972         * corelow.c (core_detach): Add inferior parameter.
10973         * darwin-nat.c (darwin_detach): Likewise.
10974         * gnu-nat.c (gnu_detach): Likewise.
10975         * inf-ptrace.c (inf_ptrace_detach): Likewise.
10976         * infcmd.c (detach_command): Pass current_inferior() down to
10977         target_detach.
10978         * infrun.c (follow_fork_inferior): Pass parent_inf to
10979         target_detach.
10980         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10981         target_detach.
10982         * linux-nat.c (linux_nat_detach): Add inferior parameter.
10983         * linux-thread-db.c (thread_db_detach): Likewise.
10984         * nto-procfs.c (procfs_detach): Likewise.
10985         * procfs.c (procfs_detach): Likewise.
10986         * record.c (record_detach): Likewise.
10987         * record.h (struct inferior): Forward-declare.
10988         (record_detach): Add inferior parameter.
10989         * remote-sim.c (gdbsim_detach): Likewise.
10990         * remote.c (remote_detach_1): Likewise.
10991         (remote_detach): Likewise.
10992         (extended_remote_detach): Likewise.
10993         * sol-thread.c (sol_thread_detach): Likewise.
10994         * target-debug.h (target_debug_print_inferior_p): New macro.
10995         * target-delegates.c: Re-generate.
10996         * top.c (kill_or_detach): Pass inferior down to target_detach.
10997         * windows-nat.c (windows_detach): Add inferior parameter.
10998
10999 2018-01-19  Simon Marchi  <[email protected]>
11000
11001         * target.h (struct target_ops) <to_detach>: Remove args
11002         parameter.
11003         (target_detach): Likewise.
11004         * target.c (dispose_inferior): Adjust.
11005         (target_detach): Remove args parameter, adjust.
11006         * aix-thread.c (aix_thread_detach): Adjust.
11007         * corefile.c (core_file_command): Adjust.
11008         * corelow.c (core_detach): Adjust.
11009         * darwin-nat.c (darwin_detach): Adjust.
11010         * gnu-nat.c (gnu_detach): Adjust.
11011         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11012         * infcmd.c (detach_command): Adjust
11013         * infrun.c (follow_fork_inferior): Adjust.
11014         (handle_vfork_child_exec_or_exit): Adjust.
11015         * linux-fork.c (linux_fork_detach): Remove args parameter.
11016         * linux-fork.h (linux_fork_detach): Likewise.
11017         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11018         * linux-thread-db.c (thread_db_detach): Likewise.
11019         * nto-procfs.c (procfs_detach): Likewise.
11020         * procfs.c (procfs_detach): Likewise.
11021         (do_detach): Remove signo parameter.
11022         * record.c (record_detach): Remove args parameter.
11023         * record.h (record_detach): Likewise.
11024         * remote-sim.c (gdbsim_detach): Likewise.
11025         * remote.c (remote_detach_1): Likewise.
11026         (remote_detach): Likewise.
11027         (extended_remote_detach): Likewise.
11028         * sol-thread.c (sol_thread_detach): Likewise.
11029         * target-delegates.c: Re-generate.
11030         * top.c (struct qt_args) <args>: Remove field.
11031         (kill_or_detach): Don't pass args.
11032         (quit_force): Don't set args.
11033         * windows-nat.c (windows_detach): Remove args parameter.
11034
11035 2018-01-19  Yao Qi  <[email protected]>
11036
11037         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11038         (arm_linux_init_abi): Install it.
11039
11040 2018-01-19  Yao Qi  <[email protected]>
11041
11042         * osabi.c (gdb_osabi_names): Extend the regexp for
11043         arm-linux-gnueabihf.
11044
11045 2018-01-18  Yao Qi  <[email protected]>
11046
11047         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11048         m_abbrevs.
11049         (abbrev_table::add_abbrev): Update.
11050         (abbrev_table::lookup_abbrev): Update.
11051
11052 2018-01-18  Yao Qi  <[email protected]>
11053
11054         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11055
11056 2018-01-17  Sergio Durigan Junior  <[email protected]>
11057
11058         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11059         to "std::string".
11060
11061 2018-01-17  Tom Tromey  <[email protected]>
11062
11063         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11064
11065 2018-01-17  Tom Tromey  <[email protected]>
11066
11067         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11068         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11069         (create_array_type_with_stride): Update.
11070         * dwarf2read.c (set_die_type): Update.
11071
11072 2018-01-17  Tom Tromey  <[email protected]>
11073
11074         * dwarf2read.c (delayed_method_info): Remove typedef.
11075         (dwarf2_cu::method_info): Now a std::vector.
11076         (add_to_method_list): Update.
11077         (free_delayed_list): Remove.
11078         (compute_delayed_physnames): Update.
11079         (process_full_comp_unit, process_full_type_unit): Clear the method
11080         list.  Remove cleanups.
11081         (psymtab_include_file_name): Add name_holder parameter.  Use
11082         unique_xmalloc_ptr.
11083         (dwarf_decode_lines): Update.
11084
11085 2018-01-17  Tom Tromey  <[email protected]>
11086             Simon Marchi  <[email protected]>
11087
11088         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11089         (dwarf2_per_objfile::free_cached_comp_units)
11090         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11091         (init_cutu_and_read_dies_no_follow): Update.
11092         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11093         (dwarf2_cu::~dwarf2_cu): New.
11094         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11095         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11096
11097 2018-01-17  Tom Tromey  <[email protected]>
11098             Simon Marchi  <[email protected]>
11099
11100         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11101         (struct die_reader_specs) <abbrev_table>: New member.
11102         (struct abbrev_table): Add constructor.
11103         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11104         <abbrev_obstack>: Now an auto_obstack.
11105         (abbrev_table_up): New typedef.
11106         (init_cu_die_reader): Add abbrev_table parameter.
11107         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11108         Add result_dwo_abbrev_table.
11109         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11110         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11111         Update.
11112         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11113         parameter.
11114         (skip_children): Update.
11115         (abbrev_table::alloc_abbrev): Rename from
11116         abbrev_table_alloc_abbrev.
11117         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11118         (abbrev_table::lookup_abbrev): Rename from
11119         abbrev_table_lookup_abbrev.
11120         (abbrev_table_read_table): Return abbrev_table_up.
11121         (abbrev_table_free, abbrev_table_free_cleanup)
11122         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11123         (load_partial_dies): Update.
11124
11125 2018-01-17  Tom Tromey  <[email protected]>
11126
11127         * dwarf2read.c (dwarf2_compute_name): Update comment.
11128         (read_func_scope, read_variable): Update.
11129         (new_symbol): Remove.
11130         (new_symbol_full): Rename to new_symbol.
11131
11132 2018-01-17  Mike Gulick  <[email protected]>
11133
11134         PR gdb/16577
11135         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11136         a warning instead of throwing an error, set section size to 0 and return
11137         NULL.
11138         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11139
11140 2018-01-17  Simon Marchi  <[email protected]>
11141
11142         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11143         std::string.
11144         (linux_ptrace_attach_fail_reason_string): Likewise.
11145         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11146         Likewise.
11147         (linux_ptrace_attach_fail_reason_string): Likewise.
11148         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11149
11150 2018-01-17  Simon Marchi  <[email protected]>
11151
11152         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11153
11154 2018-01-17  Eldar Abusalimov  <[email protected]>
11155
11156         PR gdb/21559
11157         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11158         checking for fs_base/gs_base fields in struct user_regs_struct.
11159         * configure: Regenerate.
11160
11161 2018-01-17  Yao Qi  <[email protected]>
11162
11163         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11164         function.
11165         (aarch64_linux_init_abi): Install it to gdbarch hook
11166         gcc_target_options.
11167
11168 2018-01-15  Pedro Alves  <[email protected]>
11169
11170         * common/signals-state-save-restore.c
11171         (save_original_signals_state): Fix typos.
11172
11173 2017-01-12  Tom Tromey  <[email protected]>
11174             Sergio Durigan Junior  <[email protected]>
11175
11176         * Makefile.in (install-only): Install gdb-add-index.
11177
11178 2018-01-12  John Baldwin  <[email protected]>
11179
11180         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11181
11182 2018-01-12  Andreas Arnez  <[email protected]>
11183
11184         * infrun.c (keep_going_pass_signal): Clear step-over info when
11185         insert_breakpoints fails.
11186
11187 2018-01-11  Pedro Alves  <[email protected]>
11188
11189         PR gdb/22583
11190         * infrun.c (resume): Rename to ...
11191         (resume_1): ... this.
11192         (resume): Reimplement as wrapper around resume_1.
11193
11194 2018-01-11  Pedro Alves  <[email protected]>
11195
11196         PR remote/22597
11197         * remote.c (remote_parse_stop_reply): Default to the last-set
11198         general thread instead of to 'magic_null_ptid'.
11199
11200 2018-01-10  Pedro Alves  <[email protected]>
11201
11202         * language.h (language_get_symbol_name_matcher): Rename ...
11203         (get_symbol_name_matcher): ... this.
11204         * language.c (language_get_symbol_name_matcher): Ditto.
11205         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11206         callers adjusted.
11207
11208 2018-01-10  Pedro Alves  <[email protected]>
11209
11210         PR gdb/22670
11211         * dwarf2read.c
11212         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11213         Adjust to use language_get_symbol_name_matcher instead of
11214         language_defn::la_get_symbol_name_matcher.
11215         * language.c (language_get_symbol_name_matcher): If in Ada mode
11216         and the lookup name is a verbatim match, return Ada's matcher.
11217         * language.h (language_get_symbol_name_matcher): Adjust comment.
11218         (ada_lookup_name_info::verbatim_p):: New method.
11219
11220 2018-01-10  Pedro Alves  <[email protected]>
11221
11222         PR gdb/22670
11223         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11224         minsym's language is language_auto or language_cplus, pass down
11225         language_ada instead.
11226         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11227
11228 2018-01-10  Pedro Alves  <[email protected]>
11229
11230         PR gdb/22670
11231         * minsyms.c (linkage_name_str): New function.
11232         (iterate_over_minimal_symbols): Use it.
11233
11234 2018-01-09  John Baldwin  <[email protected]>
11235
11236         * NEWS: Document that 'info proc' now works on FreeBSD.
11237
11238 2018-01-09  John Baldwin  <[email protected]>
11239
11240         * configure.ac: Check for kinfo_getfile in libutil.
11241         * configure: Regenerate.
11242         * config.in: Regenerate.
11243         * fbsd-nat.c: Include "fbsd-tdep.h".
11244         (fbsd_fetch_cmdline): New.
11245         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11246         rather than calling error.
11247         (fbsd_info_proc): New.
11248         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11249         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11250         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11251
11252 2018-01-09  John Baldwin  <[email protected]>
11253
11254         * fbsd-nat.c (struct free_deleter): Remove.
11255         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11256
11257 2018-01-09  John Baldwin  <[email protected]>
11258
11259         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11260         NULL for an empty pathname.
11261
11262 2018-01-09  John Baldwin  <[email protected]>
11263
11264         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11265         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11266         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11267         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11268         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11269         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11270         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11271         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11272         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11273         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11274         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11275         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11276         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11277         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11278         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11279
11280 2018-01-08  Samuel Thibault  <[email protected]>
11281
11282         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11283         (gnu_xfer_auxv): New function.
11284         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11285         TARGET_OBJECT_AUXV.
11286
11287 2018-01-08  Yao Qi  <[email protected]>
11288             Simon Marchi  <[email protected]>
11289
11290         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11291         common/selftest.c.
11292         (COMMON_OBS): Remove selftest.o.
11293         * configure.ac: Append selftest-arch.c and common/selftest.c to
11294         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11295         * configure: Re-generated.
11296         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11297         GDB_SELF_TEST.
11298         (maintenance_info_selftests): Likewise.
11299
11300 2018-01-08  Xavier Roirand  <[email protected]>
11301
11302         * ada-valprint.c (val_print_packed_array_elements): Use
11303         proper number of elements when printing an array indexed
11304         by an enumeration type.
11305
11306 2018-01-07  Simon Marchi  <[email protected]>
11307
11308         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11309         (dw2_get_file_names_reader): Adjust.
11310         (lookup_dwo_signatured_type): Adjust.
11311         (lookup_dwp_signatured_type): Adjust.
11312         (lookup_signatured_type): Adjust.
11313         (create_type_unit_group): Adjust.
11314         (get_type_unit_group): Adjust.
11315         (process_psymtab_comp_unit_reader): Adjust.
11316         (build_type_psymtabs_reader): Adjust.
11317         (scan_partial_symbols): Adjust.
11318         (add_partial_symbol): Adjust.
11319         (add_partial_subprogram): Adjust.
11320         (peek_die_abbrev): Adjust.
11321         (fixup_go_packaging): Adjust.
11322         (process_imported_unit_die): Adjust.
11323         (dwarf2_compute_name): Adjust.
11324         (dwarf2_physname): Adjust.
11325         (read_import_statement): Adjust.
11326         (handle_DW_AT_stmt_list): Adjust.
11327         (read_file_scope): Adjust.
11328         (read_func_scope): Adjust.
11329         (read_lexical_block_scope): Adjust.
11330         (read_call_site_scope): Adjust.
11331         (read_variable): Adjust.
11332         (dwarf2_rnglists_process): Adjust.
11333         (dwarf2_ranges_process): Adjust.
11334         (dwarf2_ranges_read): Adjust.
11335         (dwarf2_get_pc_bounds): Adjust.
11336         (dwarf2_record_block_ranges): Adjust.
11337         (dwarf2_add_field): Adjust.
11338         (dwarf2_add_member_fn): Adjust.
11339         (read_structure_type): Adjust.
11340         (process_structure_scope): Adjust.
11341         (read_enumeration_type): Adjust.
11342         (read_array_type): Adjust.
11343         (mark_common_block_symbol_computed): Adjust.
11344         (read_common_block): Adjust.
11345         (read_namespace_type): Adjust.
11346         (read_namespace): Adjust.
11347         (read_module_type): Adjust.
11348         (read_tag_pointer_type): Adjust.
11349         (read_tag_ptr_to_member_type): Adjust.
11350         (read_tag_string_type): Adjust.
11351         (read_subroutine_type): Adjust.
11352         (read_typedef): Adjust.
11353         (read_base_type): Adjust.
11354         (attr_to_dynamic_prop): Adjust.
11355         (read_subrange_type): Adjust.
11356         (read_unspecified_type): Adjust.
11357         (dwarf2_read_abbrevs): Adjust.
11358         (load_partial_dies): Adjust.
11359         (read_partial_die): Adjust.
11360         (find_partial_die): Adjust.
11361         (guess_partial_die_structure_name): Adjust.
11362         (fixup_partial_die): Adjust.
11363         (read_attribute_value): Adjust.
11364         (read_addr_index): Adjust.
11365         (read_addr_index_from_leb128): Adjust.
11366         (read_str_index): Adjust.
11367         (dwarf2_string_attr): Adjust.
11368         (get_debug_line_section): Adjust.
11369         (dwarf_decode_line_header): Adjust.
11370         (lnp_state_machine::check_line_address): Adjust.
11371         (dwarf_decode_lines_1): Adjust.
11372         (dwarf_decode_lines): Adjust.
11373         (dwarf2_start_symtab): Adjust.
11374         (var_decode_location): Adjust.
11375         (new_symbol_full): Adjust.
11376         (dwarf2_const_value_data): Adjust.
11377         (dwarf2_const_value_attr): Adjust.
11378         (dwarf2_const_value): Adjust.
11379         (die_type): Adjust.
11380         (die_containing_type): Adjust.
11381         (build_error_marker_type): Adjust.
11382         (lookup_die_type): Adjust.
11383         (guess_full_die_structure_name): Adjust.
11384         (anonymous_struct_prefix): Adjust.
11385         (determine_prefix): Adjust.
11386         (dwarf2_name): Adjust.
11387         (follow_die_ref_or_sig): Adjust.
11388         (follow_die_offset): Adjust.
11389         (follow_die_ref): Adjust.
11390         (follow_die_sig_1): Adjust.
11391         (follow_die_sig): Adjust.
11392         (get_signatured_type): Adjust.
11393         (get_DW_AT_signature_type): Adjust.
11394         (decode_locdesc): Adjust.
11395         (dwarf_decode_macros): Adjust.
11396         (cu_debug_loc_section): Adjust.
11397         (fill_in_loclist_baton): Adjust.
11398         (dwarf2_symbol_mark_computed): Adjust.
11399         (init_one_comp_unit): Don't assign
11400         dwarf2_cu::dwarf2_per_objfile.
11401         (set_die_type): Adjust.
11402
11403 2018-01-07  Simon Marchi  <[email protected]>
11404
11405         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11406         <dwarf2_per_objfile>: New field.
11407         (dwarf2_per_objfile): Remove global.
11408         (get_dwarf2_per_objfile): New function.
11409         (set_dwarf2_per_objfile): New function.
11410         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11411         dwarf2_per_objfile.
11412         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11413         (read_abbrev_offset): Likewise.
11414         (read_indirect_string): Likewise.
11415         (read_indirect_line_string): Likewise.
11416         (read_indirect_string_at_offset): Likewise.
11417         (read_indirect_string_from_dwz): Likewise.
11418         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11419         dwarf2_per_objfile.
11420         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11421         (create_all_comp_units): Change objfile parameter to
11422         dwarf2_per_objfile.
11423         (create_all_type_units): Likewise.
11424         (process_queue): Add dwarf2_per_objfile parameter.
11425         (read_and_check_comp_unit_head): Likewise.
11426         (lookup_dwo_unit_in_dwp): Likewise.
11427         (get_dwp_file): Likewise.
11428         (process_cu_includes): Likewise.
11429         (struct free_dwo_file_cleanup_data): New struct.
11430         (dwarf2_has_info): Use get_dwarf2_per_objfile and
11431         set_dwarf2_per_objfile.
11432         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11433         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11434         context, adjust calls.
11435         (dw2_instantiate_symtab): Likewise.
11436         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11437         (dw2_get_cu): Likewise.
11438         (create_cu_from_index_list): Change objfile parameter to
11439         dwarf2_per_objfile.
11440         (create_cus_from_index_list): Get dwarf2_per_objfile from
11441         context, adjust calls.
11442         (create_cus_from_index): Likewise.
11443         (create_signatured_type_table_from_index): Change objfile
11444         parameter to dwarf2_per_objfile.
11445         (create_signatured_type_table_from_debug_names): Change objfile
11446         parameter to dwarf2_per_objfile.
11447         (create_addrmap_from_index): Likewise.
11448         (create_addrmap_from_aranges): Likewise.
11449         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11450         (dw2_setup): Remove.
11451         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11452         context.
11453         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11454         get_dwarf2_per_objfile.
11455         (dw2_forget_cached_source_info): Likewise.
11456         (dw2_map_symtabs_matching_filename): Likewise.
11457         (struct dw2_symtab_iterator) <index>: Remove.
11458         <dwarf2_per_objfile>: New field.
11459         (dw2_symtab_iter_init): Replace index parameter with
11460         dwarf2_per_objfile.
11461         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11462         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11463         (dw2_print_stats): Likewise.
11464         (dw2_dump): Likewise.
11465         (dw2_expand_symtabs_for_function): Likewise.
11466         (dw2_expand_all_symtabs): Likewise.
11467         (dw2_expand_symtabs_with_fullname): Likewise.
11468         (dw2_expand_marked_cus): Replace index and objfile parameters
11469         with dwarf2_per_objfile.
11470         (dw_expand_symtabs_matching_file_matcher): Add
11471         dwarf2_per_objfile parameter and adjust calls.
11472         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11473         adjust calls.
11474         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11475         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11476         adjust calls.
11477         (create_cus_from_debug_names_list): Replace objfile parameter
11478         with dwarf2_per_objfile and adjust calls.
11479         (create_cus_from_debug_names): Likewise.
11480         (dwarf2_read_debug_names): Likewise.
11481         (mapped_debug_names::namei_to_name): Adjust call.
11482         (dw2_debug_names_iterator::next): Likewise.
11483         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11484         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11485         (dw2_debug_names_dump): Likewise.
11486         (dw2_debug_names_expand_symtabs_for_function): Likewise.
11487         (dw2_debug_names_expand_symtabs_matching): Likewise.
11488         (dwarf2_initialize_objfile): Likewise.
11489         (dwarf2_build_psymtabs): Likewise.
11490         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11491         this_cu.
11492         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11493         (read_and_check_comp_unit_head): Likewise.
11494         (read_abbrev_offset): Likewise.
11495         (create_debug_type_hash_table): Likewise.
11496         (create_debug_types_hash_table): Likewise.
11497         (create_all_type_units): Replace objfile parameter with
11498         dwarf2_per_objfile.
11499         (add_type_unit): Add dwarf2_per_objfile parameter.
11500         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11501         with dwarf2_per_objfile.
11502         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11503         (lookup_dwp_signatured_type): Likewise.
11504         (lookup_signatured_type): Likewise.
11505         (read_cutu_die_from_dwo): Likewise.
11506         (init_tu_and_read_dwo_dies): Likewise.
11507         (init_cutu_and_read_dies): Likewise.
11508         (init_cutu_and_read_dies_no_follow): Likewise.
11509         (allocate_type_unit_groups_table): Add objfile parameter.
11510         (create_type_unit_group): Use dwarf2_per_objfile from cu.
11511         (get_type_unit_group): Likewise.
11512         (process_psymtab_comp_unit): Update call.
11513         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11514         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11515         (print_tu_stats): Likewise.
11516         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11517         in void* parameter.
11518         (build_type_psymtabs): Change objfile parameter to
11519         dwarf2_per_objfile.
11520         (process_skeletonless_type_unit): Use dwarf2_per_objfile
11521         passed in void* parameter.
11522         (process_skeletonless_type_units): Change objfile parameter to
11523         dwarf2_per_objfile.
11524         (set_partial_user): Likewise.
11525         (dwarf2_build_psymtabs_hard): Likewise.
11526         (read_comp_units_from_section): Likewise.
11527         (create_all_comp_units): Likewise.
11528         (scan_partial_symbols): Update calls.
11529         (add_partial_symbol): Likewise.
11530         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11531         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11532         (process_queue): Add dwarf2_per_objfile parameter.
11533         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11534         (compute_compunit_symtab_includes): Likewise.
11535         (process_cu_includes): Add dwarf2_per_objfile parameter.
11536         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11537         (process_full_type_unit): Likewise.
11538         (process_imported_unit_die): Update call.
11539         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11540         (read_file_scope): Likewise.
11541         (allocate_dwo_file_hash_table): Add objfile parameter.
11542         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11543         (create_cus_hash_table): Likewise.
11544         (create_dwp_hash_table): Likewise.
11545         (create_dwo_unit_in_dwp_v1): Likewise.
11546         (create_dwp_v2_section): Likewise.
11547         (create_dwo_unit_in_dwp_v2): Likewise.
11548         (lookup_dwo_unit_in_dwp): Likewise.
11549         (try_open_dwop_file): Likewise.
11550         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11551         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11552         cleanup to include a reference to dwarf2_per_objfile.
11553         (open_dwp_file): Add dwarf2_per_objfile parameter.
11554         (open_and_init_dwp_file): Likewise.
11555         (get_dwp_file): Likewise.
11556         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11557         (queue_and_load_all_dwo_tus): Update call.
11558         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11559         data.
11560         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11561         (dwarf2_ranges_process): Likewise.
11562         (dwarf2_get_pc_bounds): Likewise.
11563         (mark_common_block_symbol_computed): Likewise.
11564         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11565         (dwarf2_read_abbrevs): Update call.
11566         (read_partial_die): Use dwarf2_per_objfile from cu.
11567         (find_partial_die): Likewise.
11568         (fixup_partial_die): Likewise.
11569         (read_attribute_value): Likewise.
11570         (read_indirect_string_at_offset_from): Add objfile parameter.
11571         (read_indirect_string_at_offset): Add dwarf2_per_objfile
11572         parameter.
11573         (read_indirect_string_from_dwz): Add objfile parameter.
11574         (read_indirect_string): Add objfile parameter.
11575         (read_addr_index_1): Add dwarf2_per_objfile parameter.
11576         (read_addr_index): Use dwarf2_per_objfile from cu.
11577         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11578         call dw2_setup.
11579         (read_str_index): Use dwarf2_per_objfile from cu.
11580         (get_debug_line_section): Likewise.
11581         (read_formatted_entries): Add dwarf2_per_objfile parameter.
11582         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11583         (new_symbol_full): Use dwarf2_per_objfile from cu.
11584         (build_error_marker_type): Likewise.
11585         (lookup_die_type): Likewise.
11586         (determine_prefix): Likewise.
11587         (follow_die_offset): Likewise.
11588         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11589         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11590         (dwarf2_fetch_die_type_sect_off): Likewise.
11591         (dwarf2_get_die_type): Likewise.
11592         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11593         (get_signatured_type): Likewise.
11594         (get_DW_AT_signature_type): Likewise.
11595         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11596         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11597         (cu_debug_loc_section): Likewise.
11598         (fill_in_loclist_baton): Likewise.
11599         (dwarf2_symbol_mark_computed): Likewise.
11600         (dwarf2_find_containing_comp_unit): Change objfile parameter to
11601         dwarf2_per_objfile.
11602         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11603         parameter.
11604         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11605         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11606         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11607         (set_die_type): Use dwarf2_free_objfile from cu.
11608         (get_die_type_at_offset): Likewise.
11609         (dwarf2_per_objfile_free): Don't assign global variable.
11610         (debug_names) <constructor>: Add dwarf2_per_objfile
11611         parameter, update m_debugstrlookup construction.
11612         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11613         parameter.
11614         <m_dwarf2_per_objfile>: New field.
11615         <lookup>: Use m_dwarf2_per_objfile.
11616         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11617         (psyms_seen_size): Likewise.
11618         (write_gdbindex): Replace objfile parameter with
11619         dwarf2_per_objfile.
11620         (write_debug_names): Likewise.
11621         (write_psymtabs_to_index): Likewise.
11622         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11623         calls.
11624
11625 2018-01-07  Simon Marchi  <[email protected]>
11626
11627         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11628         <dwarf2_per_objfile>: New field.
11629         (struct dwarf2_per_cu_data) <objfile>: Remove.
11630         <dwarf2_per_objfile>: New field.
11631         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11632         of objfile.
11633         (create_signatured_type_table_from_index): Likewise.
11634         (create_debug_type_hash_table): Likewise.
11635         (fill_in_sig_entry_from_dwo_entry): Likewise.
11636         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11637         (create_type_unit_group): Assign dwarf2_per_objfile instead of
11638         objfile.
11639         (create_partial_symtab): Access objfile through
11640         dwarf2_per_objfile.
11641         (process_psymtab_comp_unit_reader): Likewise.
11642         (read_comp_units_from_section): Likewise.
11643         (scan_partial_symbols): Likewise.
11644         (add_partial_symbol): Likewise.
11645         (add_partial_subprogram): Likewise.
11646         (peek_die_abbrev): Likewise.
11647         (fixup_go_packaging): Likewise.
11648         (process_full_comp_unit): Likewise.
11649         (process_full_type_unit): Likewise.
11650         (process_imported_unit_die): Likewise.
11651         (dwarf2_compute_name): Likewise.
11652         (dwarf2_physname): Likewise.
11653         (read_import_statement): Likewise.
11654         (create_cus_hash_table): Assign dwarf2_physname instead of
11655         objfile.
11656         (read_func_scope): Access objfile through dwarf2_per_objfile.
11657         (read_lexical_block_scope): Likewise.
11658         (read_call_site_scope): Likewise.
11659         (read_variable): Likewise.
11660         (dwarf2_rnglists_process): Likewise.
11661         (dwarf2_ranges_process): Likewise.
11662         (dwarf2_ranges_read): Likewise.
11663         (dwarf2_record_block_ranges): Likewise.
11664         (dwarf2_add_field): Likewise.
11665         (dwarf2_add_member_fn): Likewise.
11666         (read_structure_type): Likewise.
11667         (process_structure_scope): Likewise.
11668         (read_enumeration_type): Likewise.
11669         (read_array_type): Likewise.
11670         (read_common_block): Likewise.
11671         (read_namespace_type): Likewise.
11672         (read_namespace): Likewise.
11673         (read_module_type): Likewise.
11674         (read_tag_pointer_type): Likewise.
11675         (read_tag_ptr_to_member_type): Likewise.
11676         (read_tag_string_type): Likewise.
11677         (read_subroutine_type): Likewise.
11678         (read_typedef): Likewise.
11679         (read_base_type): Likewise.
11680         (attr_to_dynamic_prop): Likewise.
11681         (read_subrange_type): Likewise.
11682         (read_unspecified_type): Likewise.
11683         (load_partial_dies): Likewise.
11684         (read_partial_die): Likewise.
11685         (find_partial_die): Likewise.
11686         (guess_partial_die_structure_name): Likewise.
11687         (fixup_partial_die): Likewise.
11688         (read_attribute_value): Likewise.
11689         (read_addr_index_from_leb128): Likewise.
11690         (dwarf2_read_addr_index): Likewise.
11691         (dwarf2_string_attr): Likewise.
11692         (lnp_state_machine::check_line_address): Likewise.
11693         (dwarf_decode_lines_1): Likewise.
11694         (dwarf_decode_lines): Likewise.
11695         (dwarf2_start_symtab): Likewise.
11696         (var_decode_location): Likewise.
11697         (new_symbol_full): Likewise.
11698         (dwarf2_const_value_data): Likewise.
11699         (dwarf2_const_value_attr): Likewise.
11700         (dwarf2_const_value): Likewise.
11701         (die_type): Likewise.
11702         (die_containing_type): Likewise.
11703         (lookup_die_type): Likewise.
11704         (guess_full_die_structure_name): Likewise.
11705         (anonymous_struct_prefix): Likewise.
11706         (dwarf2_name): Likewise.
11707         (follow_die_ref_or_sig): Likewise.
11708         (follow_die_offset): Likewise.
11709         (follow_die_ref): Likewise.
11710         (dwarf2_fetch_die_loc_sect_off): Likewise.
11711         (dwarf2_fetch_constant_bytes): Likewise.
11712         (dwarf2_fetch_die_type_sect_off): Likewise.
11713         (dwarf2_get_die_type): Likewise.
11714         (follow_die_sig): Likewise.
11715         (decode_locdesc): Likewise.
11716         (dwarf2_per_cu_objfile): Likewise.
11717         (dwarf2_per_cu_text_offset): Likewise.
11718         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11719         objfile.
11720         (set_die_type): Access objfile through
11721         dwarf2_per_objfile.
11722
11723 2018-01-07  Simon Marchi  <[email protected]>
11724
11725         * valprint.c (converted_character_d): Remove typedef.
11726         (DEF_VEC_O (converted_character_d)): Remove.
11727         (count_next_character): Use std::vector.
11728         (print_converted_chars_to_obstack): Likewise.
11729         (generic_printstr): Likewise.
11730
11731 2018-01-07  Simon Marchi  <[email protected]>
11732
11733         * xml-support.h (struct gdb_xml_value): Add constructor.
11734         <value>: Change type to unique_xmalloc_ptr.
11735         (gdb_xml_value_s): Remove typedef.
11736         (DEF_VEC_O (gdb_xml_value_s)): Remove.
11737         (gdb_xml_element_start_handler): Change parameter type to
11738         std::vector.
11739         (xml_find_attribute): Likewise.
11740         * xml-support.c (xml_find_attribute): Change parameter type to
11741         std::vector and adjust.
11742         (gdb_xml_values_cleanup): Remove.
11743         (gdb_xml_parser::start_element): Adjust to std::vector.
11744         (xinclude_start_include): Change paraeter type to std::vector
11745         and adjust.
11746         * btrace.c (check_xml_btrace_version): Likewise.
11747         (parse_xml_btrace_block): Likewise.
11748         (parse_xml_btrace_pt_config_cpu): Likewise.
11749         (parse_xml_btrace_pt): Likewise.
11750         (parse_xml_btrace_conf_bts): Likewise.
11751         (parse_xml_btrace_conf_pt): Likewise.
11752         * memory-map.c (memory_map_start_memory): Likewise.
11753         (memory_map_start_property): Likewise.
11754         * osdata.c (osdata_start_osdata): Likewise.
11755         (osdata_start_item): Likewise.
11756         (osdata_start_column): Likewise.
11757         * remote.c (start_thread): Likewise.
11758         * solib-aix.c (library_list_start_library): Likewise.
11759         (library_list_start_list): Likewise.
11760         * solib-svr4.c (library_list_start_library): Likewise.
11761         (svr4_library_list_start_list): Likewise.
11762         * solib-target.c (library_list_start_segment): Likewise.
11763         (library_list_start_section): Likewise.
11764         (library_list_start_library): Likewise.
11765         (library_list_start_list): Likewise.
11766         * tracepoint.c (traceframe_info_start_memory): Likewise.
11767         (traceframe_info_start_tvar): Likewise.
11768         * xml-syscall.c (syscall_start_syscall): Likewise.
11769         * xml-tdesc.c (tdesc_start_target): Likewise.
11770         (tdesc_start_feature): Likewise.
11771         (tdesc_start_reg): Likewise.
11772         (tdesc_start_union): Likewise.
11773         (tdesc_start_struct): Likewise.
11774         (tdesc_start_flags): Likewise.
11775         (tdesc_start_enum): Likewise.
11776         (tdesc_start_field): Likewise.
11777         (tdesc_start_enum_value): Likewise.
11778         (tdesc_start_vector): Likewise.
11779
11780 2018-01-07  Simon Marchi  <[email protected]>
11781
11782         * extension.h (struct xmethod_worker) <clone>: Remove.
11783         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11784         Remove.
11785         (python_xmethod_worker::clone): Remove.
11786         * valops.c (find_overload_match): Use std::move instead of
11787         clone.
11788
11789 2018-01-07  Simon Marchi  <[email protected]>
11790
11791         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11792         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11793         <free_xmethod_worker_data>: Remove.
11794         <get_matching_xmethod_workers>: Chance VEC to std::vector.
11795         <get_xmethod_arg_types>: Remove.
11796         <get_xmethod_result_type>: Remove.
11797         <invoke_xmethod>: Remove.
11798         * extension.c (new_xmethod_worker): Remove.
11799         (clone_xmethod_worker): Remove.
11800         (get_matching_xmethod_workers): Return void, pass std::vector by
11801         pointer.
11802         (get_xmethod_arg_types): Rename to...
11803         (xmethod_worker::get_arg_types): ... this, and adjust.
11804         (get_xmethod_result_type): Rename to...
11805         (xmethod_worker::get_result_type): ... this, and adjust.
11806         (invoke_xmethod): Remove.
11807         (free_xmethod_worker): Remove.
11808         (free_xmethod_worker_vec): Remove.
11809         * extension.h (enum ext_lang_rc): Move here from
11810         extension-priv.h.
11811         (struct xmethod_worker): Add constructor and destructor.
11812         <data>: Remove.
11813         <value>: Remove.
11814         <invoke, clone, do_get_result_type, do_get_arg_types>: New
11815         virtual pure methods.
11816         <get_arg_types, get_result_type>: New methods.
11817         (xmethod_worker_ptr): Remove typedef.
11818         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11819         (xmethod_worker_vec): Remove typedef.
11820         (xmethod_worker_up): New typedef.
11821         (invoke_xmethod): Remove.
11822         (clone_xmethod_worker): Remove.
11823         (free_xmethod_worker): Remove.
11824         (free_xmethod_worker_vec): Remove.
11825         (get_xmethod_arg_types): Remove.
11826         (get_xmethod_result_type): Remove.
11827         * valops.c (find_method_list): Use std::vector, don't use
11828         intermediate vector.
11829         (value_find_oload_method_list): Use std::vector.
11830         (find_overload_match): Use std::vector.
11831         (find_oload_champ): Use std::vector.
11832         * value.c (value_free): Use operator delete.
11833         (value_of_xmethod): Rename to...
11834         (value_from_xmethod): ... this.  Don't assign
11835         xmethod_worker::value, take rvalue-reference.
11836         (result_type_of_xmethod): Adjust.
11837         (call_xmethod): Adjust.
11838         * value.h: Include extension.h.
11839         (struct xmethod_worker): Don't forward-declare.
11840         (value_of_xmethod): Rename to...
11841         (value_from_xmethod): ... this, take rvalue-reference.
11842         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11843         (struct python_xmethod_worker): ... this, add constructor and
11844         destructor.
11845         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11846         (gdbpy_free_xmethod_worker_data): Rename to...
11847         (python_xmethod_worker::~python_xmethod_worker): ... this and
11848         adjust.
11849         (gdbpy_clone_xmethod_worker_data): Rename to...
11850         (python_xmethod_worker::clone): ... this and adjust.
11851         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11852         temporary vector.
11853         (gdbpy_get_xmethod_arg_types): Rename to...
11854         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11855         (gdbpy_get_xmethod_result_type): Rename to...
11856         (python_xmethod_worker::do_get_result_type): ... this and
11857         adjust.
11858         (gdbpy_invoke_xmethod): Rename to...
11859         (python_xmethod_worker::invoke): ... this and adjust.
11860         (new_python_xmethod_worker): Rename to...
11861         (python_xmethod_worker::python_xmethod_worker): ... this and
11862         adjust.
11863         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11864         Remove.
11865         (gdbpy_free_xmethod_worker_data): Remove.
11866         (gdbpy_get_matching_xmethod_workers): Use std::vector.
11867         (gdbpy_get_xmethod_arg_types): Remove.
11868         (gdbpy_get_xmethod_result_type): Remove.
11869         (gdbpy_invoke_xmethod): Remove.
11870         * python/python.c (python_extension_ops): Remove obsolete
11871         callbacks.
11872
11873 2018-01-05  Pedro Alves  <[email protected]>
11874
11875         PR gdb/18653
11876         * common/signals-state-save-restore.c
11877         (save_original_signals_state): New parameter 'quiet'.  Warn if we
11878         find a custom handler preinstalled, instead of internal erroring.
11879         But only warn if !quiet.
11880         * common/signals-state-save-restore.h
11881         (save_original_signals_state): New parameter 'quiet'.
11882         * main.c (captured_main_1): Move save_original_signals_state call
11883         after option handling, and pass QUIET.
11884
11885 2018-01-05  Pedro Alves  <[email protected]>
11886
11887         * spu-tdep.c (spu_catch_start): Pass
11888         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11889
11890 2018-01-05  Pedro Alves  <[email protected]>
11891
11892         PR gdb/22670
11893         * ada-lang.c (literal_symbol_name_matcher): New function.
11894         (ada_get_symbol_name_matcher): Use it for
11895         symbol_name_match_type::SEARCH_NAME.
11896         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
11897         it down instead of assuming symbol_name_match_type::FULL.
11898         * block.h (block_lookup_symbol): New parameter 'match_type'.
11899         * c-valprint.c (print_unpacked_pointer): Use
11900         lookup_symbol_search_name instead of lookup_symbol.
11901         * compile/compile-object-load.c (get_out_value_type): Pass down
11902         symbol_name_match_type::SEARCH_NAME.
11903         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11904         symbol_name_match_type::FULL.
11905         * cp-support.c (cp_get_symbol_name_matcher): Handle
11906         symbol_name_match_type::SEARCH_NAME.
11907         * infrun.c (insert_exception_resume_breakpoint): Use
11908         lookup_symbol_search_name.
11909         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11910         * psymtab.c (maintenance_check_psymtabs): Use
11911         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11912         * stack.c (print_frame_args): Use lookup_symbol_search_name and
11913         SYMBOL_SEARCH_NAME.
11914         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11915         if symbol_name_match_type::SEARCH_NAME.
11916         (lookup_symbol_in_language): Pass down
11917         symbol_name_match_type::FULL.
11918         (lookup_symbol_search_name): New.
11919         (lookup_language_this): Pass down
11920         symbol_name_match_type::SEARCH_NAME.
11921         (lookup_symbol_aux, lookup_local_symbol): New parameter
11922         'match_type'.  Pass it down.
11923         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11924         (lookup_symbol_search_name): New declaration.
11925         (lookup_symbol_in_block): New 'match_type' parameter.
11926
11927 2018-01-05  Pedro Alves  <[email protected]>
11928
11929         PR gdb/22670
11930         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11931         ada_lookup_symbol.
11932         (ada_lookup_symbol): Reimplement in terms of
11933         ada_lookup_symbol_list, bits factored out from
11934         ada_lookup_encoded_symbol.
11935
11936 2018-01-05  Joel Brobecker  <[email protected]>
11937
11938         * ada-exp.y (write_object_renaming): When subscripting an array
11939         using a symbol as the index, pass the block in call to
11940         ada_lookup_encoded_symbol when looking that symbol up.
11941
11942 2018-01-05  Jerome Guitton  <[email protected]>
11943
11944         * ada-lang.c (ada_array_length): Use ada_index_type instead of
11945         TYPE_INDEX_TYPE.
11946
11947 2018-01-05  Joel Brobecker  <[email protected]>
11948
11949         * ada-lang.c (ada_to_fixed_value_create): Add handling of
11950         the case where VALUE_LVAL (val0) is not lval_memory.
11951
11952 2018-01-05  Xavier Roirand  <[email protected]>
11953
11954         * ada-valprint.c (print_optional_low_bound): Handle
11955         character-indexed array printing like boolean-indexed array
11956         printing.
11957
11958 2018-01-05  Joel Brobecker  <[email protected]>
11959
11960         * NEWS: Create a new section for the next release branch.
11961         Rename the section of the current branch, now that it has
11962         been cut.
11963
11964 2018-01-05  Joel Brobecker  <[email protected]>
11965
11966         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11967         * version.in: Bump version to 8.1.50.DATE-git.
11968
11969 2018-01-03  Xavier Roirand  <[email protected]>
11970
11971         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11972         Add field.
11973         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11974         Add field.
11975         (default_exception_support_info) <catch_handlers_sym>: Add field.
11976         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11977         (ada_exception_name_addr_1): Add "catch handlers" handling.
11978         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11979         Update all callers.
11980         (create_excep_cond_exprs) <ex>: Add parameter.
11981         (re_set_exception): Update create_excep_cond_exprs call.
11982         (print_it_exception, print_one_exception, print_mention_exception)
11983         (print_recreate_exception): Add "catch handler" handling.
11984         (allocate_location_catch_handlers, re_set_catch_handlers)
11985         (check_status_catch_handlers, print_it_catch_handlers)
11986         (print_one_catch_handlers, print_mention_catch_handlers)
11987         (print_recreate_catch_handlers): New function.
11988         (catch_handlers_breakpoint_ops): New variable.
11989         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11990         Add parameter.  Add "catch handler" handling.
11991         (ada_exception_sym_name, ada_exception_breakpoint_ops):
11992         Add "catch handler" handling.
11993         (ada_exception_catchpoint_cond_string): Add "catch handler"
11994         handling.
11995         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11996         call.
11997         (catch_ada_handlers_command): New function.
11998         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11999         operations structure.
12000         (_initialize_ada_language): Add "catch handlers" command entry.
12001         * NEWS: Document "catch handlers" feature.
12002
12003 2018-01-02  Joel Brobecker  <[email protected]>
12004
12005         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12006         account when creating the array type of the slice.
12007         (ada_value_slice): Likewise.
12008
12009 2018-01-02  Joel Brobecker  <[email protected]>
12010
12011         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12012         New enum value.
12013         (create_array_type_with_stride): Add byte_stride_prop parameter.
12014         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12015         New parameter.  Update all callers in this file.
12016         (array_type_has_dynamic_stride): New function.
12017         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12018         of arrays with dynamic byte strides.
12019         * dwarf2read.c (read_array_type): Add support for dynamic
12020         DW_AT_byte_stride attributes.
12021
12022 2018-01-02  Joel Brobecker  <[email protected]>
12023
12024         * dwarf2read.c (read_unspecified_type): Treat
12025         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12026
12027 2018-01-01  Joel Brobecker  <[email protected]>
12028
12029         Update copyright year range in all GDB files.
12030
12031 2018-01-01  Joel Brobecker  <[email protected]>
12032
12033         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12034         and gdb/testsuite/gdb.base/step-line.c.
12035
12036 2018-01-01  Joel Brobecker  <[email protected]>
12037
12038         * copyright.py (main): Dump the contents of
12039         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12040         even if BY_HAND is empty.
12041
12042 2018-01-01  Joel Brobecker  <[email protected]>
12043
12044         * top.c (print_gdb_version): Update Copyright year in version
12045         message.
12046
12047 2018-01-01  Joel Brobecker  <[email protected]>
12048
12049         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12050
12051 For older changes see ChangeLog-2017.
12052 \f
12053 Local Variables:
12054 mode: change-log
12055 left-margin: 8
12056 fill-column: 74
12057 version-control: never
12058 coding: utf-8
12059 End:
This page took 0.764738 seconds and 4 git commands to generate.