1 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3 * NEWS: Mention csky target.
5 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
6 Hafiz Abid Qadeer <abidh@codesourcery.com>
7 Don Breazeal <donb@codesourcery.com>
9 * csky-linux-tdep.c: New file.
10 * csky-tdep.c: Likewise.
11 * csky-tdep.h: Likewise.
12 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
14 (HFILES_NO_SRCDIR): Add csky-tdep.h.
15 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
16 * configure.tgt: Add csky support.
18 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
20 * python/py-framefilter.c (py_print_frame): Print frame architecture
21 when printing on an MI output.
23 2018-08-27 Tom Tromey <tom@tromey.com>
27 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
29 2018-08-27 Tom Tromey <tom@tromey.com>
31 * aarch64-linux-tdep.c
32 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
35 2018-08-27 Tom Tromey <tom@tromey.com>
37 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
39 (ppc64_standard_linkage1, ppc64_standard_linkage2)
40 (ppc64_standard_linkage3, ppc64_standard_linkage4)
41 (ppc64_standard_linkage5, ppc64_standard_linkage6)
42 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
45 2018-08-27 Tom Tromey <tom@tromey.com>
47 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
48 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
50 2018-08-27 Tom Tromey <tom@tromey.com>
52 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
53 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
55 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
57 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
59 * sparc-linux-tdep.c (sparc32_linux_sigframe)
60 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
61 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
63 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
64 (ppc64_linux_sigaction_tramp_frame)
65 (ppc32_linux_sighandler_tramp_frame)
66 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
67 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
68 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
69 * mn10300-linux-tdep.c (am33_linux_sigframe)
70 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
71 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
72 * mips-linux-tdep.c (mips_linux_o32_sigframe)
73 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
74 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
75 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
76 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
77 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
78 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
79 * microblaze-linux-tdep.c
80 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
81 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
82 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
83 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
84 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
85 * common/common-types.h (ULONGEST_MAX): New define.
86 (CORE_ADDR_MAX): Fix formatting.
87 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
88 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
89 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
90 (arm_linux_rt_sigreturn_tramp_frame)
91 (arm_eabi_linux_sigreturn_tramp_frame)
92 (arm_eabi_linux_rt_sigreturn_tramp_frame)
93 (thumb2_eabi_linux_sigreturn_tramp_frame)
94 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
95 (arm_linux_restart_syscall_tramp_frame)
96 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
97 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
98 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
100 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
102 2018-08-27 Tom Tromey <tom@tromey.com>
104 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
106 * mips-tdep.c (mips_deal_with_atomic_sequence)
107 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
108 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
109 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
110 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
112 * aarch64-tdep.c (aarch64_software_single_step): Use
115 2018-08-27 Tom Tromey <tom@tromey.com>
117 * linespec.c (complete_linespec_component): Add cast to "char".
118 * completer.c (completion_tracker::build_completion_result): Add
121 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
123 * solist.h (struct solist, struct target_so_ops): Fix
126 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
128 * ada-tasks.c (ada_task_info_s): Remove typedef.
129 (DEF_VEC_O(ada_task_info_s)): Remove.
130 (struct ada_tasks_inferior_data): Initialize fields.
131 <task_list>: Make an std::vector.
132 (get_ada_tasks_inferior_data): Allocate with new.
133 (ada_get_task_number): Adjust.
134 (get_task_number_from_id): Likewise.
135 (valid_task_id): Likewise.
136 (ada_get_task_info_from_ptid): Likewise.
137 (iterate_over_live_ada_tasks): Likewise.
138 (add_ada_task): Likewise.
139 (read_known_tasks): Likewise.
140 (ada_build_task_list): Likewise.
141 (print_ada_task_info): Likewise.
142 (info_task): Likewise.
143 (task_command_1): Likewise.
145 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
147 * ada-lang.c (add_angle_brackets): Return std::string.
149 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
151 * python/py-threadevent.c (py_get_event_thread): Initialize
154 2018-08-24 Pedro Alves <palves@redhat.com>
156 * python/py-bpevent.c (create_breakpoint_event_object): Use
158 * python/py-continueevent.c (emit_continue_event): Use
160 * python/py-exitedevent.c (create_exited_event_object): Return a
162 (emit_exited_event): Use copy-initialization.
163 * python/py-inferior.c (python_new_inferior)
164 (python_inferior_deleted, add_thread_object): Use
166 * python/py-infevents.c (create_inferior_call_event_object)
167 (create_register_changed_event_object)
168 (create_memory_changed_event_object): Return a gdbpy_ref<>.
169 (emit_inferior_call_event, emit_memory_changed_event)
170 (emit_register_changed_event): Use copy-initialization.
171 * python/py-newobjfileevent.c (create_new_objfile_event_object):
172 Return a gdbpy_ref<>.
173 (emit_new_objfile_event): Use copy-initialization.
174 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
175 (emit_clear_objfiles_event): Use copy-initialization.
176 * python/py-signalevent.c (create_signal_event_object): Use
178 * python/py-threadevent.c (create_thread_event_object): Use
181 2018-08-24 Pedro Alves <palves@redhat.com>
182 Simon Marchi <simon.marchi@ericsson.com>
185 * python/py-continueevent.c: Include "gdbthread.h".
186 (create_continue_event_object): Add intro comment. Add 'ptid'
187 parameter. Use it to find thread to pass to
188 create_thread_event_object.
189 (emit_continue_event): Pass PTID down to
190 create_continue_event_object.
191 * python/py-event.h (py_get_event_thread): Declare.
192 (create_thread_event_object): Remove default from 'thread'
194 * python/py-stopevent.c (create_stop_event_object): Use
196 * python/py-threadevent.c (get_event_thread): Rename to ...
197 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
198 and use it to find the thread.
199 (create_thread_event_object): Assert that THREAD isn't null.
200 Don't find the event thread here.
202 2018-08-23 Kevin Buettner <kevinb@redhat.com>
204 * block.h (blockrange, blockranges): New struct declarations.
205 (struct block): Add new field named `ranges'.
206 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
207 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
208 macros for accessing ranges in struct block.
209 (make_blockranges): New declaration.
210 block.c (make_blockranges): New function.
211 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
213 * symtab.h (find_pc_partial_function): Add new parameter `block'.
214 * blockframe.c (cache_pc_function_block): New static global.
215 (clear_pc_function_cache): Clear cache_pc_function_block.
216 (find_pc_partial_function): Move comment to symtab.h. Add
217 support for non-contiguous blocks.
218 * cli/cli-cmds.c (block.h): Include.
219 (print_disassembly): Handle printing of non-contiguous blocks.
220 (disassemble_current_function): Likewise.
221 (disassemble_command): Likewise.
223 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
225 * blockframe.c (get_pc_function_start): Likewise.
226 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
227 (gcc_symbol_address): Likewise.
228 * compile/compile-object-run.c (compile_object_run): Likewise.
229 * compile/compile.c (get_expr_block_and_pc): Likewise.
230 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
231 (func_addr_to_tail_call_list): Likewise.
232 * findvar.c (default_read_var_value): Likewise.
233 * inline-frame.c (inline_frame_this_id): Likewise.
234 (skip-inline_frames): Likewise.
235 * infcmd.c (until_next_command): Likewise.
236 * linespec.c (convert_linespec_to_sals): Likewise.
237 * parse.c (parse_exp_in_context_1): Likewise.
238 * printcmd.c (build_address_symbolic): likewise.
239 (info_address_command): Likewise.
240 symtab.c (find_function_start_sal): Likewise.
241 (skip_prologue_sal): Likewise.
242 (find_function_alias_target): Likewise.
243 (find_gnu_ifunc): Likewise.
244 * stack.c (find_frame_funname): Likewise.
245 * symtab.c (fixup_symbol_section): Likewise.
246 (find_function_start_sal): Likewise.
247 (skip_prologue_sal): Likewsie.
248 (find_function_alias_target): Likewise.
249 (find_gnu_ifunc): Likewise.
250 * tracepoint.c (info_scope_command): Likewise.
251 * value.c (value_fn_field): Likewise.
253 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
254 in place of find_pc_partial_function.
255 * blockframe.c (find_function_entry_range_from_pc): New function.
256 * symtab.h (find_function_entry_range_from_pc): Declare and document.
257 * objfiles.c (objfile_relocate1): Relocate start and end addresses
258 for each range in a block.
261 2018-08-23 Xavier Roirand <roirand@adacore.com>
263 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
266 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
268 * solib-svr4.c (read_program_headers_from_bfd): Return
269 gdb::optional<gdb::byte_vector>.
270 (svr4_exec_displacement): Adjust.
272 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
274 * solib-svr4.c (read_program_header): Return
275 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
276 (find_program_interpreter): Return
277 gdb::optional<gdb::byte_vector>.
278 (scan_dyntag_auxv): Adjust.
279 (enable_break): Adjust.
280 (svr4_exec_displacement): Adjust.
282 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
284 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
285 * inf-child.c (inf_child_target::terminal_save_inferior): New.
287 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
289 * guile/scm-string.c (gdbscm_scm_from_printf): Use
291 * guile/scm-utils.c (gdbscm_printf): Likewise.
292 * serial.c (serial_printf): Likewise.
293 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
295 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
297 * stack.c (print_frame): Print frame architecture when printing on
299 * NEWS: Mention new "arch" attribute in frame output.
301 2018-08-21 Alan Hayward <alan.hayward@arm.com>
303 * arch/aarch64.h (aarch64_regnum): Update comment.
305 2018-08-21 Alan Hayward <alan.hayward@arm.com>
307 * NEWS: Add SVE to 8.2 section.
309 2018-08-21 Pedro Alves <palves@redhat.com>
311 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
312 out from gdbscm_parse_function_args.
313 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
314 gdbscm_parse_function_args_1.
316 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
319 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
322 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
324 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
326 2018-08-19 Michael Spang <spang@google.com>
329 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
332 2018-08-18 Kevin Buettner <kevinb@redhat.com>
334 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
335 dwarf_variable_value.
336 * dwarf2-frame.c (class dwarf_expr_executor):
337 Add override for dwarf_variable_value.
338 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
339 (class symbol_needs_eval_context): Likewise.
340 (indirect_synthetic_pointer): Add forward declaration.
341 (sect_variable_value): New function.
342 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
343 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
344 for DW_OP_GNU_variable_value.
346 2018-08-16 Tom Tromey <tom@tromey.com>
348 * top.c (read_command_file): Update.
349 (command_line_input): Remove "repeat" argument.
350 * ada-lang.c (get_selections): Update.
351 * linespec.c (decode_line_2): Update.
352 * defs.h (command_line_input): Remove argument.
353 * cli/cli-script.c (read_next_line): Update.
354 * python/py-gdb-readline.c: Update.
356 2018-08-17 Tom Tromey <tom@tromey.com>
358 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
361 2018-08-15 Tom Tromey <tom@tromey.com>
363 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
365 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
367 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
368 If used, use find_pc_partial_function to find address range
370 * mi/mi-main.c (mi_cmd_list_features): Report
371 "data-disassemble-a-option" feature.
372 * NEWS: Mention new -data-disassemble option -a.
374 2018-08-13 Tom Tromey <tom@tromey.com>
376 * common/common-defs.h (_FORTIFY_SOURCE): Define.
378 2018-08-13 Alan Hayward <alan.hayward@arm.com>
380 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
381 (aarch64_linux_collect_sve_regset): Likewise.
382 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
383 * regcache.h (regcache_map_entry_size): New function.
385 2018-08-13 Alan Hayward <alan.hayward@arm.com>
387 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
388 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
389 (SVE_HEADER_VL_LENGTH): Likewise.
390 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
391 (SVE_HEADER_FLAGS_LENGTH): Likewise.
392 (SVE_HEADER_RESERVED_LENGTH): Likewise.
393 (SVE_HEADER_SIZE_OFFSET): Likewise.
394 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
395 (SVE_HEADER_VL_OFFSET): Likewise.
396 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
397 (SVE_HEADER_FLAGS_OFFSET): Likewise.
398 (SVE_HEADER_RESERVED_OFFSET): Likewise.
399 (SVE_HEADER_SIZE): Likewise.
400 (aarch64_linux_core_read_vq): Add function.
401 (aarch64_linux_core_read_description): Check for SVE section.
403 2018-08-13 Alan Hayward <alan.hayward@arm.com>
405 * aarch64-fbsd-tdep.c
406 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
408 * aarch64-linux-tdep.c
409 (aarch64_linux_iterate_over_regset_sections): Likewise.
411 (alpha_linux_iterate_over_regset_sections):
413 (alphanbsd_iterate_over_regset_sections): Likewise.
415 (amd64fbsd_iterate_over_regset_sections): Likewise.
417 (amd64_linux_iterate_over_regset_sections): Likewise.
419 (armbsd_iterate_over_regset_sections): Likewise.
421 (arm_fbsd_iterate_over_regset_sections): Likewise.
423 (arm_linux_iterate_over_regset_sections): Likewise.
424 * corelow.c (get_core_registers_cb): Likewise.
425 (core_target::fetch_registers): Likewise.
426 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
427 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
428 * gdbarch.h (void): Regenerate.
429 * gdbarch.sh: Add supply_size and collect_size.
430 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
431 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
432 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
433 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
434 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
435 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
436 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
437 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
438 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
439 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
440 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
441 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
442 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
443 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
444 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
445 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
446 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
447 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
448 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
449 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
450 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
451 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
452 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
453 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
454 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
455 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
456 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
457 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
458 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
459 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
461 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
463 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
466 2018-08-10 Keith Seitz <keiths@redhat.com>
468 * compile/compile-c-support.c (add_code_header, add_code_footer):
469 Move into policy class.
470 (c_push_user_expression, pop_user_expression_nop)
471 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
472 (compile_program): New host class.
473 (c_compile_program): New typedef.
474 (c_compute_porgram): Use c_compile_program.
476 2018-08-10 Keith Seitz <keiths@redhat.com>
478 * compile/compile-internal.h (compile_instance::~compile_instance):
479 Remove calls to htab_delete.
480 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
481 * compile.c (compile_instance::compile_instance): Initialize
482 htab unique pointers.
483 (compile_instance::get_cached_type, compile_instance::insert_type)
484 (compile_instance::error_symbol_once): Update for unique_ptr.
486 2018-08-10 Keith Seitz <keiths@redhat.com>
488 * compile/compile-c-symbols.c (struct symbol_error)
489 (hash_symbol_error, eq_symbol_error, del_symbol_error)
490 (compile_instance::insert_symbol_error)
491 (compile_instance::error_symbol_once): Move to ...
492 * compile/compile.c: ... here.
494 2018-08-10 Keith Seitz <keiths@redhat.com>
496 * compile/compile-c-support.c (c_get_compile_context): Use `new'
497 instead of `new_compile_instance'.
498 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
500 If the symbol error map is not initialized, create it.
501 (generate_c_for_for_one_symbol): Do not check/initialize
502 the symbol error map.
503 * compile/compile-c-types.c (compile_c_instance): Make a class.
505 (compile_instance::compile_instance): Initialize the type cache.
506 (get_cached_type): New function.
507 (insert_type): Update description.
508 (compile_c_instance::m_default_cflags): Define.
509 (convert_type): Update description. Use get_cached_type.
510 (delete_instance): Moved to destructor.
511 (new_compile_instance): Moved to constructor.
512 * compile/compile-c.h (compile_c_instance): Make class inheriting
513 from compile_instance.
514 <base>: Remove field.
515 <type_map, symbol_err_map>: Move to base class.
516 <c_plugin>: Rename to `m_plugin' and remove pointer type.
517 * compile/compile-internal.h (compile_instance): Make class.
518 <type_map_t, symbol_err_map_t>: Define.
519 <fe>: Rename to `m_gcc_fe'.
520 <scope, block, gcc_target_options>: Add `m_' prefix.
521 <m_type_map, m_symbol_err_map>: New fields, moved from
524 (convert_type, new_compile_instance): Remove.
525 * compile/compile.c (cleanup_compile_instance): Remove.
526 (compile_to_object): Use unique_ptr to eliminate cleanups.
527 (compile_instance::set_print_callback, compile_instance::version)
528 (compile_instance::set_verbose)
529 (compile_instance::set_driver_filename)
530 (compile_instance::set_triplet_regexp)
531 (compile_instance::set_arguments)
532 (compile_instance::set_source_file)
533 (compile_instance::compile): Define.
535 2018-08-10 Keith Seitz <keiths@redhat.com>
537 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
538 * compile/compile-c-types.c: Define GCC_METHODN macros and include
539 gcc-c-fe.def to define C plugin.
540 (delete_instance): Delete `c_plugin'.
541 (new_compile_instance): Initialize `c_plugin'.
542 * compile/compile-c.h: Include gcc_c_plugin.h.
543 (struct compile_c_instance) <c_plugin>: New member.
544 * gcc-c-plugin.h: New file.
545 Update all callers with API change.
547 2018-08-10 Keith Seitz <keiths@redhat.com>
549 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
550 (HFILES_NO_SRCDIR): ... to here.
551 Add compile-internal.h and compile-c.h.
552 * compile/compile-c-support.c: Include compile-c.h.
553 * compile/compile-c-symbols.c: Include compile-c.h.
554 (generate_c_for_variable_locations): Update comment.
555 * compile/compile-c-types.c: Include compile-c.h.
556 * compile/compile-c.h: New file -- moved C language declarations
557 from other files here.
558 * compile/compile-internal.h: Do not include hashtab.h or
560 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
561 (gcc_convert_symbol, gcc_symbol_address)
562 (generate_c_for_variable_locations, c_get_mode_for_size)
563 (c_get_range_decl_name): Definitions moved to compile-c.h.
564 * compile/compile-loc2c.c: Include compile-c.h.
566 2018-08-10 Keith Seitz <keiths@redhat.com>
568 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
569 (c_symbol_substitution_name): ... this.
572 2018-08-10 Keith Seitz <keiths@redhat.com>
574 * compile/compile-c-support.c (c_compute_program): Use
575 unique_xmalloc_ptr to eliminate cleanup.
576 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
577 Return a unique_xmalloc_ptr and eliminate cleanup.
578 * compile/compile-internal.h (generate_c_for_variable_locations):
579 Return unique_xmalloc_ptr and update description.
581 2018-08-10 Alan Hayward <alan.hayward@arm.com>
583 * corelow.c (core_target::get_core_register_section): Rename
584 min_size to section_min_size.
586 2018-08-09 Jim Wilson <jimw@sifive.com>
588 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
589 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
590 * NEWS: Mention new GNU/Linux RISC-V target.
591 * configure.host: Add riscv*-*-linux*.
592 * configure.nat: Add riscv*.
593 * configure.tgt: Add riscv*-*-linux*.
594 * riscv-linux-nat.c: New file.
595 * riscv-linux-tdep.c: New file.
597 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
599 * infrun.c (resume): Make static, add forward declaration.
600 (proceed): Update header comment.
601 * infrun.h (resume): Delete declaration.
603 2018-08-09 Tom Tromey <tom@tromey.com>
605 * riscv-tdep.h: Minor formatting fixes.
607 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
609 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
610 * dwarf-index-cache.c (create_dir_and_check): Likewise.
611 (test_mkdir_recursive): Likewise.
612 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
614 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
616 * valarith.c (value_subscripted_rvalue): If an array is not in
617 memory, and we don't know the upper bound, then we can't know that
618 the requested element exists or not.
620 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
622 * target.c (str_comma_list_concat_elem): Fix typo in comment.
623 (target_options_to_string): Add comment.
625 2018-08-08 Tom Tromey <tom@tromey.com>
627 * unittests/scoped_mmap-selftests.c: Check result of "write".
629 2018-08-08 Jim Wilson <jimw@sifive.com>
631 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
632 (decode_register_index_short): New.
633 (decode_j_type_insn, decode_cj_type_insn): New.
634 (decode_b_type_insn, decode_cb_type_insn): New.
635 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
636 local xlen. Check xlen when decoding ambiguous compressed insns. In
637 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
638 is_c_sw_insn instead of is_sw_insn.
639 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
640 (riscv_software_single_step): New.
641 * riscv-tdep.h (riscv_software_single_step): Declare.
643 * riscv-tdep.c (riscv_isa_xlen): Drop static.
644 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
646 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
649 * target.c (dispose_inferior): Don't dispose of inferiors that are
652 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
654 * remote.c (remote_target::download_tracepoint): Change char* to
657 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
659 * target.h (target_options_to_string): Return an std::string.
660 * target.c (str_comma_list_concat_elem): Return void, use
662 (do_option): Likewise.
663 (target_options_to_string): Return an std::string.
664 * linux-nat.c (linux_nat_target::wait): Adjust.
665 * target-debug.h (target_debug_print_options): Adjust.
667 2018-08-07 Tom Tromey <tom@tromey.com>
669 * Makefile.in (CPPFLAGS): New variable.
670 (INTERNAL_CPPFLAGS): Use it.
672 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
674 * NEWS: Mention the index cache.
676 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
678 * common/pathstuff.h (get_standard_cache_dir): New.
679 * common/pathstuff.c (get_standard_cache_dir): New.
680 * build-id.h (build_id_to_string): New.
681 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
682 DEBUG_STR_SUFFIX): Move to here.
683 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
684 DEBUG_STR_SUFFIX): Move from there.
685 (write_psymtabs_to_index): Make non-static, add basename
686 parameter. Write to temporary files, rename when done.
687 (save_gdb_index_command): Adjust call to
688 write_psymtabs_to_index.
689 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
691 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
692 (get_gdb_index_contents_from_cache): New.
693 (get_gdb_index_contents_from_cache_dwz): New.
694 (dwarf2_initialize_objfile): Read index from cache.
695 (dwarf2_build_psymtabs): Save to index.
696 * dwarf-index-cache.h: New file.
697 * dwarf-index-cache.c: New file.
698 * dwarf-index-write.h: New file.
700 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
702 * gnulib/aclocal.m4: Re-generate.
703 * gnulib/config.in: Re-generate.
704 * gnulib/configure: Re-generate.
705 * gnulib/import/Makefile.am: Re-generate.
706 * gnulib/import/Makefile.in: Re-generate.
707 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
708 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
709 * gnulib/import/m4/mkdir.m4: New file.
710 * gnulib/import/mkdir.c: New file.
711 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
714 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
716 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
717 * common/scoped_mmap.c: New file.
718 * common/scoped_mmap.h (destroy): New method.
719 (~scoped_mmap, reset): Use destroy.
720 (scoped_mmap): New move constructor.
721 (mmap_file): New declaration.
722 * unittests/scoped_mmap-selftests.c (test_normal,
723 test_invalid_filename, run_tests): New functions.
724 (_initialize_scoped_mmap_selftests): Register selftest.
726 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
728 * dwarf2read.c (read_gdb_index_from_section): Rename to...
729 (read_gdb_index_from_buffer): ... this. Remove section
730 parameter, add buffer parameter.
731 (get_gdb_index_contents_ftype,
732 get_gdb_index_contents_dwz_ftype): New typedefs.
733 (dwarf2_read_gdb_index): Add callback parameters to get the
735 (get_gdb_index_contents_from_section): New.
736 (dwarf2_initialize_objfile): Update call to
737 dwarf2_read_gdb_index.
739 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
741 * common/filestuff.h (gdb_fopen_cloexec): New overload.
742 (gdb_open_cloexec): Likewise.
743 * nat/linux-osdata.c (command_from_pid): Use string_printf.
744 (commandline_from_pid): Likewise.
745 (linux_xfer_osdata_threads): Likewise.
746 (linux_xfer_osdata_fds): Likewise.
747 * ada-lang.c (is_package_name): Likewise.
748 * auxv.c (procfs_xfer_auxv): Likewise.
749 * breakpoint.c (print_one_breakpoint_location): Use
751 (print_one_catch_solib): Use string_printf.
752 * coff-pe-read.c (add_pe_exported_sym): Likewise.
753 (add_pe_forwarded_sym): Likewise.
754 * dwarf2read.c (create_type_unit_group): Likewise.
755 (build_error_marker_type): Likewise.
756 * infcall.c (get_function_name): Likewise.
757 * valprint.c (print_converted_chars_to_obstack): Likewise.
758 * xtensa-tdep.c (xtensa_register_type): Likewise.
760 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
762 * remote.c (remote_target::download_tracepoint): Fix format
765 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
767 * tracefile.c: Include common/byte-vector.h.
768 (trace_save): Change type of buf to gdb::byte_vector. Initialize
769 with trace_regblock_size if needed. Update uses of buf.
771 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
773 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
774 std::vector<unsigned char>.
775 * tracepoint.c (collection_list::collection_list): Remove
776 m_regs_mask initializer from initializer list. Resize
777 m_regs_mask using the largest remote register number.
778 (collection_list::add_remote_register): Remove size check on
779 m_regs_mask. Use at to access element.
780 (collection_list::stringify): Change type of temp_buf to
781 gdb::char_vector. Update uses of temp_buf. Resize if needed to
782 stringify the register mask. Use pack_hex_byte for the register
785 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
787 * tracepoint.h (class collection_list) <add_register>: Remove.
788 <add_remote_register, add_ax_registers, add_local_register>:
790 <add_memrange>: Add scope parameter.
791 * tracepoint.c (encode_actions_1): Likewise.
792 (collection_list::add_register): Rename to ...
793 (collection_list::add_remote_register): ... this. Update
795 (collection_list::add_ax_registers, add_local_register): New
797 (collection_list::add_memrange): Add scope parameter. Call
798 add_local_register instead of add_register.
799 (finalize_tracepoint_aexpr): New function.
800 (collection_list::collect_symbol): Update calls to add_memrange.
801 Call add_local_register instead of add_register. Call
802 add_ax_registers. Call finalize_tracepoint_aexpr.
803 (encode_actions_1): Get remote regnos for $reg action. Call
804 add_remote_register, add_ax_registers, and add_local_register.
805 Update call to add_memrange. Call finalize_tracepoint_aexpr.
806 (validate_actionline): Call finalize_tracepoint_aexpr.
808 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
810 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
811 Replace array buf with gdb::char_vector buf, of size
812 get_remote_packet_size (). Replace references to buf and
813 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
814 and xsnprintf with snprintf. Raise errors if the buffer is too
817 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
819 * remote.c (remote_target::download_tracepoint): Fix the has_more
820 predicate in the QTDP action list iteration.
822 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
824 * remote.c (remote_target::download_tracepoint): Fix indentation
827 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
829 * proc-api.c (_initialize_proc_api): Remove c, unused.
830 * procfs.c (procfs_init_inferior): Remove signals, unused.
831 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
834 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
835 Andrew Burgess <andrew.burgess@embecosm.com>
837 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
838 'W_STOPCODE (0)' as this could be ambiguous.
840 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
842 * ser-tcp.c (net_open): Fix thinko when deciding whether to
843 disable TCP's Nagle algorithm (use "ai_protocol" instead of
846 2018-08-02 Tom Tromey <tom@tromey.com>
849 * dwarf2read.c (read_func_scope): Set symtab on template parameter
851 (process_structure_scope): Likewise.
853 2018-08-02 Xavier Roirand <roirand@adacore.com>
856 * darwin-nat.c (darwin_kill_inferior): Fix handling of
859 2018-08-02 Tom Tromey <tom@tromey.com>
861 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
862 (darwin_suspend_inferior, darwin_resume_inferior)
863 (darwin_decode_notify_message, darwin_resume_inferior_threads)
864 (darwin_check_new_threads): Check result of get_darwin_inferior.
866 2018-07-31 Joel Brobecker <brobecker@adacore.com>
870 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
872 * varobj.c (varobj_get_path_expr_parent): Report an error if
873 parent is a dynamic varobj.
875 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
877 * gnulib/aclocal.m4: Re-generate.
878 * gnulib/config.in: Re-generate.
879 * gnulib/configure: Re-generate.
880 * gnulib/import/Makefile.in: Re-generate.
881 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
882 * gnulib/import/m4/onceonly.m4: Re-generate.
884 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
886 * target-descriptions.c (struct xml_test_tdesc): New.
887 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
888 (record_xml_tdesc): Update.
889 (maintenance_check_xml_descriptions): Update.
890 * target-descriptions.h (record_xml_tdesc): Update comment.
892 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
894 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
895 checking array bounds are defined.
897 2018-07-30 Tom Tromey <tom@tromey.com>
899 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
900 irreflexivity violation.
902 2018-07-30 Tom Tromey <tom@tromey.com>
904 * cli/cli-decode.c (lookup_cmd): Remove lint code.
905 * value.c (unpack_long): Remove lint code.
906 * valops.c (value_ind): Remove lint code.
907 * valarith.c (value_x_binop, value_x_unop, value_equal)
908 (value_pos): Remove lint code.
910 2018-07-28 Tom de Vries <tdevries@suse.de>
912 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
913 with undefined upper bound as <optimized out>.
915 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
917 * gcore.in: Rename variable "name" to "prefix". Expand
920 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
922 * windows-nat.c (windows_nat_target::create_inferior): Update to
923 call close() in global namespace.
925 2018-07-26 Tom Tromey <tom@tromey.com>
927 * dwarf-index-write.c (add_address_entry): Don't add objfile
929 * dbxread.c (find_stab_function): Rename from
930 find_stab_function_addr. Return a bound_minimal_symbol.
931 (read_dbx_symtab): Use raw_text_low, raw_text_high.
932 Don't add objfile offsets.
933 (end_psymtab): Use raw_text_low, raw_text_high,
934 MSYMBOL_VALUE_RAW_ADDRESS.
935 (read_ofile_symtab): Update.
936 (process_one_symbol): Update.
937 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
939 (dw2_relocate): Remove.
940 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
942 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
944 (process_psymtab_comp_unit_reader, add_partial_symbol)
945 (add_partial_subprogram, dwarf2_ranges_read): Update.
946 (load_partial_dies): Update.
947 (add_address_entry): Don't add objfile offsets.
948 (dwarf2_build_include_psymtabs): Update.
949 (create_addrmap_from_aranges): Don't add objfile offsets.
950 (dw2_find_pc_sect_compunit_symtab): Update.
951 * mdebugread.c (parse_symbol): Don't add objfile offsets.
952 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
954 (parse_partial_symbols): Don't add objfile offsets. Use
955 raw_text_low, raw_text_high. Update.
956 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
957 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
958 or call 'relocate' quick function. Clear psymbol_map.
959 * psympriv.h (struct partial_symbol) <address>: Add section
961 <set_unrelocated_address>: Rename from set_address.
962 <raw_text_low, raw_text_high>: New methods.
963 <text_low, text_high>: Add objfile parameter.
964 (add_psymbol_to_bcache): Add 'section' parameter. Call
965 set_unrelocated_address.
966 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
967 (find_pc_psymbol): Update.
968 (fixup_psymbol_section, relocate_psymtabs): Remove.
969 (dump_psymtab, psym_functions): Update.
970 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
972 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
973 (start_psymtab_common): Update.
974 * symfile-debug.c (debug_qf_relocate): Remove.
975 (debug_sym_quick_functions): Update.
976 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
977 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
980 2018-07-26 Tom Tromey <tromey@redhat.com>
982 * dbxread.c (end_psymtab): Use text_high_valid and
984 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
985 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
986 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
988 <text_low_valid, text_high_valid>: New fields.
989 <set_text_low, set_text_high>: Update.
990 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
992 2018-07-26 Tom Tromey <tom@tromey.com>
994 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
996 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
997 textlow and texthigh fields.
998 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1000 * mdebugread.c (parse_lines, parse_partial_symbols)
1001 (psymtab_to_symtab_1): Update.
1002 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1003 Rename fields. Update comment. Now private.
1004 <text_low, text_high, set_text_low, set_text_high>: New methods.
1005 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1006 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1007 (start_psymtab_common, maintenance_info_psymtabs)
1008 (maintenance_check_psymtabs): Update.
1009 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1011 (scan_xcoff_symtab): Update.
1013 2018-07-26 Tom Tromey <tromey@redhat.com>
1015 * psympriv.h (struct partial_symbol) <unrelocated_address,
1016 address, set_address>: New methods.
1017 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1018 (fixup_psymbol_section, relocate_psymtabs): Update.
1019 (print_partial_symbols): Add 'objfile' parameter. Update.
1020 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1023 2018-07-26 Tom Tromey <tom@tromey.com>
1025 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1026 (debug_names::write_psymbols): Update.
1027 * psympriv.h (struct partial_symbol): Derive from
1028 general_symbol_info.
1029 <obj_section>: New method.
1030 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1031 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1032 (find_pc_sect_psymbol, fixup_psymbol_section)
1033 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1034 (print_partial_symbols, recursively_search_psymtabs)
1035 (compare_psymbols, psymbol_hash, psymbol_compare)
1036 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1037 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1039 2018-07-26 Tom Tromey <tromey@redhat.com>
1041 * dbxread.c (end_psymtab): Remove dead code.
1043 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1045 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1046 DWARF unwinders are disabled.
1047 * dwarf2-frame.c: Add dwarf2read.h include.
1048 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1050 (dwarf2_frame_unwinders_enabled_p): Define.
1051 (show_dwarf_unwinders_enabled_p): New function.
1052 (_initialize_dwarf2_frame): Register switch to control DWARF
1054 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1055 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1056 (show_dwarf_cmdlist): Remove static keyword.
1057 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1058 (show_dwarf_cmdlist): Declare.
1059 * NEWS: Document new feature.
1061 2018-07-26 Tom de Vries <tdevries@suse.de>
1063 PR breakpoints/23366
1064 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1066 2018-07-26 Tom de Vries <tdevries@suse.de>
1068 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1069 DW_AT_count can't be translated to a dynamic prop.
1071 2018-07-25 Tom de Vries <tdevries@suse.de>
1073 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1076 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1078 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1080 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1082 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1084 2018-07-24 Keith Seitz <keiths@redhat.comt
1087 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1088 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1089 instead of add_symbol_to_list.
1090 (read_file_scope): Call prepare_one_comp_unit before reading
1093 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1095 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1097 2018-07-24 Tom Tromey <tom@tromey.com>
1099 * utils.c (malloc, realloc, free): Don't declare.
1100 * configure, config.in: Rebuild.
1101 * configure.ac: Don't check for declarations of free, malloc, or
1104 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1106 * aarch64-linux-nat.c
1107 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1109 * arm-linux-nat.c (fetch_regs): Likewise.
1110 (store_regs): Likewise.
1111 (fetch_vfp_regs): Likewise.
1112 (store_vfp_regs): Likewise.
1113 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1114 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1115 (arm_linux_nat_target::insert_watchpoint): Likewise.
1116 (arm_linux_nat_target::remove_watchpoint): Likewise.
1117 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1119 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1121 * ppc-linux-nat.c (fetch_register): Likewise.
1122 (fetch_all_gp_regs): Likewise.
1123 (fetch_ppc_registers): Likewise.
1124 (store_all_gp_regs): Likewise.
1125 (store_ppc_registers): Likewise.
1126 (hwdebug_insert_point): Likewise.
1127 (can_use_watchpoint_cond_accel): Likewise.
1128 * remote-sim.c (gdb_os_write_stdout): Likewise.
1130 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1131 Tom Tromey <tom@tromey.com>
1133 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1135 * configure: Rebuild.
1137 2018-07-22 Tom Tromey <tom@tromey.com>
1139 * regformats/regdat.sh: Define xmltarget_${name} inside
1140 #ifndef IN_PROCESS_AGENT.
1142 2018-07-22 Tom Tromey <tom@tromey.com>
1144 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1146 2018-07-22 Tom Tromey <tom@tromey.com>
1148 * symfile.c (reread_symbols): Notify iter, not objfile.
1150 2018-07-22 Tom Tromey <tom@tromey.com>
1152 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1154 (ravenscar_thread_target::prepare_to_store): Likewise.
1156 2018-07-22 Tom Tromey <tom@tromey.com>
1158 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1159 unused variable. Call value_fetch_lazy when needed.
1160 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1161 Remove unused variable. Call value_fetch_lazy when needed.
1163 2018-07-22 Tom Tromey <tom@tromey.com>
1165 * m32c-tdep.c (mark_dma): Return void.
1166 (make_regs): Remove unused declarations.
1168 2018-07-22 Tom Tromey <tom@tromey.com>
1170 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1171 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1172 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1173 bkscm_get_valid_block_smob_arg_unsafe for effect.
1175 2018-07-22 Tom Tromey <tom@tromey.com>
1177 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1180 2018-07-22 Tom Tromey <tom@tromey.com>
1182 * windows-nat.c (saved_context): Conditionally define.
1183 * remote.c (remote_target::remote_btrace_maybe_reopen):
1184 Conditionally declare "warned".
1185 * inflow.c (sigquit_ours): Conditionally define.
1186 (new_tty): Move "tty" declaration inside #if.
1187 * guile/guile.c (guile_datadir): Conditionally define.
1188 * charset.c (set_be_le_names): Move some declarations inside #if.
1189 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1191 (parse_xml_btrace_conf): Likewise.
1193 2018-07-22 Tom Tromey <tom@tromey.com>
1195 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1197 2018-07-22 Tom Tromey <tom@tromey.com>
1199 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1200 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1201 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1202 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1203 * stack.c (frame_apply_level_command): Remove unused variable.
1204 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1205 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1206 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1208 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1209 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1210 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1212 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1213 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1215 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1216 Remove unused variable.
1217 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1219 * common/tdesc.c (print_xml_feature::visit): Remove unused
1221 * compile/compile-object-load.c (store_regs): Remove unused
1223 * complaints.c (clear_complaints): Remove unused variable.
1224 * corelow.c (core_target_open): Remove unused variable.
1225 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1227 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1229 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1231 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1233 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1235 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1237 * ia64-tdep.c (examine_prologue): Remove unused variable.
1238 * infcall.c (run_inferior_call): Remove unused variable.
1239 * inferior.c (exit_inferior): Remove unused variable.
1240 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1241 * linespec.c (decode_line_2): Remove unused variable.
1242 * linux-nat.c (super_close): Remove.
1243 * linux-tdep.c (linux_info_proc): Remove unused variable.
1244 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1245 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1246 Remove unused variable.
1247 * parse.c (find_minsym_type_and_address): Remove unused variable.
1248 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1250 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1252 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1254 * record-btrace.c (record_btrace_target::store_registers): Remove
1256 (cmd_show_record_btrace_cpu): Remove unused variable.
1257 * riscv-tdep.c (riscv_register_reggroup_p)
1258 (riscv_push_dummy_call, riscv_return_value): Remove unused
1260 * rust-exp.y (literal): Remove unused variable.
1261 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1263 <STRUCTOP_ANONYMOUS>: Likewise.
1264 * s390-linux-tdep.c (s390_linux_init_abi_31)
1265 (s390_linux_init_abi_64): Remove unused variable.
1266 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1267 (file_select_thread, net_windows_open, _initialize_ser_windows):
1268 Remove unused variables.
1269 * symtab.c (find_pc_sect_line): Remove unused variable.
1270 * target-memory.c (compute_garbled_blocks): Remove unused
1272 (target_write_memory_blocks): Remove unused variable.
1273 * target.c (target_stack::unpush): Remove unused variables.
1274 * tracepoint.c (start_tracing, all_tracepoint_actions)
1275 (merge_uploaded_trace_state_variables)
1276 (print_one_static_tracepoint_marker): Remove unused variable.
1277 * unittests/basic_string_view/element_access/char/1.cc (test01):
1278 Remove unused variable.
1279 * windows-nat.c (windows_continue, windows_add_all_dlls)
1280 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1281 Remove unused variables.
1283 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1285 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1286 attr_profile in HAVE_ELF.
1287 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1290 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1292 * frame.c (frame_register_unwind): Change parameter name.
1293 (frame_unwind_register): Likewise.
1294 (frame_unwind_register_value): Likewise.
1295 (frame_unwind_register_signed): Likewise.
1296 (frame_unwind_register_unsigned): Likewise.
1297 * frame.h (frame_register_unwind): Likewise.
1298 (frame_unwind_register): Likewise.
1299 (frame_unwind_register_value): Likewise.
1300 (frame_unwind_register_signed): Likewise.
1301 (frame_unwind_register_unsigned): Likewise.
1302 (frame_unwind_arch): Likewise.
1304 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1306 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1309 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1311 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1312 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1315 2018-07-20 Keith Seitz <keiths@redhat.com>
1317 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1318 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1319 m_compunit_symtab, m_language>: Add "m_" prefix.
1321 * buildsym.c: Update all uses.
1323 2018-07-20 Tom Tromey <tom@tromey.com>
1325 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1326 * buildsym.h (record_line_ftype): Remove typedef.
1328 2018-07-20 Tom Tromey <tom@tromey.com>
1330 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1331 (end_expandable_symtab): Likewise.
1332 (end_symtab_get_static_block): Likewise.
1333 (end_symtab_from_static_block): Likewise.
1334 * buildsym-legacy.c (augment_type_symtab): Remove.
1335 (end_expandable_symtab): Remove.
1336 (end_symtab_get_static_block): Remove.
1337 (end_symtab_from_static_block): Remove.
1339 2018-07-20 Tom Tromey <tom@tromey.com>
1341 * dwarf2read.c: Include buildsym.h.
1342 (struct dwarf2_cu) <builder>: New method.
1343 (fixup_go_packaging): Update.
1344 (process_full_comp_unit, process_full_type_unit): Update. Don't
1345 use scoped_free_pendings.
1346 (using_directives): Add "cu" parameter, remove "language".
1347 (read_import_statement, setup_type_unit_groups, )
1348 (read_func_scope, read_lexical_block_scope)
1349 (dwarf2_record_block_ranges, read_namespace): Update.
1350 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1351 (lnp_state_machine::handle_end_sequence): Update.
1352 (class lnp_state_machine) <m_cu>: New member.
1353 <m_record_line_callback>: Remove.
1354 <m_currently_recording_lines>: New member.
1355 (lnp_state_machine::handle_set_file): Update.
1356 (noop_record_line): Remove.
1357 (dwarf_record_line_p): Add cu parameter.
1358 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1359 (lnp_state_machine::record_line)
1360 (lnp_state_machine::lnp_state_machine)
1361 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1362 (dwarf_decode_lines): Update.
1363 (dwarf2_start_subfile): Add cu parameter.
1364 (dwarf2_start_symtab, new_symbol): Update.
1365 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1366 Remove dwarf2_per_objfile parameter.
1367 (dwarf_decode_macros): Update.
1369 2018-07-20 Tom Tromey <tom@tromey.com>
1371 * stabsread.c (define_symbol): Update.
1372 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1373 * dwarf2read.c (new_symbol): Update.
1374 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1375 * cp-namespace.c: Include buildsym.h.
1376 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1377 * buildsym-legacy.c (get_buildsym_compunit): New function.
1379 2018-07-20 Tom Tromey <tom@tromey.com>
1381 * xcoffread.c: Include buildsym-legacy.h.
1382 * windows-nat.c: Include buildsym-legacy.h.
1383 * stabsread.c: Include buildsym-legacy.h.
1384 * mdebugread.c: Include buildsym-legacy.h.
1385 * buildsym-legacy.h: New file.
1386 * buildsym-legacy.c: New file, from buildsym.c.
1387 * go32-nat.c: Include buildsym-legacy.h.
1388 * dwarf2read.c: Include buildsym-legacy.h.
1389 * dbxread.c: Include buildsym-legacy.h.
1390 * cp-namespace.c: Include buildsym-legacy.h.
1391 * coffread.c: Include buildsym-legacy.h.
1392 * buildsym.h: Move some contents to buildsym-legacy.h.
1393 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1395 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1397 2018-07-20 Tom Tromey <tom@tromey.com>
1399 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1400 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1401 (buildsym_compunit::buildsym_compunit)
1402 (buildsym_compunit::~buildsym_compunit)
1403 (buildsym_compunit::get_macro_table): Define.
1405 2018-07-20 Tom Tromey <tom@tromey.com>
1407 * buildsym.c (reset_symtab_globals): Remove.
1408 (buildsym_compunit::end_symtab_from_static_block): Update.
1409 (buildsym_compunit::augment_type_symtab): Update.
1410 (end_symtab_from_static_block): Call free_buildsym_compunit.
1411 (augment_type_symtab, end_symtab, end_expandable_symtab):
1414 2018-07-20 Tom Tromey <tom@tromey.com>
1416 * arch-utils.c: Do not include buildsym.h.
1417 * mipsread.c: Do not include buildsym.h.
1418 * machoread.c: Do not include buildsym.h.
1419 * elfread.c: Do not include buildsym.h.
1421 2018-07-20 Tom Tromey <tom@tromey.com>
1423 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1425 (buildsym_compunit): Add new constructor.
1426 (struct buildsym_compunit) <get_last_source_file, finish_block,
1427 record_block_range, start_subfile, patch_subfile_names,
1428 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1429 set_last_source_start_addr, get_last_source_start_addr,
1430 get_local_using_directives, set_local_using_directives,
1431 get_global_using_directives, outermost_context_p,
1432 get_current_context_stack, get_context_stack_depth,
1433 get_current_subfile, get_local_symbols, get_file_symbols,
1434 get_global_symbols, record_debugformat, record_producer,
1435 push_context, pop_context, end_symtab_get_static_block,
1436 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1438 <record_pending_block, finish_block_internal, make_blockvector,
1439 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1443 2018-05-22 Tom Tromey <tom@tromey.com>
1445 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1447 (finish_block_internal): Update.
1449 2018-07-20 Tom Tromey <tom@tromey.com>
1451 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1453 (finish_block_internal): Update.
1455 2018-07-20 Tom Tromey <tom@tromey.com>
1457 * buildsym.h (EXTERN): Don't define or undef.
1458 * buildsym.c (EXTERN): Don't define.
1460 2018-07-20 Tom Tromey <tom@tromey.com>
1462 * buildsym.c: Remove TODO comment.
1464 2018-07-20 Tom Tromey <tom@tromey.com>
1466 * coffread.c (coff_symtab_read): Update.
1467 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1468 (xcoff_new_init): Update.
1469 * mipsread.c (mipscoff_new_init): Update.
1470 * mdebugread.c (mdebug_build_psymtabs): Update.
1471 * elfread.c (elf_new_init): Update.
1472 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1474 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1475 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1476 (stabsect_build_psymtabs): Update.
1477 * buildsym.h (buildsym_init): Don't declare.
1478 * buildsym.c: Update comment.
1479 (prepare_for_building): Remove.
1480 (start_symtab, restart_symtab): Update.
1481 (reset_symtab_globals): Update comment.
1482 (buildsym_init): Remove.
1484 2018-07-20 Tom Tromey <tom@tromey.com>
1486 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1487 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1488 (read_enum_type, common_block_start, common_block_end)
1489 (cleanup_undefined_types_1, finish_global_stabs): Update.
1490 * mdebugread.c (psymtab_to_symtab_1): Update.
1491 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1492 (read_lexical_block_scope, new_symbol): Update.
1493 * dbxread.c (process_one_symbol): Update.
1494 * coffread.c (coff_symtab_read, process_coff_symbol)
1495 (coff_read_enum_type): Update.
1496 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1498 (get_local_symbols, get_file_symbols, get_global_symbols): New
1500 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1502 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1503 (~scoped_free_pendings): Update.
1504 (finish_block, prepare_for_building, reset_symtab_globals)
1505 (end_symtab_get_static_block, end_symtab_with_blockvector)
1506 (augment_type_symtab, push_context): Update.
1507 (get_local_symbols, get_file_symbols, get_global_symbols): New
1509 (buildsym_init): Update.
1511 2018-07-20 Tom Tromey <tom@tromey.com>
1513 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1514 (process_full_type_unit): Likewise.
1515 (dwarf2_start_symtab): Set list_in_scope.
1517 2018-07-20 Tom Tromey <tom@tromey.com>
1519 * dwarf2read.c (process_psymtab_comp_unit_reader)
1520 (build_type_psymtabs_reader): Do not set list_in_scope.
1522 2018-07-20 Tom Tromey <tom@tromey.com>
1524 * buildsym.c (free_pendings): Remove.
1525 (add_symbol_to_list, scoped_free_pendings)
1526 (finish_block_internal, buildsym_init): Update.
1528 2018-07-20 Tom Tromey <tom@tromey.com>
1530 * xcoffread.c (read_xcoff_symtab): Update.
1531 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1533 * dbxread.c (process_one_symbol): Update.
1534 * coffread.c (coff_symtab_read): Update.
1535 * buildsym.h (finish_block): Update.
1536 * buildsym.c (finish_block): Remove "listhead" argument.
1537 (end_symtab_get_static_block): Update.
1539 2018-07-20 Tom Tromey <tom@tromey.com>
1541 * buildsym.h (class scoped_free_pendings): Remove constructor.
1542 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1544 <m_pending_block_obstack, m_pending_blocks>: New members.
1545 (pending_block_obstack, pending_blocks): Remove.
1546 (scoped_free_pendings::scoped_free_pendings): Default.
1547 (~scoped_free_pendings): Update.
1548 (free_pending_blocks): Remove.
1549 (finish_block_internal, record_pending_block, make_blockvector)
1550 (end_symtab_get_static_block, augment_type_symtab, push_context)
1551 (buildsym_init): Update.
1553 2018-07-20 Tom Tromey <tom@tromey.com>
1555 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1556 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1558 (pending_addrmap, pending_addrmap_obstack)
1559 (pending_addrmap_interesting): Remove.
1560 (scoped_free_pendings, record_block_range, make_blockvector)
1561 (prepare_for_building, reset_symtab_globals, buildsym_init):
1564 2018-07-20 Tom Tromey <tom@tromey.com>
1566 * xcoffread.c (process_linenos): Update.
1567 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1568 * mdebugread.c (psymtab_to_symtab_1): Update.
1569 * dwarf2read.c (setup_type_unit_groups)
1570 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1571 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1572 * dbxread.c (process_one_symbol): Update.
1573 * coffread.c (coff_symtab_read, enter_linenos)
1574 (process_coff_symbol): Update.
1575 * buildsym.h (current_subfile): Don't declare.
1576 (get_current_subfile): Declare.
1577 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1579 (start_subfile, free_buildsym_compunit, push_subfile)
1580 (prepare_for_building, start_symtab): Update.
1581 (get_current_subfile): New function.
1583 2018-07-20 Tom Tromey <tom@tromey.com>
1585 * coffread.c (coff_symtab_read): Update.
1586 * xcoffread.c (read_xcoff_symtab): Update.
1587 * dwarf2read.c (new_symbol): Update.
1588 (read_func_scope, read_lexical_block_scope): Update.
1589 * dbxread.c (process_one_symbol): Update.
1590 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1591 (outermost_context_p): Remove macro.
1592 (outermost_context_p, get_current_context_stack)
1593 (get_context_stack_depth): Declare.
1594 (pop_context): Return struct context_stack.
1595 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1597 (context_stack_size): Remove.
1598 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1599 (prepare_for_building, end_symtab_get_static_block)
1600 (augment_type_symtab, push_context): Update.
1601 (pop_context): Return struct context_stack.
1602 (outermost_context_p, get_current_context_stack)
1603 (get_context_stack_depth): New functions.
1604 (buildsym_init): Update.
1606 2018-07-20 Tom Tromey <tom@tromey.com>
1608 * rust-exp.y: Now a pure parser. Update all rules.
1609 (%union): Move earlier.
1610 (current_parser, work_obstack): Remove globals.
1611 (rust_parser, ~rust_parser): Update.
1612 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1613 lex_character, lex_number, lex_string, lex_identifier,
1614 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1615 convert_name, convert_params_to_expression,
1616 convert_ast_to_expression, ast_basic_type, ast_operation,
1617 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1618 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1619 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1620 ast_array_type, ast_slice_type, ast_reference_type,
1621 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1622 (rust_parse): Update.
1623 (rustyyerror, rustyylex): Add parser parameter.
1624 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1625 (rust_lex_stringish_test, rust_lex_test_sequence)
1626 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1627 (rust_lex_test_push_back, rust_lex_tests): Update.
1629 2018-07-19 Pedro Alves <palves@redhat.com>
1631 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1632 gdb::unique_xmalloc_ptr.
1633 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1634 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1635 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1636 copy-initialization.
1637 * guile/scm-pretty-print.c (ppscm_print_children): Use
1638 gdb::unique_xmalloc_ptr instead of cleanups.
1639 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1640 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1641 gdb::unique_xmalloc_ptr.
1642 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1643 Adjust to use gdb::unique_xmalloc_ptr.
1644 * guile/scm-utils.c (extract_arg): Adjust.
1645 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1646 gdb::unique_xmalloc_ptr instead of a cleanup.
1648 2018-07-19 Tom Tromey <tom@tromey.com>
1650 * utils.c (do_value_free_to_mark)
1651 (make_cleanup_value_free_to_mark): Remove.
1652 * utils.h (make_cleanup_value_free_to_mark): Remove.
1654 2018-07-19 Pedro Alves <palves@redhat.com>
1656 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1657 forwarding reference.
1659 2018-07-18 Pedro Alves <palves@redhat.com>
1661 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1662 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1665 2018-07-18 Pedro Alves <palves@redhat.com>
1667 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1669 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1671 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1672 directly instead of a cleanup.
1673 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1674 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1675 (vlscm_binop_gdbthrow): New, factored out from ...
1676 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1677 (vlscm_rich_compare): Use gdbscm_wrap.
1678 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1679 instead of a cleanup.
1680 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1682 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1683 Use xfree directly instead of a cleanup.
1684 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1685 Adjust to use gdbscm_wrap and scoped_value_mark.
1686 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1687 (gdbscm_value_address, gdbscm_value_dereference)
1688 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1690 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1691 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1693 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1694 gdbscm_wrap and scoped_value_mark.
1695 (gdbscm_value_to_string): Use xfree directly instead of a
1696 cleanup. Move 'buffer' unique_ptr to TRY scope.
1697 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1698 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1700 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1701 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1703 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1706 2018-07-18 Tom de Vries <tdevries@suse.de>
1708 * findvar.c (default_read_var_value): Also resolve dynamic type for
1709 LOC_OPTIMIZED_OUT vars.
1711 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1713 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1716 2018-07-17 Tom Tromey <tom@tromey.com>
1718 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1719 (compute_enum_list, pascm_set_param_value_x)
1720 (gdbscm_parameter_value): Update.
1721 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1722 (gdbscm_scm_to_host_string): Update.
1723 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1725 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1726 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1727 * guile/scm-string.c (gdbscm_scm_to_string): Return
1729 (gdbscm_scm_to_host_string): Likewise.
1731 2018-07-17 Tom Tromey <tom@tromey.com>
1733 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1734 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1735 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1736 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1739 2018-07-17 Tom Tromey <tom@tromey.com>
1741 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1742 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1744 * guile/scm-cmd.c (cmdscm_function): Update.
1745 * guile/scm-pretty-print.c
1746 (ppscm_print_exception_unless_memory_error): Update.
1747 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1748 Return unique_xmalloc_ptr.
1750 2018-07-17 Tom Tromey <tom@tromey.com>
1752 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1755 2018-07-17 Jim Wilson <jimw@sifive.com>
1757 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1758 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1759 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1760 unecessary braces after EF_RISCV_RVC test. Delete call to
1761 set_gdbarch_decr_pc_after_break.
1763 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1764 RISCV_LAST_FP_REGNUM + 1.
1765 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1767 2018-07-17 Tom Tromey <tom@tromey.com>
1769 * configure.ac: Remove --disable-gdbcli.
1770 * configure: Rebuild.
1771 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1772 (SUBDIR_CLI_CFLAGS): Remove.
1773 (SFILES): Use SUBDIR_CLI_SRCS.
1774 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1776 2018-07-17 Tom Tromey <tom@tromey.com>
1779 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1781 2018-07-16 Jim Wilson <jimw@sifive.com>
1783 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1785 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1787 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1789 (libunwind_frame_sniffer): Likewise.
1790 (libunwind_frame_prev_register): Likewise.
1791 (libunwind_sigtramp_frame_sniffer): Likewise.
1792 * ia64-tdep.c (ia64_access_reg): Likewise.
1793 (ia64_access_rse_reg): Likewise.
1794 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1795 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1797 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1799 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1801 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1803 * remote-sim.c (gdbsim_target::close,
1804 gdbsim_target::mourn_inferior): Remove unused variables.
1806 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1808 * ia64-tdep.c (ktab_buf): New global.
1809 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1810 (get_kernel_table): Adjust.
1812 2018-07-16 Tom Tromey <tom@tromey.com>
1814 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1815 * dwarf2read.c (using_directives, new_symbol): Use
1816 outermost_context_p.
1817 * dbxread.c (process_one_symbol): Use outermost_context_p.
1818 * coffread.c (coff_symtab_read): Use outermost_context_p.
1820 2018-07-16 Tom Tromey <tom@tromey.com>
1822 * dwarf2read.c (using_directives, read_func_scope)
1823 (read_lexical_block_scope): Update.
1824 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1825 * buildsym.h (local_using_directives, global_using_directives):
1827 (get_local_using_directives, set_local_using_directives)
1828 (get_global_using_directives): Declare.
1829 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1830 m_global_using_directives>: New members.
1831 (finish_block_internal, prepare_for_building)
1832 (reset_symtab_globals, end_symtab_get_static_block)
1833 (push_context): Update.
1834 (get_local_using_directives, set_local_using_directives)
1835 (get_global_using_directives): New functions.
1836 (buildsym_init): Update.
1838 2018-07-16 Tom Tromey <tom@tromey.com>
1840 * xcoffread.c (xcoff_initial_scan): Don't call
1841 free_pending_blocks.
1842 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1843 * buildsym.h (class scoped_free_pendings): Add constructor.
1844 (free_pending_blocks): Don't declare.
1845 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1846 (free_pending_blocks): Now static.
1848 2018-07-16 Tom Tromey <tom@tromey.com>
1850 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1851 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1853 (struct subfile_stack): Remove.
1854 (subfile_stack): Remove.
1855 (push_subfile, pop_subfile, buildsym_init): Update.
1857 2018-07-16 Tom Tromey <tom@tromey.com>
1859 * buildsym.c (push_subfile): Use gdb_assert.
1860 (pop_subfile): Use gdb_assert.
1862 2018-07-16 Tom Tromey <tom@tromey.com>
1864 * buildsym.h (merge_symbol_lists): Remove.
1865 * buildsym.c (merge_symbol_lists): Remove.
1867 2018-07-16 Tom Tromey <tom@tromey.com>
1869 * stabsread.c (scan_file_globals): Update comment.
1870 * stabsread.h (scan_file_globals): Move from buildsym.h.
1871 * buildsym.h (scan_file_globals): Move to stabsread.h.
1873 2018-07-16 Tom Tromey <tom@tromey.com>
1875 * xcoffread.c (xcoff_new_init): Update.
1876 * mipsread.c (mipscoff_new_init): Update.
1877 * mdebugread.c (mdebug_build_psymtabs): Update.
1878 * elfread.c (elf_new_init): Update.
1879 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1880 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1881 * buildsym.h (buildsym_new_init): Don't declare.
1882 * buildsym.c (buildsym_new_init): Remove.
1884 2018-07-16 Tom Tromey <tom@tromey.com>
1886 * stabsread.h (within_function): Move from buildsym.h.
1887 * stabsread.c (start_stabs): Clear within_function.
1888 * coffread.c (coff_start_symtab): Clear within_function.
1889 * buildsym.h (within_function): Move to stabsread.h.
1890 * buildsym.c (prepare_for_building): Update.
1892 2018-07-16 Tom Tromey <tom@tromey.com>
1894 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1895 * dwarf2read.c (dwarf2_start_symtab): Don't set
1896 processing_gcc_compilation.
1897 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1899 2018-07-16 Tom Tromey <tom@tromey.com>
1901 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1902 (next_symbol_text_func): Move from buildsym.h.
1903 * stabsread.c (hashname): Move from buildsym.c.
1904 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1905 (next_symbol_text_func, hashname): Move to stabsread.h.
1906 * buildsym.c: Don't include bcache.h
1907 (hashname): Move to stasbread.c.
1909 2018-07-16 Tom Tromey <tom@tromey.com>
1911 * buildsym.h (context_stack_size): Don't declare.
1912 * buildsym.c (context_stack_size): New global.
1914 2018-07-16 Tom Tromey <tom@tromey.com>
1916 * dbxread.c (processing_acc_compilation): New global.
1917 * buildsym.h (processing_acc_compilation): Don't declare.
1919 2018-07-16 Tom Tromey <tom@tromey.com>
1921 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1922 * dbxread.c (read_ofile_symtab): Update.
1923 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1924 * buildsym.h (last_source_start_addr): Remove.
1925 (set_last_source_start_addr, get_last_source_start_addr):
1927 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1929 (struct buildsym_compunit) <m_last_source_start_addr>: New
1931 (prepare_for_building): Remove start_addr parameter.
1932 (start_symtab, restart_symtab, end_symtab_get_static_block)
1933 (end_symtab_with_blockvector): Update.
1934 (set_last_source_start_addr, get_last_source_start_addr): New
1937 2018-07-16 Tom Tromey <tom@tromey.com>
1939 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1941 (have_line_numbers): Remove.
1942 (record_line, prepare_for_building, end_symtab_get_static_block)
1943 (augment_type_symtab): Update.
1945 2018-07-16 Tom Tromey <tom@tromey.com>
1947 * buildsym.c (~buildsym_compunit): Free the macro table.
1948 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1950 <m_pending_macros>: New member.
1951 (pending_macros): Remove.
1952 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1953 (reset_symtab_globals, end_symtab_get_static_block)
1954 (end_symtab_with_blockvector, augment_type_symtab)
1955 (buildsym_init): Update.
1957 2018-07-16 Tom Tromey <tom@tromey.com>
1959 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1961 (buildsym_compunit::set_last_source_file): New method.
1962 <m_last_source_file>: New member.
1963 (prepare_for_building): Remove "name" parameter.
1964 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1965 (last_source_file): Remove.
1966 (set_last_source_file, get_last_source_file): Update.
1968 2018-07-16 Tom Tromey <tom@tromey.com>
1970 * buildsym.c (prepare_for_building): Add assert.
1972 2018-07-16 Tom Tromey <tom@tromey.com>
1974 * buildsym.c (~buildsym_compunit): Update.
1975 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1976 (start_subfile, patch_subfile_names)
1977 (end_symtab_with_blockvector): Update.
1979 2018-07-16 Tom Tromey <tom@tromey.com>
1981 * buildsym.c (struct buildsym_compunit): Add constructor,
1982 destructor, initializers.
1983 (start_buildsym_compunit): Remove.
1984 (free_buildsym_compunit): Use "delete".
1985 (start_symtab, restart_symtab): Use "new".
1987 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1989 * symfile.c (set_objfile_default_section_offset): Remove struct
1992 2018-07-14 Stafford Horne <shorne@gmail.com>
1994 * (Responsible Maintainers): Add myself as or1k maintainer.
1996 2018-07-13 Tom Tromey <tom@tromey.com>
1998 * symfile.c (set_objfile_default_section_offset): Use extra braces
2001 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2003 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2006 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2008 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2009 unittests/cli-utils-selftests.c
2010 * unittests/cli-utils-selftests.c: New file.
2012 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2014 * NEWS: Mention new commands. Mention change to 'thread apply'.
2016 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2018 * thread.c (thr_try_catch_cmd): New function.
2019 (thread_apply_all_command): Handle qcs flags.
2020 (thread_apply_command): Handle qcs flags.
2021 (taas_command): New function.
2022 (tfaas_command): New function.
2023 (_initialize_thread): Update to setup the new commands 'taas
2024 and 'tfaas'. Change doc string for 'thread apply'.
2026 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2028 * stack.c: (trailing_outermost_frame): New function, mostly
2029 extracted from backtrace_command_1.
2030 (leading_innermost_frame): New function.
2031 (backtrace_command_1): Update to call trailing_outermost_frame.
2032 (frame_apply_command_count): New function.
2033 (frame_apply_level_command): New function.
2034 (frame_apply_all_command): New function.
2035 (frame_apply_command): New function.
2036 (faas_command): New function.
2037 (frame_cmd_list): New variable.
2038 (_initialize_stack): Update to setup the new commands 'frame apply'
2041 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2043 * cli-utils.c (number_or_range_parser::get_number): Only handle
2044 numbers or convenience var as numbers.
2045 (parse_flags): New function.
2046 (parse_flags_qcs): New function.
2047 (number_or_range_parser::finished): Ensure parsing end is detected
2048 before end of string.
2049 * cli-utils.h (parse_flags): New function.
2050 (parse_flags_qcs): New function.
2051 (number_or_range_parser): Remove m_finished bool.
2052 (number_or_range_parser::skip_range): Set m_in_range to false.
2054 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2056 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2059 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2060 Jan Kratochvil <jan.kratochvil@redhat.com>
2061 Paul Fertser <fercerpav@gmail.com>
2062 Tsutomu Seki <sekiriki@gmail.com>
2063 Pedro Alves <palves@redhat.com>
2065 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2066 'unittests/parse-connection-spec-selftests.c'.
2067 (COMMON_SFILES): Add 'common/netstuff.c'.
2068 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2069 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2070 * common/netstuff.c: New file.
2071 * common/netstuff.h: New file.
2072 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2073 (wait_for_connect): Update comment. New parameter
2074 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2075 Use 'sock' directly instead of 'scb->fd'.
2076 (try_connect): New function, with code from 'net_open'.
2077 (net_open): Rewrite main loop to deal with multiple
2078 sockets/addresses. Handle IPv6-style hostnames; implement
2079 support for IPv6 connections.
2080 * unittests/parse-connection-spec-selftests.c: New file.
2082 2018-07-11 Pedro Alves <palves@redhat.com>
2085 * remote.c (remote_target::remote_detach_pid): Call
2086 set_current_process.
2088 2018-07-11 Pedro Alves <palves@redhat.com>
2090 * h8300-tdep.c (h8300_gdbarch_init): Remove
2091 set_gdbarch_ecoff_reg_to_regnum calls.
2093 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2096 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2097 offsets/sizes for static members of a class/struct.
2099 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2101 * target-descriptions.c (tdesc_register_bitsize): Rename.
2102 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2103 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2104 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2106 2018-07-10 Tom Tromey <tom@tromey.com>
2108 * breakpoint.c (moribund_locations): Now static and a
2110 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2111 (build_bpstat_chain, update_global_location_list)
2112 (breakpoint_retire_moribund): Update.
2113 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2116 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2118 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2119 (riscv_register_reggroup_p): Use new function, remove unneeded
2121 (riscv_push_dummy_call): Extend assert to compare against xlen or
2122 flen based on register type.
2124 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2126 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2128 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2130 * remote.c (show_hardware_watchpoint_limit): New function.
2131 (show_hardware_watchpoint_length_limit): New function.
2132 (show_hardware_breakpoint_limit): New function.
2133 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2134 where appropriate, update help text.
2136 2018-07-09 Tom Tromey <tom@tromey.com>
2138 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2139 (CLIBS): Don't mention NAT_CLIBS.
2141 2018-07-09 Tom Tromey <tom@tromey.com>
2143 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2144 (LIBGDB_OBS, clean mostlyclean): Update.
2145 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2147 2018-07-09 Tom Tromey <tom@tromey.com>
2149 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2150 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2151 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2153 2018-07-09 Tom Tromey <tom@tromey.com>
2155 * Makefile.in (ALLDEPFILES): Remove exec.c.
2156 (COMMON_OBS): Remove exec.o.
2157 (COMMON_SFILES): Add exec.c.
2159 2018-07-09 Tom Tromey <tom@tromey.com>
2161 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2163 2018-07-09 Tom Tromey <tom@tromey.com>
2165 * Makefile.in (clean mostlyclean): Remove stamp-version.
2166 (version.c): Depend on stamp-version.
2167 (stamp-version): New rule, from version.c rule.
2169 2018-07-09 Tom Tromey <tom@tromey.com>
2171 * Makefile.in (init.c): Depend on stamp-init.
2172 (stamp-init): New rule, from init.c rule.
2173 (clean mostlyclean): Remove stamp-init.
2175 2018-07-09 Tom Tromey <tom@tromey.com>
2177 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2178 SUBDIR_GCC_COMPILE_SRCS.
2180 2018-07-09 Tom Tromey <tom@tromey.com>
2182 * Makefile.in (init.c): Remove some unused sed rules.
2184 2018-07-09 Tom Tromey <tom@tromey.com>
2186 * Makefile.in (TSOBS): Remove.
2187 (INIT_FILES): Update.
2188 (LIBGDB_OBS): Update.
2189 (COMMON_SFILES): Add inflow.c.
2190 (SFILES): Remove inflow.c.
2192 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2194 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2196 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2198 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2199 get_saveloc_name, is_signal_frame_name, step_name,
2200 init_remote_name, create_addr_space_name,
2201 destroy_addr_space_name, search_unwind_table_name,
2202 find_dyn_list_name): Constify.
2204 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2206 * darwin-nat.c (darwin_pthread_kill): New function.
2207 (darwin_resume_thread): Use darwin_pthread_kill.
2209 2018-07-05 Tom de Vries <tdevries@suse.de>
2211 * macroexp.c (macro_buffer) <operator=>: New member function.
2213 2018-07-04 Tom Tromey <tom@tromey.com>
2215 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2217 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2219 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2220 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2221 * maint.c: Likewise.
2224 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2226 * NEWS: Create a new section for the next release branch.
2227 Rename the section of the current branch, now that it has
2230 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2232 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2233 * version.in: Bump version to 8.2.50.DATE-git.
2235 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2236 Pedro Alves <palves@redhat.com>
2238 * linux-nat.c (linux_init_ptrace): Rename to ...
2239 (linux_init_ptrace_procfs): ... this. Call
2240 linux_proc_init_warnings.
2241 (linux_nat_target::post_attach)
2242 (linux_nat_target::post_startup_inferior): Adjust.
2243 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2244 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2246 2018-07-04 Tom de Vries <tdevries@suse.de>
2248 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2250 (read_comp_unit_head): ... here.
2252 2018-07-03 Tom Tromey <tom@tromey.com>
2254 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2255 (stop_tracing, tstatus_command)
2256 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2257 (print_one_static_tracepoint_marker): Update.
2258 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2260 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2262 (all_tracepoints, static_tracepoints_here): Return std::vector.
2264 2018-07-03 Tom Tromey <tom@tromey.com>
2266 * common/ptid.c (ptid_equal): Remove.
2267 * common/ptid.h (ptid_equal): Don't declare.
2268 * ada-tasks.c: Update.
2269 * breakpoint.c: Update.
2270 * common/agent.c: Update.
2271 * corelow.c: Update.
2272 * darwin-nat-info.c: Update.
2273 * darwin-nat.c: Update.
2275 * dtrace-probe.c: Update.
2276 * dummy-frame.c: Update.
2277 * fbsd-nat.c: Update.
2279 * gdbthread.h: Update.
2280 * gnu-nat.c: Update.
2281 * go32-nat.c: Update.
2282 * inf-loop.c: Update.
2283 * inf-ptrace.c: Update.
2284 * infcall.c: Update.
2288 * linux-fork.c: Update.
2289 * linux-nat.c: Update.
2290 * linux-thread-db.c: Update.
2291 * mi/mi-cmd-var.c: Update.
2292 * mi/mi-interp.c: Update.
2293 * mi/mi-main.c: Update.
2294 * nto-procfs.c: Update.
2295 * ppc-linux-tdep.c: Update.
2297 * python/py-inferior.c: Update.
2298 * python/py-record-btrace.c: Update.
2299 * python/py-record.c: Update.
2300 * ravenscar-thread.c: Update.
2301 * regcache.c: Update.
2302 * remote-sim.c: Update.
2304 * sol-thread.c: Update.
2307 * tui/tui-stack.c: Update.
2309 * windows-nat.c: Update.
2310 * windows-tdep.c: Update.
2312 2018-07-03 Tom Tromey <tom@tromey.com>
2314 * common/ptid.c (ptid_match): Remove.
2315 * common/ptid.h (ptid_match): Don't declare.
2316 * fbsd-nat.c: Update.
2319 * linux-nat.c: Update.
2320 * record-btrace.c: Update.
2321 * regcache.c: Update.
2324 2018-07-03 Tom Tromey <tom@tromey.com>
2326 * common/ptid.c (ptid_tid_p): Remove.
2327 * common/ptid.h (ptid_tid_p): Don't declare.
2328 * sol-thread.c: Update.
2330 2018-07-03 Tom Tromey <tom@tromey.com>
2332 * common/ptid.c (ptid_lwp_p): Remove.
2333 * common/ptid.h (ptid_lwp_p): Don't declare.
2334 * fbsd-nat.c: Update.
2335 * linux-nat.c: Update.
2336 * nat/linux-procfs.c: Update.
2337 * nat/x86-linux-dregs.c: Update.
2338 * sol-thread.c: Update.
2340 2018-07-03 Tom Tromey <tom@tromey.com>
2342 * common/ptid.c (ptid_is_pid): Remove.
2343 * common/ptid.h (ptid_is_pid): Don't declare.
2345 * linux-nat.c: Update.
2346 * mi/mi-interp.c: Update.
2350 2018-07-03 Tom Tromey <tom@tromey.com>
2352 * common/ptid.c (ptid_get_tid): Remove.
2353 * common/ptid.h (ptid_get_tid): Don't declare.
2354 * ada-tasks.c: Update.
2355 * aix-thread.c: Update.
2356 * bsd-uthread.c: Update.
2357 * darwin-nat.c: Update.
2358 * fbsd-nat.c: Update.
2359 * i386-darwin-nat.c: Update.
2361 * linux-tdep.c: Update.
2362 * nto-procfs.c: Update.
2363 * ppc-ravenscar-thread.c: Update.
2364 * python/py-infthread.c: Update.
2365 * ravenscar-thread.c: Update.
2366 * sol-thread.c: Update.
2367 * sparc-ravenscar-thread.c: Update.
2368 * windows-nat.c: Update.
2370 2018-07-03 Tom Tromey <tom@tromey.com>
2372 * common/ptid.c (ptid_get_lwp): Remove.
2373 * common/ptid.h (ptid_get_lwp): Don't declare.
2374 * aarch64-linux-nat.c: Update.
2375 * ada-tasks.c: Update.
2376 * aix-thread.c: Update.
2377 * amd64-linux-nat.c: Update.
2378 * arm-linux-nat.c: Update.
2379 * corelow.c: Update.
2380 * fbsd-nat.c: Update.
2381 * fbsd-tdep.c: Update.
2382 * gnu-nat.c: Update.
2383 * i386-cygwin-tdep.c: Update.
2384 * i386-gnu-nat.c: Update.
2385 * i386-linux-nat.c: Update.
2386 * ia64-linux-nat.c: Update.
2387 * inf-ptrace.c: Update.
2389 * linux-fork.c: Update.
2390 * linux-nat.c: Update.
2391 * linux-tdep.c: Update.
2392 * linux-thread-db.c: Update.
2393 * mips-linux-nat.c: Update.
2394 * nat/aarch64-linux-hw-point.c: Update.
2395 * nat/aarch64-linux.c: Update.
2396 * nat/linux-btrace.c: Update.
2397 * nat/linux-osdata.c: Update.
2398 * nat/linux-procfs.c: Update.
2399 * nat/x86-linux-dregs.c: Update.
2400 * obsd-nat.c: Update.
2401 * ppc-fbsd-nat.c: Update.
2402 * ppc-linux-nat.c: Update.
2404 * python/py-infthread.c: Update.
2405 * ravenscar-thread.c: Update.
2407 * s390-linux-nat.c: Update.
2408 * sol-thread.c: Update.
2409 * sol2-tdep.c: Update.
2410 * spu-linux-nat.c: Update.
2411 * x86-linux-nat.c: Update.
2412 * xtensa-linux-nat.c: Update.
2414 2018-07-03 Tom Tromey <tom@tromey.com>
2416 * common/ptid.c (ptid_get_pid): Remove.
2417 * common/ptid.h (ptid_get_pid): Don't declare.
2418 * aarch64-linux-nat.c: Update.
2419 * ada-lang.c: Update.
2420 * aix-thread.c: Update.
2421 * alpha-bsd-nat.c: Update.
2422 * amd64-fbsd-nat.c: Update.
2423 * amd64-linux-nat.c: Update.
2424 * arm-linux-nat.c: Update.
2425 * arm-nbsd-nat.c: Update.
2427 * break-catch-syscall.c: Update.
2428 * breakpoint.c: Update.
2429 * bsd-uthread.c: Update.
2430 * corelow.c: Update.
2432 * darwin-nat.c: Update.
2433 * fbsd-nat.c: Update.
2434 * fbsd-tdep.c: Update.
2436 * gnu-nat.c: Update.
2437 * hppa-nbsd-nat.c: Update.
2438 * hppa-obsd-nat.c: Update.
2439 * i386-fbsd-nat.c: Update.
2440 * ia64-linux-nat.c: Update.
2441 * inf-ptrace.c: Update.
2443 * inferior.c: Update.
2444 * inferior.h: Update.
2447 * linux-fork.c: Update.
2448 * linux-nat.c: Update.
2449 * linux-tdep.c: Update.
2450 * linux-thread-db.c: Update.
2451 * m68k-bsd-nat.c: Update.
2452 * mi/mi-interp.c: Update.
2453 * mi/mi-main.c: Update.
2454 * mips-linux-nat.c: Update.
2455 * mips-nbsd-nat.c: Update.
2456 * mips64-obsd-nat.c: Update.
2457 * nat/aarch64-linux-hw-point.c: Update.
2458 * nat/aarch64-linux.c: Update.
2459 * nat/linux-btrace.c: Update.
2460 * nat/linux-osdata.c: Update.
2461 * nat/linux-procfs.c: Update.
2462 * nat/x86-linux-dregs.c: Update.
2463 * nto-procfs.c: Update.
2464 * obsd-nat.c: Update.
2465 * ppc-linux-nat.c: Update.
2466 * ppc-nbsd-nat.c: Update.
2467 * ppc-obsd-nat.c: Update.
2468 * proc-service.c: Update.
2470 * python/py-inferior.c: Update.
2471 * python/py-infthread.c: Update.
2472 * ravenscar-thread.c: Update.
2474 * remote-sim.c: Update.
2476 * rs6000-nat.c: Update.
2477 * s390-linux-nat.c: Update.
2478 * sh-nbsd-nat.c: Update.
2479 * sol-thread.c: Update.
2480 * sparc-nat.c: Update.
2481 * sparc64-tdep.c: Update.
2482 * spu-linux-nat.c: Update.
2483 * spu-tdep.c: Update.
2484 * target-debug.h: Update.
2487 * tid-parse.c: Update.
2488 * tracefile-tfile.c: Update.
2489 * vax-bsd-nat.c: Update.
2490 * windows-nat.c: Update.
2491 * x86-linux-nat.c: Update.
2492 * x86-nat.c: Update.
2494 2018-07-03 Tom Tromey <tom@tromey.com>
2496 * common/ptid.c (pid_to_ptid): Remove.
2497 * common/ptid.h (pid_to_ptid): Don't declare.
2498 * aix-thread.c: Update.
2499 * arm-linux-nat.c: Update.
2500 * common/ptid.c: Update.
2501 * common/ptid.h: Update.
2502 * corelow.c: Update.
2504 * darwin-nat.c: Update.
2505 * fbsd-nat.c: Update.
2506 * fork-child.c: Update.
2507 * gnu-nat.c: Update.
2508 * go32-nat.c: Update.
2509 * inf-ptrace.c: Update.
2511 * inferior.c: Update.
2513 * linux-fork.c: Update.
2514 * linux-nat.c: Update.
2515 * nat/aarch64-linux-hw-point.c: Update.
2516 * nat/fork-inferior.c: Update.
2517 * nat/x86-linux-dregs.c: Update.
2518 * nto-procfs.c: Update.
2519 * obsd-nat.c: Update.
2521 * progspace.c: Update.
2523 * rs6000-nat.c: Update.
2524 * s390-linux-nat.c: Update.
2525 * sol-thread.c: Update.
2526 * spu-linux-nat.c: Update.
2529 * tracefile-tfile.c: Update.
2530 * windows-nat.c: Update.
2532 2018-07-03 Tom Tromey <tom@tromey.com>
2534 * common/ptid.h (ptid_build): Don't declare.
2535 * common/ptid.c (ptid_build): Remove.
2536 * aix-thread.c: Update.
2537 * bsd-kvm.c: Update.
2538 * bsd-uthread.c: Update.
2539 * common/agent.c: Update.
2540 * common/ptid.c: Update.
2541 * common/ptid.h: Update.
2542 * corelow.c: Update.
2543 * darwin-nat.c: Update.
2544 * fbsd-nat.c: Update.
2545 * gnu-nat.c: Update.
2546 * linux-fork.c: Update.
2547 * linux-nat.c: Update.
2548 * linux-thread-db.c: Update.
2549 * nat/linux-osdata.c: Update.
2550 * nat/linux-procfs.c: Update.
2551 * nto-procfs.c: Update.
2552 * obsd-nat.c: Update.
2553 * proc-service.c: Update.
2555 * ravenscar-thread.c: Update.
2556 * remote-sim.c: Update.
2558 * sol-thread.c: Update.
2560 * windows-nat.c: Update.
2562 2018-07-03 Tom Tromey <tom@tromey.com>
2564 * infrun.c (follow_exec): Use exit_inferior_silent.
2565 * inferior.c (exit_inferior_num_silent): Remove.
2566 * inferior.h (exit_inferior_num_silent): Don't declare.
2568 2018-07-03 Tom Tromey <tom@tromey.com>
2571 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2572 inferior_ptid on error.
2574 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2575 Simon Marchi <simon.marchi@polymtl.ca>
2578 * disasm.h (gdb_disassembler): Add
2579 `m_disassembler_options_holder'. member
2580 * disasm.c (get_all_disassembler_options): New function.
2581 (gdb_disassembler::gdb_disassembler): Use it.
2582 (gdb_buffered_insn_length_init_dis): Likewise.
2583 (gdb_buffered_insn_length): Adjust accordingly.
2584 (set_disassembler_options): Handle options with arguments.
2585 (show_disassembler_options_sfunc): Likewise. Add a leading new
2586 line if showing options with descriptions.
2587 (disassembler_options_completer): Adapt to using the
2588 `disasm_options_and_args_t' structure.
2589 * mips-tdep.c (mips_disassembler_options): New variable.
2590 (mips_disassembler_options_o32): Likewise.
2591 (mips_disassembler_options_n32): Likewise.
2592 (mips_disassembler_options_n64): Likewise.
2593 (gdb_print_insn_mips): Don't set `disassembler_options'.
2594 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2596 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2597 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2598 `gdbarch_disassembler_options_implicit' and
2599 `gdbarch_valid_disassembler_options'.
2600 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2601 `disasm_options_and_args_t' structure.
2602 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2604 (valid_disassembler_options): Switch from `disasm_options_t' to
2605 the `disasm_options_and_args_t' structure.
2606 * NEWS: Document `set disassembler-options' support for the MIPS
2608 * gdbarch.h: Regenerate.
2609 * gdbarch.c: Regenerate.
2611 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2613 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2615 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2617 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2618 parameter in call to amd64_target_description.
2619 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2620 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2621 (amd64fbsd_init_abi): Likewise.
2622 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2623 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2624 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2625 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2627 2018-06-29 Pedro Alves <palves@redhat.com>
2629 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2630 "segments" parameter.
2631 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2632 (_initialize_amd64_tdep): Update call to
2633 amd64_create_target_description.
2634 (amd64_target_description): Add "segments" parameter. Adjust
2635 the implementation to use it.
2636 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2637 call to amd64_create_target_description.
2638 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2639 * gdb/arch/amd64.h (amd64_create_target_description): Add
2640 "segments" register.
2641 * gdb/arch/amd64.c (amd64_create_target_description): Add
2642 "segments" parameter. Call create_feature_i386_64bit_segments
2643 only if SEGMENTS is true.
2644 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2645 call to amd64_create_target_description.
2647 2018-06-29 Pedro Alves <palves@redhat.com>
2649 * thread.c (thread_target_id_str): New, factored out from ...
2650 (print_thread_info_1): ... here. Use it to compute the max
2651 "Target Id" column width.
2653 2018-06-29 Pedro Alves <palves@redhat.com>
2655 * remote.c (remote_target::extra_thread_info): Delete
2656 'display_buf' and 'n' locals. from the cache, regardless of
2657 packet mechanims is in use. Use cache for qThreadExtra and qP
2660 2018-06-29 Pedro Alves <palves@redhat.com>
2662 * blockframe.c (find_pc_sect_containing_function): New function.
2663 * breakpoint.c (print_breakpoint_location): Don't call
2664 find_pc_sect_function.
2665 * linespec.c (create_sals_line_offset): Record the location's
2667 * linespec.c (convert_address_location_to_sals): Fill in sal's
2668 symbol with find_pc_sect_containing_function.
2669 * symtab.c (find_function_start_sal): Rename to ...
2670 (find_function_start_sal_1): ... this.
2671 (find_function_start_sal): Reimplement as wrapper around
2672 find_function_start_sal_1, and use
2673 find_pc_sect_containing_function to fill in the sal's symbol.
2674 (find_function_start_sal(symbol*, bool)): Adjust.
2675 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2677 (find_pc_sect_containing_function): Declare.
2679 2018-06-29 Pedro Alves <palves@redhat.com>
2681 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2682 true if the the location has no symbol.
2684 2018-06-28 Tom Tromey <tom@tromey.com>
2686 * NEWS: Mention --enable-codesign.
2687 * silent-rules.mk (ECHO_SIGN): New variable.
2688 * configure.ac: Add --enable-codesign.
2689 * configure: Rebuild.
2690 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2691 (gdb$(EXEEXT)): Optionally invoke codesign.
2693 2018-06-28 Pedro Alves <palves@redhat.com>
2695 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2697 (switch_to_thread_no_regs): Adjust comment.
2698 * infcmd.c (stop_pc): Delete.
2699 (post_create_inferior, info_program_command): Replace references
2700 to stop_pc with references to thread_info->suspend.stop_pc.
2701 * inferior.h (stop_pc): Delete declaration.
2702 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2703 (handle_inferior_event_1, handle_signal_stop)
2704 (process_event_stop_test, keep_going_stepped_thread)
2705 (handle_step_into_function, handle_step_into_function_backward)
2706 (print_stop_location): Replace references to stop_pc with
2707 references to thread_info->suspend.stop_pc.
2708 (struct infcall_suspend_state) <stop_pc>: Delete field.
2709 (save_infcall_suspend_state, restore_infcall_suspend_state):
2710 Remove references to inf_stat->stop_pc.
2711 * linux-fork.c (fork_load_infrun_state): Likewise.
2712 * record-btrace.c (record_btrace_set_replay): Likewise.
2713 * record-full.c (record_full_goto_entry): Likewise.
2714 * remote.c (print_one_stopped_thread): Likewise.
2715 * target.c (target_resume): Extend comment.
2716 * thread.c (set_executing_thread): New.
2717 (set_executing): Use it.
2718 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2719 Remove references to stop_pc.
2721 2018-06-28 Pedro Alves <palves@redhat.com>
2723 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2724 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2726 2018-06-28 Tom Tromey <tom@tromey.com>
2728 * coffread.c (coff_symfile_finish): Update.
2729 * xcoffread.c (xcoff_symfile_finish): Update.
2730 * elfread.c (elf_symfile_finish): Update.
2731 * symfile.h (dwarf2_free_objfile): Don't declare.
2732 * dwarf2read.c (_initialize_dwarf2_read): Use
2733 register_objfile_data_with_cleanup.
2734 (dwarf2_free_objfile): Now static. Change signature.
2736 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2738 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2739 option "-o" to add-symbol-file-load to add an offset to each
2740 section's load address.
2741 * symfile.c (set_objfile_default_section_offset): New function.
2743 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2745 * symfile.c (add_symbol_file_command): Make sure that sections
2746 with the same name are sorted in the same order.
2748 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2750 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2751 require the second argument. If omitted, load sections at the
2752 addresses specified in the file.
2754 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2756 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2757 (_initialize_symfile): Add option "-o" to symbol-file to add an
2758 offset to each section of the symbol file.
2760 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2762 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2764 2018-06-27 Tom Tromey <tom@tromey.com>
2766 * stack.c (_initialize_stack): Update "func" help text.
2768 2018-06-27 Tom Tromey <tom@tromey.com>
2770 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2772 (unwind_infopy_str, pyuw_create_unwind_info)
2773 (unwind_infopy_add_saved_register, pyuw_sniffer)
2774 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2776 (struct saved_reg): Add constructor.
2777 <value>: Now a gdbpy_ref<>.
2779 2018-06-27 Tom Tromey <tom@tromey.com>
2781 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2783 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2785 * gdb-gdb.py.in: Format using autopep8.
2787 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2789 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2790 (type_lookup_function): Recognize CORE_ADDR values.
2792 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2794 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2797 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2799 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2802 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2804 * gdb-gdb.py: Move to...
2805 * gdb-gdb.py.in: ... here.
2806 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2807 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2809 (distclean): Remove gdb-gdb.py when cleaning.
2810 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2811 * configure: Re-generate.
2813 2018-06-27 Pedro Alves <palves@redhat.com>
2815 * proc-service.c (get_ps_regcache): New.
2816 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2817 (ps_lsetfpregs): Use it.
2819 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2822 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2823 (dwarf_decode_lines_1): Adjust.
2825 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2827 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2829 <info_proc>: Likewise.
2831 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2833 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2834 to windows_fetch_one_register, and only handle the case of
2835 fetching one register. Move the code that reloads the context
2836 and iterates over all registers if R is negative to...
2837 (windows_nat_target::fetch_registers): ... here.
2838 (do_windows_store_inferior_registers): Rename to
2839 windows_store_one_register, and only handle the case of storing
2840 one register. Move the code that handles the case where r is
2842 (windows_nat_target::store_registers) ... here.
2844 2018-06-26 Tom Tromey <tom@tromey.com>
2847 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2848 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2850 (rust_internal_print_type): Add podata parameter.
2851 (rust_print_type): Update.
2853 2018-06-26 Tom Tromey <tom@tromey.com>
2855 * typeprint.h (struct print_offset_data) <update, finish,
2856 maybe_print_hole>: New methods.
2857 <indentation>: New constant.
2858 * typeprint.c (print_offset_data::indentation): Define.
2859 (print_offset_data::maybe_print_hole, print_offset_data::update)
2860 (print_offset_data::finish): Move from c-typeprint.c and rename.
2861 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2862 (print_spaces_filtered_with_print_options): Update.
2863 (c_print_type_union_field_offset, maybe_print_hole)
2864 (c_print_type_struct_field_offset): Move to typeprint.c and
2866 (c_type_print_base_struct_union): Update.
2868 2018-06-25 Pedro Alves <palves@redhat.com>
2870 * gdbthread.h (thread_info_ref, delete_thread)
2871 (delete_thread_silent, first_thread_of_inferior)
2872 (any_thread_of_inferior, switch_to_thread)
2873 (enable_thread_stack_temporaries)
2874 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2875 (get_last_thread_stack_temporary)
2876 (value_in_thread_stack_temporaries, can_access_registers_thread):
2877 Spell out "struct thread_info" instead of just "thread_info".
2878 * inferior.h (notice_new_inferior): Likewise.
2880 2018-06-25 Pedro Alves <palves@redhat.com>
2882 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2883 pass thread_info pointer to delete_thread.
2884 (windows_nat_target::detach): Pass inferior pointer to
2886 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2888 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2889 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2890 and pass a thread_info pointer to delete_thread.
2891 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2892 pass thread_info pointer to delete_thread.
2893 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2894 delete_thread_silent call.
2895 * procfs.c (procfs_target::detach): Pass inferior pointer to
2897 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2898 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2899 delete_thread_silent call.
2900 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2901 pass thread_info pointer to delete_thread.
2902 (windows_nat_target::detach): Pass inferior pointer to
2905 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2907 * regcache.c (readable_regcache::read_part): Fix asserts.
2908 (reg_buffer::raw_collect_part): New function.
2909 (regcache::write_part): Fix asserts.
2910 (reg_buffer::raw_supply_part): New function.
2911 (regcache::transfer_regset_register): New helper function.
2912 (regcache::transfer_regset): Call new functions.
2913 (regcache_supply_regset): Use gdb_byte*.
2914 (regcache::supply_regset): Likewise.
2915 (regcache_collect_regset): Likewise.
2916 (regcache::collect_regset): Likewise.
2917 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2918 (reg_buffer::raw_supply_part): Likewise.
2919 (regcache::transfer_regset_register): Likewise.
2920 (regcache::transfer_regset): Use gdb_byte*.
2922 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2924 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2926 2018-06-21 Pedro Alves <palves@redhat.com>
2928 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2929 instead of a ptid_t. All callers adjusted.
2930 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2932 (print_ada_task_info, display_current_task_id, task_command_1):
2934 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2936 (breakpoint_kind): Adjust.
2937 (remove_breakpoints_pid): Rename to ...
2938 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2939 pointer. All callers adjusted.
2940 (bpstat_clear_actions): Use inferior_thread.
2941 (get_bpstat_thread): New.
2942 (bpstat_do_actions): Use it.
2943 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2944 to take a thread_info pointer. All callers adjusted.
2945 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2946 (breakpoint_re_set_thread): Use inferior_thread.
2947 * breakpoint.h (struct inferior): Forward declare.
2948 (bpstat_stop_status): Update.
2949 (remove_breakpoints_pid): Delete.
2950 (remove_breakpoints_inf): New.
2951 * bsd-uthread.c (bsd_uthread_target::wait)
2952 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2953 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2954 (maint_btrace_packet_history_cmd)
2955 (maint_btrace_clear_packet_history_cmd): Adjust.
2956 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2958 * cli/cli-interp.c: Include "inferior.h".
2959 * common/refcounted-object.h (struct
2960 refcounted_object_ref_policy): New.
2961 * compile/compile-object-load.c: Include gdbthread.h.
2962 (store_regs): Use inferior_thread.
2963 * corelow.c (core_target::close): Use current_inferior.
2964 (core_target_open): Adjust to use first_thread_of_inferior and use
2965 the current inferior.
2966 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2967 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2968 <thread>: ... this new field. All references adjusted.
2969 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2970 Take a thread_info pointer instead of a ptid_t.
2971 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2972 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2973 thread_info pointer instead of a ptid_t.
2974 * elfread.c: Include "inferior.h".
2975 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2976 Use inferior_thread.
2977 * eval.c (evaluate_subexp): Likewise.
2978 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2980 * gdb_proc_service.h (struct thread_info): Forward declare.
2981 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2982 <thread>: ... this new field. All references adjusted.
2983 * gdbarch.h, gdbarch.c: Regenerate.
2984 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2985 'thread' parameter. All implementations and callers adjusted.
2986 * gdbthread.h (thread_info) <set_running>: New method.
2987 (delete_thread, delete_thread_silent): Take a thread_info pointer
2989 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2990 (first_thread_of_process): Delete, replaced by ...
2991 (first_thread_of_inferior): ... this new function. All callers
2993 (any_live_thread_of_process): Delete, replaced by ...
2994 (any_live_thread_of_inferior): ... this new function. All callers
2996 (switch_to_thread, switch_to_no_thread): Declare.
2997 (is_executing): Delete.
2998 (enable_thread_stack_temporaries): Update comment.
2999 <enable_thread_stack_temporaries>: Take a thread_info pointer
3000 instead of a ptid_t. Incref the thread.
3001 <~enable_thread_stack_temporaries>: Decref the thread.
3004 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3005 (get_last_thread_stack_temporary)
3006 (value_in_thread_stack_temporaries, can_access_registers_thread):
3007 Take a thread_info pointer instead of a ptid_t. All callers
3009 * infcall.c (get_call_return_value): Use inferior_thread.
3010 (run_inferior_call): Work with thread pointers instead of ptid_t.
3011 (call_function_by_hand_dummy): Work with thread pointers instead
3012 of ptid_t. Use thread_info_ref.
3013 * infcmd.c (proceed_thread_callback): Access thread's state
3015 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3016 access thread's state directly.
3017 (continue_command): Use inferior_thread.
3018 (info_program_command): Use find_thread_ptid and access thread
3020 (proceed_after_attach_callback): Use thread state directly.
3021 (notice_new_inferior): Take a thread_info pointer instead of a
3022 ptid_t. All callers adjusted.
3023 (exit_inferior): Take an inferior pointer instead of a pid. All
3025 (exit_inferior_silent): New.
3026 (detach_inferior): Delete.
3027 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3028 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3029 (detach_inferior_command, kill_inferior_command): Use
3030 find_inferior_id instead of valid_gdb_inferior_id and
3031 gdb_inferior_id_to_pid.
3032 (inferior_command): Use inferior and thread pointers.
3033 * inferior.h (struct thread_info): Forward declare.
3034 (notice_new_inferior): Take a thread_info pointer instead of a
3035 ptid_t. All callers adjusted.
3036 (detach_inferior): Delete declaration.
3037 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3038 instead of a pid. All callers adjusted.
3039 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3040 (valid_gdb_inferior_id): Delete.
3041 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3042 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3043 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3045 <inf>: ... this new field.
3046 <step_ptid>: Delete, replaced by ...
3047 <step_thread>: ... this new field.
3048 (get_displaced_stepping_state): Take an inferior pointer instead
3049 of a pid. All callers adjusted.
3050 (displaced_step_in_progress_any_inferior): Adjust.
3051 (displaced_step_in_progress_thread): Take a thread pointer instead
3052 of a ptid_t. All callers adjusted.
3053 (displaced_step_in_progress, add_displaced_stepping_state): Take
3054 an inferior pointer instead of a pid. All callers adjusted.
3055 (get_displaced_step_closure_by_addr): Adjust.
3056 (remove_displaced_stepping_state): Take an inferior pointer
3057 instead of a pid. All callers adjusted.
3058 (displaced_step_prepare_throw, displaced_step_prepare)
3059 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3060 All callers adjusted.
3061 (start_step_over): Adjust.
3062 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3063 displaced step queue.
3064 (do_target_resume): Adjust.
3065 (fetch_inferior_event): Use inferior_thread.
3066 (context_switch, get_inferior_stop_soon): Take an
3067 execution_control_state pointer instead of a ptid_t. All callers
3069 (switch_to_thread_cleanup): Delete.
3070 (stop_all_threads): Use scoped_restore_current_thread.
3071 * inline-frame.c: Include "gdbthread.h".
3072 (inline_state) <inline_state>: Take a thread pointer instead of a
3073 ptid_t. All callers adjusted.
3074 <ptid>: Delete, replaced by ...
3075 <thread>: ... this new field.
3076 (find_inline_frame_state): Take a thread pointer instead of a
3077 ptid_t. All callers adjusted.
3078 (skip_inline_frames, step_into_inline_frame)
3079 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3080 pointer instead of a ptid_t. All callers adjusted.
3081 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3082 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3083 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3085 * linux-nat.c (get_detach_signal): Likewise.
3086 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3087 (thread_db_notice_clone): Adjust.
3088 (thread_db_find_new_threads_silently)
3089 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3090 a thread pointer instead of a ptid_t. All callers adjusted.
3091 * mi/mi-cmd-var.c: Include "inferior.h".
3092 (mi_cmd_var_update_iter): Update to use thread pointers.
3093 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3095 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3097 (mi_output_running): ... this new function.
3098 (mi_on_resume_1): Adjust to use it.
3099 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3100 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3102 (interrupt_thread_callback): : Adjust to use thread and inferior
3104 * proc-service.c: Include "gdbthread.h".
3105 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3106 * progspace-and-thread.c: Include "inferior.h".
3107 * progspace.c: Include "inferior.h".
3108 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3109 hold a reference to an inferior_object.
3110 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3112 * python/py-inferior.c (struct inferior_object): Give the type a
3113 tag name instead of a typedef.
3114 (python_on_normal_stop): No need to check if the current thread is
3116 (inferior_to_inferior_object): Change return type to
3117 inferior_object. All callers adjusted.
3118 (find_thread_object): Delete, bits factored out to ...
3119 (thread_to_thread_object): ... this new function.
3120 * python/py-infthread.c (create_thread_object): Use
3121 inferior_to_inferior_object.
3122 (thpy_is_stopped): Use thread pointer directly.
3123 (gdbpy_selected_thread): Use inferior_thread.
3124 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3125 field, replaced with ...
3126 <thread>: ... this new field. All users adjusted.
3127 (btpy_insn_or_gap_new): Drop const.
3128 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3130 * python/py-record.c: Include "gdbthread.h".
3131 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3132 a ptid_t. All callers adjusted.
3133 (gdbpy_current_recording): Use inferior_thread.
3134 * python/py-record.h (recpy_record_object) <ptid>: Delete
3135 field, replaced with ...
3136 <thread>: ... this new field. All users adjusted.
3137 (recpy_element_object) <ptid>: Delete
3138 field, replaced with ...
3139 <thread>: ... this new field. All users adjusted.
3140 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3141 a ptid_t. All callers adjusted.
3142 * python/py-threadevent.c: Include "gdbthread.h".
3143 (get_event_thread): Use thread_to_thread_object.
3144 * python/python-internal.h (struct inferior_object): Forward
3146 (find_thread_object, find_inferior_object): Delete declarations.
3147 (thread_to_thread_object, inferior_to_inferior_object): New
3149 * record-btrace.c: Include "inferior.h".
3150 (require_btrace_thread): Use inferior_thread.
3151 (record_btrace_frame_sniffer)
3152 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3153 (get_thread_current_frame): Use scoped_restore_current_thread and
3155 (get_thread_current_frame): Use thread pointer directly.
3156 (record_btrace_replay_at_breakpoint): Use thread's inferior
3158 * record-full.c: Include "inferior.h".
3159 * regcache.c: Include "gdbthread.h".
3160 (get_thread_arch_regcache): Use the inferior's address space
3162 (get_thread_regcache, registers_changed_thread): New.
3163 * regcache.h (get_thread_regcache(thread_info *thread)): New
3165 (registers_changed_thread): New.
3166 (remote_target) <remote_detach_1>: Swap order of parameters.
3167 (remote_add_thread): <remote_add_thread>: Return the new thread.
3168 (get_remote_thread_info(ptid_t)): New overload.
3169 (remote_target::remote_notice_new_inferior): Use thread pointers
3171 (remote_target::process_initial_stop_replies): Use
3172 thread_info::set_running.
3173 (remote_target::remote_detach_1, remote_target::detach)
3174 (extended_remote_target::detach): Adjust.
3175 * stack.c (frame_show_address): Use inferior_thread.
3176 * target-debug.h (target_debug_print_thread_info_pp): New.
3177 * target-delegates.c: Regenerate.
3178 * target.c (default_thread_address_space): Delete.
3179 (memory_xfer_partial_1): Use current_inferior.
3180 (target_detach): Use current_inferior.
3181 (target_thread_address_space): Delete.
3182 (generic_mourn_inferior): Use current_inferior.
3183 * target.h (struct target_ops) <thread_address_space>: Delete.
3184 (target_thread_address_space): Delete.
3185 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3187 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3188 thread pointer instead of a ptid_t. Adjust all callers.
3189 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3190 (first_thread_of_process): Delete, replaced by ...
3191 (first_thread_of_inferior): ... this new function. All callers
3193 (any_thread_of_process): Rename to ...
3194 (any_thread_of_inferior): ... this, and take an inferior pointer.
3195 (any_live_thread_of_process): Rename to ...
3196 (any_live_thread_of_inferior): ... this, and take an inferior
3198 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3199 (value_in_thread_stack_temporaries)
3200 (get_last_thread_stack_temporary): Take a thread pointer instead
3201 of a ptid_t. Adjust all callers.
3202 (thread_info::set_running): New.
3203 (validate_registers_access): Use inferior_thread.
3204 (can_access_registers_ptid): Rename to ...
3205 (can_access_registers_thread): ... this, and take a thread
3207 (print_thread_info_1): Adjust to compare thread pointers instead
3209 (switch_to_no_thread, switch_to_thread): Make extern.
3210 (scoped_restore_current_thread::~scoped_restore_current_thread):
3211 Use m_thread pointer directly.
3212 (scoped_restore_current_thread::scoped_restore_current_thread):
3213 Use inferior_thread.
3214 (thread_command): Use thread pointer directly.
3215 (thread_num_make_value_helper): Use inferior_thread.
3216 * top.c (execute_command): Use inferior_thread.
3217 * tui/tui-interp.c: Include "inferior.h".
3218 * varobj.c (varobj_create): Use inferior_thread.
3219 (value_of_root_1): Use find_thread_global_id instead of
3220 global_thread_id_to_ptid.
3222 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3224 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3226 (regcache::write_part): Likewise.
3227 (readable_regcache::cooked_read_part): Update comment.
3228 (readable_regcache::cooked_write_part): Likewise.
3229 * regcache.h: (readable_regcache::read_part): Likewise.
3230 (regcache::write_part): Likewise.
3232 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3233 Dirk Schubert <dirk.schubert@arm.com>
3235 * aarch64-linux-nat.c (post_attach): New.
3236 (aarch64_linux_nat_target::post_attach): Override post_attach to
3237 record the number of hardware debug registers.
3239 2018-06-20 Tom Tromey <tom@tromey.com>
3241 * python/py-param.c (add_setshow_generic): Make parameters const.
3242 (parmpy_init): Update.
3244 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3246 * regcache.h (regcache_cooked_read_ftype): Rename to...
3247 (register_read_ftype): ...this, change type to function_view.
3248 (class reg_buffer) <save>: Remove src parameter.
3249 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3250 parameter non-const in first overload. Remove src parameter in
3252 * regcache.c (do_cooked_read): Remove.
3253 (readonly_detached_regcache::readonly_detached_regcache): Make
3254 parameter non-const, adjust call to other constructor.
3255 (reg_buffer::save): Remove src parameter.
3256 * frame.c (do_frame_register_read): Remove.
3257 (frame_save_as_regcache): Use lambda function.
3258 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3259 parameter to ppu2spu_data *.
3260 (ppu2spu_sniffer): Use lambda function.
3262 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3264 * record-full.c (record_full_target::insert_breakpoint): Remove
3265 "struct" keyword, add const.
3267 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3269 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3270 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3271 * configure.ac: Remove AC_PREREQ, add missing quoting.
3272 * gnulib/configure.ac: Modernize usage of
3273 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3274 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3275 (AUTOMAKE_VERSION): Bump to 1.15.1.
3276 * configure: Re-generate.
3277 * config.in: Re-generate.
3278 * aclocal.m4: Re-generate.
3279 * gnulib/aclocal.m4: Re-generate.
3280 * gnulib/config.in: Re-generate.
3281 * gnulib/configure: Re-generate.
3282 * gnulib/import/Makefile.in: Re-generate.
3284 2018-06-19 Pedro Alves <palves@redhat.com>
3286 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3287 (lookup_minimal_symbol_by_pc_section): ... here with
3288 gdb_assert_not_reached added.
3290 2018-06-19 Pedro Alves <palves@redhat.com>
3292 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3293 parameter with a block parameter. Compare location's block symbol
3294 with the frame's block instead of addresses.
3295 (skip_inline_frames): Pass the current block instead of the
3296 frame's address. Break out as soon as we determine the frame
3297 should not be skipped.
3299 2018-06-18 Tom Tromey <tom@tromey.com>
3301 * solib-aix.c (solib_aix_get_section_offsets): Return
3303 (solib_aix_solib_create_inferior_hook): Update.
3305 2018-06-18 Tom Tromey <tom@tromey.com>
3307 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3309 2018-06-18 Tom Tromey <tom@tromey.com>
3311 * solib-frv.c (frv_relocate_main_executable): Use
3313 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3316 2018-06-18 Tom Tromey <tom@tromey.com>
3318 * objfiles.h (inhibit_section_map_updates): Update.
3319 (resume_section_map_updates, resume_section_map_updates_cleanup):
3321 * solib-svr4.c (svr4_handle_solib_event): Update.
3322 * objfiles.c (inhibit_section_map_updates): Return
3323 scoped_restore_tmpl<int>.
3324 (resume_section_map_updates, resume_section_map_updates_cleanup):
3327 2018-06-18 Tom Tromey <tom@tromey.com>
3329 * valprint.h (read_string): Update.
3330 * valprint.c (read_string): Change type of "buffer".
3331 (val_print_string): Update.
3332 * python/py-value.c (valpy_string): Update.
3333 * language.h (struct language_defn) <la_get_string>: Change
3335 (default_get_string, c_get_string): Update.
3336 * language.c (default_get_string): Change type of "buffer".
3337 * guile/scm-value.c (gdbscm_value_to_string): Update.
3338 * c-lang.c (c_get_string): Change type of "buffer".
3340 2018-06-18 Tom Tromey <tom@tromey.com>
3342 * ser-mingw.c (struct pipe_state_destroyer): New.
3343 (pipe_state_up): New typedef.
3344 (cleanup_pipe_state): Remove.
3345 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3347 2018-06-18 Tom Tromey <tom@tromey.com>
3349 * rust-lang.h (rust_yyerror): Don't declare.
3350 * rust-lang.c (rust_language_defn): Update.
3351 * rust-exp.y (yyerror): Now static.
3352 * parse.c (parse_exp_in_context_1): Update.
3353 * p-lang.h (p_yyerror): Don't declare.
3354 * p-lang.c (p_language_defn): Update.
3355 * p-exp.y (yyerror): Now static.
3356 * opencl-lang.c (opencl_language_defn): Update.
3357 * objc-lang.c (objc_language_defn): Update.
3358 * m2-lang.h (m2_yyerror): Don't declare.
3359 * m2-lang.c (m2_language_defn): Update.
3360 * m2-exp.y (yyerror): Now static.
3361 * language.h (struct language_defn) <la_error>: Remove.
3362 * language.c (unk_lang_error): Remove.
3363 (unknown_language_defn, auto_language_defn): Remove.
3364 * go-lang.h (go_yyerror): Don't declare.
3365 * go-lang.c (go_language_defn): Update.
3366 * go-exp.y (yyerror): Now static.
3367 * f-lang.h (f_yyerror): Don't declare.
3368 * f-lang.c (f_language_defn): Update.
3369 * f-exp.y (yyerror): Now static.
3370 * d-lang.h (d_yyerror): Don't declare.
3371 * d-lang.c (d_language_defn): Update.
3372 * d-exp.y (yyerror): Now static.
3373 * c-lang.h (c_yyerror): Don't declare.
3374 * c-lang.c (c_language_defn, cplus_language_defn)
3375 (asm_language_defn, minimal_language_defn): Update.
3376 * c-exp.y (yyerror): Now static.
3377 * ada-lang.h (ada_yyerror): Don't declare.
3378 * ada-lang.c (ada_language_defn): Update.
3379 * ada-exp.y (yyerror): Now static.
3381 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3383 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3384 (store_sveregs_to_thread): Likewise.
3385 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3386 (aarch64_linux_store_inferior_registers): Likewise.
3387 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3389 (aarch64_sve_regs_copy_to_regcache): Likewise.
3390 (aarch64_sve_regs_copy_from_regcache): Likewise.
3391 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3393 (aarch64_sve_regs_copy_to_regcache): Likewise.
3394 (aarch64_sve_regs_copy_from_regcache): Likewise.
3395 (sve_context): Structure from Linux headers.
3396 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3397 (SVE_SIG_ZREG_SIZE): Likewise.
3398 (SVE_SIG_PREG_SIZE): Likewise.
3399 (SVE_SIG_FFR_SIZE): Likewise.
3400 (SVE_SIG_REGS_OFFSET): Likewise.
3401 (SVE_SIG_ZREGS_OFFSET): Likewise.
3402 (SVE_SIG_ZREG_OFFSET): Likewise.
3403 (SVE_SIG_ZREGS_SIZE): Likewise.
3404 (SVE_SIG_PREGS_OFFSET): Likewise.
3405 (SVE_SIG_PREG_OFFSET): Likewise.
3406 (SVE_SIG_PREGS_SIZE): Likewise.
3407 (SVE_SIG_FFR_OFFSET): Likewise.
3408 (SVE_SIG_REGS_SIZE): Likewise.
3409 (SVE_SIG_CONTEXT_SIZE): Likewise.
3410 (SVE_PT_REGS_MASK): Likewise.
3411 (SVE_PT_REGS_FPSIMD): Likewise.
3412 (SVE_PT_REGS_SVE): Likewise.
3413 (SVE_PT_VL_INHERIT): Likewise.
3414 (SVE_PT_VL_ONEXEC): Likewise.
3415 (SVE_PT_REGS_OFFSET): Likewise.
3416 (SVE_PT_FPSIMD_OFFSET): Likewise.
3417 (SVE_PT_FPSIMD_SIZE): Likewise.
3418 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3419 (SVE_PT_SVE_PREG_SIZE): Likewise.
3420 (SVE_PT_SVE_FFR_SIZE): Likewise.
3421 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3422 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3423 (__SVE_SIG_TO_PT): Likewise.
3424 (SVE_PT_SVE_OFFSET): Likewise.
3425 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3426 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3427 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3428 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3429 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3430 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3431 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3432 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3433 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3434 (SVE_PT_SVE_SIZE): Likewise.
3435 (SVE_PT_SIZE): Likewise.
3436 (HAS_SVE_STATE): New define.
3438 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3440 * nat/aarch64-sve-linux-sigcontext.h: New file.
3441 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3443 (SVE_VQ_MIN): Likewise.
3444 (SVE_VQ_MAX): Likewise.
3445 (SVE_VL_MIN): Likewise.
3446 (SVE_VL_MAX): Likewise.
3447 (SVE_NUM_ZREGS): Likewise.
3448 (SVE_NUM_PREGS): Likewise.
3449 (sve_vl_valid): Likewise.
3450 (struct user_sve_header): Likewise.
3452 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3453 Richard Bunt <Richard.Bunt@arm.com>
3455 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3456 was requested by GDB.
3458 2018-06-15 Tom de Vries <tdevries@suse.de>
3460 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3462 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3464 * gnulib/update-gnulib.sh: Print expected versions of
3467 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3469 * arch-utils.c (default_type_align): Use type_length_units.
3470 * gdbtypes.c (type_align): Use type_length_units.
3472 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3474 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3475 of 'define' command.
3477 2018-06-14 Tom de Vries <tdevries@suse.de>
3480 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3481 get_no_prettyformat_print_options.
3483 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3485 * sparc-nat.h: Include target.h.
3486 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3487 <fetch_registers>: Remove this argument in function call.
3488 <store_registers>: Remove this argument in function call, remove
3490 <low_forget_process>: Call sparc64_forget_process instead of
3491 sparc_forget_process.
3493 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3495 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3496 (procfs_target::make_corefile_notes): Adjust to new
3497 target_read_alloc return type.
3499 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3500 Stephen Roberts <stephen.roberts@arm.com>
3503 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3504 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3505 Move should_notify_stop local into more inner scope.
3507 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3508 Stephen Roberts <stephen.roberts@arm.com>
3511 * infrun.c (resume_1): Add call to mark_async_event_handler.
3513 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3515 * infrun.c (do_target_wait): Change old version of $pc printed.
3517 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3519 * dwarf2read.c (read_index_from_section): Rename to...
3520 (read_gdb_index_from_section): ... this, update all callers.
3521 (dwarf2_read_index): Rename to...
3522 (dwarf2_read_gdb_index): ... this, update all callers.
3524 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3526 * gdb/hppa-linux-nat.c
3527 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3528 hppa_linux_nat_target::fetch_registers.
3530 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3532 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3533 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3534 (AARCH64_DWARF_SVE_FFR): Likewise.
3535 (AARCH64_DWARF_SVE_P0): Likewise.
3536 (AARCH64_DWARF_SVE_Z0): Likewise.
3538 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3540 * common/common-regcache.h (raw_compare): New function.
3541 * regcache.c (regcache::raw_compare): Likewise.
3542 * regcache.h (regcache::raw_compare): New declaration.
3544 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3546 * common/common-regcache.h (reg_buffer_common): New structure.
3547 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3548 (reg_buffer::raw_supply): Likewise.
3549 (reg_buffer::raw_supply_integer): Likewise.
3550 (reg_buffer::raw_supply_zeroed): Likewise.
3551 (reg_buffer::raw_collect): Likewise.
3552 (reg_buffer::raw_collect_integer): Likewise.
3553 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3554 (reg_buffer::raw_supply): Likewise.
3555 (reg_buffer::raw_supply_integer): Likewise.
3556 (reg_buffer::raw_supply_zeroed): Likewise.
3557 (reg_buffer::raw_collect): Likewise.
3558 (reg_buffer::raw_collect_integer): Likewise.
3560 2018-06-10 Tom Tromey <tom@tromey.com>
3562 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3563 (class remote_state) <stop_reply_queue>: Now std::vector.
3564 (remote_state::~remote_state)
3565 (remote_target::stop_reply_queue_length): Update.
3566 (struct queue_iter_param, remove_child_of_pending_fork)
3567 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3568 (check_pending_event_prevents_wildcard_vcont_callback)
3569 (remove_stop_reply_for_inferior)
3570 (remove_stop_reply_of_remote_state)
3571 (remote_notif_remove_once_on_match)
3572 (stop_reply_match_ptid_and_ws)
3573 (remote_kill_child_of_pending_fork): Remove.
3574 (remote_target::remove_new_fork_children)
3575 (remote_target::check_pending_events_prevent_wildcard_vcont)
3576 (remote_target::discard_pending_stop_replies)
3577 (remote_target::discard_pending_stop_replies_in_queue)
3578 (remote_target::remote_notif_remove_queued_reply)
3579 (remote_target::queued_stop_reply)
3580 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3581 (remote_target::wait, remote_target::kill_new_fork_children)
3582 (remote_target::async): Update.
3584 2018-06-10 Tom Tromey <tom@tromey.com>
3586 * record-full.c (record_full_arch_list_cleanups): Remove.
3587 (record_full_message): Use try/catch.
3588 (record_full_wait_cleanups): Remove.
3589 (record_full_wait_1): Use try/catch.
3590 (record_full_restore): Likewise.
3592 2018-06-10 Tom Tromey <tom@tromey.com>
3594 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3595 declare VEC. Add constructor.
3596 <in_target_beneath>: Now bool.
3597 (record_full_breakpoints): Now a std::vector, static.
3598 (record_full_sync_record_breakpoints)
3599 (record_full_init_record_breakpoints)
3600 (record_full_target::insert_breakpoint)
3601 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3603 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3605 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3606 * serial.c (serial_interface_lookup): Remove struct keyword.
3608 2018-06-10 Tom Tromey <tom@tromey.com>
3610 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3612 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3614 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3616 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3617 "beneath" as a method.
3618 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3619 Use "beneath" as a method.
3621 2018-06-10 Tom Tromey <tom@tromey.com>
3623 * tracefile.c (struct trace_file_writer_deleter): New.
3624 <operator()>: Rename from trace_file_writer_xfree.
3625 (trace_file_writer_up): New typedef.
3626 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3628 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3630 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3631 <m_registers, m_register_status>: Change type to
3633 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3636 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3638 * common/common-regcache.h (enum register_status): Add
3639 underlying type "signed char".
3640 * regcache.h (reg_buffer) <m_register_status>: Change type to
3642 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3643 register_status instead of signed char.
3644 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3645 (reg_buffer::get_register_status): Remove cast.
3646 (readable_regcache::raw_read): Remove cast.
3647 (readable_regcache::cooked_read): Remove cast.
3649 2018-06-09 Tom Tromey <tom@tromey.com>
3651 * source.c (reverse_search_command, forward_search_command): Use
3654 2018-06-09 Tom Tromey <tom@tromey.com>
3656 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3657 (serial_ops_list): Now static, std::vector.
3658 (serial_interface_lookup, serial_add_interface): Update.
3660 2018-06-09 Tom Tromey <tom@tromey.com>
3662 * dwarf2read.c (process_cu_includes): Update.
3663 (process_full_comp_unit): Update.
3664 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3667 2018-06-08 Paul Koning <paul_koning@dell.com>
3671 * python/python.c (do_start_initialization):
3672 Avoid call to internal Python API.
3673 (init__gdb_module): New function.
3675 2018-06-08 Gary Benson <gbenson@redhat.com>
3677 * linux-thread-db.c (valprint.h): New include.
3678 (struct check_thread_db_info): New structure.
3679 (check_thread_db_on_load, tdb_testinfo): New static globals.
3680 (check_thread_db, check_thread_db_callback): New functions.
3681 (try_thread_db_load_1): Run integrity checks if requested.
3682 (maintenance_check_libthread_db): New function.
3683 (_initialize_thread_db): Register "maint check libthread-db"
3684 and "maint set/show check-libthread-db".
3685 * NEWS: Mention the above new commands.
3687 2018-06-08 Tom Tromey <tom@tromey.com>
3689 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3692 2018-06-08 Tom Tromey <tom@tromey.com>
3694 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3696 2018-06-08 Tom Tromey <tom@tromey.com>
3698 * common/btrace-common.h (struct btrace_data): Add constructor,
3699 destructor, move assignment operator.
3700 <empty, clear, fini>: New methods.
3701 <format>: Initialize.
3702 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3703 (btrace_data_empty): Don't declare.
3704 * common/btrace-common.c (btrace_data_init): Remove.
3705 (btrace_data::fini): Rename from btrace_data_fini.
3706 (btrace_data::empty): Rename from btrace_data_empty.
3707 (btrace_data::clear): Rename from btrace_data_clear. Return
3709 * btrace.h (make_cleanup_btrace_data): Don't declare.
3710 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3711 (parse_xml_btrace): Update.
3712 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3713 (maint_btrace_clear_packet_history_cmd): Update.
3715 2018-06-07 Pedro Alves <palves@redhat.com>
3717 * target.h (target_ops) <beneath>: Now a method. All references
3719 (class target_stack): New.
3720 * target.c (g_target_stack): New.
3721 (g_current_top_target): Delete.
3722 (current_top_target): Get the top target out of g_target_stack.
3723 (target_stack::push, target_stack::unpush): New.
3724 (push_target, unpush_target): Reimplement.
3725 (target_is_pushed): Reimplement in terms of g_target_stack.
3726 (target_ops::beneath, target_stack::find_beneath): New.
3728 2018-06-07 Pedro Alves <palves@redhat.com>
3730 * target.h (find_target_beneath): Delete declaration.
3731 * target.c (find_target_beneath): Delete definition.
3732 * aix-thread.c: All callers of find_target_beneath adjusted to
3733 call target_ops::beneath instead.
3734 * bsd-uthread.c: Likewise.
3735 * linux-thread-db.c: Likewise.
3736 * ravenscar-thread.c: Likewise.
3737 * sol-thread.c: Likewise.
3738 * spu-multiarch.c: Likewise.
3740 2018-06-07 Pedro Alves <palves@redhat.com>
3742 * target.h (target_ops) <beneath>: Now a method. All references
3744 (target_ops) <m_beneath>: New.
3745 * target.c (target_ops::beneath): New.
3746 * corelow.c: Adjust all references to target_ops::beneath.
3747 * linux-thread-db.c: Likewise.
3748 * make-target-delegates: Likewise.
3749 * record-btrace.c: Likewise.
3750 * record-full.c: Likewise.
3751 * remote.c: Likewise.
3752 * target.c: Likewise.
3753 * target-delegates.c: Regenerate.
3755 2018-06-07 Pedro Alves <palves@redhat.com>
3757 * target.h (target_stack): Delete.
3758 (current_top_target): Declare function.
3759 * target.c (target_stack): Delete.
3760 (g_current_top_target): New.
3761 (current_top_target): New function.
3762 * auxv.c: Use current_top_target instead of target_stack
3764 * avr-tdep.c: Likewise.
3765 * breakpoint.c: Likewise.
3766 * corefile.c: Likewise.
3767 * elfread.c: Likewise.
3769 * exceptions.c: Likewise.
3770 * frame.c: Likewise.
3771 * gdbarch-selftests.c: Likewise.
3772 * gnu-v3-abi.c: Likewise.
3773 * ia64-tdep.c: Likewise.
3774 * ia64-vms-tdep.c: Likewise.
3775 * infcall.c: Likewise.
3776 * infcmd.c: Likewise.
3777 * infrun.c: Likewise.
3778 * linespec.c: Likewise.
3779 * linux-tdep.c: Likewise.
3780 * minsyms.c: Likewise.
3781 * ppc-linux-nat.c: Likewise.
3782 * ppc-linux-tdep.c: Likewise.
3783 * procfs.c: Likewise.
3784 * regcache.c: Likewise.
3785 * remote.c: Likewise.
3786 * rs6000-tdep.c: Likewise.
3787 * s390-linux-nat.c: Likewise.
3788 * s390-tdep.c: Likewise.
3789 * solib-aix.c: Likewise.
3790 * solib-darwin.c: Likewise.
3791 * solib-dsbt.c: Likewise.
3792 * solib-spu.c: Likewise.
3793 * solib-svr4.c: Likewise.
3794 * solib-target.c: Likewise.
3795 * sparc-tdep.c: Likewise.
3796 * sparc64-tdep.c: Likewise.
3797 * spu-tdep.c: Likewise.
3798 * symfile.c: Likewise.
3799 * symtab.c: Likewise.
3800 * target-descriptions.c: Likewise.
3801 * target-memory.c: Likewise.
3802 * target.c: Likewise.
3803 * target.h: Likewise.
3804 * tracefile-tfile.c: Likewise.
3805 * tracepoint.c: Likewise.
3806 * valops.c: Likewise.
3807 * valprint.c: Likewise.
3808 * value.c: Likewise.
3809 * windows-tdep.c: Likewise.
3810 * mi/mi-main.c: Likewise.
3812 2018-06-07 Tom Tromey <tom@tromey.com>
3814 * valprint.h (build_address_symbolic): Declare.
3815 * printcmd.c (print_address_symbolic): Update.
3816 (build_address_symbolic): Change "name" and "filename" to
3818 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3820 * defs.h (build_address_symbolic): Remove declaration.
3822 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3824 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3825 (aarch64_vnv_type): Add function.
3826 (aarch64_pseudo_register_name): Add V regs for SVE.
3827 (aarch64_pseudo_register_type): Likewise.
3828 (aarch64_pseudo_register_reggroup_p): Likewise.
3829 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3830 (aarch64_pseudo_read_value): Add V regs for SVE.
3831 (aarch64_pseudo_write_2): Use V0 offset for SVE
3832 (aarch64_pseudo_write): Add V regs for SVE.
3833 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3835 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3837 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3838 (sve_vl_from_vq): Likewise.
3840 2018-06-05 Tom Tromey <tom@tromey.com>
3842 * cli/cli-cmds.c (show_version): Update.
3843 * top.c (print_gdb_version): Add "interactive" parameter.
3845 * main.c (captured_main_1): Update.
3846 * top.h (print_gdb_version): Add "interactive" parameter and a
3849 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3851 * common/enum-flags.h: Add trailing semicolon to example in
3854 2018-06-05 Tom Tromey <tom@tromey.com>
3857 * NEWS: Add entry about pager.
3858 * utils.c (pagination_disabled_for_command): New global.
3859 (prompt_for_continue): Allow "c" response to prompt.
3860 (reinitialize_more_filter): Clear
3861 pagination_disabled_for_command.
3862 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3864 2018-06-04 Tom Tromey <tom@tromey.com>
3866 * ada-lang.h (ada_lookup_symbol_list): Update.
3867 * ada-lang.c (resolve_subexp): Update.
3868 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3870 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3871 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3872 results parameter to std::vector.
3873 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3875 * ada-exp.y (block_lookup): Update.
3876 (select_possible_type_sym): Change type of syms. Remove nsyms
3878 (write_var_or_type, write_name_assoc): Update.
3880 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3882 * windows-nat.c (windows_nat_target::xfer_partial): Return
3883 TARGET_XFER_E_IO if we need to delegate to the target beneath
3884 but BENEATH is NULL.
3886 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3888 * Makefile.in (config.status): Add configure.nat as a
3891 2018-06-04 Tom Tromey <tom@tromey.com>
3893 * cp-name-parser.y (cpname_state): Add method declarations.
3894 (HANDLE_QUAL): Update.
3895 (cpname_state::d_grab, cpname_state::fill_comp)
3896 (cpname_state::make_operator, cpname_state::make_dtor)
3897 (cpname_state::make_builtin_type, cpname_state::make_name)
3898 (cpname_state::d_qualify, cpname_state::d_int_type)
3899 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3900 (%union): Move earlier.
3902 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3904 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3906 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3908 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3909 (aarch64_pseudo_write_1): Likewise.
3910 (aarch64_pseudo_read_value): Use helper.
3911 (aarch64_pseudo_write): Likewise.
3913 2018-06-04 Pedro Alves <palves@redhat.com>
3915 * darwin-nat.c (darwin_ops): Delete.
3916 (darwin_attach_pid): Use get_native_target.
3918 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3920 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3921 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3923 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3925 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3926 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3927 (aarch64_gdbarch_init): Check for SVE.
3928 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3930 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3932 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3933 * aarch64-tdep.h (aarch64_read_description): Likewise.
3934 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3935 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3936 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3937 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3938 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3940 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3942 * value.c (value_fetch_lazy_bitfield): New.
3943 (value_fetch_lazy_memory): New.
3944 (value_fetch_lazy_register): New.
3945 (value_fetch_lazy): Factor out to smaller functions.
3947 2018-06-01 Tom Tromey <tom@tromey.com>
3949 * cp-name-parser.y (backslashable, represented): Now const.
3951 2018-06-01 Tom Tromey <tom@tromey.com>
3953 * cp-name-parser.y: Include parser-defs.h.
3954 (parser_fprintf): Remove declaration.
3956 2018-06-01 Tom Tromey <tom@tromey.com>
3958 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3960 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3961 (global_result): Remove globals.
3962 (struct cpname_state): New.
3963 (yyparse): Don't declare.
3964 (yylex, yyerror): Move declarations after %union.
3965 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3966 (make_name): Add state parameter.
3968 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3970 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3972 (yylex): Add lvalp, state parameters.
3973 (yyerror): Add state parameter.
3974 (cp_demangled_name_to_comp): Update.
3976 2018-06-01 Tom Tromey <tom@tromey.com>
3978 * cp-name-parser.y (parser_fprintf): Declare.
3979 (GDB_YY_REMAP_PREFIX): Define.
3980 Include yy-remap.h. Don't redefine yy* identifiers.
3982 2018-06-01 Tom Tromey <tom@tromey.com>
3984 * python/py-type.c (typy_legacy_template_argument): Update.
3985 * cp-support.h (cp_demangled_name_to_comp): Update.
3986 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3987 parameter to be a "std::string *".
3990 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3992 * ada-lex.l: Include "diagnostics.h" instead of
3993 "common/diagnostics.h".
3994 * unittests/environ-selftests.c: Likewise.
3995 * common/diagnostics.h: Moved to ../include.
3997 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3999 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4000 to language_mode_manual while calling breakpoint_re_set_one.
4002 2018-06-01 Tom Tromey <tom@tromey.com>
4004 * valops.c (value_cast_structs, destructor_name_p): Update.
4005 * symtab.c (gdb_mangle_name): Update.
4006 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4008 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4009 (pascal_object_print_value_fields, pascal_object_print_value):
4011 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4012 * linespec.c (find_methods): Update.
4013 * gdbtypes.h (type_name_no_tag): Remove.
4014 (type_name_or_error): Rename from type_name_no_tag_or_error.
4015 * gdbtypes.c (type_name_no_tag): Remove.
4016 (type_name_or_error): Rename from type_name_no_tag_or_error.
4017 (lookup_struct_elt_type, check_typedef): Update.
4018 * expprint.c (print_subexp_standard): Update.
4019 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4020 * d-namespace.c (d_lookup_nested_symbol): Update.
4021 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4022 (cp_print_class_member): Update.
4023 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4024 * completer.c (add_struct_fields): Update.
4025 * c-typeprint.c (cp_type_print_derivation_info)
4026 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4028 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4029 (ada_prefer_type, ada_is_exception_sym): Update.
4031 2018-06-01 Tom Tromey <tom@tromey.com>
4033 * valops.c (enum_constant_from_type, value_namespace_elt)
4034 (value_maybe_namespace_elt): Update.
4035 * valarith.c (find_size_for_pointer_math): Update.
4036 * target-descriptions.c (make_gdb_type): Update.
4037 * symmisc.c (print_symbol): Update.
4038 * stabsread.c (define_symbol, read_type)
4039 (complain_about_struct_wipeout, add_undefined_type)
4040 (cleanup_undefined_types_1): Update.
4041 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4042 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4043 (rust_internal_print_type, rust_composite_type)
4044 (rust_evaluate_funcall, rust_evaluate_subexp)
4045 (rust_inclusive_range_type_p): Update.
4046 * python/py-type.c (typy_get_tag): Update.
4047 * p-typeprint.c (pascal_type_print_base): Update.
4048 * mdebugread.c (parse_symbol, parse_type): Update.
4049 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4051 * guile/scm-type.c (gdbscm_type_tag): Update.
4052 * go-lang.c (sixg_string_p): Update.
4053 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4055 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4056 (TYPE_TAG_NAME): Remove.
4057 * gdbtypes.c (type_name_no_tag): Simplify.
4058 (check_typedef, check_types_equal, recursive_dump_type)
4059 (copy_type_recursive, arch_composite_type): Update.
4060 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4061 in summary mode when needed.
4062 * eval.c (evaluate_funcall): Update.
4063 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4064 (process_structure_scope, read_enumeration_type)
4065 (read_namespace_type, read_module_type, determine_prefix): Update.
4066 * cp-support.c (inspect_type): Update.
4067 * coffread.c (process_coff_symbol, decode_base_type): Update.
4068 * c-varobj.c (c_is_path_expr_parent): Update.
4069 * c-typeprint.c (c_type_print_base_struct_union): Update.
4070 (c_type_print_base_1): Update. Print struct/class/union/enum in
4071 summary when using C language.
4072 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4073 (gen_maybe_namespace_elt): Update.
4074 * ada-lang.c (ada_type_name): Simplify.
4075 (empty_record, ada_template_to_fixed_record_type_1)
4076 (template_to_static_fixed_type)
4077 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4079 2018-06-01 Tom Tromey <tom@tromey.com>
4081 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4083 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4084 (c_print_type): Update.
4085 (c_print_type): New overload.
4086 (c_type_print_varspec_prefix, c_type_print_args)
4087 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4088 (c_type_print_base_struct_union, c_type_print_base_1)
4089 (cp_type_print_method_args): Add "language" parameter.
4090 (c_type_print_base): Update.
4091 * c-lang.h (c_print_type): Add new overload.
4093 2018-06-01 Tom Tromey <tom@tromey.com>
4095 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4096 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4098 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4100 * aarch64-tdep.c (aarch64_sve_register_names): New const
4102 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4103 (AARCH64_SVE_Z_REGS_NUM): New define.
4104 (AARCH64_SVE_P_REGS_NUM): Likewise.
4105 (AARCH64_SVE_NUM_REGS): Likewise.
4107 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4109 * nat/linux-ptrace.h [__alpha__]
4110 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4113 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4115 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4116 the endianness selected.
4117 * NEWS: Document `set endian auto' mode operation update.
4119 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4121 * Makefile.in: Add new header.
4122 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4123 (sve_vl_from_vg): Likewise.
4124 (sve_vq_from_vl): Likewise.
4125 (sve_vl_from_vq): Likewise.
4126 (sve_vq_from_vg): Likewise.
4127 (sve_vg_from_vq): Likewise.
4128 * configure.nat: Add new c file.
4129 * nat/aarch64-sve-linux-ptrace.c: New file.
4130 * nat/aarch64-sve-linux-ptrace.h: New file.
4132 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4134 * aarch64-linux-nat.c (aarch64_linux_read_description):
4136 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4138 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4139 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4140 (aarch64_gdbarch_init): Add parmeter zero.
4141 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4142 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4143 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4145 * doc/gdb.texinfo: Describe SVE feature
4146 * features/aarch64-sve.c: New file.
4148 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4151 * gdbarch.sh (significant_addr_bit): Default to zero when
4152 not set by target architecture.
4153 * gdbarch.c: Re-generated.
4154 * utils.c (address_significant): Update.
4156 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4158 * stack.c (func_command): Remove trailing newline in call to error.
4160 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4162 * regcache.h (regcache_raw_collect): Remove, update callers to
4163 use regcache::raw_collect.
4164 * regcache.c (regcache_raw_collect): Remove.
4166 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4168 * regcache.h (regcache_raw_supply): Remove, update callers to
4169 use detached_regcache::raw_supply.
4170 * regcache.c (regcache_raw_supply): Remove.
4172 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4174 * regcache.h (regcache_cooked_write_part): Remove, update
4175 callers to use regcache::cooked_write_part.
4176 * regcache.c (regcache_cooked_write_part): Remove.
4178 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4180 * regcache.h (regcache_cooked_read_part): Remove, update callers
4181 to use readable_regcache::cooked_read_part.
4182 * regcache.c (regcache_cooked_read_part): Remove.
4184 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4186 * regcache.h (regcache_cooked_read_value): Remove, update
4187 callers to use readable_regcache::cooked_read_value.
4188 * regcache.c (regcache_cooked_read_value): Remove.
4190 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4192 * regcache.h (regcache_cooked_write): Remove, update callers to
4193 use regcache::cooked_write.
4194 * regcache.c (regcache_cooked_write): Remove.
4196 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4198 * regcache.h (regcache_invalidate): Remove, update callers to
4199 use detached_regcache::invalidate instead.
4200 * regcache.c (regcache_invalidate): Remove.
4202 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4204 * regcache.h (regcache_raw_write_part): Remove, update callers
4205 to use regcache::raw_write_part instead.
4206 * regcache.c (regcache_raw_write_part): Remove.
4208 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4210 * regcache.h (regcache_raw_read_part): Remove, update callers to
4211 use readable_regcache::raw_read_part instead.
4212 * regcache.c (regcache_raw_read_part): Remove.
4214 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4216 * regcache.h (regcache_cooked_read): Remove, update callers to
4217 use readable_regcache::cooked_read instead.
4218 * regcache.c (regcache_cooked_read): Remove.
4220 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4222 * regcache.h (regcache_raw_write): Remove, update callers to use
4223 regcache::raw_write instead.
4224 * regcache.c (regcache_raw_write): Remove.
4226 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4228 * regcache.h (regcache_raw_read): Remove, update callers to use
4229 readable_regcache::raw_read instead.
4230 * regcache.c (regcache_raw_read): Remove.
4232 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4234 * regcache.h (regcache_raw_update): Remove, update callers to
4235 use readable_regcache::raw_update instead.
4236 * regcache.c (regcache_raw_update): Remove.
4238 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4240 * regcache.h (regcache_register_status): Remove, update callers
4241 to use reg_buffer::get_register_status directly instead.
4242 * regcache.c (regcache_register_status): Remove.
4244 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4246 * regcache.h (regcache_get_ptid): Remove, update all callers to
4247 call regcache::ptid instead.
4248 * regcache.c (regcache_get_ptid): Remove.
4250 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4252 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4254 2018-05-30 Pedro Alves <palves@redhat.com>
4256 * common/common-exceptions.h (exception_rethrow): Use
4259 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4261 * breakpoint.c (print_solib_event, check_status_catch_solib):
4262 Remove struct keyword in range-based for loops.
4263 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4264 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4266 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4268 * symfile.c (addr_info_make_relative): Likewise.
4269 * thread.c (value_in_thread_stack_temporaries): Likewise.
4271 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4274 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4275 aggregate type to get its real type before accessing it.
4277 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4279 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4280 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4281 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4282 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4283 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4284 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4285 * printcmd.c (info_address_command): Likewise.
4287 2018-05-29 Tom Tromey <tom@tromey.com>
4289 * windows-nat.c (handle_exception): Update fall-through comment.
4291 2018-05-29 Tom Tromey <tom@tromey.com>
4293 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4294 (struct program_space) <added_solibs>: Now a std::vector.
4295 * breakpoint.c (print_solib_event): Update.
4296 (check_status_catch_solib): Update.
4297 * progspace.c (clear_program_space_solib_cache): Update.
4298 * solib.c (update_solib_list): Update.
4300 2018-05-29 Tom Tromey <tom@tromey.com>
4302 * python/py-type.c (typy_richcompare): Update.
4303 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4304 * gdbtypes.h (types_deeply_equal): Return bool.
4305 (types_equal): Likewise.
4306 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4308 (check_types_equal): Change worklist to std::vector. Return
4310 (struct type_equality_entry): Add constructor.
4311 (compare_maybe_null_strings): Return bool.
4312 (check_types_worklist): Return bool. Change worklist to
4314 (types_deeply_equal): Use std::vector.
4315 (types_equal): Return bool.
4316 (compare_maybe_null_strings): Simplify.
4318 2018-05-29 Tom Tromey <tom@tromey.com>
4320 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4322 2018-05-29 Tom Tromey <tom@tromey.com>
4324 * objc-lang.h: Don't include cp-support.h.
4325 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4328 2018-05-27 Tom Tromey <tom@tromey.com>
4330 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4332 2018-05-25 Tom Tromey <tom@tromey.com>
4334 * value.c (value::location): Initialize.
4336 2018-05-25 Tom Tromey <tom@tromey.com>
4338 * dbxread.c (init_bincl_list): Remove.
4339 (bincl_list): Now a std::vector.
4340 (bincls_allocated, next_bincl): Remove.
4341 (free_bincl_list, do_free_bincl_list_cleanup)
4342 (make_cleanup_free_bincl_list): Remove.
4343 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4345 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4346 (struct header_file_location): Add constructor.
4347 (add_bincl_to_list): Remove.
4349 2018-05-25 Tom Tromey <tom@tromey.com>
4351 * tui/tui.c (tui_enable): Update.
4352 * mi/mi-interp.c (mi_interp::init): Update.
4353 * interps.h (class interp) <name>: New method.
4354 <m_name>: Rename from name.
4355 (~scoped_restore_interp): Update.
4356 * interps.c (interp::interp): Update.
4357 (interp_add, interp_set, interp_lookup_existing)
4358 (current_interp_named_p): Update.
4360 2018-05-25 Tom Tromey <tom@tromey.com>
4362 * interps.c (interp_name): Remove.
4363 * mi/mi-interp.c (mi_interp::init): Update.
4364 * interps.h (interp_name): Remove.
4365 (~scoped_restore_interp): Update.
4366 * tui/tui.c (tui_enable): Update.
4368 2018-05-25 Tom Tromey <tom@tromey.com>
4370 * utils.c (fputs_maybe_filtered): Update.
4371 * linespec.c (decode_line_full): Update.
4372 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4373 (mi_print_breakpoint_for_event, mi_solib_loaded)
4374 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4375 (mi_user_selected_context_changed): Update.
4376 * mi/mi-main.c (mi_execute_command): Update.
4377 * cli/cli-script.c (execute_control_command): Update.
4378 * python/python.c (execute_gdb_command): Update.
4379 * solib.c (info_sharedlibrary_command): Update.
4380 * interps.c (interp_ui_out): Remove.
4381 * interps.h (interp_ui_out): Remove.
4383 2018-05-25 Tom Tromey <tom@tromey.com>
4385 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4386 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4387 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4389 2018-05-25 Tom Tromey <tom@tromey.com>
4391 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4392 * interps.c (interp_exec): Use scoped_restore.
4394 2018-05-25 Tom Tromey <tom@tromey.com>
4396 * remote.c (remote_target::remote_file_get): Use
4398 (remote_target::remote_file_put): Likewise.
4400 2018-05-25 Tom Tromey <tom@tromey.com>
4402 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4404 (get_pe_section_index, add_pe_exported_sym): Update.
4405 (read_pe_exported_syms): Use gdb::def_vector.
4407 2018-05-25 Tom Tromey <tom@tromey.com>
4409 * frame.c (remove_prev_frame): Remove.
4410 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4412 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4414 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4416 * mips-linux-nat.c (supply_fpregset): Always call
4417 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4418 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4419 `mips_fill_fpregset'.
4420 * mips-linux-tdep.c (mips_supply_fpregset)
4421 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4422 (mips_fill_fpregset_wrapper): Remove functions.
4423 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4424 (mips_linux_fpregset): Remove variable.
4425 (mips_linux_iterate_over_regset_sections): Use
4426 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4427 (mips_linux_o32_sigframe_init): Remove comment.
4429 2018-05-25 Pedro Alves <palves@redhat.com>
4431 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4432 (struct readahead_cache, struct packet_reg, struct
4433 remote_arch_state, class remote_state): Move higher up in the
4435 (remote_target::m_remote_state): Now an object instead of a pointer.
4436 (remote_target::get_remote_state): Adjust.
4438 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4440 * stack.c (select_and_print_frame): Delete.
4441 (struct function_bounds): Move struct within function.
4442 (func_command): Most content moved into new function
4443 find_frame_for_function, use new function, print result, add
4445 (find_frame_for_function): New function, now returns a result.
4447 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4449 * stack.c (iterate_over_block_arg_vars): Fix comment.
4450 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4452 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4456 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4458 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4460 * frame.h (class scoped_restore_selected_frame): New class.
4461 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4462 of any exception, use scoped_restore_selected_frame to restore the
4465 2018-05-24 Pedro Alves <palves@redhat.com>
4467 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4470 2018-05-23 Tom Tromey <tom@tromey.com>
4472 * complaints.c (struct complaints): Remove.
4473 (symfile_complaint_book): Remove.
4474 (series): New global.
4475 (complaint_internal): Update.
4476 (clear_complaints): Update.
4478 2018-05-23 Tom Tromey <tom@tromey.com>
4480 * complaints.c (counters): New global.
4481 (struct complain): Remove.
4482 (struct complaints) <root>: Remove.
4483 (complaint_sentinel): Remove.
4484 (symfile_complaint_book): Update.
4485 (find_complaint) Remove.
4486 (complaint_internal, clear_complaints): Update.
4488 2018-05-23 Tom Tromey <tom@tromey.com>
4490 * complaints.c (struct complain) <file, line>: Remove.
4491 (find_complaint): Remove file, line parameters.
4492 (complaint_internal): Update.
4494 2018-05-23 Tom Tromey <tom@tromey.com>
4496 * complaints.c (vcomplaint): Remove.
4497 (complaint_internal) Merge in contents of vcomplaint.
4499 2018-05-23 Tom Tromey <tom@tromey.com>
4501 * complaints.c (struct complaints) <explanation>: Remove.
4502 (symfile_explanations): Remove.
4503 (symfile_complaint_book): Update.
4504 (vcomplaint): Update.
4505 (struct explanation): Remove.
4507 2018-05-23 Tom Tromey <tom@tromey.com>
4509 * complaints.c (symfile_complaints): Remove.
4510 (complaint_internal): Remove "complaints" parameter.
4511 (clear_complaints, vcomplaint): Remove "c" parameter.
4512 (get_complaints): Remove.
4513 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4514 (dwarf2_debug_line_missing_file_complaint)
4515 (dwarf2_debug_line_missing_end_sequence_complaint)
4516 (dwarf2_complex_location_expr_complaint)
4517 (dwarf2_const_value_length_mismatch_complaint)
4518 (dwarf2_section_buffer_overflow_complaint)
4519 (dwarf2_macro_malformed_definition_complaint)
4520 (dwarf2_invalid_attrib_class_complaint)
4521 (create_addrmap_from_index, dw2_symtab_iter_next)
4522 (dw2_expand_marked_cus)
4523 (dw2_debug_names_iterator::find_vec_in_debug_names)
4524 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4525 (create_debug_type_hash_table, init_cutu_and_read_dies)
4526 (partial_die_parent_scope, add_partial_enumeration)
4527 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4528 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4529 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4530 (create_cus_hash_table, create_dwp_hash_table)
4531 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4532 (dwarf2_rnglists_process, dwarf2_ranges_process)
4533 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4534 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4535 (handle_struct_member_die, process_structure_scope)
4536 (read_array_type, read_common_block, read_module_type)
4537 (read_tag_pointer_type, read_typedef, read_base_type)
4538 (read_subrange_type, load_partial_dies, partial_die_info::read)
4539 (partial_die_info::read, partial_die_info::read)
4540 (partial_die_info::read, read_checked_initial_length_and_offset)
4541 (dwarf2_string_attr, read_formatted_entries)
4542 (dwarf_decode_line_header)
4543 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4544 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4545 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4546 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4547 (get_signatured_type, get_DW_AT_signature_type)
4548 (decode_locdesc, file_file_name, consume_improper_spaces)
4549 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4550 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4551 (dwarf2_symbol_mark_computed, set_die_type)
4552 (read_attribute_value): Update.
4553 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4555 * dbxread.c (unknown_symtype_complaint)
4556 (lbrac_mismatch_complaint, repeated_header_complaint)
4557 (set_namestring, function_outside_compilation_unit_complaint)
4558 (read_dbx_symtab, process_one_symbol): Update.
4559 * gdbtypes.c (stub_noname_complaint): Update.
4560 * windows-nat.c (handle_unload_dll): Update.
4561 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4562 (decode_base_type): Update.
4563 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4564 (eb_complaint, record_include_begin, record_include_end)
4565 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4566 (process_xcoff_symbol, read_symbol)
4567 (function_outside_compilation_unit_complaint)
4568 (scan_xcoff_symtab): Update.
4569 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4570 * buildsym.c (finish_block_internal, make_blockvector)
4571 (end_symtab_get_static_block, augment_type_symtab): Update.
4572 * dtrace-probe.c (dtrace_process_dof)
4573 (dtrace_static_probe_ops::get_probes): Update.
4574 * complaints.h (struct complaint): Don't declare.
4575 (symfile_complaints): Remove.
4576 (complaint_internal): Remove "complaints" parameter.
4577 (complaint): Likewise.
4578 (clear_complaints): Likewise.
4579 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4580 (reread_symbols): Update.
4581 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4582 (dwarf2_frame_cache, decode_frame_entry): Update.
4583 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4584 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4585 (info_selectors_command): Update.
4586 * macrotab.c (macro_include, check_for_redefinition)
4587 (macro_undef): Update.
4588 * objfiles.c (filter_overlapping_sections): Update.
4589 * stabsread.c (invalid_cpp_abbrev_complaint)
4590 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4591 (define_symbol, error_type, read_type, rs6000_builtin_type)
4592 (stabs_method_name_from_physname, read_member_functions)
4593 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4594 (attach_fields_to_type, complain_about_struct_wipeout)
4595 (read_range_type, read_args, common_block_start)
4596 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4598 * mdebugread.c (index_complaint, unknown_ext_complaint)
4599 (basic_type_complaint, bad_tag_guess_complaint)
4600 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4601 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4602 (parse_procedure, parse_lines)
4603 (function_outside_compilation_unit_complaint)
4604 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4605 (bad_tag_guess_complaint, reg_value_complaint): Update.
4606 * cp-support.c (demangled_name_complaint): Update.
4607 * macroscope.c (sal_macro_scope): Update.
4608 * dwarf-index-write.c (class debug_names): Update.
4610 2018-05-23 Tom Tromey <tom@tromey.com>
4612 * complaints.c (clear_complaints): Remove "noisy" parameter.
4613 * complaints.h (clear_complaints): Update.
4614 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4615 (reread_symbols): Update.
4617 2018-05-23 Tom Tromey <tom@tromey.com>
4619 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4621 (vcomplaint, clear_complaints): Update.
4622 (symfile_explanations): Remove some messages.
4624 2018-05-23 Tom Tromey <tom@tromey.com>
4626 * complaints.c (internal_complaint): Remove.
4627 * complaints.h (internal_complaint): Remove.
4629 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4631 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4633 2018-05-22 Pedro Alves <palves@redhat.com>
4635 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4636 (remote_fileio_badfd, remote_fileio_return_errno)
4637 (remote_fileio_return_success, remote_fileio_func_open)
4638 (remote_fileio_func_open, remote_fileio_func_close)
4639 (remote_fileio_func_read, remote_fileio_func_write)
4640 (remote_fileio_func_lseek, remote_fileio_func_rename)
4641 (remote_fileio_func_unlink, remote_fileio_func_stat)
4642 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4643 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4644 remote_target parameter.
4645 (remote_fio_func_map) <func>: Add remote_target parameter.
4646 (do_remote_fileio_request, remote_fileio_request):
4647 * remote-fileio.h (remote_fileio_request):
4648 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4649 remote_target parameter.
4650 (remote_notif_process, handle_notification): Adjust to pass down
4652 (remote_notif_state_allocate): Add remote_target parameter. Save
4654 * remote-notif.h (struct remote_target): Forward declare.
4655 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4656 remote_target parameter.
4657 (struct remote_notif_state) <remote>: New field.
4658 (remote_notif_ack, remote_notif_parse): Add remote_target
4660 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4661 remote_target parameter.
4662 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4663 (threads_listing_context, rmt_thread_action, protocol_feature)
4664 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4665 (packet_result, struct threads_listing_context, remote_state):
4666 Move definitions and declarations higher up.
4667 (remote_target) <~remote_target>: Declare.
4668 (remote_download_command_source, remote_file_put, remote_file_get)
4669 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4670 (remote_hostio_pread_vFile, remote_hostio_send_command)
4671 (remote_hostio_set_filesystem, remote_hostio_open)
4672 (remote_hostio_close, remote_hostio_unlink, remote_state)
4673 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4674 (get_memory_write_packet_size, get_memory_read_packet_size)
4675 (append_pending_thread_resumptions, remote_detach_1)
4676 (append_resumption, remote_resume_with_vcont)
4677 (add_current_inferior_and_thread, wait_ns, wait_as)
4678 (process_stop_reply, remote_notice_new_inferior)
4679 (process_initial_stop_replies, remote_add_thread)
4680 (btrace_sync_conf, remote_btrace_maybe_reopen)
4681 (remove_new_fork_children, kill_new_fork_children)
4682 (discard_pending_stop_replies, stop_reply_queue_length)
4683 (check_pending_events_prevent_wildcard_vcont)
4684 (discard_pending_stop_replies_in_queue, stop_reply)
4685 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4686 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4687 (remote_interrupt_as, remote_interrupt_ns)
4688 (remote_get_noisy_reply, remote_query_attached)
4689 (remote_add_inferior, remote_current_thread, get_current_thread)
4690 (set_thread, set_general_thread, set_continue_thread)
4691 (set_general_process, write_ptid)
4692 (remote_unpack_thread_info_response, remote_get_threadinfo)
4693 (parse_threadlist_response, remote_get_threadlist)
4694 (remote_threadlist_iterator, remote_get_threads_with_ql)
4695 (remote_get_threads_with_qxfer)
4696 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4697 (get_offsets, remote_check_symbols, remote_supported_packet)
4698 (remote_query_supported, remote_packet_size)
4699 (remote_serial_quit_handler, remote_detach_pid)
4700 (remote_vcont_probe, remote_resume_with_hc)
4701 (send_interrupt_sequence, interrupt_query)
4702 (remote_notif_get_pending_events, fetch_register_using_p)
4703 (send_g_packet, process_g_packet, fetch_registers_using_g)
4704 (store_register_using_P, store_registers_using_G)
4705 (set_remote_traceframe, check_binary_download)
4706 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4707 (remote_xfer_live_readonly_partial, remote_read_bytes)
4708 (remote_send_printf, remote_flash_write, readchar)
4709 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4710 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4711 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4712 (extended_remote_disable_randomization, extended_remote_run)
4713 (send_environment_packet, extended_remote_environment_support)
4714 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4715 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4716 (packet_command): Now methods of ...
4717 (remote_target): ... this class.
4718 (m_remote_state) <remote_target>: New field.
4719 (struct remote_state) <stop_reply_queue,
4720 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4722 (remote_state::remote_state): Allocate stop_reply_queue.
4723 (remote_state): Delete global.
4724 (get_remote_state_raw): Delete.
4725 (remote_target::get_remote_state): Allocate m_remote_state on
4727 (get_current_remote_target): New.
4728 (remote_ops, extended_remote_ops): Delete.
4729 (wait_forever_enabled_p, remote_async_inferior_event_token):
4730 Delete, moved to struct remote_state.
4731 (remote_target::close): Delete self. Destruction bits split to
4733 (remote_target::~remote_target): ... this.
4734 (show_memory_packet_size): Adjust to use
4735 get_current_remote_target.
4736 (struct protocol_feature) <func>: Add remote_target parameter.
4737 All callers adjusted.
4738 (curr_quit_handler_target): New.
4739 (remote_serial_quit_handler): Reimplement.
4740 (remote_target::open_1): Adjust to use get_current_remote_target.
4741 Heap-allocate remote_target/extended_remote_target instances.
4742 (vcont_builder::vcont_builder): Add remote_target parameter, and
4743 save it in m_remote. All callers adjusted.
4744 (vcont_builder::m_remote): New field.
4745 (vcont_builder::restart, vcont_builder::flush)
4746 (vcont_builder::push_action): Use it.
4747 (remote_target::commit_resume): Use it.
4748 (struct queue_iter_param) <remote>: New field.
4749 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4750 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4751 (check_pending_event_prevents_wildcard_vcont_callback)
4752 (remote_target::check_pending_events_prevent_wildcard_vcont)
4753 (remote_target::discard_pending_stop_replies)
4754 (remote_target::discard_pending_stop_replies_in_queue)
4755 (remote_target::remote_notif_remove_queued_reply): Fill in
4757 (remote_notif_get_pending_events): New.
4758 (remote_target::readchar, remote_target::remote_serial_write):
4759 Save/restore curr_quit_handler_target.
4761 (kill_new_fork_children): Fill in 'remote' field.
4762 (packet_command): Use get_current_remote_target, defer to
4763 remote_target method of same name.
4764 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4765 parameter, and save it in m_remote. All callers adjusted.
4766 (scoped_remote_fd::release): Use m_remote.
4767 (scoped_remote_fd::m_remote): New field.
4768 (remote_file_put, remote_file_get, remote_file_delete): Use
4769 get_current_remote_target, defer to remote_target method of same
4771 (remote_btrace_reset): Add remote_state paremeter. Update all
4773 (remote_async_inferior_event_handler). Pass down 'data'.
4774 (remote_new_objfile): Use get_current_remote_target.
4775 (remote_target::vcont_r_supported): New.
4776 (set_range_stepping): Use get_current_remote_target and
4777 remote_target::vcont_r_supported.
4778 (_initialize_remote): Don't allocate 'remote_state' and
4779 'stop_reply_queue' globals.
4780 * remote.h (struct remote_target): Forward declare.
4781 (getpkt, putpkt, remote_notif_get_pending_events): Add
4782 'remote_target' parameter.
4784 2018-05-22 Pedro Alves <palves@redhat.com>
4786 * remote.c (vcont_builder): Now a class. Make all data members
4788 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4790 (vcont_builder_restart): Rename to ...
4791 (vcont_builder::restart): ... this.
4792 (vcont_builder_flush): Rename to ...
4793 (vcont_builder::flush): ... this.
4794 (vcont_builder_push_action): Rename to ...
4795 (vcont_builder::push_action): ... this.
4796 (remote_target::commit_resume): Adjust.
4798 2018-05-22 Pedro Alves <palves@redhat.com>
4800 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4801 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4802 (get_fixed_memory_packet_size): New.
4803 (get_memory_packet_size): Use it.
4804 (set_memory_packet_size): Don't override the config size with
4805 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4806 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4807 Don't refer to get_memory_packet_size if not connected to a remote
4808 target. Show "(default)" if configured size is 0.
4810 2018-05-22 Pedro Alves <palves@redhat.com>
4812 * remote.c (remote_target::mourn_inferior): Move
4813 discard_pending_stop_replies call here from ...
4814 (_initialize_remote): ... here.
4816 2018-05-22 Pedro Alves <palves@redhat.com>
4818 * remote.c (compare_section_command): Remove set_general_process
4821 2018-05-22 Pedro Alves <palves@redhat.com>
4823 * remote.c (struct packet_reg, struct remote_arch_state):
4824 Move higher up in the file.
4825 (remote_state) <m_arch_states>: Store remote_arch_state values
4826 instead of remote_arch_state pointers.
4827 (remote_state::get_remote_arch_state): Adjust.
4829 2018-05-22 Pedro Alves <palves@redhat.com>
4831 * remote.c: Include <unordered_map>.
4832 (remote_state): Now a class.
4833 (remote_state) <get_remote_arch_state>: Declare method.
4834 <get_remote_arch_state>: New field.
4835 (remote_arch_state) <remote_arch_state>: Declare ctor.
4836 <regs>: Now a unique_ptr.
4837 (remote_gdbarch_data_handle): Delete.
4838 (get_remote_arch_state): Delete.
4839 (remote_state::get_remote_arch_state): New.
4840 (get_remote_state): Adjust to call remote_state's
4841 get_remote_arch_state method.
4842 (init_remote_state): Delete, bits factored out to ...
4843 (remote_arch_state::remote_arch_state): ... this new method.
4844 (get_remote_packet_size, get_memory_packet_size)
4845 (process_g_packet, remote_target::fetch_registers)
4846 (remote_target::prepare_to_store, store_registers_using_G)
4847 (remote_target::store_registers, remote_target::get_trace_status):
4848 Adjust to call remote_state's method.
4849 (_initialize_remote): Remove reference to
4850 remote_gdbarch_data_handle.
4852 2018-05-22 Pedro Alves <palves@redhat.com>
4854 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4855 pread>: New method declarations.
4856 (remote_target::open_1): Adjust.
4857 (readahead_cache_invalidate): Rename to ...
4858 (readahead_cache::invalidate): ... this, and adjust to be a class
4860 (readahead_cache_invalidate_fd): Rename to ...
4861 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4863 (remote_hostio_pwrite): Adjust.
4864 (remote_hostio_pread_from_cache): Rename to ...
4865 (readahead_cache::pread): ... this, and adjust to be a class
4867 (remote_hostio_close): Adjust.
4869 2018-05-22 Pedro Alves <palves@redhat.com>
4871 * remote.c (remote_hostio_close_cleanup): Delete.
4872 (class scoped_remote_fd): New.
4873 (remote_file_put, remote_file_get): Use it.
4875 2018-05-22 Pedro Alves <palves@redhat.com>
4877 (struct vCont_action_support): Use bool and initialize all fields.
4878 (struct readahead_cache): Initialize all fields.
4879 (remote_state): Use bool and initialize all fields.
4880 (remote_state::remote_state, remote_state::~remote_state): New.
4881 (new_remote_state): Delete.
4882 (_initialize_remote): Use new to allocate remote_state.
4884 2018-05-22 Pedro Alves <palves@redhat.com>
4888 * c-exp.y: Include "c-support.h".
4889 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4890 of tolower. Use c_ident_is_alpha to scan names.
4891 * c-lang.c: Include "c-support.h".
4892 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4893 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4894 * c-support.h: New file, with bits factored out from ...
4895 * cp-name-parser.y: ... this file.
4896 Include "c-support.h".
4897 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4898 c-support.h and renamed.
4899 (symbol_end, yylex): Adjust.
4901 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4903 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4904 parameter type to CORE_ADDR.
4905 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4906 parameter type in declaration to CORE_ADDR.
4907 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4908 target_auxv_search to get AT_HWCAP and use the result to get the
4910 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4911 to CORE_ADDR. Remove the cast of the return value to unsigned
4912 long. Fix error predicate of target_auxv_search.
4913 (ppc_linux_nat_target::read_description): Change the type of the
4914 hwcap variable to CORE_ADDR.
4916 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4918 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4919 if the size of fpscr is larger than 32 bits.
4921 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4923 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4924 (ppc32_linux_vsxregmap): New global.
4925 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4926 regcache_supply_regset, and regcache_collect_regset.
4927 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4928 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4929 (fetch_vsx_register, store_vsx_register): Remove.
4930 (fetch_vsx_registers): Add regno parameter. Get regset using
4931 ppc_linux_vsxregset. Use regset to supply registers.
4932 (store_vsx_registers): Add regno parameter. Get regset using
4933 ppc_linux_vsxregset. Use regset to collect registers.
4934 (fetch_register): Call fetch_vsx_registers instead of
4936 (store_register): Call store_vsx_registers instead of
4938 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4939 new regno parameter.
4940 (store_ppc_registers): Call store_vsx_registers with -1 for the
4941 new regno parameter.
4942 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4943 (ppc_collect_vsxregset): Remove.
4945 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4947 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4949 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4950 for vector register offset fields.
4951 (ppc64_fbsd_reg_offsets): Likewise.
4952 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4953 to vector register offset fields.
4954 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4955 to vector register offset fields.
4956 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4957 vector register offset fields.
4958 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4959 initializers for vector register offset fields.
4960 (rs6000_aix64_reg_offsets): Likewise.
4961 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4962 (ppc_supply_vrregset): Remove.
4963 (ppc_collect_vrregset): Remove.
4964 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4965 (ppc_linux_vrregset) : New function.
4966 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4967 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4968 (ppc32_linux_vrregset): Remove.
4969 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4970 and use result instead of ppc32_linux_vrregset.
4971 (ppc32_linux_reg_offsets): Remove initializers for vector register
4973 (ppc64_linux_reg_offsets): Likewise.
4974 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4975 * ppc-linux-nat.c: Include regset.h.
4976 (gdb_vrregset_t): Adjust comment to account for little-endian
4978 (supply_vrregset, fill_vrregset): Remove.
4979 (fetch_altivec_register, store_altivec_register): Remove.
4980 (fetch_altivec_registers): Add regno parameter. Get regset using
4981 ppc_linux_vrregset. Use regset to supply registers.
4982 (store_altivec_registers): Add regno parameter. Get regset using
4983 ppc_linux_vrregset. Use regset to collect registers.
4984 (fetch_register): Call fetch_altivec_registers instead of
4985 fetch_altivec_register.
4986 (store_register): Call store_altivec_registers instead of
4987 store_altivec_register.
4988 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4989 the new regno parameter.
4990 (store_ppc_registers): Call store_altivec_registers with -1 for
4991 the new regno parameter.
4993 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4995 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4996 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4997 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4998 (gdb_vrregset_t): Change array type size to
4999 PPC_LINUX_SIZEOF_VRREGSET.
5000 (gdb_vsxregset_t): Change array type size to
5001 PPC_LINUX_SIZEOF_VSXREGSET.
5002 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5003 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5004 PPC_LINUX_SIZEOF_VSXREGSET.
5006 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5008 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5009 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5011 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5012 ppc_linux_target_wordsize with tid.
5013 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5015 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5016 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5017 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5018 tid parameter. Remove static specifier.
5019 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5020 (ppc_linux_target_wordsize): New declaration.
5022 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5024 * arch/ppc-linux-common.c: New file.
5025 * arch/ppc-linux-common.h: New file.
5026 * arch/ppc-linux-tdesc.h: New file.
5027 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5028 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5029 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5030 arch/ppc-linux-tdesc.h.
5031 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5032 arch/ppc-linux-tdesc.h.
5033 (ppc_linux_nat_target::read_description): Remove target
5034 description matching code. Fill a ppc_linux_features struct and
5035 call ppc_linux_match_description with it. Move comment about ISA
5036 2.05 to ppc-linux-common.c.
5037 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5038 arch/ppc-linux-tdesc.h.
5039 (ppc_linux_core_read_description): Remove target description
5040 matching code. Fill a ppc_linux_features struct and call
5041 ppc_linux_match_description with it.
5042 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5043 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5044 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5045 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5046 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5047 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5048 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5049 (tdesc_powerpc_e500l): Remove.
5051 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5053 * ada-lang.c (catch_assert_command): Pass empty string instead
5054 of NULL for excep_string argument.
5056 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5058 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5059 the width of the requested register exceeds the width of the
5062 2018-05-21 Tom Tromey <tom@tromey.com>
5064 * printcmd.c (output_command): Remove.
5065 (output_command_const): Rename to output_command.
5066 * valprint.h (output_command): Rename from output_command_const.
5067 * tracepoint.c (trace_dump_actions): Call output_command.
5069 2018-05-21 Tom Tromey <tom@tromey.com>
5071 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5072 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5073 * ada-lang.h (create_ada_exception_catchpoint): Update.
5074 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5076 (create_excep_cond_exprs, ~ada_catchpoint)
5077 (should_stop_exception, print_one_exception)
5078 (print_mention_exception, print_recreate_exception): Update.
5079 (ada_get_next_arg): Remove.
5080 (catch_ada_exception_command_split): Use std::string. Change type
5081 of "excep_string", "cond_string".
5082 (catch_ada_exception_command): Update.
5083 (create_ada_exception_catchpoint): Change type of excep_string.
5084 (ada_exception_sal): Remove excep_string parameter.
5085 (~ada_catchpoint): Remove.
5087 2018-05-21 Tom Tromey <tom@tromey.com>
5089 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5092 2018-05-21 Tom Tromey <tom@tromey.com>
5094 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5095 Return unique_xmalloc_ptr.
5096 (print_it_exception): Update.
5098 2018-05-21 Tom Tromey <tom@tromey.com>
5100 * tracepoint.c (trace_dump_actions): Use std::string.
5102 2018-05-21 Tom Tromey <tom@tromey.com>
5104 * symfile.c (reread_symbols): Use std::string for original_name.
5106 2018-05-21 Tom Tromey <tom@tromey.com>
5108 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5109 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5112 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5114 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5116 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5117 * objfiles.c (get_objfile_bfd_data): Allocate
5118 objfile_per_bfd_storage with obstack_new when allocating on
5121 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5123 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5125 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5126 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5127 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5128 (add_pending): Likewise.
5129 (parse_symbol): Likewise.
5130 (parse_partial_symbols): Likewise.
5131 (psymtab_to_symtab_1): Likewise.
5132 (new_psymtab): Likewise.
5133 (elfmdebug_build_psymtabs): Likewise.
5134 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5135 * objfiles.c (get_objfile_bfd_data): Likewise.
5136 (objfile_register_static_link): Likewise.
5137 * psymtab.c (allocate_psymtab): Likewise.
5138 * stabsread.c (read_member_functions): Likewise.
5139 * xcoffread.c (xcoff_end_psymtab): Likewise.
5141 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5143 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5144 compiler supports std::is_trivially_constructible.
5145 * common/poison.h: Include obstack.h.
5146 (IsMallocable): Define to is_trivially_constructible if the
5147 compiler supports it, define to true_type otherwise.
5151 (XOBNEWVEC): Redefine.
5152 * gdb_obstack.h (obstack_zalloc): New.
5153 (OBSTACK_ZALLOC): Redefine.
5154 (obstack_calloc): New.
5155 (OBSTACK_CALLOC): Redefine.
5157 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5158 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5160 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5161 obstack_calloc/obstack_zalloc.
5162 (gdbarch_obstack_zalloc): Remove.
5163 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5165 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5167 * stack.c (backtrace_command_1): Remove useless variable int i.
5169 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5171 * stack.c (print_frame_info): Fix comment.
5173 2018-05-18 Tom Tromey <tom@tromey.com>
5175 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5176 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5177 (~dwarf2_per_objfile): Update
5178 (dwarf2_get_dwz_file): Use new.
5179 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5182 2018-05-18 Tom Tromey <tom@tromey.com>
5184 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5186 * dwarf2read.c (struct dwp_file): Add constructor and
5188 (open_and_init_dwp_file): Return a unique_ptr.
5189 (dwarf2_per_objfile, create_dwp_hash_table)
5190 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5191 (lookup_dwo_unit_in_dwp): Update.
5192 (open_and_init_dwp_file, get_dwp_file): Update.
5194 2018-05-18 Tom Tromey <tom@tromey.com>
5196 * dwarf2read.c (dwarf2_per_objfile): Update.
5197 (struct mapped_index): Add initializers.
5198 (dwarf2_read_index): Use new.
5199 (dw2_symtab_iter_init): Update.
5200 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5203 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5205 * dwarf2read.c (mapped_index) <total_size>: Remove.
5207 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5209 * unittests/format_pieces-selftests.c (test_format_specifier):
5212 2018-05-18 Tom Tromey <tom@tromey.com>
5214 * c-typeprint.c (maybe_print_hole): New function.
5215 (c_print_type_struct_field_offset): Update.
5216 (c_type_print_base_struct_union): Call maybe_print_hole.
5218 2018-05-17 Keith Seitz <keiths@redhat.com>
5220 * breakpoint.c (build_bpstat_chain): New function, moved from
5222 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5223 If no stop chain is passed, call build_bpstat_chain to build it.
5224 * breakpoint.h (build_bpstat_chain): Declare.
5225 (bpstat_stop_status): Move documentation here from breakpoint.c.
5226 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5227 build the stop chain and pass it to skip_inline_frames.
5228 Pass this stop chain to bpstat_stop_status.
5229 * inline-frame.c: Include breakpoint.h.
5230 (stopped_by_user_bp_inline_frame): New function.
5231 (skip_inline_frames): Add parameter `stop_chain'.
5232 Move documention to inline-frame.h.
5233 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5234 whether the frame should be elided.
5235 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5236 Add moved documentation and update for new parameter.
5238 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5241 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5242 unittests/format_pieces-selftests.c.
5243 * common/format.h (format_piece) <operator==>: New.
5244 (format_pieces) <operator[]>: Remove.
5245 * common/format.c (format_pieces::format_pieces): Handle \e.
5246 * unittests/format_pieces-selftests.c: New.
5248 2018-05-17 Tom Tromey <tom@tromey.com>
5251 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5252 (dw2_instantiate_symtab): Add skip_partial parameter.
5253 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5254 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5255 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5256 (dw2_expand_symtabs_matching_one)
5257 (dw2_find_pc_sect_compunit_symtab)
5258 (dw2_debug_names_lookup_symbol)
5259 (dw2_debug_names_expand_symtabs_for_function): Update.
5260 (init_cutu_and_read_dies): Add skip_partial parameter.
5261 (process_psymtab_comp_unit, build_type_psymtabs_1)
5262 (process_skeletonless_type_unit, load_partial_comp_unit)
5263 (psymtab_to_symtab_1): Update.
5264 (load_full_comp_unit): Add skip_partial parameter.
5265 (process_imported_unit_die, dwarf2_read_addr_index)
5266 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5267 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5268 (read_signatured_type): Update.
5270 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5272 * value.c (release_value): Remove unused variable.
5273 (record_latest_value): Likewise.
5274 (access_value_history): Likewise.
5275 (preserve_values): Likewise.
5277 2018-05-17 Tom Tromey <tom@tromey.com>
5279 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5282 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5285 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5286 Also handle registers whose width is not a multiple of
5288 (linux_nat_trad_target::store_register): Likewise.
5290 2018-05-16 Tom Tromey <tom@tromey.com>
5292 * gdbcore.h (core_bfd): Redefine.
5293 * corelow.c (core_target::close): Update.
5294 (core_target_open): Update.
5295 * progspace.h (struct program_space) <cbfd>: Now a
5298 2018-05-16 Tom Tromey <tom@tromey.com>
5301 * symfile-add-flags.h (enum symfile_add_flags)
5302 <SYMFILE_NOT_FILENAME>: New constant.
5303 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5304 objfile name from BFD.
5305 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5306 * minidebug.c (find_separate_debug_file_in_section): Put
5307 ".gnu_debugdata" into BFD's file name.
5309 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5311 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5314 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5317 * aarch64-tdep.c (aarch64_analyze_prologue,
5318 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5319 Indicate not interested in errors.
5321 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5323 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5324 Supply the MIPS_ZERO_REGNUM register.
5326 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5328 * mips-tdep.c (mask_address_var): Make variable static.
5330 2018-05-14 Tom Tromey <tom@tromey.com>
5332 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5334 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5336 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5337 FXSAVE_ADDR for the mxcsr register.
5339 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5341 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5343 2018-05-11 Pedro Alves <palves@redhat.com>
5345 * corelow.c (core_target) <core_target>: No longer inline.
5346 Initialize m_core_gdbarch, m_core_vec and build the section table
5348 <~core_target>: New.
5349 <core_gdbarch, get_core_register_section>: New methods.
5350 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5351 factored out from ...
5352 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5354 (sniff_core_bfd): Add gdbarch parameter.
5355 (core_close): Delete, merged into ...
5356 (core_target::close): ... here. Delete self.
5357 (core_close_cleanup): Delete.
5358 (core_target_open): Allocate a core_target on the heap. Use a
5359 unique_ptr instead of a cleanup. Bits moved into the core_target
5360 ctor. Adjust to use core_target methods instead of globals.
5361 (get_core_register_section): Rename to ...
5362 (core_target::get_core_register_section): ... this and adjust.
5363 (struct get_core_registers_cb_data): New.
5364 (get_core_registers_cb): Use it. Use bool.
5365 (core_target::fetch_registers, core_target::files_info)
5366 (core_target::xfer_partial, core_target::read_description)
5367 (core_target::pid_to, core_target::thread_name): Adjust to
5368 reference class fields instead of globals.
5369 * target.h (struct target_ops_deleter, target_ops_up): New.
5371 2018-05-11 Pedro Alves <palves@redhat.com>
5373 * corefile.c (core_file_command): Move to corelow.c.
5374 * corelow.c (the_core_target): Delete.
5375 (core_file_command): Moved from corefile.c. Check exec_bfd
5376 instead of the_core_target. Use target_detach instead of calling
5377 into the_core_target directly.
5378 (maybe_say_no_core_file_now): New.
5379 (core_target::detach): Use it.
5380 (_initialize_corelow): Remove references to the_core_target.
5381 * gdbcore.h (the_core_target): Delete.
5383 2018-05-11 Tom Tromey <tromey@redhat.com>
5384 Pedro Alves <palves@redhat.com>
5386 * corefile.c (core_bfd): Remove.
5387 * gdbcore.h (core_bfd): Now a macro.
5388 * progspace.h (struct program_space) <cbfd>: New field.
5390 2018-05-11 Tom Tromey <tom@tromey.com>
5392 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5395 2018-05-10 Tom Tromey <tom@tromey.com>
5397 * configure: Rebuild.
5398 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5400 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5403 * regformats/regdat.sh: Adjust script, following the addition
5404 of the new expedite_regs parameter to init_target_desc.
5406 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5409 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5410 set_gdbarch_significant_addr_bit.
5411 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5412 set_gdbarch_significant_addr_bit.
5413 * utils.c (address_significant): Update to sign extend addr.
5415 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5417 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5418 (xtensa_linux_init_abi): Limit tdep->num_regs by
5419 tdep->num_nopriv_regs.
5420 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5421 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5424 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5426 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5428 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5430 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5431 (I387_MXCSR_INIT_VAL): New constant.
5432 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5433 buffer if it was supplied by the inferior.
5434 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5435 (i387_xsave_get_clear_bv): New function.
5436 (i387_supply_xsave): Only read x87 control registers from the
5437 xsave buffer if the feature is enabled, and the state will have
5438 been written, otherwise, provide a suitable default.
5439 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5440 including x87 control registers. Update control registers if they
5441 have changed from the default value, and mark features as enabled
5443 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5445 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5447 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5449 2018-05-07 Tom Tromey <tom@tromey.com>
5451 * configure: Rebuild.
5452 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5454 2018-05-07 Tom Tromey <tom@tromey.com>
5457 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5458 bit. Use correct value for VDIV.
5460 2018-05-04 Tom Tromey <tom@tromey.com>
5462 * configure: Rebuild.
5463 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5465 2018-05-04 Tom Tromey <tom@tromey.com>
5467 * linux-record.c (record_linux_system_call) <case
5468 RECORD_SYS_RECVFROM>: Add "break".
5470 2018-05-04 Tom Tromey <tom@tromey.com>
5472 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5473 Add missing "break".
5474 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5475 Add missing "break".
5477 2018-05-04 Tom Tromey <tom@tromey.com>
5479 * rs6000-tdep.c (ppc_process_record_op4)
5480 (ppc_process_record_op63): Add fall-through comment.
5482 2018-05-04 Tom Tromey <tom@tromey.com>
5484 * i386-tdep.c (i386_process_record): Add fall-through comment.
5486 2018-05-04 Tom Tromey <tom@tromey.com>
5488 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5491 2018-05-04 Tom Tromey <tom@tromey.com>
5493 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5494 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5495 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5497 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5499 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5502 2018-05-04 Tom Tromey <tom@tromey.com>
5504 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5506 2018-05-04 Tom Tromey <tom@tromey.com>
5508 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5509 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5510 * symfile.c (section_is_mapped): Fix fall-through comment.
5511 * stabsread.c (define_symbol, read_member_functions): Fix
5512 fall-through comment.
5513 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5515 * remote.c (remote_wait_as): Fix fall-through comment.
5516 * p-exp.y (yylex): Fix fall-through comment.
5517 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5519 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5520 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5521 * jv-exp.y (yylex): Fix fall-through comment.
5522 * go-exp.y (lex_one_token): Fix fall-through comment.
5523 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5524 fall-through comment.
5525 * f-exp.y (yylex): Fix fall-through comment.
5526 * dwarf2read.c (process_die): Fix fall-through comments.
5527 * dbxread.c (process_one_symbol): Fix fall-through comment.
5528 * d-exp.y (lex_one_token): Fix fall-through comment.
5529 * cp-name-parser.y (yylex): Fix fall-through comment.
5530 * coffread.c (coff_symtab_read): Fix fall-through comment.
5531 * c-exp.y (lex_one_token): Fix fall-through comment.
5532 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5534 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5537 2018-05-04 Tom Tromey <tom@tromey.com>
5540 * NEWS: Mention gdb.execute change.
5541 * gdbcmd.h (execute_control_command): Don't declare.
5542 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5543 execute_control_commands, execute_control_commands_to_string.
5544 * cli/cli-script.h (execute_control_commands)
5545 (execute_control_commands_to_string): Declare.
5546 (execute_control_command): Add from_tty parameter.
5547 * cli/cli-script.c (execute_control_commands)
5548 (execute_control_commands_to_string): New functions.
5549 (execute_user_command): Use execute_control_commands.
5550 (execute_control_command_1): Add "from_tty" parameter. Update.
5551 (execute_control_command): Likewise.
5553 2018-05-04 Tom Tromey <tom@tromey.com>
5556 * NEWS: Mention that breakpoint commands are writable.
5557 * python/py-breakpoint.c (bppy_set_commands): New function.
5558 (breakpoint_object_getset) <"commands">: Use it.
5560 2018-05-04 Tom Tromey <tom@tromey.com>
5562 * tracepoint.c (actions_command): Update.
5563 * mi/mi-cmd-break.c (mi_command_line_array)
5564 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5565 (mi_read_next_line): Remove.
5566 (mi_cmd_break_commands): Update.
5567 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5569 * cli/cli-script.c (get_command_line): Update.
5570 (process_next_line): Use function_view. Constify.
5571 (recurse_read_control_structure, read_command_lines)
5572 (read_command_lines_1): Change argument types to function_view.
5573 (do_define_command, document_command): Update.
5574 * breakpoint.h (check_tracepoint_command): Don't declare.
5575 * breakpoint.c (check_tracepoint_command): Remove.
5576 (commands_command_1, create_tracepoint_from_upload): Update.
5578 2018-05-04 Tom Tromey <tom@tromey.com>
5581 * cli/cli-script.h (enum command_control_type) <define_control>:
5583 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5584 (build_command_line, execute_control_command_1)
5585 (process_next_line): Likewise.
5586 (do_define_command): New function, extracted from define_command.
5587 (define_command): Use it.
5589 2018-05-04 Tom Tromey <tom@tromey.com>
5591 * tracepoint.c (actions_command): Update.
5592 * cli/cli-script.h (read_command_lines): Update.
5593 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5594 (MAX_TMPBUF): Remove define.
5595 (define_command): Use string_printf.
5596 (document_command): Likewise.
5597 * breakpoint.c (commands_command_1): Update.
5599 2018-05-04 Tom Tromey <tom@tromey.com>
5601 * top.c (execute_command): Update.
5602 * cli/cli-script.h (print_command_lines): Now varargs.
5603 * cli/cli-script.c (print_command_lines): Now varargs.
5604 (execute_control_command_1) <case while_control, case if_control>:
5607 2018-05-04 Tom Tromey <tom@tromey.com>
5609 * tracepoint.c (all_tracepoint_actions): Rename from
5610 all_tracepoint_actions_and_cleanup. Change return type.
5611 (actions_command, encode_actions_1, encode_actions)
5612 (trace_dump_actions, tdump_command): Update.
5613 * remote.c (remote_download_command_source): Update.
5614 * python/python.c (gdbpy_eval_from_control_command)
5615 (python_command, python_interactive_command): Update.
5616 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5617 * guile/guile.c (guile_command)
5618 (gdbscm_eval_from_control_command, guile_command): Update.
5619 * compile/compile.c (compile_code_command)
5620 (compile_print_command, compile_to_object): Update.
5621 * cli/cli-script.h (struct command_lines_deleter): New.
5622 (counted_command_line): New typedef.
5623 (struct command_line): Add constructor, destructor.
5624 <body_list>: Remove.
5625 <body_list_0, body_list_1>: New members.
5626 (command_line_up): Remove typedef.
5627 (read_command_lines, read_command_lines_1, get_command_line):
5629 (copy_command_lines): Don't declare.
5630 * cli/cli-script.c (build_command_line): Use "new".
5631 (get_command_line): Return counted_command_line.
5632 (print_command_lines, execute_user_command)
5633 (execute_control_command_1, while_command, if_command): Update.
5634 (realloc_body_list): Remove.
5635 (process_next_line, recurse_read_control_structure): Update.
5636 (read_command_lines, read_command_lines_1): Return counted_command_line.
5637 (free_command_lines): Use "delete".
5638 (copy_command_lines): Remove.
5639 (define_command, document_command, show_user_1): Update.
5640 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5641 a counted_command_line.
5642 * breakpoint.h (counted_command_line): Remove typedef.
5643 (breakpoint_set_commands): Update.
5644 * breakpoint.c (check_no_tracepoint_commands)
5645 (validate_commands_for_breakpoint): Update.
5646 (breakpoint_set_commands): Change commands to be a
5647 counted_command_line.
5648 (commands_command_1, update_dprintf_command_list)
5649 (create_tracepoint_from_upload): Update.
5651 2018-05-04 Tom Tromey <tom@tromey.com>
5653 * cli/cli-decode.h (cmd_list_element): New constructor.
5654 (~cmd_list_element): New destructor.
5655 (struct cmd_list_element): Add initializers.
5656 * cli/cli-decode.c (do_add_cmd): Use "new".
5657 (delete_cmd): Use "delete".
5659 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5660 Pedro Alves <palves@redhat.com>
5662 PR breakpoints/19806 and support for PR external/20207.
5663 * NEWS: Mention Aarch64 watchpoint improvements.
5664 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5665 watchpoints and PR external/20207 watchpoints.
5666 * nat/aarch64-linux-hw-point.c
5667 (kernel_supports_any_contiguous_range): New.
5668 (aarch64_watchpoint_offset): New.
5669 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5670 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5671 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5672 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5673 next_addr_orig_p. Support PR external/20207 watchpoints.
5674 (aarch64_downgrade_regs): New.
5675 (aarch64_dr_state_insert_one_point): New parameters offset and
5677 (aarch64_dr_state_remove_one_point): Likewise.
5678 (aarch64_handle_breakpoint): Update caller.
5679 (aarch64_handle_aligned_watchpoint): Likewise.
5680 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5682 (aarch64_linux_set_debug_regs): Remove const from state. Call
5683 aarch64_downgrade_regs.
5684 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5685 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5686 (DR_CONTROL_MASK): ... this.
5687 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5688 (unsigned int aarch64_watchpoint_offset): New prototype.
5689 (aarch64_linux_set_debug_regs): Remove const from state.
5690 * utils.c (align_up, align_down): Move to ...
5691 * common/common-utils.c (align_up, align_down): ... here.
5692 * utils.h (align_up, align_down): Move to ...
5693 * common/common-utils.h (align_up, align_down): ... here.
5695 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5697 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5698 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5699 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5700 Re-implement to match the ABI as summarized in GCC's
5701 gcc/config/sparc/sparc.c. All callers updated.
5702 (sparc32_store_arguments): Remove assertion.
5704 2018-05-04 Tom Tromey <tom@tromey.com>
5706 * printcmd.c: Don't include tui.h.
5707 (decode_format): Use skip_spaces.
5709 2018-05-04 Tom Tromey <tom@tromey.com>
5712 * printcmd.c (last_count): New global.
5713 (x_command): Use saved count when repeating.
5715 2018-05-04 Tom Tromey <tom@tromey.com>
5717 * nto-procfs.c (do_closedir_cleanup): Remove.
5718 (procfs_pidlist): Use gdb_dir_up.
5719 * procfs.c (do_closedir_cleanup): Remove.
5720 (proc_update_threads): Use gdb_dir_up.
5721 * common/filestuff.h (struct gdb_dir_deleter): New.
5722 (gdb_dir_up): New typedef.
5724 2018-05-04 Tom Tromey <tom@tromey.com>
5726 * ada-lang.c (print_mention_exception): Use std::string.
5728 2018-05-04 Tom Tromey <tom@tromey.com>
5730 * ada-lang.c (create_excep_cond_exprs): Update.
5731 (ada_exception_catchpoint_cond_string): Use std::string.
5733 2018-05-04 Tom Tromey <tom@tromey.com>
5735 * ada-lang.c (xget_renaming_scope): Return std::string.
5736 (old_renaming_is_invisible): Update.
5738 2018-05-04 Tom Tromey <tom@tromey.com>
5740 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5741 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5743 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5745 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5747 2018-05-04 Tom Tromey <tom@tromey.com>
5749 * remote.c (remote_query_supported_append): Change type.
5750 (remote_check_symbols): Update.
5752 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5755 * configure.ac: Prepend libpython.
5756 * python/python-config.py: Likewise.
5757 * configure: Regenerate.
5759 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5761 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5763 2018-05-03 Pedro Alves <palves@redhat.com>
5766 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5767 override. Write 'true' instead of '1'.
5768 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5771 2018-05-02 Pedro Alves <palves@redhat.com>
5773 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5774 add_inf_child_target.
5775 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5776 add_inf_child_target.
5777 * aix-thread.c (aix_thread_target_info): New.
5778 (aix_thread_target) <shortname, longname, doc>: Delete.
5780 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5781 add_inf_child_target.
5782 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5783 add_inf_child_target.
5784 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5785 add_inf_child_target.
5786 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5787 add_inf_child_target.
5788 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5789 add_inf_child_target.
5790 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5791 add_inf_child_target.
5792 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5793 add_inf_child_target.
5794 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5795 add_inf_child_target.
5796 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5797 add_inf_child_target.
5798 * bfd-target.c (target_bfd_target_info): New.
5799 (target_bfd) <shortname, longname, doc>: Delete.
5801 * bsd-kvm.c (bsd_kvm_target_info): New.
5802 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5804 (bsd_kvm_target::open): Rename to ...
5805 (bsd_kvm_target_open): ... this. Adjust.
5806 * bsd-uthread.c (bsd_uthread_target_info): New.
5807 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5809 * corefile.c (core_file_command): Adjust.
5810 * corelow.c (core_target_info): New.
5811 (core_target) <shortname, longname, doc>: Delete.
5813 (core_target::open): Rename to ...
5814 (core_target_open): ... this. Adjust.
5815 * ctf.c (ctf_target_info): New.
5816 (ctf_target) <shortname, longname, doc>: Delete.
5818 (ctf_target::open): Rename to ...
5819 (ctf_target_open): ... this.
5820 (_initialize_ctf): Adjust.
5821 * exec.c (exec_target_info): New.
5822 (exec_target) <shortname, longname, doc>: Delete.
5824 (exec_target::open): Rename to ...
5825 (exec_target_open): ... this.
5826 * gdbcore.h (core_target_open): Declare.
5827 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5828 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5829 add_inf_child_target.
5830 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5831 add_inf_child_target.
5832 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5833 add_inf_child_target.
5834 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5835 add_inf_child_target.
5836 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5837 add_inf_child_target.
5838 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5839 add_inf_child_target.
5840 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5841 add_inf_child_target.
5842 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5843 add_inf_child_target.
5844 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5845 add_inf_child_target.
5846 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5847 add_inf_child_target.
5848 * inf-child.c (inf_child_target_info): New.
5849 (inf_child_target::info): New.
5850 (inf_child_open_target): Remove 'target' parameter. Use
5851 get_native_target instead.
5852 (inf_child_target::open): Delete.
5853 (add_inf_child_target): New.
5854 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5857 (add_inf_child_target): Declare.
5858 (inf_child_open_target): Declare.
5859 * linux-thread-db.c (thread_db_target_info): New.
5860 (thread_db_target) <shortname, longname, doc>: Delete.
5862 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5863 add_inf_child_target.
5864 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5865 add_inf_child_target.
5866 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5867 add_inf_child_target.
5868 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5869 add_inf_child_target.
5870 * make-target-delegates (print_class): Adjust.
5871 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5872 add_inf_child_target.
5873 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5874 add_inf_child_target.
5875 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5876 add_inf_child_target.
5877 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5878 add_inf_child_target.
5879 * nto-procfs.c (nto_native_target_info): New.
5880 (nto_procfs_target_native) <shortname, longname, doc>:
5883 (nto_procfs_target_info): New.
5884 (nto_procfs_target_procfs) <shortname, longname, doc>:
5887 (init_procfs_targets): Adjust.
5888 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5889 add_inf_child_target.
5890 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5891 add_inf_child_target.
5892 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5893 add_inf_child_target.
5894 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5895 add_inf_child_target.
5896 * ravenscar-thread.c (ravenscar_target_info): New.
5897 (ravenscar_thread_target) <shortname, longname, doc>:
5900 * record-btrace.c (record_btrace_target_info):
5901 (record_btrace_target) <shortname, longname, doc>: Delete.
5903 (record_btrace_target::open): Rename to ...
5904 (record_btrace_target_open): ... this. Adjust.
5905 * record-full.c (record_longname, record_doc): New.
5906 (record_full_base_target) <shortname, longname, doc>: Delete.
5908 (record_full_target_info): New.
5909 (record_full_target): <shortname>: Delete.
5911 (record_full_core_open_1, record_full_open_1): Update comments.
5912 (record_full_base_target::open): Rename to ...
5913 (record_full_open): ... this.
5914 (cmd_record_full_restore): Update.
5915 (_initialize_record_full): Update.
5916 * remote-sim.c (remote_sim_target_info): New.
5917 (gdbsim_target) <shortname, longname, doc>: Delete.
5919 (gdbsim_target::open): Rename to ...
5920 (gdbsim_target_open): ... this.
5921 (_initialize_remote_sim): Adjust.
5922 * remote.c (remote_doc): New.
5923 (remote_target_info): New.
5924 (remote_target) <shortname, longname, doc>: Delete.
5926 (extended_remote_target_info): New.
5927 (extended_remote_target) <shortname, longname, doc>: Delete.
5929 (remote_target::open_1): Make static. Adjust.
5930 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5931 * s390-linux-nat.c (_initialize_s390_nat): Use
5932 add_inf_child_target.
5933 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5934 add_inf_child_target.
5935 * sol-thread.c (thread_db_target_info): New.
5936 (sol_thread_target) <shortname, longname, doc>: Delete.
5938 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5939 add_inf_child_target.
5940 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5941 add_inf_child_target.
5942 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5943 add_inf_child_target.
5944 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5945 add_inf_child_target.
5946 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5947 add_inf_child_target.
5948 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5949 add_inf_child_target.
5950 * spu-linux-nat.c (_initialize_spu_nat): Use
5951 add_inf_child_target.
5952 * spu-multiarch.c (spu_multiarch_target_info): New.
5953 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5955 * target-delegates.c: Regenerate.
5956 * target.c: Include <unordered_map>.
5957 (target_ops_p): Delete.
5958 (DEF_VEC_P(target_ops_p)): Delete.
5959 (target_factories): New.
5960 (test_target_info): New.
5961 (test_target_ops::info): New.
5962 (open_target): Adjust to use target_factories.
5963 (add_target_with_completer): Rename to ...
5964 (add_target): ... this. Change prototype. Register target_info
5965 and open callback in target_factories. Register target_info in
5966 command context instead of target_ops.
5967 (add_target): Delete old implementation.
5968 (add_deprecated_target_alias): Change prototype. Adjust.
5969 (the_native_target): New.
5970 (set_native_target, get_native_target): New.
5971 (find_default_run_target): Use the_native_target.
5972 (find_attach_target, find_run_target): Simplify.
5973 (target_ops::open): Delete.
5974 (dummy_target_info): New.
5975 (dummy_target::shortname, dummy_target::longname)
5976 (dummy_target::doc): Delete.
5977 (dummy_target::info): New.
5978 (debug_target::shortname, debug_target::longname)
5979 (debug_target::doc): Delete.
5980 (debug_target::info): New.
5981 * target.h (struct target_info): New.
5982 (target_ops::~target_ops): Add comment.
5983 (target_ops::info): New.
5984 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5985 longer virtual. Implement in terms of target_info.
5986 (set_native_target, get_native_target): Declare.
5987 (target_open_ftype): New.
5988 (add_target, add_target_with_completer)
5989 (add_deprecated_target_alias): Change prototype.
5990 (test_target) <shortname, longname, doc>: Delete.
5992 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5993 add_inf_child_target.
5994 * tracefile-tfile.c (tfile_target_info): New.
5995 (tfile_target) <shortname, longname, doc>: Delete.
5997 (tfile_target::open): Rename to ...
5998 (tfile_target_open): ... this.
5999 (_initialize_tracefile_tfile): Adjust.
6000 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6001 add_inf_child_target.
6002 * windows-nat.c (_initialize_windows_nat): Use
6003 add_inf_child_target.
6004 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6005 add_inf_child_target.
6007 2018-05-02 Pedro Alves <palves@redhat.com>
6009 * linux-nat.h (linux_nat_target) <low_new_thread,
6010 low_delete_thread, low_new_fork, low_forget_process,
6011 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6012 New virtual methods.
6013 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6014 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6015 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6016 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6017 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6019 * linux-fork.c (delete_fork): Adjust to call low method.
6020 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6021 (linux_nat_new_fork, linux_nat_forget_process_hook)
6022 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6023 (linux_nat_status_is_event):
6024 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6025 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6027 (sigtrap_is_event): Rename to ...
6028 (linux_nat_target::low_status_is_event): ... this.
6029 (linux_nat_set_status_is_event): Delete.
6030 (save_stop_reason, linux_nat_wait_1)
6031 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6033 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6034 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6035 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6036 (linux_nat_set_prepare_to_resume): Delete.
6037 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6038 low virtual methods.
6039 * amd64-linux-nat.c: Likewise.
6040 * arm-linux-nat.c: Likewise.
6041 * i386-linux-nat.c: Likewise.
6042 * ia64-linux-nat.c: Likewise.
6043 * mips-linux-nat.c: Likewise.
6044 * ppc-linux-nat.c: Likewise.
6045 * s390-linux-nat.c: Likewise.
6046 * sparc64-linux-nat.c: Likewise.
6047 * x86-linux-nat.c: Likewise.
6048 * x86-linux-nat.h: Include "nat/x86-linux.h".
6049 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6050 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6053 2018-05-02 Pedro Alves <palves@redhat.com>
6055 * target.h (target_ops)
6056 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6057 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6058 stopped_by_watchpoint, have_continuable_watchpoint,
6059 stopped_data_address, watchpoint_addr_within_range,
6060 can_accel_watchpoint_condition, can_run, thread_alive,
6061 has_all_memory, has_memory, has_stack, has_registers,
6062 has_execution, can_async_p, is_async_p, supports_non_stop,
6063 always_non_stop_p, can_execute_reverse, supports_multi_process,
6064 supports_enable_disable_tracepoint,
6065 supports_disable_randomization, supports_string_tracing,
6066 supports_evaluation_of_breakpoint_conditions,
6067 can_run_breakpoint_commands, filesystem_is_local,
6068 can_download_tracepoint, get_trace_state_variable_value,
6069 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6070 record_is_replaying, record_will_replay,
6071 augmented_libraries_svr4_read>: Adjust to return bool.
6072 * aarch64-linux-nat.c: All implementations adjusted.
6073 * aix-thread.c: All implementations adjusted.
6074 * arm-linux-nat.c: All implementations adjusted.
6075 * breakpoint.c: All implementations adjusted.
6076 * bsd-kvm.c: All implementations adjusted.
6077 * bsd-uthread.c: All implementations adjusted.
6078 * corelow.c: All implementations adjusted.
6079 * ctf.c: All implementations adjusted.
6080 * darwin-nat.c: All implementations adjusted.
6081 * darwin-nat.h: All implementations adjusted.
6082 * exec.c: All implementations adjusted.
6083 * fbsd-nat.c: All implementations adjusted.
6084 * fbsd-nat.h: All implementations adjusted.
6085 * gnu-nat.c: All implementations adjusted.
6086 * gnu-nat.h: All implementations adjusted.
6087 * go32-nat.c: All implementations adjusted.
6088 * ia64-linux-nat.c: All implementations adjusted.
6089 * inf-child.c: All implementations adjusted.
6090 * inf-child.h: All implementations adjusted.
6091 * inf-ptrace.c: All implementations adjusted.
6092 * inf-ptrace.h: All implementations adjusted.
6093 * linux-nat.c: All implementations adjusted.
6094 * linux-nat.h: All implementations adjusted.
6095 * mips-linux-nat.c: All implementations adjusted.
6096 * nto-procfs.c: All implementations adjusted.
6097 * ppc-linux-nat.c: All implementations adjusted.
6098 * procfs.c: All implementations adjusted.
6099 * ravenscar-thread.c: All implementations adjusted.
6100 * record-btrace.c: All implementations adjusted.
6101 * record-full.c: All implementations adjusted.
6102 * remote-sim.c: All implementations adjusted.
6103 * remote.c: All implementations adjusted.
6104 * s390-linux-nat.c: All implementations adjusted.
6105 * sol-thread.c: All implementations adjusted.
6106 * spu-multiarch.c: All implementations adjusted.
6107 * target-delegates.c: All implementations adjusted.
6108 * target.c: All implementations adjusted.
6109 * target.h: All implementations adjusted.
6110 * tracefile-tfile.c: All implementations adjusted.
6111 * tracefile.c: All implementations adjusted.
6112 * tracefile.h: All implementations adjusted.
6113 * windows-nat.c: All implementations adjusted.
6114 * x86-linux-nat.h: All implementations adjusted.
6115 * x86-nat.h: All implementations adjusted.
6117 2018-05-02 Pedro Alves <palves@redhat.com>
6119 * make-target-delegates (scan_target_h): Don't trim lines here.
6120 Replace sequences of tabs and/or whitespace with a single
6122 (top level, parsing methods): Trim each line before processing it
6125 2018-05-02 Pedro Alves <palves@redhat.com>
6126 John Baldwin <jhb@freebsd.org>
6128 * target.h (enum strata) <debug_stratum>: New.
6129 (struct target_ops) <all delegation methods>: Replace by C++
6130 virtual methods, and drop "to_" prefix. All references updated
6132 <to_shortname, to_longname, to_doc, to_data,
6133 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6134 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6135 virtual methods. All references updated throughout.
6136 <can_attach, supports_terminal_ours, can_create_inferior,
6137 get_thread_control_capabilities, attach_no_wait>: New
6139 <insert_breakpoint, remove_breakpoint>: Now
6140 TARGET_DEFAULT_NORETURN methods.
6141 <info_proc>: Now returns bool.
6143 (OPS_MAGIC): Delete.
6144 (current_target): Delete. All references replaced by references
6146 (target_stack): ... this. New.
6147 (target_shortname, target_longname): Adjust.
6148 (target_can_run): Now a function declaration.
6149 (default_child_has_all_memory, default_child_has_memory)
6150 (default_child_has_stack, default_child_has_registers)
6151 (default_child_has_execution): Remove target_ops parameter.
6152 (complete_target_initialization): Delete.
6153 (memory_breakpoint_target): New template class.
6154 (test_target_ops): Refactor as a C++ class with virtual methods.
6155 * make-target-delegates (NAME_PART): Tighten.
6156 (POINTER_PART, CP_SYMBOL): New.
6157 (SIMPLE_RETURN_PART): Reimplement.
6158 (VEC_RETURN_PART): Expect less.
6159 (RETURN_PART, VIRTUAL_PART): New.
6160 (METHOD): Adjust to C++ virtual methods.
6161 (scan_target_h): Remove reference to C99.
6162 (dname): Output "target_ops::" prefix.
6163 (write_function_header): Adjust to output a C++ class method.
6164 (write_declaration): New.
6165 (write_delegator): Adjust to output a C++ class method.
6166 (tdname): Output "dummy_target::" prefix.
6167 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6169 (tdefault_names, debug_names): Delete.
6170 (return_types, tdefaults, styles, argtypes_array): New.
6171 (top level): All methods are delegators.
6173 (top level): Print dummy_target and debug_target classes.
6174 * target-delegates.c: Regenerate.
6175 * target-debug.h (target_debug_print_enum_info_proc_what)
6176 (target_debug_print_thread_control_capabilities)
6177 (target_debug_print_thread_info_p): New.
6178 * target.c (dummy_target): Delete.
6179 (the_dummy_target, the_debug_target): New.
6180 (target_stack): Now extern.
6181 (set_targetdebug): Push/unpush debug target.
6182 (default_child_has_all_memory, default_child_has_memory)
6183 (default_child_has_stack, default_child_has_registers)
6184 (default_child_has_execution): Remove target_ops parameter.
6185 (complete_target_initialization): Delete.
6186 (add_target_with_completer): No longer call
6187 complete_target_initialization.
6188 (target_supports_terminal_ours): Use regular delegation.
6189 (update_current_target): Delete.
6190 (push_target): No longer check magic number. Don't call
6191 update_current_target.
6192 (unpush_target): Don't call update_current_target.
6193 (target_is_pushed): No longer check magic number.
6194 (target_require_runnable): Skip for all stratums over
6196 (target_ops::info_proc): New.
6197 (target_info_proc): Use find_target_at and
6198 find_default_run_target.
6199 (target_supports_disable_randomization): Use regular delegation.
6200 (target_get_osdata): Use find_target_at.
6201 (target_ops::open, target_ops::close, target_ops::can_attach)
6202 (target_ops::attach, target_ops::can_create_inferior)
6203 (target_ops::create_inferior, target_ops::can_run)
6204 (target_can_run): New.
6205 (default_fileio_target): Use regular delegation.
6206 (target_ops::fileio_open, target_ops::fileio_pwrite)
6207 (target_ops::fileio_pread, target_ops::fileio_fstat)
6208 (target_ops::fileio_close, target_ops::fileio_unlink)
6209 (target_ops::fileio_readlink): New.
6210 (target_fileio_open_1, target_fileio_unlink)
6211 (target_fileio_readlink): Always call the target method. Handle
6213 (return_zero, return_zero_has_execution): Delete.
6214 (init_dummy_target): Delete.
6215 (dummy_target::dummy_target, dummy_target::shortname)
6216 (dummy_target::longname, dummy_target::doc)
6217 (debug_target::debug_target, debug_target::shortname)
6218 (debug_target::longname, debug_target::doc): New.
6219 (target_supports_delete_record): Use regular delegation.
6220 (setup_target_debug): Delete.
6221 (maintenance_print_target_stack): Skip debug_stratum.
6222 (initialize_targets): Instantiate the_dummy_target and
6224 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6226 (target_auxv_search, fprint_target_auxv): Adjust.
6227 (info_auxv_command): Adjust to use target_stack.
6228 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6229 * exceptions.c (print_flush): Handle a NULL target_stack.
6230 * regcache.c (target_ops_no_register): Refactor as class with
6233 * exec.c (exec_target): New class.
6234 (exec_ops): Now an exec_target.
6235 (exec_open, exec_close_1, exec_get_section_table)
6236 (exec_xfer_partial, exec_files_info, exec_has_memory)
6237 (exec_make_note_section): Refactor as exec_target methods.
6238 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6240 (exec_target::find_memory_regions): New.
6241 (_initialize_exec): Don't call init_exec_ops.
6242 * gdbcore.h (exec_file_clear): Delete.
6244 * corefile.c (core_target): Delete.
6245 (core_file_command): Adjust.
6246 * corelow.c (core_target): New class.
6247 (the_core_target): New.
6248 (core_close): Remove target_ops parameter.
6249 (core_close_cleanup): Adjust.
6250 (core_target::close): New.
6251 (core_open, core_detach, get_core_registers, core_files_info)
6252 (core_xfer_partial, core_thread_alive, core_read_description)
6253 (core_pid_to_str, core_thread_name, core_has_memory)
6254 (core_has_stack, core_has_registers, core_info_proc): Rework as
6255 core_target methods.
6256 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6257 (_initialize_corelow): Initialize the_core_target.
6258 * gdbcore.h (core_target): Delete.
6259 (the_core_target): New.
6261 * ctf.c: (ctf_target): New class.
6262 (ctf_ops): Now a ctf_target.
6263 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6264 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6265 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6267 (init_ctf_ops): Delete.
6268 (_initialize_ctf): Don't call it.
6269 * tracefile-tfile.c (tfile_target): New class.
6270 (tfile_ops): Now a tfile_target.
6271 (tfile_open, tfile_close, tfile_files_info)
6272 (tfile_get_tracepoint_status, tfile_trace_find)
6273 (tfile_fetch_registers, tfile_xfer_partial)
6274 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6275 Refactor as tfile_target methods.
6276 (tfile_xfer_partial_features): Remove target_ops parameter.
6277 (init_tfile_ops): Delete.
6278 (_initialize_tracefile_tfile): Don't call it.
6279 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6280 (tracefile_has_stack, tracefile_has_registers)
6281 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6282 tracefile_target methods.
6283 (init_tracefile_ops): Delete.
6284 (tracefile_target::tracefile_target): New.
6285 * tracefile.h: Include "target.h".
6286 (tracefile_target): New class.
6287 (init_tracefile_ops): Delete.
6289 * spu-multiarch.c (spu_multiarch_target): New class.
6290 (spu_ops): Now a spu_multiarch_target.
6291 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6292 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6293 (spu_search_memory, spu_mourn_inferior): Refactor as
6294 spu_multiarch_target methods.
6295 (init_spu_ops): Delete.
6296 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6297 complete_target_initialization.
6299 * ravenscar-thread.c (ravenscar_thread_target): New class.
6300 (ravenscar_ops): Now a ravenscar_thread_target.
6301 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6302 (ravenscar_thread_alive, ravenscar_pid_to_str)
6303 (ravenscar_fetch_registers, ravenscar_store_registers)
6304 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6305 (ravenscar_stopped_by_hw_breakpoint)
6306 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6307 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6308 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6310 (init_ravenscar_thread_ops): Delete.
6311 (_initialize_ravenscar): Remove references to
6312 init_ravenscar_thread_ops and complete_target_initialization.
6314 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6315 (bsd_uthread_target): New class.
6316 (bsd_uthread_ops): Now a bsd_uthread_target.
6317 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6318 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6319 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6320 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6321 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6322 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6323 (bsd_uthread_target): Delete function.
6324 (_initialize_bsd_uthread): Remove reference to
6325 complete_target_initialization.
6327 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6328 (target_bfd): ... this new class.
6329 (target_bfd_xfer_partial, target_bfd_get_section_table)
6330 (target_bfd_close): Refactor as target_bfd methods.
6331 (target_bfd::~target_bfd): New.
6332 (target_bfd_reopen): Adjust.
6333 (target_bfd::close): New.
6335 * record-btrace.c (record_btrace_target): New class.
6336 (record_btrace_ops): Now a record_btrace_target.
6337 (record_btrace_open, record_btrace_stop_recording)
6338 (record_btrace_disconnect, record_btrace_close)
6339 (record_btrace_async, record_btrace_info)
6340 (record_btrace_insn_history, record_btrace_insn_history_range)
6341 (record_btrace_insn_history_from, record_btrace_call_history)
6342 (record_btrace_call_history_range)
6343 (record_btrace_call_history_from, record_btrace_record_method)
6344 (record_btrace_is_replaying, record_btrace_will_replay)
6345 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6346 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6347 (record_btrace_store_registers, record_btrace_prepare_to_store)
6348 (record_btrace_to_get_unwinder)
6349 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6350 (record_btrace_commit_resume, record_btrace_wait)
6351 (record_btrace_stop, record_btrace_can_execute_reverse)
6352 (record_btrace_stopped_by_sw_breakpoint)
6353 (record_btrace_supports_stopped_by_sw_breakpoint)
6354 (record_btrace_stopped_by_hw_breakpoint)
6355 (record_btrace_supports_stopped_by_hw_breakpoint)
6356 (record_btrace_update_thread_list, record_btrace_thread_alive)
6357 (record_btrace_goto_begin, record_btrace_goto_end)
6358 (record_btrace_goto, record_btrace_stop_replaying_all)
6359 (record_btrace_execution_direction)
6360 (record_btrace_prepare_to_generate_core)
6361 (record_btrace_done_generating_core): Refactor as
6362 record_btrace_target methods.
6363 (init_record_btrace_ops): Delete.
6364 (_initialize_record_btrace): Remove reference to
6365 init_record_btrace_ops.
6366 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6367 the execution_direction global.
6368 (record_full_base_target, record_full_target)
6369 (record_full_core_target): New classes.
6370 (record_full_ops): Now a record_full_target.
6371 (record_full_core_ops): Now a record_full_core_target.
6372 (record_full_target::detach, record_full_target::disconnect)
6373 (record_full_core_target::disconnect)
6374 (record_full_target::mourn_inferior, record_full_target::kill):
6376 (record_full_open, record_full_close, record_full_async): Refactor
6377 as methods of the record_full_base_target class.
6378 (record_full_resume, record_full_commit_resume): Refactor
6379 as methods of the record_full_target class.
6380 (record_full_wait, record_full_stopped_by_watchpoint)
6381 (record_full_stopped_data_address)
6382 (record_full_stopped_by_sw_breakpoint)
6383 (record_full_supports_stopped_by_sw_breakpoint)
6384 (record_full_stopped_by_hw_breakpoint)
6385 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6386 methods of the record_full_base_target class.
6387 (record_full_store_registers, record_full_xfer_partial)
6388 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6389 Refactor as methods of the record_full_target class.
6390 (record_full_can_execute_reverse, record_full_get_bookmark)
6391 (record_full_goto_bookmark, record_full_execution_direction)
6392 (record_full_record_method, record_full_info, record_full_delete)
6393 (record_full_is_replaying, record_full_will_replay)
6394 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6395 (record_full_stop_replaying): Refactor as methods of the
6396 record_full_base_target class.
6397 (record_full_core_resume, record_full_core_kill)
6398 (record_full_core_fetch_registers)
6399 (record_full_core_prepare_to_store)
6400 (record_full_core_store_registers, record_full_core_xfer_partial)
6401 (record_full_core_insert_breakpoint)
6402 (record_full_core_remove_breakpoint)
6403 (record_full_core_has_execution): Refactor
6404 as methods of the record_full_core_target class.
6405 (record_full_base_target::supports_delete_record): New.
6406 (init_record_full_ops): Delete.
6407 (init_record_full_core_ops): Delete.
6408 (record_full_save): Refactor as method of the
6409 record_full_base_target class.
6410 (_initialize_record_full): Remove references to
6411 init_record_full_ops and init_record_full_core_ops.
6413 * remote.c (remote_target, extended_remote_target): New classes.
6414 (remote_ops): Now a remote_target.
6415 (extended_remote_ops): Now an extended_remote_target.
6416 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6417 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6418 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6419 (remote_pass_signals, remote_set_syscall_catchpoint)
6420 (remote_program_signals, )
6421 (remote_thread_always_alive): Remove target_ops parameter.
6422 (remote_thread_alive, remote_thread_name)
6423 (remote_update_thread_list, remote_threads_extra_info)
6424 (remote_static_tracepoint_marker_at)
6425 (remote_static_tracepoint_markers_by_strid)
6426 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6427 (remote_open): Refactor as methods of remote_target.
6428 (extended_remote_open, extended_remote_detach)
6429 (extended_remote_attach, extended_remote_post_attach):
6430 (extended_remote_supports_disable_randomization)
6431 (extended_remote_create_inferior): : Refactor as method of
6432 extended_remote_target.
6433 (remote_set_permissions, remote_open_1, remote_detach)
6434 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6435 (remote_resume, remote_commit_resume, remote_stop)
6436 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6437 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6438 (remote_prepare_to_store, remote_store_registers)
6439 (remote_flash_erase, remote_flash_done, remote_files_info)
6440 (remote_kill, remote_mourn, remote_insert_breakpoint)
6441 (remote_remove_breakpoint, remote_insert_watchpoint)
6442 (remote_watchpoint_addr_within_range)
6443 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6444 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6445 (remote_supports_stopped_by_sw_breakpoint)
6446 (remote_stopped_by_hw_breakpoint)
6447 (remote_supports_stopped_by_hw_breakpoint)
6448 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6449 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6450 (remote_verify_memory): Refactor as methods of remote_target.
6451 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6453 (remote_xfer_partial, remote_get_memory_xfer_limit)
6454 (remote_search_memory, remote_rcmd, remote_memory_map)
6455 (remote_pid_to_str, remote_get_thread_local_address)
6456 (remote_get_tib_address, remote_read_description): Refactor as
6457 methods of remote_target.
6458 (remote_target::fileio_open, remote_target::fileio_pwrite)
6459 (remote_target::fileio_pread, remote_target::fileio_close): New.
6460 (remote_hostio_readlink, remote_hostio_fstat)
6461 (remote_filesystem_is_local, remote_can_execute_reverse)
6462 (remote_supports_non_stop, remote_supports_disable_randomization)
6463 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6464 (remote_supports_enable_disable_tracepoint)
6465 (remote_supports_string_tracing)
6466 (remote_can_run_breakpoint_commands, remote_trace_init)
6467 (remote_download_tracepoint, remote_can_download_tracepoint)
6468 (remote_download_trace_state_variable, remote_enable_tracepoint)
6469 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6470 (remote_trace_start, remote_get_trace_status)
6471 (remote_get_tracepoint_status, remote_trace_stop)
6472 (remote_trace_find, remote_get_trace_state_variable_value)
6473 (remote_save_trace_data, remote_get_raw_trace_data)
6474 (remote_set_disconnected_tracing, remote_core_of_thread)
6475 (remote_set_circular_trace_buffer, remote_traceframe_info)
6476 (remote_get_min_fast_tracepoint_insn_len)
6477 (remote_set_trace_buffer_size, remote_set_trace_notes)
6478 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6479 (remote_disable_btrace, remote_teardown_btrace)
6480 (remote_read_btrace, remote_btrace_conf)
6481 (remote_augmented_libraries_svr4_read, remote_load)
6482 (remote_pid_to_exec_file, remote_can_do_single_step)
6483 (remote_execution_direction, remote_thread_handle_to_thread_info):
6484 Refactor as methods of remote_target.
6485 (init_remote_ops, init_extended_remote_ops): Delete.
6486 (remote_can_async_p, remote_is_async_p, remote_async)
6487 (remote_thread_events, remote_upload_tracepoints)
6488 (remote_upload_trace_state_variables): Refactor as methods of
6490 (_initialize_remote): Remove references to init_remote_ops and
6491 init_extended_remote_ops.
6493 * remote-sim.c (gdbsim_target): New class.
6494 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6495 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6496 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6497 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6498 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6499 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6500 Refactor as methods of gdbsim_target.
6501 (gdbsim_ops): Now a gdbsim_target.
6502 (init_gdbsim_ops): Delete.
6503 (gdbsim_cntrl_c): Adjust.
6504 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6506 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6507 (the_amd64_linux_nat_target): New.
6508 (amd64_linux_fetch_inferior_registers)
6509 (amd64_linux_store_inferior_registers): Refactor as methods of
6510 amd64_linux_nat_target.
6511 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6512 * i386-linux-nat.c: Don't include "linux-nat.h".
6513 (i386_linux_nat_target): New class.
6514 (the_i386_linux_nat_target): New.
6515 (i386_linux_fetch_inferior_registers)
6516 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6517 as methods of i386_linux_nat_target.
6518 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6519 * inf-child.c (inf_child_ops): Delete.
6520 (inf_child_fetch_inferior_registers)
6521 (inf_child_store_inferior_registers): Delete.
6522 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6523 methods of inf_child_target.
6524 (inf_child_target::supports_terminal_ours)
6525 (inf_child_target::terminal_init)
6526 (inf_child_target::terminal_inferior)
6527 (inf_child_target::terminal_ours_for_output)
6528 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6529 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6531 (inf_child_open, inf_child_disconnect, inf_child_close)
6532 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6533 (inf_child_post_startup_inferior, inf_child_can_run)
6534 (inf_child_pid_to_exec_file): Refactor as methods of
6536 (inf_child_follow_fork): Delete.
6537 (inf_child_target::can_create_inferior)
6538 (inf_child_target::can_attach): New.
6539 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6540 (inf_child_target::has_stack, inf_child_target::has_registers)
6541 (inf_child_target::has_execution): New.
6542 (inf_child_fileio_open, inf_child_fileio_pwrite)
6543 (inf_child_fileio_pread, inf_child_fileio_fstat)
6544 (inf_child_fileio_close, inf_child_fileio_unlink)
6545 (inf_child_fileio_readlink, inf_child_use_agent)
6546 (inf_child_can_use_agent): Refactor as methods of
6548 (return_zero, inf_child_target): Delete.
6549 (inf_child_target::inf_child_target): New.
6550 * inf-child.h: Include "target.h".
6551 (inf_child_target): Delete function prototype.
6552 (inf_child_target): New class.
6553 (inf_child_open_target, inf_child_mourn_inferior)
6554 (inf_child_maybe_unpush_target): Delete.
6555 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6556 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6557 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6558 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6559 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6560 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6561 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6562 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6563 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6564 methods of inf_ptrace_target.
6565 (inf_ptrace_target): Delete function.
6566 * inf-ptrace.h: Include "inf-child.h".
6567 (inf_ptrace_target): Delete function declaration.
6568 (inf_ptrace_target): New class.
6569 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6570 * linux-nat.c (linux_target): New.
6571 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6572 (linux_nat_target::~linux_nat_target): New.
6573 (linux_child_post_attach, linux_child_post_startup_inferior)
6574 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6575 (linux_child_remove_fork_catchpoint)
6576 (linux_child_insert_vfork_catchpoint)
6577 (linux_child_remove_vfork_catchpoint)
6578 (linux_child_insert_exec_catchpoint)
6579 (linux_child_remove_exec_catchpoint)
6580 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6581 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6582 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6583 (linux_nat_stopped_data_address)
6584 (linux_nat_stopped_by_sw_breakpoint)
6585 (linux_nat_supports_stopped_by_sw_breakpoint)
6586 (linux_nat_stopped_by_hw_breakpoint)
6587 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6588 (linux_nat_kill, linux_nat_mourn_inferior)
6589 (linux_nat_xfer_partial, linux_nat_thread_alive)
6590 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6591 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6592 (linux_child_static_tracepoint_markers_by_strid)
6593 (linux_nat_is_async_p, linux_nat_can_async_p)
6594 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6595 (linux_nat_supports_multi_process)
6596 (linux_nat_supports_disable_randomization, linux_nat_async)
6597 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6598 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6599 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6600 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6601 methods of linux_nat_target.
6602 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6603 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6605 (check_stopped_by_watchpoint): Adjust.
6606 (linux_xfer_partial): Delete.
6607 (linux_target_install_ops, linux_target, linux_nat_add_target):
6609 (linux_nat_target::linux_nat_target): New.
6610 * linux-nat.h: Include "inf-ptrace.h".
6611 (linux_nat_target): New.
6612 (linux_target, linux_target_install_ops, linux_nat_add_target):
6613 Delete function declarations.
6614 (linux_target): Declare global.
6615 * linux-thread-db.c (thread_db_target): New.
6616 (thread_db_target::thread_db_target): New.
6617 (thread_db_ops): Delete.
6618 (the_thread_db_target): New.
6619 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6620 (thread_db_update_thread_list, thread_db_pid_to_str)
6621 (thread_db_extra_thread_info)
6622 (thread_db_thread_handle_to_thread_info)
6623 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6624 (thread_db_resume): Refactor as methods of thread_db_target.
6625 (init_thread_db_ops): Delete.
6626 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6627 * x86-linux-nat.c: Don't include "linux-nat.h".
6628 (super_post_startup_inferior): Delete.
6629 (x86_linux_nat_target::~x86_linux_nat_target): New.
6630 (x86_linux_child_post_startup_inferior)
6631 (x86_linux_read_description, x86_linux_enable_btrace)
6632 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6633 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6634 methods of x86_linux_nat_target.
6635 (x86_linux_create_target): Delete. Bits folded ...
6636 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6638 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6639 (x86_linux_nat_target): New class.
6640 (x86_linux_create_target): Delete.
6641 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6642 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6643 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6644 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6645 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6646 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6648 (x86_use_watchpoints): Delete.
6649 * x86-nat.h: Include "breakpoint.h" and "target.h".
6650 (x86_use_watchpoints): Delete.
6651 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6652 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6653 (x86_insert_watchpoint, x86_remove_watchpoint)
6654 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6655 (x86_stopped_by_hw_breakpoint): New declarations.
6656 (x86_nat_target): New template class.
6658 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6659 (the_ppc_linux_nat_target): New.
6660 (ppc_linux_fetch_inferior_registers)
6661 (ppc_linux_can_use_hw_breakpoint)
6662 (ppc_linux_region_ok_for_hw_watchpoint)
6663 (ppc_linux_ranged_break_num_registers)
6664 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6665 (ppc_linux_insert_mask_watchpoint)
6666 (ppc_linux_remove_mask_watchpoint)
6667 (ppc_linux_can_accel_watchpoint_condition)
6668 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6669 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6670 (ppc_linux_watchpoint_addr_within_range)
6671 (ppc_linux_masked_watch_num_registers)
6672 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6673 (ppc_linux_read_description): Refactor as methods of
6674 ppc_linux_nat_target.
6675 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6677 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6678 (procfs_target): New class.
6679 (the_procfs_target): New.
6680 (procfs_target): Delete function.
6681 (procfs_auxv_parse, procfs_attach, procfs_detach)
6682 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6683 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6684 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6685 (procfs_create_inferior, procfs_update_thread_list)
6686 (procfs_thread_alive, procfs_pid_to_str)
6687 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6688 (procfs_stopped_data_address, procfs_insert_watchpoint)
6689 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6690 (proc_find_memory_regions, procfs_info_proc)
6691 (procfs_make_note_section): Refactor as methods of procfs_target.
6692 (_initialize_procfs): Adjust.
6693 * sol-thread.c (sol_thread_target): New class.
6694 (sol_thread_ops): Now a sol_thread_target.
6695 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6696 (sol_thread_fetch_registers, sol_thread_store_registers)
6697 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6698 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6699 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6700 (init_sol_thread_ops): Delete.
6701 (_initialize_sol_thread): Adjust. Remove references to
6702 init_sol_thread_ops and complete_target_initialization.
6704 * windows-nat.c (windows_nat_target): New class.
6705 (windows_fetch_inferior_registers)
6706 (windows_store_inferior_registers, windows_resume, windows_wait)
6707 (windows_attach, windows_detach, windows_pid_to_exec_file)
6708 (windows_files_info, windows_create_inferior)
6709 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6710 (windows_close, windows_pid_to_str, windows_xfer_partial)
6711 (windows_get_tib_address, windows_get_ada_task_ptid)
6712 (windows_thread_name, windows_thread_alive): Refactor as
6713 windows_nat_target methods.
6714 (do_initial_windows_stuff): Adjust.
6715 (windows_target): Delete function.
6716 (_initialize_windows_nat): Adjust.
6718 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6719 (darwin_mourn_inferior, darwin_kill_inferior)
6720 (darwin_create_inferior, darwin_attach, darwin_detach)
6721 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6722 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6723 (darwin_supports_multi_process): Refactor as darwin_nat_target
6725 (darwin_resume_to, darwin_files_info): Delete.
6726 (_initialize_darwin_inferior): Rename to ...
6727 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6728 * darwin-nat.h: Include "inf-child.h".
6729 (darwin_nat_target): New class.
6730 (darwin_complete_target): Delete.
6731 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6732 (darwin_target): New.
6733 (i386_darwin_fetch_inferior_registers)
6734 (i386_darwin_store_inferior_registers): Refactor as methods of
6736 (darwin_complete_target): Delete, with ...
6737 (_initialize_i386_darwin_nat): ... bits factored out here.
6739 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6740 (the_alpha_linux_nat_target): New.
6741 (alpha_linux_register_u_offset): Refactor as
6742 alpha_linux_nat_target method.
6743 (_initialize_alpha_linux_nat): Adjust.
6744 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6745 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6746 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6747 methods of linux_nat_trad_target.
6748 (linux_trad_target): Delete.
6749 * linux-nat-trad.h (linux_trad_target): Delete function.
6750 (linux_nat_trad_target): New class.
6751 * mips-linux-nat.c (mips_linux_nat_target): New class.
6752 (super_fetch_registers, super_store_registers, super_close):
6754 (the_mips_linux_nat_target): New.
6755 (mips64_linux_regsets_fetch_registers)
6756 (mips64_linux_regsets_store_registers)
6757 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6758 (mips_linux_register_u_offset, mips_linux_read_description)
6759 (mips_linux_can_use_hw_breakpoint)
6760 (mips_linux_stopped_by_watchpoint)
6761 (mips_linux_stopped_data_address)
6762 (mips_linux_region_ok_for_hw_watchpoint)
6763 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6764 (mips_linux_close): Refactor as methods of mips_linux_nat.
6765 (_initialize_mips_linux_nat): Adjust to C++ification.
6767 * aix-thread.c (aix_thread_target): New class.
6768 (aix_thread_ops): Now an aix_thread_target.
6769 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6770 (aix_thread_fetch_registers, aix_thread_store_registers)
6771 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6772 (aix_thread_thread_alive, aix_thread_pid_to_str)
6773 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6774 Refactor as methods of aix_thread_target.
6775 (init_aix_thread_ops): Delete.
6776 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6777 and complete_target_initialization.
6778 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6779 (rs6000_nat_target): New class.
6780 (the_rs6000_nat_target): New.
6781 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6782 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6783 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6784 (super_create_inferior): Delete.
6785 (_initialize_rs6000_nat): Adjust to C++ification.
6787 * arm-linux-nat.c (arm_linux_nat_target): New class.
6788 (the_arm_linux_nat_target): New.
6789 (arm_linux_fetch_inferior_registers)
6790 (arm_linux_store_inferior_registers, arm_linux_read_description)
6791 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6792 (arm_linux_remove_hw_breakpoint)
6793 (arm_linux_region_ok_for_hw_watchpoint)
6794 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6795 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6796 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6797 arm_linux_nat_target.
6798 (_initialize_arm_linux_nat): Adjust to C++ification.
6800 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6801 (the_aarch64_linux_nat_target): New.
6802 (aarch64_linux_fetch_inferior_registers)
6803 (aarch64_linux_store_inferior_registers)
6804 (aarch64_linux_child_post_startup_inferior)
6805 (aarch64_linux_read_description)
6806 (aarch64_linux_can_use_hw_breakpoint)
6807 (aarch64_linux_insert_hw_breakpoint)
6808 (aarch64_linux_remove_hw_breakpoint)
6809 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6810 (aarch64_linux_region_ok_for_hw_watchpoint)
6811 (aarch64_linux_stopped_data_address)
6812 (aarch64_linux_stopped_by_watchpoint)
6813 (aarch64_linux_watchpoint_addr_within_range)
6814 (aarch64_linux_can_do_single_step): Refactor as methods of
6815 aarch64_linux_nat_target.
6816 (super_post_startup_inferior): Delete.
6817 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6819 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6820 (the_hppa_linux_nat_target): New.
6821 (hppa_linux_fetch_inferior_registers)
6822 (hppa_linux_store_inferior_registers): Refactor as methods of
6823 hppa_linux_nat_target.
6824 (_initialize_hppa_linux_nat): Adjust to C++ification.
6826 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6827 (the_ia64_linux_nat_target): New.
6828 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6829 (ia64_linux_stopped_data_address)
6830 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6831 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6832 ia64_linux_nat_target methods.
6833 (super_xfer_partial): Delete.
6834 (_initialize_ia64_linux_nat): Adjust to C++ification.
6836 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6837 (the_m32r_linux_nat_target): New.
6838 (m32r_linux_fetch_inferior_registers)
6839 (m32r_linux_store_inferior_registers): Refactor as
6840 m32r_linux_nat_target methods.
6841 (_initialize_m32r_linux_nat): Adjust to C++ification.
6843 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6844 (the_m68k_linux_nat_target): New.
6845 (m68k_linux_fetch_inferior_registers)
6846 (m68k_linux_store_inferior_registers): Refactor as
6847 m68k_linux_nat_target methods.
6848 (_initialize_m68k_linux_nat): Adjust to C++ification.
6850 * s390-linux-nat.c (s390_linux_nat_target): New class.
6851 (the_s390_linux_nat_target): New.
6852 (s390_linux_fetch_inferior_registers)
6853 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6854 (s390_insert_watchpoint, s390_remove_watchpoint)
6855 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6856 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6857 (s390_auxv_parse, s390_read_description): Refactor as methods of
6858 s390_linux_nat_target.
6859 (_initialize_s390_nat): Adjust to C++ification.
6861 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6862 (the_sparc_linux_nat_target): New.
6863 (_initialize_sparc_linux_nat): Adjust to C++ification.
6864 * sparc-nat.c (sparc_fetch_inferior_registers)
6865 (sparc_store_inferior_registers): Remove target_ops parameter.
6866 * sparc-nat.h (sparc_fetch_inferior_registers)
6867 (sparc_store_inferior_registers): Remove target_ops parameter.
6868 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6869 (the_sparc64_linux_nat_target): New.
6870 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6872 * spu-linux-nat.c (spu_linux_nat_target): New class.
6873 (the_spu_linux_nat_target): New.
6874 (spu_child_post_startup_inferior, spu_child_post_attach)
6875 (spu_child_wait, spu_fetch_inferior_registers)
6876 (spu_store_inferior_registers, spu_xfer_partial)
6877 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6879 (_initialize_spu_nat): Adjust to C++ification.
6881 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6882 (the_tilegx_linux_nat_target): New.
6883 (fetch_inferior_registers, store_inferior_registers):
6884 Refactor as methods.
6885 (_initialize_tile_linux_nat): Adjust to C++ification.
6887 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6888 (the_xtensa_linux_nat_target): New.
6889 (xtensa_linux_fetch_inferior_registers)
6890 (xtensa_linux_store_inferior_registers): Refactor as
6891 xtensa_linux_nat_target methods.
6892 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6894 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6895 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6896 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6897 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6898 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6899 (fbsd_stopped_by_sw_breakpoint)
6900 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6901 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6902 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6903 (fbsd_post_startup_inferior, fbsd_post_attach)
6904 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6905 (fbsd_set_syscall_catchpoint)
6906 (super_xfer_partial, super_resume, super_wait)
6907 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6908 (fbsd_handle_debug_trap): Remove target_ops parameter.
6909 (fbsd_nat_add_target): Delete.
6910 * fbsd-nat.h: Include "inf-ptrace.h".
6911 (fbsd_nat_add_target): Delete.
6912 (USE_SIGTRAP_SIGINFO): Define.
6913 (fbsd_nat_target): New class.
6915 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6916 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6917 (amd64bsd_target): Delete.
6918 * amd64-bsd-nat.h: New file.
6919 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6921 (amd64_fbsd_nat_target): New class.
6922 (the_amd64_fbsd_nat_target): New.
6923 (amd64fbsd_read_description): Refactor as method of
6924 amd64_fbsd_nat_target.
6925 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6926 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6927 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6928 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6929 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6930 (i386bsd_target): Delete.
6931 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6932 (i386bsd_fetch_inferior_registers)
6933 (i386bsd_store_inferior_registers): Declare.
6934 (i386_bsd_nat_target): New class.
6935 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6936 (the_i386_fbsd_nat_target): New.
6937 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6938 i386_fbsd_nat_target methods.
6939 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6940 (_initialize_i386fbsd_nat): Adjust to C++ification.
6941 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6942 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6943 (_initialize_x86_bsd_nat): Adjust to C++ification.
6944 * x86-bsd-nat.h: Include "x86-nat.h".
6945 (x86bsd_target): Delete declaration.
6946 (x86bsd_nat_target): New class.
6948 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6949 (the_aarch64_fbsd_nat_target): New.
6950 (aarch64_fbsd_fetch_inferior_registers)
6951 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6952 aarch64_fbsd_nat_target.
6953 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6954 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6955 (the_alpha_bsd_nat_target): New.
6956 (alphabsd_fetch_inferior_registers)
6957 (alphabsd_store_inferior_registers): Refactor as
6958 alpha_bsd_nat_target methods.
6959 (_initialize_alphabsd_nat): Refactor as methods of
6960 alpha_bsd_nat_target.
6961 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6962 (the_amd64_nbsd_nat_target): New.
6963 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6964 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6965 (the_amd64_obsd_nat_target): New.
6966 (_initialize_amd64obsd_nat): Adjust to C++ification.
6967 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6968 (the_arm_fbsd_nat_target): New.
6969 (arm_fbsd_fetch_inferior_registers)
6970 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6971 (_initialize_arm_fbsd_nat): Refactor as methods of
6972 arm_fbsd_nat_target.
6973 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6974 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6975 (the_arm_netbsd_nat_target): New.
6976 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6977 arm_netbsd_nat_target.
6978 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6979 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6980 (the_hppa_nbsd_nat_target): New.
6981 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6982 hppa_nbsd_nat_target methods.
6983 (_initialize_hppanbsd_nat): Adjust to C++ification.
6984 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6985 (the_hppa_obsd_nat_target): New.
6986 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6987 methods of hppa_obsd_nat_target.
6988 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6990 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6991 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6993 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6994 (_initialize_i386obsd_nat): Use add_target.
6995 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6996 (the_m68k_bsd_nat_target): New.
6997 (m68kbsd_fetch_inferior_registers)
6998 (m68kbsd_store_inferior_registers): Refactor as methods of
6999 m68k_bsd_nat_target.
7000 (_initialize_m68kbsd_nat): Adjust to C++ification.
7001 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7002 (the_mips_fbsd_nat_target): New.
7003 (mips_fbsd_fetch_inferior_registers)
7004 (mips_fbsd_store_inferior_registers): Refactor as methods of
7005 mips_fbsd_nat_target.
7006 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7008 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7009 (the_mips_nbsd_nat_target): New.
7010 (mipsnbsd_fetch_inferior_registers)
7011 (mipsnbsd_store_inferior_registers): Refactor as methods of
7012 mips_nbsd_nat_target.
7013 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7014 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7015 (the_mips64_obsd_nat_target): New.
7016 (mips64obsd_fetch_inferior_registers)
7017 (mips64obsd_store_inferior_registers): Refactor as methods of
7018 mips64_obsd_nat_target.
7019 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7021 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7023 * nbsd-nat.h: Include "inf-ptrace.h".
7024 (nbsd_nat_target): New class.
7025 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7026 (obsd_wait): Refactor as methods of obsd_nat_target.
7027 (obsd_add_target): Delete.
7028 * obsd-nat.h: Include "inf-ptrace.h".
7029 (obsd_nat_target): New class.
7030 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7031 (the_ppc_fbsd_nat_target): New.
7032 (ppcfbsd_fetch_inferior_registers)
7033 (ppcfbsd_store_inferior_registers): Refactor as methods of
7034 ppc_fbsd_nat_target.
7035 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7037 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7038 (the_ppc_nbsd_nat_target): New.
7039 (ppcnbsd_fetch_inferior_registers)
7040 (ppcnbsd_store_inferior_registers): Refactor as methods of
7041 ppc_nbsd_nat_target.
7042 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7043 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7044 (the_ppc_obsd_nat_target): New.
7045 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7046 methods of ppc_obsd_nat_target.
7047 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7049 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7050 (the_sh_nbsd_nat_target): New.
7051 (shnbsd_fetch_inferior_registers)
7052 (shnbsd_store_inferior_registers): Refactor as methods of
7054 (_initialize_shnbsd_nat): Adjust to C++ification.
7055 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7056 (inf_ptrace_xfer_partial): Delete.
7057 (sparc_xfer_partial, sparc_target): Delete.
7058 * sparc-nat.h (sparc_fetch_inferior_registers)
7059 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7060 (sparc_target): Delete function declaration.
7061 (sparc_target): New template class.
7062 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7063 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7064 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7065 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7067 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7068 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7069 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7070 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7072 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7073 (the_vax_bsd_nat_target): New.
7074 (vaxbsd_fetch_inferior_registers)
7075 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7077 (_initialize_vaxbsd_nat): Adjust to C++ification.
7079 * bsd-kvm.c (bsd_kvm_target): New class.
7080 (bsd_kvm_ops): Now a bsd_kvm_target.
7081 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7082 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7083 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7085 (bsd_kvm_return_one): Delete.
7086 (bsd_kvm_add_target): Adjust to C++ification.
7088 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7089 (nto_procfs_target_procfs): New classes.
7090 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7091 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7092 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7093 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7094 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7095 (procfs_remove_hw_breakpoint, procfs_resume)
7096 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7097 (procfs_kill_inferior, procfs_store_registers)
7098 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7099 as methods of nto_procfs_target.
7100 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7101 (nto_native_ops): Delete.
7102 (procfs_open, procfs_native_open): Delete.
7103 (nto_native_ops): Now an nto_procfs_target_native.
7104 (init_procfs_targets): Adjust to C++ification.
7105 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7106 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7107 Refactor as methods of nto_procfs_target.
7109 * go32-nat.c (go32_nat_target): New class.
7110 (the_go32_nat_target): New.
7111 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7112 (go32_store_registers, go32_xfer_partial, go32_files_info)
7113 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7114 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7115 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7116 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7117 (go32_target): Delete.
7118 (_initialize_go32_nat): Adjust to C++ification.
7120 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7121 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7122 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7123 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7125 (gnu_target): Delete.
7126 * gnu-nat.h (gnu_target): Delete.
7127 (gnu_nat_target): New class.
7128 * i386-gnu-nat.c (gnu_base_target): New.
7129 (i386_gnu_nat_target): New class.
7130 (the_i386_gnu_nat_target): New.
7131 (_initialize_i386gnu_nat): Adjust to C++ification.
7133 2018-05-02 Pedro Alves <palves@redhat.com>
7135 * bfd-target.c (target_bfd_xclose): Rename to ...
7136 (target_bfd_close): ... this.
7137 (target_bfd_reopen): Adjust.
7138 * target.c (target_close): Remove references to to_xclose.
7139 * target.h (target_ops::to_xclose): Delete.
7140 (target_ops::to_close): Update comments.
7142 2018-05-02 Pedro Alves <palves@redhat.com>
7144 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7146 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7147 * inf-ptrace.c (inf_ptrace_register_u_offset)
7148 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7149 (inf_ptrace_store_register, inf_ptrace_store_registers)
7150 (inf_ptrace_trad_target): Move to ...
7151 * linux-nat-trad.c: ... this new file.
7152 * linux-nat-trad.h: New file.
7153 * linux-nat.c (linux_target_install_ops): Make extern.
7154 (linux_trad_target): Delete.
7155 * linux-nat.h (linux_trad_target): Delete declaration.
7156 (linux_target_install_ops): Declare.
7157 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7160 2018-05-02 Pedro Alves <palves@redhat.com>
7162 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7163 procfs_target/add_target here.
7164 * procfs.c (procfs_target): Make static.
7165 (_initialize_procfs): Call add_target here.
7166 * procfs.h (struct target_ops): Remove forward declaration.
7167 (procfs_target): Remove declaration.
7168 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7170 2018-05-02 Pedro Alves <palves@redhat.com>
7172 * procfs.c (procfs_stopped_by_watchpoint)
7173 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7174 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7176 (procfs_use_watchpoints): Delete, move contents...
7177 (procfs_target): ... here.
7178 * procfs.h (procfs_use_watchpoints): Delete declaration.
7179 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7180 procfs_use_watchpoints.
7181 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7182 procfs_use_watchpoints.
7184 2018-05-02 Tom Tromey <tom@tromey.com>
7187 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7188 and var_zuinteger_unlimited.
7189 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7190 and PARAM_ZUINTEGER_UNLIMITED.
7191 (set_parameter_value): Handle var_zuinteger and
7192 var_zuinteger_unlimited.
7193 (add_setshow_generic): Likewise.
7194 (parmpy_init): Likewise.
7196 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7199 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7200 pointer is not null before dereferencing it.
7202 2018-04-30 Tom Tromey <tom@tromey.com>
7204 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7207 2018-04-30 Tom Tromey <tom@tromey.com>
7209 * breakpoint.c (mention): Remove use of is_mi_like_p.
7210 (print_mention_ranged_breakpoint): Likewise.
7211 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7214 2018-04-30 Tom Tromey <tom@tromey.com>
7216 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7218 2018-04-30 Tom Tromey <tom@tromey.com>
7220 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7221 (info_spu_event_command): Remove some uses of is_mi_like_p.
7223 2018-04-30 Tom Tromey <tom@tromey.com>
7225 * python/py-framefilter.c (py_print_single_arg)
7226 (enumerate_locals, py_print_args, py_print_frame): Remove some
7227 uses of is_mi_like_p.
7229 2018-04-30 Tom Tromey <tom@tromey.com>
7232 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7233 * ui-out.h (ui_out::is_mi_like_p): Now const.
7234 (ui_out::do_is_mi_like_p): Now const.
7235 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7237 2018-04-30 Tom Tromey <tom@tromey.com>
7239 * varobj.c (varobj_set_visualizer): Use new_reference.
7240 * python/python.c (gdbpy_decode_line): Use new_reference.
7241 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7244 2018-04-30 Tom Tromey <tom@tromey.com>
7246 * varobj.c (install_new_value): Use new_reference.
7247 * value.h (value_incref): Return void. Swap intro comment with
7249 * value.c (set_value_parent): Use new_reference.
7250 (value_incref): Return void. Update intro comment.
7251 (release_value): Use new_reference.
7252 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7254 2018-04-30 Tom Tromey <tom@tromey.com>
7256 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7257 * gdb_bfd.h (new_bfd_ref): Remove.
7258 (gdb_bfd_open): Update comment.
7259 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7260 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7261 (gdb_bfd_fdopenr): Use new_reference.
7262 * exec.c (exec_file_attach): Use new_reference.
7264 2018-04-30 Tom Tromey <tom@tromey.com>
7266 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7269 2018-04-30 Tom Tromey <tom@tromey.com>
7271 * jit.c (jit_read_code_entry): Use type_align.
7272 * i386-tdep.c (i386_gdbarch_init): Don't call
7273 set_gdbarch_long_long_align_bit.
7274 * gdbarch.sh: Remove long_long_align_bit.
7275 * gdbarch.c, gdbarch.h: Rebuild.
7276 * arc-tdep.c (arc_type_align): New function.
7277 (arc_gdbarch_init): Use arc_type_align. Don't call
7278 set_gdbarch_long_long_align_bit.
7280 2018-04-30 Tom Tromey <tom@tromey.com>
7282 * rust-lang.c (rust_type_alignment): Remove.
7283 (rust_composite_type): Use type_align.
7285 2018-04-30 Tom Tromey <tom@tromey.com>
7287 * NEWS: Mention Type.align.
7288 * python/py-type.c (typy_get_alignof): New function.
7289 (type_object_getset): Add "alignof".
7291 2018-04-30 Tom Tromey <tom@tromey.com>
7295 * std-operator.def (UNOP_ALIGNOF): New operator.
7296 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7298 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7299 * c-lang.c (c_op_print_tab): Add alignof.
7300 * c-exp.y (ALIGNOF): New token.
7301 (exp): Add "ALIGNOF" production.
7302 (ident_tokens): Add _Alignof and alignof.
7304 2018-04-30 Tom Tromey <tom@tromey.com>
7306 * i386-tdep.c (i386_type_align): New function.
7307 (i386_gdbarch_init): Update.
7308 * gdbarch.sh (type_align): New method.
7309 * gdbarch.c, gdbarch.h: Rebuild.
7310 * arch-utils.h (default_type_align): Declare.
7311 * arch-utils.c (default_type_align): New function.
7312 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7313 (struct type) <align_log2>: New field.
7314 <instance_flags>: Now a bitfield.
7315 (TYPE_RAW_ALIGN): New macro.
7316 (type_align, type_raw_align, set_type_align): Declare.
7317 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7319 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7320 (get_alignment, maybe_set_alignment): New functions.
7321 (read_structure_type, read_enumeration_type, read_array_type)
7322 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7323 (read_subrange_type, read_base_type): Set type alignment.
7325 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7327 * dwarf2read.c (read_index_from_section): Use bool.
7329 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7332 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7335 2018-04-29 John Reiser <jreiser@BitWagon.com>
7338 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7339 last step, and do it atomically.
7341 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7343 * compile/compile-c-types.c (convert_int, convert_float):
7346 2018-04-27 Tom Tromey <tom@tromey.com>
7349 * rust-lang.c (rust_inclusive_range_type_p): New function.
7350 (rust_range): Handle inclusive ranges.
7351 (rust_compute_range): Likewise.
7352 * rust-exp.y (struct rust_op) <inclusive>: New field.
7353 (DOTDOTEQ): New constant.
7354 (range_expr): Add "..=" productions.
7355 (operator_tokens): Add "..=" token.
7356 (ast_range): Add "inclusive" parameter.
7357 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7359 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7361 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7362 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7364 * expprint.c (print_subexp_standard): Handle new bounds values.
7365 (dump_subexp_body_standard): Likewise.
7367 2018-04-27 Tom Tromey <tom@tromey.com>
7369 * configure: Rebuild.
7370 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7371 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7373 (class symbol_needs_eval_context): Likewise.
7374 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7375 (mock_mapped_index::symbol_name_at): Use "override". Remove
7377 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7379 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7380 * aarch64-tdep.c (instruction_reader::read): Use "override".
7381 (instruction_reader_test::read): Likewise.
7382 * arm-tdep.c (instruction_reader::read): Use "override".
7383 (instruction_reader_thumb::read): Likewise.
7385 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7388 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7389 instead of remote_send.
7390 (remote_send): Remove.
7392 2018-04-26 Pedro Alves <palves@redhat.com>
7394 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7395 find_function_start_sal instead of find_pc_line.
7397 2018-04-26 Pedro Alves <palves@redhat.com>
7399 * breakpoint.c (set_breakpoint_location_function): Handle
7401 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7402 * elfread.c (elf_symtab_read): Give data symbols with
7403 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7404 (elf_rel_plt_read): Update comment.
7405 * linespec.c (convert_linespec_to_sals): Handle
7407 (minsym_found): Handle mst_data_gnu_ifunc.
7408 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7409 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7410 * parse.c (find_minsym_type_and_address): Handle
7412 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7413 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7414 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7416 <mst_data_gnu_ifunc>: New enumerator.
7418 2018-04-26 Pedro Alves <palves@redhat.com>
7420 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7421 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7422 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7424 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7425 (lookup_minimal_symbol_by_pc): Adjust.
7426 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7427 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7428 * minsyms.h (lookup_msym_prefer): New enum.
7429 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7430 parameter by a lookup_msym_prefer parameter.
7432 2018-04-26 Pedro Alves <palves@redhat.com>
7434 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7435 ends in "@plt" instead of looking at the symbol's section.
7437 2018-04-26 Pedro Alves <palves@redhat.com>
7439 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7441 (find_pc_partial_function_gnu_ifunc): Rename to ...
7442 (find_pc_partial_function): ... this, and remove references to
7444 (find_pc_partial_function): Delete old implementation.
7445 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7447 2018-04-26 Pedro Alves <palves@redhat.com>
7449 * linespec.c (struct bound_minimal_symbol_search_key): New.
7450 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7451 skip first line if we found a GNU ifunc minimal symbol by name.
7452 (compare_msymbols): Change parameters to work with a destructured
7454 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7457 2018-04-26 Pedro Alves <palves@redhat.com>
7459 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7460 ifunc targets here. Instead, if we have an ifunc minsym, use its
7462 (add_location_to_breakpoint): Store the minsym and the objfile in
7463 the breakpoint location.
7464 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7465 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7466 Record the minsym in the sal.
7467 * symtab.h (symtab_and_line) <msymbol>: New field.
7469 2018-04-26 Pedro Alves <palves@redhat.com>
7471 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7472 unless we actually resolved the ifunc.
7474 2018-04-26 Pedro Alves <palves@redhat.com>
7476 * c-exp.y (variable production): Prefer ifunc minsyms over
7477 regular function symbols.
7478 * symtab.c (find_gnu_ifunc): New function.
7479 * minsyms.h (lookup_msym_prefer): New enum.
7480 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7481 parameter by a lookup_msym_prefer parameter.
7482 * symtab.h (find_gnu_ifunc): New declaration.
7484 2018-04-26 Pedro Alves <palves@redhat.com>
7486 * blockframe.c (find_gnu_ifunc_target_type): New function.
7487 (find_function_type): New.
7488 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7489 return a value with a memory address.
7490 (eval_call): For calls to GNU ifunc functions, try to find the
7491 type of the target function from the type that the resolver
7493 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7495 * infcall.c (find_function_return_type): Delete.
7496 (find_function_addr): Add 'function_type' parameter. For calls to
7497 GNU ifunc functions, try to find the type of the target function
7498 from the type that the resolver returns, and return it via
7500 (call_function_by_hand_dummy): Adjust to use the function type
7501 returned by find_function_addr.
7502 (find_function_addr): Add 'function_type' parameter and move
7504 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7507 2018-04-26 Pedro Alves <palves@redhat.com>
7509 * c-exp.y (variable production): Skip finding an alias for ifunc
7512 2018-04-26 Pedro Alves <palves@redhat.com>
7514 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7516 2018-04-25 Pedro Alves <palves@redhat.com>
7518 * infcmd.c (kill_command): Print the pid as string, not the whole
7519 thread's ptid. Add comment. s/has been killed/killed/ in output
7521 * remote.c (remote_detach_1): Print the pid as string, not the
7522 whole thread's ptid.
7524 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7525 Sergio Durigan Junior <sergiodj@redhat.com>
7526 Pedro Alves <palves@redhat.com>
7528 * infcmd.c (kill_command): Print message when inferior has
7530 * inferior.c (print_inferior_events): Remove 'static'. Set as
7532 (add_inferior): Improve message printed when
7533 'print_inferior_events' is on.
7534 (exit_inferior): Remove message printed when
7535 'print_inferior_events' is on.
7536 (detach_inferior): Improve message printed when
7537 'print_inferior_events' is on.
7538 (initialize_inferiors): Use 'add_inferior_silent' to set
7539 'current_inferior_'.
7540 * inferior.h (print_inferior_events): Declare here as
7542 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7543 '[Detaching...]' messages when 'print_inferior_events' is on.
7544 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7545 as prefix/suffix for messages. Remove periods. Fix erroneous
7546 'Detaching after fork from child...', replace it by '... from
7548 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7549 prefix/suffix when printing 'Detaching...' messages. Print
7550 them when 'print_inferior_events' is on.
7551 * remote.c (remote_detach_1): Print message when detaching
7552 from inferior and '!is_fork_parent'.
7554 2018-04-24 Tom Tromey <tom@tromey.com>
7556 * cli-out.h: Reindent.
7558 2018-04-24 Tom Tromey <tom@tromey.com>
7560 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7561 (cli_ui_out::do_field_string): Use fputs_filtered.
7562 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7564 2018-04-23 Tom Tromey <tom@tromey.com>
7566 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7567 gdb::unique_xmalloc_ptr.
7569 2018-04-23 Tom Tromey <tom@tromey.com>
7571 * configure: Rebuild.
7573 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7576 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7577 prepare_for_testing. Set normal_bp to r_debug_state if target
7580 2018-04-21 Pedro Alves <palves@redhat.com>
7581 Rajendra SY <rajendra.sy@gmail.com>
7583 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7584 * remote.c (extended_remote_attach): In all-stop mode, mark the
7585 thread as executing.
7587 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7589 * thread.c (thread_apply_all_command): Fix comment.
7590 (thread_command): Fix comment.
7592 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7594 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7596 * features/aarch64-core.c (create_feature_aarch64_core):
7598 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7600 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7602 * features/i386/32bit-avx512.c
7603 (create_feature_i386_32bit_avx512): Likewise.
7604 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7606 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7608 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7610 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7612 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7614 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7616 * features/i386/64bit-avx512.c
7617 (create_feature_i386_64bit_avx512): Likewise.
7618 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7620 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7622 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7624 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7626 * features/i386/64bit-segments.c
7627 (create_feature_i386_64bit_segments): Likewise.
7628 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7630 * features/i386/x32-core.c
7631 (create_feature_i386_x32_core): Likewise.
7632 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7633 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7634 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7635 * target-descriptions.c: In generated code, don't pass xml
7638 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7640 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7641 (print_xml_feature::visit_post): Likewise.
7642 (print_xml_feature::visit): Likewise.
7643 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7644 (print_xml_feature): Add new class.
7645 * regformats/regdat.sh: Null xmltarget on feature targets.
7646 * target-descriptions.c (struct target_desc): Add xmltarget.
7647 (maintenance_check_tdesc_xml_convert): Add unittest function.
7648 (tdesc_get_features_xml): Add function to get xml.
7649 (maintenance_check_xml_descriptions): Test xml generation.
7650 * xml-tdesc.c (string_read_description_xml): Add function.
7651 * xml-tdesc.h (string_read_description_xml): Add declaration.
7653 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7655 * features/Makefile: Add feature marker to targets with new style
7656 target descriptions.
7657 * regformats/aarch64.dat: Regenerate.
7658 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7659 * regformats/i386/amd64-avx-linux.dat: Likewise.
7660 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7661 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7662 * regformats/i386/amd64-linux.dat: Likewise.
7663 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7664 * regformats/i386/amd64.dat: Likewise.
7665 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7666 * regformats/i386/i386-avx-linux.dat: Likewise.
7667 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7668 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7669 * regformats/i386/i386-linux.dat: Likewise.
7670 * regformats/i386/i386-mmx-linux.dat: Likewise.
7671 * regformats/i386/i386-mpx-linux.dat: Likewise.
7672 * regformats/i386/i386.dat: Likewise.
7673 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7674 * regformats/i386/x32-avx-linux.dat: Likewise.
7675 * regformats/i386/x32-linux.dat: Likewise.
7676 * regformats/tic6x-c62x-linux.dat: Likewise.
7677 * regformats/tic6x-c64x-linux.dat: Likewise.
7678 * regformats/tic6x-c64xp-linux.dat: Likewise.
7679 * regformats/regdat.sh: Parse feature marker.
7681 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7683 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7684 (tdesc_osabi_name): Likewise.
7685 * target-descriptions.c (tdesc_architecture_name): Add new
7687 (tdesc_osabi_name): Likewise.
7689 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7691 * common/tdesc.c (tdesc_predefined_type): Move to here.
7692 (tdesc_named_type): Likewise.
7693 (tdesc_create_vector): Likewise.
7694 (tdesc_create_struct): Likewise.
7695 (tdesc_set_struct_size): Likewise.
7696 (tdesc_create_union): Likewise.
7697 (tdesc_create_flags): Likewise.
7698 (tdesc_create_enum): Likewise.
7699 (tdesc_add_field): Likewise.
7700 (tdesc_add_typed_bitfield): Likewise.
7701 (tdesc_add_bitfield): Likewise.
7702 (tdesc_add_flag): Likewise.
7703 (tdesc_add_enum_value): Likewise.
7704 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7705 (struct tdesc_type_vector): Likewise.
7706 (struct tdesc_type_field): Likewise.
7707 (struct tdesc_type_with_fields): Likewise.
7708 (tdesc_create_enum): Add declaration.
7709 (tdesc_add_typed_bitfield): Likewise.
7710 (tdesc_add_enum_value): Likewise.
7711 * target-descriptions.c (tdesc_type_field): Move from here.
7712 (tdesc_type_builtin): Likewise.
7713 (tdesc_type_vector): Likewise.
7714 (tdesc_type_with_fields): Likewise.
7715 (tdesc_predefined_types): Likewise.
7716 (tdesc_named_type): Likewise.
7717 (tdesc_create_vector): Likewise.
7718 (tdesc_create_struct): Likewise.
7719 (tdesc_set_struct_size): Likewise.
7720 (tdesc_create_union): Likewise.
7721 (tdesc_create_flags): Likewise.
7722 (tdesc_create_enum): Likewise.
7723 (tdesc_add_field): Likewise.
7724 (tdesc_add_typed_bitfield): Likewise.
7725 (tdesc_add_bitfield): Likewise.
7726 (tdesc_add_flag): Likewise.
7727 (tdesc_add_enum_value): Likewise.
7728 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7729 (tdesc_add_typed_bitfield): Likewise.
7730 (tdesc_add_enum_value): Likewise.
7732 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7734 * common/tdesc.c (tdesc_feature::accept): Move to here.
7735 (tdesc_feature::operator==): Likewise.
7736 (tdesc_create_reg): Likewise.
7737 * common/tdesc.h (tdesc_type_kind): Likewise.
7738 (struct tdesc_type): Likewise.
7739 (struct tdesc_feature): Likewise.
7740 * regformats/regdat.sh: Create a feature.
7741 * target-descriptions.c (tdesc_type_kind): Move from here.
7742 (tdesc_type): Likewise.
7743 (tdesc_type_up): Likewise.
7744 (tdesc_feature): Likewise.
7745 (tdesc_create_reg): Likewise.
7747 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7749 * Makefile.in: Add arch/tdesc.c
7750 * common/tdesc.c: New file.
7751 * common/tdesc.h (tdesc_element_visitor): Move to here.
7752 (tdesc_element): Likewise.
7753 (tdesc_reg): Likewise.
7754 (tdesc_reg_up): Likewise.
7755 * regformats/regdef.h (reg): Add offset to constructors.
7756 * target-descriptions.c (tdesc_element_visitor): Move from here.
7757 (tdesc_element): Likewise.
7758 (tdesc_reg): Likewise.
7759 (tdesc_reg_up): Likewise.
7761 2018-04-17 Tom Tromey <tom@tromey.com>
7763 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7766 2018-04-17 Tom Tromey <tom@tromey.com>
7768 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7770 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7772 * symtab.c (print_symbol_info): Skip printing filename and line
7773 number when `last' is NULL.
7774 (symtab_symbol_info): Use empty string instead of NULL for first
7775 invocation of print_symbol_info.
7776 (rbreak_command): Pass NULL to `last' parameter of
7779 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7781 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7784 2018-04-16 Pedro Alves <palves@redhat.com>
7786 * MAINTAINERS (sh): Remove.
7787 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7788 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7789 (ALLDEPFILES): Remove sh64-tdep.c.
7790 * NEWS: Mentions that support for SH-5/SH64 is removed.
7791 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7792 (sh*-*-openbsd*): Ditto.
7793 (sh64-*-elf*): Remove.
7795 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7796 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7797 * sh-tdep.c: No longer include "sh64-tdep.h".
7798 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7799 * sh64-tdep.c, sh64-tdep.h: Remove files.
7801 2018-04-16 Pedro Alves <palves@redhat.com>
7803 * MAINTAINERS: Remove m88k.
7804 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7805 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7806 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7807 * NEWS: Mention that support for m88k was removed.
7808 * configure.host (m88*-*-*): Remove support.
7809 * configure.nat (m88k-*-*): Remove support.
7810 * configure.tgt (m88*-*-openbsd*): Remove.
7811 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7813 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7815 * configure.tgt (x86_tobjs): New variable.
7816 (amd64_tobjs, i386_tobjs): Use it.
7818 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7820 * symtab.c (print_symbol_info): Precede the symbol definition by
7821 the line number when available.
7822 * NEWS: Advertise this enhancement.
7824 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7826 * NEWS (New options): announce set/show record btrace cpu.
7827 * btrace.c: Include record-btrace.h.
7828 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7829 the vendor is unknown.
7830 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7831 Maybe overwrite the btrace configuration's cpu.
7832 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7833 (btrace_fetch): Add cpu parameter. Update callers.
7834 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7835 Maybe overwrite the btrace configuration's cpu. Skip enabling
7836 errata workarounds if the vendor is unknown.
7837 * python/py-record-btrace.c: Include record-btrace.h.
7838 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7839 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7840 * record-btrace.c (record_btrace_cpu_state_kind): New.
7841 (record_btrace_cpu): New.
7842 (set_record_btrace_cpu_cmdlist): New.
7843 (record_btrace_get_cpu): New.
7844 (require_btrace_thread, record_btrace_info)
7845 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7846 (cmd_set_record_btrace_cpu_none): New.
7847 (cmd_set_record_btrace_cpu_auto): New.
7848 (cmd_set_record_btrace_cpu): New.
7849 (cmd_show_record_btrace_cpu): New.
7850 (_initialize_record_btrace): Initialize set/show record btrace cpu
7852 * record-btrace.h (record_btrace_get_cpu): New.
7854 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7856 * record.c (set_record_command): Fix typo in message.
7858 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7860 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7862 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7864 * infrun.c (process_event_stop_test): Call
7865 gdbarch_in_indirect_branch_thunk.
7866 * gdbarch.sh (in_indirect_branch_thunk): New.
7867 * gdbarch.c: Regenerated.
7868 * gdbarch.h: Regenerated.
7871 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7872 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7873 (ALLDEPFILES): Add x86-tdep.c.
7874 * arch-utils.h (default_in_indirect_branch_thunk): New.
7875 * arch-utils.c (default_in_indirect_branch_thunk): New.
7876 * i386-tdep: Include x86-tdep.h.
7877 (i386_in_indirect_branch_thunk): New.
7878 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7880 * amd64-tdep: Include x86-tdep.h.
7881 (amd64_in_indirect_branch_thunk): New.
7882 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7884 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7887 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7888 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7889 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7892 2018-04-12 Tom Tromey <tom@tromey.com>
7894 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7895 (rust_evaluate_subexp): Likewise.
7897 2018-04-12 Pedro Alves <palves@redhat.com>
7899 * procfs.c (procfs_detach): Make forward declaration's prototype
7900 match definition's protototype.
7901 (proc_get_LDT_entry): Remove stale do_cleanups call.
7903 2018-04-12 Pedro Alves <palves@redhat.com>
7905 * target.h (target_ops::to_has_exited): Delete.
7906 (target_has_exited): Delete.
7907 * target-delegates.c: Regenerate.
7909 2018-04-11 Pedro Alves <palves@redhat.com>
7911 * target.c (fileio_fh_t::t): Add comment.
7912 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7913 (target_fileio_close): Handle a NULL target.
7914 (invalidate_fileio_fh): New.
7915 (target_close): Call it.
7916 * remote.c (remote_hostio_send_command): No longer check whether
7917 remote_desc is open.
7919 2018-04-11 Pedro Alves <palves@redhat.com>
7921 * target.c (fileio_fh_t): Make it a named struct instead of a
7923 (fileio_fh_t::is_closed): New method.
7924 (DEF_VEC_O (fileio_fh_t)): Remove.
7925 (fileio_fhandles): Now a std::vector.
7926 (is_closed_fileio_fh): Delete.
7927 (acquire_fileio_fd): Adjust. Rename parameters.
7928 (release_fileio_fd): Adjust.
7929 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7930 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7931 (target_fileio_close): Adjust.
7933 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7935 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7938 2018-04-10 Pedro Alves <palves@redhat.com>
7940 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7941 (scoped_finish_thread_state): New class.
7942 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7944 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7945 (fetch_inferior_event, normal_stop): Likewise.
7946 * thread.c (finish_thread_state_cleanup): Delete.
7948 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7949 Pedro Alves <palves@redhat.com>
7951 * value.c: Include "selftest.h" and "common/array-view.h".
7952 (struct range) <operator ==>: New.
7953 (test_ranges_contain): New.
7954 (check_ranges_vector): New.
7955 (test_insert_into_bit_range_vector): New.
7956 (_initialize_values): Register selftests.
7957 * common/array-view.h (operator==, operator!=): New.
7959 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7961 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7963 * inline-frame.c: Include <algorithm>.
7964 (struct inline_state): Add constructor.
7965 (inline_state_s): Remove.
7966 (DEF_VEC_O(inline_state_s)): Remove.
7967 (inline_states): Change type to std::vector.
7968 (find_inline_frame_state): Adjust to std::vector.
7969 (allocate_inline_frame_state): Remove.
7970 (clear_inline_frame_state): Adjust to std::vector.
7971 (skip_inline_frames): Adjust to std::vector.
7973 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7975 * tracepoint.h (struct trace_state_variable): Add constructor.
7976 <name>: Change type to std::string.
7977 * tracepoint.c (tsv_s): Remove.
7978 (DEF_VEC_O(tsv_s)): Remove.
7979 (tvariables): Change to std::vector.
7980 (create_trace_state_variable): Adjust to std::vector.
7981 (find_trace_state_variable): Likewise.
7982 (find_trace_state_variable_by_number): Likewise.
7983 (delete_trace_state_variable): Likewise.
7984 (trace_variable_command): Adjust to std::string.
7985 (delete_trace_variable_command): Likewise.
7986 (tvariables_info_1): Adjust to std::vector.
7987 (save_trace_state_variables): Likewise.
7988 (start_tracing): Likewise.
7989 (merge_uploaded_trace_state_variables): Adjust to std::vector
7991 * target.h (struct target_ops)
7992 <to_download_trace_state_variable>: Pass reference to
7993 trace_state_variable.
7994 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7995 * target-delegates.c: Re-generate.
7996 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7997 (mi_tsv_deleted): Likewise.
7998 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7999 * remote.c (remote_download_trace_state_variable): Change
8000 pointer to reference and adjust.
8001 * make-target-delegates (parse_argtypes): Handle references.
8002 (write_function_header): Likewise.
8003 (munge_type): Likewise.
8005 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8007 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8008 string_view-selftests.c.
8009 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8011 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8012 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8013 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8014 * unittests/basic_string_view/element_access/char/1.cc:
8016 * unittests/basic_string_view/element_access/char/empty.cc:
8018 * unittests/basic_string_view/element_access/char/front_back.cc:
8020 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8021 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8023 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8025 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8027 * unittests/basic_string_view/operations/compare/char/1.cc:
8029 * unittests/basic_string_view/operations/compare/char/13650.cc:
8031 * unittests/basic_string_view/operations/copy/char/1.cc:
8033 * unittests/basic_string_view/operations/data/char/1.cc:
8035 * unittests/basic_string_view/operations/find/char/1.cc:
8037 * unittests/basic_string_view/operations/find/char/2.cc:
8039 * unittests/basic_string_view/operations/find/char/3.cc:
8041 * unittests/basic_string_view/operations/find/char/4.cc:
8043 * unittests/basic_string_view/operations/rfind/char/1.cc:
8045 * unittests/basic_string_view/operations/rfind/char/2.cc:
8047 * unittests/basic_string_view/operations/rfind/char/3.cc:
8049 * unittests/basic_string_view/operations/substr/char/1.cc:
8051 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8052 * unittests/string_view-selftests.c: New file.
8054 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8056 * unittests/basic_string_view/capacity/1.cc: New file.
8057 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8058 * unittests/basic_string_view/cons/char/1.cc: New file.
8059 * unittests/basic_string_view/cons/char/2.cc: New file.
8060 * unittests/basic_string_view/cons/char/3.cc: New file.
8061 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8062 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8063 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8064 * unittests/basic_string_view/element_access/char/1.cc: New file.
8065 * unittests/basic_string_view/element_access/char/2.cc: New file.
8066 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8067 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8068 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8069 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8070 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8071 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8072 * unittests/basic_string_view/include.cc: New file.
8073 * unittests/basic_string_view/inserters/char/1.cc: New file.
8074 * unittests/basic_string_view/inserters/char/2.cc: New file.
8075 * unittests/basic_string_view/inserters/char/3.cc: New file.
8076 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8077 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8078 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8079 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8080 * unittests/basic_string_view/literals/types.cc: New file.
8081 * unittests/basic_string_view/literals/values.cc: New file.
8082 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8083 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8084 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8085 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8086 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8087 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8088 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8089 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8090 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8091 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8092 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8093 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8094 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8095 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8096 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8097 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8098 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8099 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8100 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8101 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8102 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8103 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8104 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8105 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8106 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8107 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8108 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8109 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8110 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8111 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8112 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8113 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8114 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8115 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8116 * unittests/basic_string_view/operators/char/2.cc: New file.
8117 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8118 * unittests/basic_string_view/range_access/char/1.cc: New file.
8119 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8120 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8121 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8122 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8123 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8124 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8125 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8126 * unittests/basic_string_view/typedefs.cc: New file.
8127 * unittests/basic_string_view/types/1.cc: New file.
8129 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8131 * common/gdb_string_view.h: Remove libstdc++ implementation
8132 details, adjust to gdb reality.
8133 * common/gdb_string_view.tcc: Likewise.
8134 * cli/cli-script.c (struct string_view): Remove.
8135 (user_args) <m_args>: Change element type to gdb::string_view.
8136 (user_args::insert_args): Adjust.
8138 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8140 * common/gdb_string_view.h: New file.
8141 * common/gdb_string_view.tcc: New file.
8143 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8145 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8146 * configure: Re-generate.
8148 2018-04-09 Pedro Alves <palves@redhat.com>
8150 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8151 (set_target_gdbarch): Call
8152 gdb::observers::architecture_changed.notify instead of
8153 observer_notify_architecture_changed.
8155 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8157 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8158 (do_restore_current_traceframe_cleanup): Remove.
8159 (restore_current_traceframe_cleanup_dtor): Remove.
8160 (make_cleanup_restore_current_traceframe): Remove.
8161 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8163 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8164 * infrun.c (fetch_inferior_event): Use
8165 scoped_restore_current_traceframe.
8167 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8169 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8171 <n_allocated_type_units>: Remove.
8172 <all_type_units>: Change to std::vector.
8173 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8174 to std::vector change.
8175 (dwarf2_per_objfile::get_cutu): Likewise.
8176 (dwarf2_per_objfile::get_tu): Likewise.
8177 (create_signatured_type_table_from_index): Likewise.
8178 (create_signatured_type_table_from_debug_names): Likewise.
8179 (dw2_symtab_iter_next): Likewise.
8180 (dw2_print_stats): Likewise.
8181 (dw2_expand_all_symtabs): Likewise.
8182 (dw2_expand_marked_cus): Likewise.
8183 (dw2_debug_names_iterator::next): Likewise.
8184 (dwarf2_initialize_objfile): Likewise.
8185 (add_signatured_type_cu_to_table): Likewise.
8186 (create_all_type_units): Likewise.
8187 (add_type_unit): Likewise.
8188 (struct tu_abbrev_offset): Add constructor.
8189 (build_type_psymtabs_1): Adjust to std::vector change.
8190 (print_tu_stats): Likewise.
8191 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8192 (write_debug_names): Likewise.
8194 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8196 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8197 Make an std::vector.
8198 <n_comp_units>: Remove.
8199 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8200 to std::vector change.
8201 (dwarf2_per_objfile::get_cutu): Likewise.
8202 (dwarf2_per_objfile::get_cu): Likewise.
8203 (create_cus_from_index): Likewise.
8204 (create_addrmap_from_index): Likewise.
8205 (create_addrmap_from_aranges): Likewise.
8206 (dwarf2_read_index): Likewise.
8207 (dw2_find_last_source_symtab): Likewise.
8208 (dw2_map_symtabs_matching_filename): Likewise.
8209 (dw2_symtab_iter_next): Likewise.
8210 (dw2_print_stats): Likewise.
8211 (dw2_expand_all_symtabs): Likewise.
8212 (dw2_expand_symtabs_with_fullname): Likewise.
8213 (dw2_expand_marked_cus): Likewise.
8214 (dw2_map_symbol_filenames): Likewise.
8215 (create_cus_from_debug_names): Likewise.
8216 (dwarf2_read_debug_names): Likewise.
8217 (dw2_debug_names_iterator::next): Likewise.
8218 (dwarf2_initialize_objfile): Likewise.
8219 (set_partial_user): Likewise.
8220 (dwarf2_build_psymtabs_hard): Likewise.
8221 (read_comp_units_from_section): Remove arguments, adjust to
8223 (create_all_comp_units): Adjust to std::vector and
8224 read_comp_units_from_section changes.
8225 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8227 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8228 (psyms_seen_size): Likewise.
8229 (write_gdbindex): Likewise.
8230 (write_debug_names): Likewise.
8232 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8234 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8235 with dwarf2_per_objfile.
8236 (create_cus_from_index): Likewise.
8237 (create_signatured_type_table_from_index): Likewise.
8238 (dwarf2_read_index): Likewise.
8239 (dwarf2_initialize_objfile): Likewise.
8240 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8241 per_cu rather than get_dwarf2_per_objfile.
8243 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8245 * dwarf2read.h (struct signatured_type): Forward declare.
8246 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8248 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8249 (dw2_get_cutu): ...this.
8250 (dwarf2_per_objfile::get_cu): Rename from...
8251 (dw2_get_cu): ...this.
8252 (dwarf2_per_objfile::get_tu): New.
8253 (create_addrmap_from_index): Adjust.
8254 (create_addrmap_from_aranges): Adjust.
8255 (dw2_find_last_source_symtab): Adjust.
8256 (dw2_map_symtabs_matching_filename): Adjust.
8257 (dw2_symtab_iter_next): Adjust.
8258 (dw2_print_stats): Adjust.
8259 (dw2_expand_all_symtabs): Adjust.
8260 (dw2_expand_symtabs_with_fullname): Adjust.
8261 (dw2_expand_marked_cus): Adjust.
8262 (dw_expand_symtabs_matching_file_matcher): Adjust.
8263 (dw2_map_symbol_filenames): Adjust.
8264 (dw2_debug_names_iterator::next): Adjust.
8265 (dwarf2_initialize_objfile): Adjust.
8266 (set_partial_user): Adjust.
8267 (dwarf2_build_psymtabs_hard): Adjust.
8269 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8271 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8272 Remove unused variables.
8273 (dw2_map_symtabs_matching_filename): Likewise.
8274 (dwarf2_record_block_ranges): Likewise.
8275 (dwarf2_read_addr_index): Likewise.
8276 (follow_die_offset): Likewise.
8278 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8280 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8281 to symbol_file_add_main.
8283 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8286 * mi/mi-console.c (do_fputc_async_safe): New.
8287 (mi_console_file::write_async_safe): New.
8288 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8289 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8291 * ui-file.c (ui_file::putstrn): Adjust call to
8292 fputstrn_unfiltered.
8293 * utils.c (printchar): Replace do_fputs and do_fprintf
8294 parameters by do_fputc.
8295 (fputstr_filtered): Adjust call to printchar.
8296 (fputstr_unfiltered): Likewise.
8297 (fputstrn_filtered): Likewise.
8298 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8300 * utils.h (do_fputc_ftype): New typedef.
8301 (fputstrn_unfiltered): Add do_fputc parameter.
8303 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8305 * regformats/i386/i386-avx.dat: Remove.
8307 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8310 * amd64-tdep.c (amd64_none_init_abi): New function.
8311 (amd64_x32_none_init_abi): New function.
8312 (_initialize_amd64_tdep): Register handlers for x86-64 and
8313 x64_32 with GDB_OSABI_NONE.
8314 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8315 GDB_OSABI_NONE osabi.
8317 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8320 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8322 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8323 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8325 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8327 * common/byte-vector.h (char_vector): New type.
8328 * target.h (target_read_alloc): Return
8329 gdb::optional<byte_vector>.
8330 (target_read_stralloc): Return gdb::optional<char_vector>.
8331 (target_get_osdata): Return gdb::optional<char_vector>.
8332 * target.c (target_read_alloc_1): Templatize. Replacement
8333 manual memory management with vector.
8334 (target_read_alloc): Change return type, adjust.
8335 (target_read_stralloc): Change return type, adjust.
8336 (target_get_osdata): Change return type, adjust.
8337 * auxv.c (struct auxv_info) <length>: Remove.
8338 <data>: Change type to gdb::optional<byte_vector>.
8339 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8340 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8341 (target_auxv_search): Adjust.
8342 (fprint_target_auxv): Adjust.
8343 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8344 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8345 (linux_make_corefile_notes): Adjust.
8346 * osdata.c (get_osdata): Adjust.
8347 * remote.c (remote_get_threads_with_qxfer): Adjust.
8348 (remote_memory_map): Adjust.
8349 (remote_traceframe_info): Adjust.
8350 (btrace_read_config): Adjust.
8351 (remote_read_btrace): Adjust.
8352 (remote_pid_to_exec_file): Adjust.
8353 * solib-aix.c (solib_aix_get_library_list): Adjust.
8354 * solib-dsbt.c (decode_loadmap): Don't free buf.
8355 (dsbt_get_initial_loadmaps): Adjust.
8356 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8357 * solib-target.c (solib_target_current_sos): Adjust.
8358 * tracepoint.c (sdata_make_value): Adjust.
8359 * xml-support.c (xinclude_start_include): Adjust.
8360 (xml_fetch_content_from_file): Adjust.
8361 * xml-support.h (xml_fetch_another): Change return type.
8362 (xml_fetch_content_from_file): Change return type.
8363 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8364 * xml-tdesc.c (file_read_description_xml): Adjust.
8365 (fetch_available_features_from_target): Change return type.
8366 (target_fetch_description_xml): Adjust.
8367 (target_read_description_xml): Adjust.
8369 2018-04-06 Tom Tromey <tom@tromey.com>
8371 * value.c (~value): Update.
8372 (struct value) <contents>: Now unique_xmalloc_ptr.
8373 (value_contents_bits_eq, allocate_value_contents)
8374 (value_contents_raw, value_contents_all_raw)
8375 (value_contents_for_printing, value_contents_for_printing_const)
8376 (set_value_enclosing_type): Update.
8378 2018-04-06 Tom Tromey <tom@tromey.com>
8380 * value.c (range_s): Remove typedef, VEC.
8381 (struct range): Add operator<.
8382 (range_lessthan): Remove.
8383 (ranges_contain): Change type.
8385 (struct value) <unavailable, optimized_out>: Now std::vector.
8386 (value_entirely_available)
8387 (value_entirely_covered_by_range_vector)
8388 (value_entirely_unavailable, value_entirely_optimized_out):
8390 (insert_into_bit_range_vector): Change argument type.
8391 (find_first_range_overlap): Likewise.
8392 (struct ranges_and_idx, value_contents_bits_eq)
8393 (require_not_optimized_out, require_available): Update.
8394 (ranges_copy_adjusted): Change argument types.
8395 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8397 2018-04-06 Tom Tromey <tom@tromey.com>
8399 * value.c (~value): Update.
8400 (struct value) <parent>: Now a value_ref_ptr.
8401 (value_parent, set_value_parent, value_address, value_copy):
8404 2018-04-06 Tom Tromey <tom@tromey.com>
8406 * value.c (struct value): Add constructor, destructor, and member
8408 (allocate_value_lazy, value_decref): Update.
8410 2018-04-06 Tom Tromey <tom@tromey.com>
8412 * value.c (struct value) <released, next>: Remove.
8413 (all_values): Now a std::vector.
8414 (allocate_value_lazy): Update.
8415 (value_next): Remove.
8416 (value_mark, value_free_to_mark, release_value)
8417 (value_release_to_mark): Update.
8419 2018-04-06 Tom Tromey <tom@tromey.com>
8421 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8422 (free_value_chain): Remove.
8423 * value.c (free_value_chain): Remove.
8424 (value_release_to_mark): Return a std::vector.
8425 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8427 (check_condition): Update.
8428 * eval.c (fetch_subexp_value): Change "val_chain" to a
8430 * breakpoint.c (update_watchpoint): Update.
8431 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8433 2018-04-06 Tom Tromey <tom@tromey.com>
8435 * value.h (free_all_values): Remove.
8436 * value.c (free_all_values): Remove.
8438 2018-04-06 Tom Tromey <tom@tromey.com>
8440 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8441 (value_history_chain, value_history_count): Remove.
8442 (value_history): New global.
8443 (record_latest_value, access_value_history, show_values)
8444 (preserve_values): Update.
8446 2018-04-06 Tom Tromey <tom@tromey.com>
8448 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8449 * varobj.c (varobj_set_display_format, varobj_set_value)
8450 (install_default_visualizer, construct_visualizer)
8451 (install_new_value, ~varobj, varobj_get_value_type)
8452 (my_value_of_variable, varobj_editable_p): Update.
8453 * c-varobj.c (c_describe_child, c_value_of_variable)
8454 (cplus_number_of_children, cplus_describe_child): Update.
8455 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8456 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8457 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8459 2018-04-06 Tom Tromey <tom@tromey.com>
8461 * printcmd.c (last_examine_address): Change type to
8463 (do_examine, x_command): Update.
8465 2018-04-06 Tom Tromey <tom@tromey.com>
8467 * value.c (release_value): Update.
8468 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8469 (struct bpstats) <val>: Now a value_ref_ptr.
8470 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8471 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8472 (~watchpoint, print_it_watchpoint, watch_command_1)
8473 (invalidate_bp_value_on_memory_change): Update.
8475 2018-04-06 Tom Tromey <tom@tromey.com>
8477 * varobj.c (varobj_clear_saved_item)
8478 (update_dynamic_varobj_children, install_new_value, ~varobj):
8480 * value.h (value_incref): Move declaration earlier.
8481 (value_decref): Rename from value_free.
8482 (struct value_ref_policy): New.
8483 (value_ref_ptr): New typedef.
8484 (struct value_deleter): Remove.
8485 (gdb_value_up): Remove typedef.
8486 (release_value): Change return type.
8487 (release_value_or_incref): Remove.
8488 * value.c (set_value_parent): Update.
8489 (value_incref): Change return type.
8490 (value_decref): Rename from value_free.
8491 (value_free_to_mark, free_all_values, free_value_chain): Update.
8492 (release_value): Return value_ref_ptr.
8493 (release_value_or_incref): Remove.
8494 (record_latest_value, set_internalvar, clear_internalvar):
8496 * stack.c (info_frame_command): Don't call value_free.
8497 * python/py-value.c (valpy_dealloc, valpy_new)
8498 (value_to_value_object): Update.
8499 * printcmd.c (do_examine): Update.
8500 * opencl-lang.c (lval_func_free_closure): Update.
8501 * mi/mi-main.c (register_changed_p): Don't call value_free.
8502 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8503 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8504 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8506 * guile/scm-value.c (vlscm_free_value_smob)
8507 (vlscm_scm_from_value): Update.
8508 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8509 (frame_unwind_register_unsigned, get_frame_register_bytes)
8510 (put_frame_register_bytes): Don't call value_free.
8511 * findvar.c (address_from_register): Don't call value_free.
8512 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8513 * dwarf2loc.c (entry_data_value_free_closure)
8514 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8515 (dwarf2_evaluate_loc_desc_full): Update.
8516 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8517 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8518 (~watchpoint, watch_command_1)
8519 (invalidate_bp_value_on_memory_change): Update.
8520 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8522 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8525 * warning.m4: Add -Wno-error=deprecated-register.
8526 * configure: Re-generate.
8528 2018-04-05 Tom Tromey <tom@tromey.com>
8530 * linespec.h: Remove include of "vec.h".
8532 2018-04-05 Tom Tromey <tom@tromey.com>
8534 * linespec.c (typep): Remove typedef.
8535 (find_methods, find_superclass_methods): Take a std::vector.
8536 (find_method): Use std::vector.
8538 2018-04-05 Tom Tromey <tom@tromey.com>
8540 * utils.c (compare_strings): Remove.
8541 * utils.h (compare_strings): Remove.
8542 * objc-lang.h (find_imps): Update.
8543 * objc-lang.c (find_methods): Take a std::vector.
8544 (uniquify_strings, find_imps): Likewise.
8545 * linespec.c (find_methods): Take a std::vector.
8546 (decode_objc): Use std::vector.
8547 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8549 (find_method, find_function_symbols): Use std::vector.
8551 2018-04-05 Tom Tromey <tom@tromey.com>
8553 * completer.c (completion_tracker::completion_tracker): Remove
8555 (completion_tracker::discard_completions): Likewise.
8556 * breakpoint.c (ambiguous_names_p): Remove cast.
8557 * ada-lang.c (_initialize_ada_language): Remove cast.
8558 * utils.h (streq): Update.
8559 (streq_hash): Add new declaration.
8560 * utils.c (streq): Return bool.
8561 (streq_hash): New function.
8563 2018-04-05 Tom Tromey <tom@tromey.com>
8565 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8566 Remove a string copy.
8568 2018-04-05 Tom Tromey <tom@tromey.com>
8570 * linespec.c (filter_results): Use std::vector.
8571 (decode_line_2, decode_line_full): Update.
8573 2018-04-05 Tom Tromey <tom@tromey.com>
8575 * linespec.c (canonical_to_fullform): Return std::string.
8576 (filter_results): Update.
8577 (struct decode_line_2_item): Add constructor.
8578 <fullform, displayform>: Now std::string.
8579 (decode_line_2_compare_items): Now a std::sort comparator.
8580 (decode_line_2): Update.
8582 2018-04-05 Tom Tromey <tom@tromey.com>
8584 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8585 (unexpected_linespec_error): Update.
8586 (linespec_parse_basic, parse_linespec): Update.
8588 2018-04-05 Tom Tromey <tom@tromey.com>
8590 * linespec.c (linespec_parse_basic): Reindent.
8592 2018-04-05 Tom Tromey <tom@tromey.com>
8594 * minsyms.h (iterate_over_minimal_symbols): Update.
8595 * minsyms.c (iterate_over_minimal_symbols): Take a
8597 * linespec.c (struct collect_minsyms): Remove.
8598 (compare_msyms): Now a std::sort comparator.
8599 (add_minsym): Add parameters.
8600 (search_minsyms_for_name): Update. Use std::vector.
8602 2018-04-03 Tom Tromey <tom@tromey.com>
8604 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8607 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8609 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8611 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8614 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8615 printing static type.
8617 2018-04-01 Tom Tromey <tom@tromey.com>
8619 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8620 (rs6000_xfer_shared_libraries): Update.
8622 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8624 * common/gdb_vecs.h (char_ptr): Remove.
8625 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8627 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8629 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8631 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8633 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8635 * tracepoint.h (struct uploaded_tp): Initialize fields.
8636 <actions, step_actions, cmd_strings>: Change type to
8637 std::vector<char *>.
8638 * tracepoint.c (get_uploaded_tp): Allocate with new.
8639 (free_uploaded_tps): Free with delete.
8640 (parse_tracepoint_definition): Adjust to std::vector change.
8641 * breakpoint.c (read_uploaded_action): Likewise.
8642 (create_tracepoint_from_upload): Likewise.
8643 * ctf.c (ctf_write_uploaded_tp): Likewise.
8644 (SET_ARRAY_FIELD): Likewise.
8645 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8647 2018-03-30 Tom Tromey <tom@tromey.com>
8649 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8651 (svr4_keep_data_in_core): Update.
8652 (svr4_read_so_list): Update.
8654 2018-03-30 Tom Tromey <tom@tromey.com>
8656 * windows-nat.c (handle_output_debug_string, handle_exception):
8658 * target.h (target_read_string): Update.
8659 * target.c (target_read_string): Change "string" to
8661 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8663 * solib-frv.c (frv_current_sos): Update.
8664 * solib-dsbt.c (dsbt_current_sos): Update.
8665 * solib-darwin.c (darwin_current_sos): Update.
8666 * linux-thread-db.c (inferior_has_bug): Update.
8667 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8668 Update. Remove alloca.
8669 * ada-lang.c (ada_main_name): Update.
8671 2018-03-30 Tom Tromey <tom@tromey.com>
8673 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8674 (struct dwo_file_deleter): New.
8675 (dwo_file_up): New typedef.
8676 (open_and_init_dwo_file): Use dwo_file_up.
8677 (free_dwo_file_cleanup): Remove.
8679 2018-03-30 Tom Tromey <tom@tromey.com>
8681 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8682 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8684 2018-03-30 Tom Tromey <tom@tromey.com>
8686 * dwarf2read.c (class free_cached_comp_units): New class.
8687 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8688 (free_cached_comp_units): Remove function.
8690 2018-03-30 Tom Tromey <tom@tromey.com>
8692 * utils.h (make_cleanup_unpush_target): Remove.
8693 * inf-ptrace.c (struct target_unpusher): New.
8694 (target_unpush_up) New typedef.
8695 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8697 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8699 2018-03-27 Tom Tromey <tom@tromey.com>
8701 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8703 2018-03-27 Pedro Alves <palves@redhat.com>
8704 Tom Tromey <tom@tromey.com>
8706 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8707 destructor. Now a class.
8708 (gdb_readline_wrapper_cleanup): Remove function.
8709 (gdb_readline_wrapper): Remove cleanups.
8711 2018-03-27 Tom Tromey <tom@tromey.com>
8713 * typeprint.h (struct type_print_options) <local_typedefs,
8714 global_typedefs>: Remove "struct" keyword.
8715 (class typedef_hash_table): New class.
8716 (recursively_update_typedef_hash, add_template_parameters)
8717 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8718 (find_typedef_in_hash): Don't declare.
8719 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8720 (typedef_hash_table::recursively_update): Rename from
8721 recursively_update_typedef_hash. Now a member.
8722 (typedef_hash_table::add_template_parameters): Rename from
8723 add_template_parameters. Now a member.
8724 (typedef_hash_table::typedef_hash_table): Now a constructor;
8725 rename from create_typedef_hash.
8726 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8727 rename from free_typedef_hash.
8728 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8729 (do_free_global_table): Remove.
8730 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8731 from copy_type_recursive.
8732 (create_global_typedef_table): Remove.
8733 (typedef_hash_table::find_global_typedef): Now a member of
8735 (typedef_hash_table::find_typedef): Rename from
8736 find_typedef_in_hash; now a member.
8737 (whatis_exp): Update.
8738 * extension.h (struct ext_lang_type_printers): Add constructor and
8740 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8742 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8743 Now a constructor; rename from start_ext_lang_type_printers.
8744 (ext_lang_type_printers): Now a destructor; rename from
8745 free_ext_lang_type_printers.
8746 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8748 (c_type_print_base_struct_union): Update. Remove cleanups.
8750 2018-03-27 Tom Tromey <tom@tromey.com>
8752 * dwarf-index-write.c: Include <cmath>.
8754 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8756 * NEWS: Add entry describing new "set|show varsize-limit" command.
8757 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8759 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8762 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8764 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8766 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8767 * dwarf-index-common.c: New file.
8768 * dwarf-index-common.h: New file.
8769 * dwarf-index-write.c: New file.
8770 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8771 (struct dwarf2_section_info): Move from here.
8772 (dwarf2_section_info_def): Likewise.
8773 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8774 (offset_type): Likewise.
8775 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8776 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8777 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8778 (byte_swap): Likewise.
8779 (MAYBE_SWAP): Likewise.
8780 (dwarf2_per_cu_ptr): Likewise.
8781 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8782 (struct tu_stats): Likewise.
8783 (struct dwarf2_per_objfile): Likewise.
8784 (struct dwarf2_per_cu_data): Likewise.
8785 (struct signatured_type): Likewise.
8786 (sig_type_ptr): Likewise.
8787 (DEF_VEC_P (sig_type_ptr)): Likewise.
8788 (INDEX4_SUFFIX): Likewise.
8789 (INDEX5_SUFFIX): Likewise.
8790 (DEBUG_STR_SUFFIX): Likewise.
8791 (dwarf2_read_section): Make non-static.
8792 (mapped_index_string_hash): Move from here.
8793 (dwarf5_djb_hash): Likewise.
8794 (file_write): Likewise.
8795 (class data_buf): Likewise.
8796 (struct symtab_index_entry): Likewise.
8797 (struct mapped_symtab): Likewise.
8798 (find_slot): Likewise.
8799 (hash_expand): Likewise.
8800 (add_index_entry): Likewise.
8801 (uniquify_cu_indices): Likewise.
8802 (class c_str_view): Likewise.
8803 (class c_str_view_hasher): Likewise.
8804 (class vector_hasher): Likewise.
8805 (write_hash_table): Likewise.
8806 (psym_index_map): Likewise.
8807 (struct addrmap_index_data): Likewise.
8808 (add_address_entry): Likewise.
8809 (add_address_entry_worker): Likewise.
8810 (write_address_map): Likewise.
8811 (symbol_kind): Likewise.
8812 (write_psymbols): Likewise.
8813 (struct signatured_type_index_data): Likewise.
8814 (write_one_signatured_type): Likewise.
8815 (recursively_count_psymbols): Likewise.
8816 (recursively_write_psymbols): Likewise.
8817 (class debug_names): Likewise.
8818 (check_dwarf64_offsets): Likewise.
8819 (psyms_seen_size): Likewise.
8820 (write_gdbindex): Likewise.
8821 (write_debug_names): Likewise.
8822 (assert_file_size): Likewise.
8823 (write_psymtabs_to_index): Likewise.
8824 (save_gdb_index_command): Likewise.
8825 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8827 * dwarf2read.h: New file.
8829 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8832 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8833 symbol name if the CU's language stores symbol names in linkage
8835 * language.h (struct language_defn)
8836 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8837 all instances of this struct.
8839 2018-03-26 Tom Tromey <tom@tromey.com>
8841 * stack.c (backtrace_command_1): Remove verbose code.
8843 2018-03-26 Tom Tromey <tom@tromey.com>
8845 * python/py-framefilter.c (py_print_type): Don't catch
8846 exceptions. Return void.
8847 (py_print_value): Likewise.
8848 (py_print_single_arg): Likewise.
8849 (enumerate_args): Don't catch exceptions.
8850 (py_print_args): Likewise.
8851 (py_print_frame): Likewise.
8852 (gdbpy_apply_frame_filter): Catch exceptions here.
8854 2018-03-26 Tom Tromey <tom@tromey.com>
8856 * stack.c (_initialize_stack): Remove trailing newlines from help
8857 text. Add "Usage" line to "backtrace" help.
8859 2018-03-26 Tom Tromey <tom@tromey.com>
8862 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8864 2018-03-26 Tom Tromey <tom@tromey.com>
8866 * python/py-framefilter.c (py_print_single_arg): Return
8867 EXT_LANG_BT_ERROR from catch.
8869 2018-03-26 Tom Tromey <tom@tromey.com>
8872 * stack.c (backtrace_command_1): Move some code into no-filters
8875 2018-03-26 Tom Tromey <tom@tromey.com>
8877 * python/py-framefilter.c (throw_quit_or_print_exception): New
8879 (gdbpy_apply_frame_filter): Use it.
8881 2018-03-26 Tom Tromey <tom@tromey.com>
8884 * python/py-framefilter.c (py_print_type, py_print_value)
8885 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8888 2018-03-26 Tom Tromey <tom@tromey.com>
8890 * python/py-framefilter.c (enumerate_args): Use
8891 gdb::unique_xmalloc_ptr.
8893 2018-03-26 Tom Tromey <tom@tromey.com>
8895 * python/py-framefilter.c (py_print_frame): Return
8897 (gdbpy_apply_frame_filter): Update comment.
8898 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8900 <EXT_LANG_BT_NO_FILTERS>: Change value.
8902 2018-03-26 Tom Tromey <tom@tromey.com>
8905 * stack.c (backtrace_command): Parse "hide" argument.
8906 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8907 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8910 2018-03-26 Tom Tromey <tom@tromey.com>
8912 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8914 (backtrace_command): Remove "fulltrace", add "flags".
8916 2018-03-26 Tom Tromey <tom@tromey.com>
8918 * stack.c (backtrace_command): Rewrite command line parsing.
8920 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8922 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8924 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8926 * filename-seen-cache.h: Add include guard.
8928 2018-03-26 Keith Seitz <keiths@redhat.com>
8930 * symfile.c (place_section): Remove "struct" from section_addr_info
8932 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8933 "struct" keyword from section_addr_info.
8935 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8937 * regformats/regdef.h (reg): Add constructors.
8939 2018-03-25 Pedro Alves <palves@redhat.com>
8941 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8942 if then/else bodies in var_func_name extraction.
8944 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8946 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8947 lookup_minimal_symbol() to find symbol entry.
8948 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8950 2018-03-23 Keith Seitz <keiths@redhat.com>
8953 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8954 nested type definitions for C++, too.
8956 2018-03-23 Tom Tromey <tom@tromey.com>
8958 * machoread.c (struct oso_el): Add a constructor. Don't define as
8960 (macho_register_oso): Remove.
8961 (macho_symtab_read): Take a std::vector.
8962 (oso_el_compare_name): Now a std::sort comparator.
8963 (macho_symfile_read_all_oso): Take a std::vector.
8964 (macho_symfile_read): Use std::vector. Remove cleanups.
8966 2018-03-22 Tom Tromey <tom@tromey.com>
8968 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8969 (record_full_goto_bookmark): Use std::string.
8971 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8974 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8977 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8979 * rs6000-tdep.c (store_insn_p): New function.
8980 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8981 and cr_reg to their unshifted values. Use store_insn_p to
8982 match LR saves using either R1 or fdata->alloca_reg. Use
8983 store_insn_p to match CR saves. Set alloca_reg_offset
8984 when alloca_reg and framep are set. Remove lr_reg shift
8985 when assigning to fdata->lr_register.
8987 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8989 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8990 command line args instead of emitting a warning.
8992 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8994 * tracepoint.h (struct static_tracepoint_marker): Initialize
8995 fields, define default constructor, move constructor and move
8996 assignment, disable the rest.
8997 <str_id, extra>: Make std::string.
8998 (release_static_tracepoint_marker): Remove.
8999 (free_current_marker): Remove.
9000 * tracepoint.c (free_current_marker): Remove.
9001 (parse_static_tracepoint_marker_definition): Adjust to
9002 std::string, use new hex2str overload.
9003 (release_static_tracepoint_marker): Remove.
9004 (print_one_static_tracepoint_marker): Get marker by reference
9005 and adjust to std::string.
9006 (info_static_tracepoint_markers_command): Adjust to std::vector
9008 * target.h (static_tracepoint_marker_p): Remove typedef.
9009 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9010 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9012 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9014 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9015 (target_debug_print_std_vector_static_tracepoint_marker): New.
9016 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9018 (target_debug_print_static_tracepoint_marker_p): ... this.
9019 * target-delegates.c: Re-generate.
9020 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9022 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9023 (decode_static_tracepoint_spec): Adjust to std::vector.
9024 (tracepoint_print_one_detail): Adjust to std::string.
9025 (strace_marker_decode_location): Adjust to std::string.
9026 (update_static_tracepoint): Adjust to std::string, remove call
9027 to release_static_tracepoint_marker.
9028 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9029 Adjust to std::vector.
9030 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9031 (remote_static_tracepoint_markers_by_strid): Adjust to
9033 * common/rsp-low.h (hex2str): New overload with explicit count
9035 * common/rsp-low.c (hex2str): New overload with explicit count
9037 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9038 (_initialize_rsp_low_selftests): Add test_hex2str test.
9039 * unittests/tracepoint-selftests.c
9040 (test_parse_static_tracepoint_marker_definition): Adjust to
9043 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9045 * tracepoint.c (parse_static_tracepoint_marker_definition):
9046 Consider case where the definition is followed by more
9048 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9049 tracepoint-selftests.c.
9050 * unittests/tracepoint-selftests.c: New.
9052 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9054 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9057 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9059 * symtab.c (find_pc_sect_line): fixed indentation.
9061 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9063 * symtab.c (find_pc_sect_line): now uses binary search.
9065 2018-03-19 Tom Tromey <tom@tromey.com>
9067 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9070 2018-03-19 Pedro Alves <palves@redhat.com>
9071 Tom Tromey <tom@tromey.com>
9073 * unittests/observable-selftests.c: New file.
9074 * common/observable.h: New file.
9075 * observable.h: New file.
9076 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9077 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9078 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9079 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9080 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9081 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9082 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9083 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9084 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9085 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9086 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9087 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9088 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9089 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9090 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9091 tui/tui-interp.c, valops.c: Update all users.
9092 * tui/tui-hooks.c (tui_bp_created_observer)
9093 (tui_bp_deleted_observer, tui_bp_modified_observer)
9094 (tui_inferior_exit_observer, tui_before_prompt_observer)
9095 (tui_normal_stop_observer, tui_register_changed_observer):
9097 (tui_observers_token): New global.
9098 (attach_or_detach, tui_attach_detach_observers): New functions.
9099 (tui_install_hooks, tui_remove_hooks): Use
9100 tui_attach_detach_observers.
9101 * record-btrace.c (record_btrace_thread_observer): Remove.
9102 (record_btrace_thread_observer_token): New global.
9103 * observer.sh: Remove.
9104 * observer.c: Rename to observable.c.
9105 * observable.c (namespace gdb_observers): Define new objects.
9106 (observer_debug): Move into gdb_observers namespace.
9107 (struct observer, struct observer_list, xalloc_observer_list_node)
9108 (xfree_observer_list_node, generic_observer_attach)
9109 (generic_observer_detach, generic_observer_notify): Remove.
9110 (_initialize_observer): Update.
9111 Don't include observer.inc.
9112 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9113 (clean mostlyclean): Likewise.
9114 (observer.h, observer.inc): Remove targets.
9115 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9116 (COMMON_SFILES): Use observable.c, not observer.c.
9117 * .gitignore: Remove observer.h.
9119 2018-03-18 Tom Tromey <tom@tromey.com>
9121 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9123 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9125 2018-03-17 Tom Tromey <tom@tromey.com>
9127 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9129 2018-03-17 Tom Tromey <tom@tromey.com>
9131 * target.c (class scoped_target_fd): New.
9132 (target_fileio_close_cleanup): Remove.
9133 (target_fileio_read_alloc_1): Use scoped_target_fd.
9135 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9137 * silent-rules.mk: New.
9138 * Makefile.in: Include silent-rules.mk
9139 (srcdir, VPATH, top_srcdir): Move up.
9140 (COMPILE): Add ECHO_CXX.
9141 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9142 (init.c): Add ECHO_INIT_C.
9143 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9144 (version.c): Add ECHO_GEN.
9145 (printcmd.o): Add ECHO_CXX.
9146 (target-float.o): Add ECHO_CXX.
9147 (ada-exp.o): Add ECHO_CXX.
9148 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9149 (insight$(EXEEXT)): Add ECHO_CXXLD.
9150 * gnulib/configure.ac: Add AM_SILENT_RULES.
9151 * gnulib/aclocal.m4: Re-generate.
9152 * gnulib/configure: Re-generate.
9153 * gnulib/import/Makefile.in: Re-generate.
9155 2018-03-16 Tom Tromey <tom@tromey.com>
9157 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9158 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9159 * utils.c (do_free_section_addr_info)
9160 (make_cleanup_free_section_addr_info): Remove.
9161 * symfile.h (struct other_sections): Add constructor.
9162 (struct section_addr_info): Remove.
9163 (section_addr_info): New typedef.
9164 (struct sym_fns) <sym_offsets>: Change type of parameter.
9165 (build_section_addr_info_from_objfile)
9166 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9167 (default_symfile_offsets, symbol_file_add)
9168 (symbol_file_add_from_bfd)
9169 (build_section_addr_info_from_section_table): Update.
9170 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9171 * symfile.c (alloc_section_addr_info): Remove.
9172 (build_section_addr_info_from_section_table): Change return type.
9174 (build_section_addr_info_from_bfd)
9175 (build_section_addr_info_from_objfile): Likewise.
9176 (free_section_addr_info): Remove.
9177 (relative_addr_info_to_section_offsets): Change type of "addrs".
9178 (addrs_section_compar): Now a std::sort comparator.
9179 (addrs_section_sort): Change return type.
9180 (addr_info_make_relative): Change type of "addrs". Update.
9181 (default_symfile_offsets, syms_from_objfile_1)
9182 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9183 (symbol_file_add_separate): Update.
9184 (symbol_file_add): Change type of "addrs". Update.
9185 (add_symbol_file_command): Update. Remove cleanups.
9186 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9188 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9189 * solib.c (solib_read_symbols): Update.
9190 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9191 * machoread.c (macho_symfile_offsets): Update.
9192 * jit.c (jit_bfd_try_read_symtab): Update.
9194 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9196 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9197 unittests/utils-selftests.c.
9198 * unittests/utils-selftests.c: New file.
9200 2018-03-14 Tom Tromey <tom@tromey.com>
9203 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9206 2018-03-14 Tom Tromey <tom@tromey.com>
9209 * printcmd.c (printf_pointer): Allow "-" in format.
9211 2018-03-14 Tom Tromey <tom@tromey.com>
9213 * printcmd.c (_initialize_printcmd): Add usage to printf.
9215 2018-03-14 Yao Qi <qiyao@sourceware.org>
9217 * MAINTAINERS: Update my email address.
9219 2018-03-13 Tom Tromey <tom@tromey.com>
9221 * machoread.c (macho_check_dsym): Change filenamep to a
9223 (macho_symfile_read): Update.
9224 * symfile.c (load_command): Use std::string.
9226 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9228 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9229 to error message string.
9230 (riscv_register_name): Use xsnprintf instead of sprintf.
9231 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9233 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9235 (riscv_push_dummy_call): Likewise.
9237 2018-03-12 Tom Tromey <tom@tromey.com>
9239 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9240 Use gdb::byte_vector.
9241 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9243 2018-03-12 Yao Qi <yao.qi@linaro.org>
9245 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9246 parameter type to readable_regcache.
9247 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9250 2018-03-11 Tom Tromey <tom@tromey.com>
9252 * dwarf2read.c (struct nextfield): Add initializers.
9253 (struct nextfnfield): Remove.
9254 (struct fnfieldlist): Add initializers. Remove "length" and
9255 "head", use std::vector.
9256 (struct decl_field_list): Remove.
9257 (struct field_info): Add initializers.
9258 <fields, baseclasses>: Now std::vector.
9259 <nbaseclasses, nfnfields, typedef_field_list_count,
9260 nested_types_list_count>: Remove.
9261 (dwarf2_add_field, dwarf2_add_type_defn)
9262 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9263 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9264 (process_structure_scope): Update.
9266 2018-03-11 Tom Tromey <tom@tromey.com>
9268 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9269 for use by std::sort.
9270 (build_type_psymtabs_1): Use std::vector.
9272 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9274 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9275 and LIBMPFR in the printed configuration.
9277 2018-03-08 Tom Tromey <tom@tromey.com>
9279 * source.c (get_filename_and_charpos): Use scoped_fd.
9280 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9281 (procfs_pidlist): Likewise.
9282 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9283 (iterate_over_mappings): Likewise.
9285 2018-03-08 Tom Tromey <tom@tromey.com>
9287 * infcall.c (struct call_return_meta_info)
9288 <stack_temporaries_enabled>: Remove.
9289 (get_call_return_value, call_function_by_hand_dummy): Update.
9290 * thread.c (disable_thread_stack_temporaries): Remove.
9291 (enable_thread_stack_temporaries): Remove.
9292 (thread_stack_temporaries_enabled_p): Return bool.
9293 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9294 (get_last_thread_stack_temporary): Update.
9295 * eval.c (evaluate_subexp): Update.
9296 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9297 class, not a function.
9298 (value_ptr, value_vec): Remove typedefs.
9299 (class thread_info) <stack_temporaries_enabled>: Now bool.
9300 <stack_temporaries>: Now a std::vector.
9301 (thread_stack_temporaries_enabled_p)
9302 (value_in_thread_stack_temporaries): Return bool.
9304 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9306 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9307 (getpkt_or_notif_sane_1): Likewise.
9309 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9311 * build-id.c (build_id_to_debug_bfd): Use std::string.
9313 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9315 * build-id.c (find_separate_debug_file_by_buildid): Return
9317 * build-id.h (find_separate_debug_file_by_buildid): Return
9319 * coffread.c (coff_symfile_read): Adjust to std::string.
9320 * elfread.c (elf_symfile_read): Adjust to std::string.
9321 * symfile.c (separate_debug_file_exists): Change parameter to
9323 (find_separate_debug_file): Return std::string.
9324 (find_separate_debug_file_by_debuglink): Return std::string.
9325 * symfile.h (find_separate_debug_file_by_debuglink): Return
9328 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9330 * common/xml-utils.c (xml_escape_text): Move code to...
9331 (xml_escape_text_append): ... this new function.
9332 * common/xml-utils.h (xml_escape_text_append): New declaration.
9333 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9335 (_initialize_xml_utils): register test_xml_escape_text_append as
9338 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9340 * defs.h: Remove MAX_REGISTER_SIZE.
9341 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9343 * python/py-unwind.c (pyuw_sniffer): Likewise.
9345 2018-03-07 Tom Tromey <tom@tromey.com>
9347 * linux-tdep.c (linux_info_proc): Update.
9348 * target.h (struct target_ops) <to_fileio_readlink>: Return
9350 (target_fileio_readlink): Return optional<string>.
9351 * remote.c (remote_hostio_readlink): Return optional<string>.
9352 * inf-child.c (inf_child_fileio_readlink): Return
9354 * target.c (target_fileio_readlink): Return optional<string>.
9356 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9358 * regcache.c (cooked_read_test): Add riscv to the list of
9359 architectures that have a save_reggroup.
9361 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9363 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9364 value is not a dynamic class object.
9366 2018-03-06 Tom Tromey <tom@tromey.com>
9368 * rust-exp.y: Formatting fixes.
9370 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9372 * riscv-tdep.c (riscv_register_name): Remove target description
9374 (riscv_gdbarch_init): Remove target description check.
9376 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9378 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9380 * riscv-tdep.h: Likewise.
9382 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9384 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9385 (riscv_pseudo_register_write): Delete.
9386 (riscv_gdbarch_init): Remove all use of pseudo registers.
9388 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9390 * record-btrace.c (btrace_print_lines): Replace cleanup
9391 parameter with RAII equivalents.
9392 (btrace_insn_history): Replace cleanup with RAII equivalents.
9393 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9394 make_cleanup_ui_out_tuple_begin_end): Remove.
9395 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9396 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9397 make_cleanup_ui_out_list_begin_end): Remove.
9399 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9401 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9402 parameter types to std::vector. Use bool.
9403 (record_btrace_wait): Replace VEC(tp_t) with
9404 std::vector<thread_info *>.
9405 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9407 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9409 * record-btrace.c (record_btrace_disable_callback): Remove.
9410 (struct scoped_btrace_disable): New.
9411 (record_btrace_open): Use scoped_btrace_disable.
9413 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9415 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9416 reading values from registers.
9418 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9420 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9423 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9425 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9426 change parameter type. Use GDB's print functions, and use
9427 core_addr_to_string where appropriate.
9428 (riscv_push_dummy_call): Use core_addr_to_string where
9429 appropriate, update call to riscv_print_arg_location, and reindent
9431 (riscv_return_value): Update call to riscv_print_arg_location.
9433 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9434 Tim Newsome <tim@sifive.com>
9435 Albert Ou <a0u@eecs.berkeley.edu>
9436 Darius Rad <darius@bluespec.com>
9438 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9439 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9440 (ALLDEPFILES): Add riscv-tdep.c
9441 * configure.tgt: Add riscv support.
9442 * riscv-tdep.c: New file.
9443 * riscv-tdep.h: New file.
9444 * NEWS: Mention new target.
9445 * MAINTAINERS: Add entry for riscv.
9447 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9449 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9450 fields within aggregates.
9452 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9454 * record-btrace.c (btrace_print_lines): Change type of flags to
9455 gdb_disassembly_flags.
9457 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9459 * fbsd-nat.c: Include "inf-ptrace.h".
9460 (USE_SIGTRAP_SIGINFO): Conditionally define.
9461 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9462 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9463 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9465 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9467 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9469 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9470 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9471 "supports_stopped_by_hw_breakpoint" target methods.
9473 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9475 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9476 * fbsd-nat.c (debug_fbsd_nat): New variable.
9477 (show_fbsd_nat_debug): New function.
9478 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9479 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9481 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9483 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9484 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9486 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9487 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9490 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9492 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9493 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9495 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9497 * charset.c (struct charset_vector): New.
9498 (charsets): Change type to charset_vector.
9499 (find_charset_names): Adjust.
9501 (_initialize_charset): Adjust.
9503 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9505 * progspace.h (struct program_space) <deleted_solibs>: Change
9506 type to std::vector<std::string>.
9507 * progspace.c (clear_program_space_solib_cache): Adjust.
9508 * breakpoint.c (print_solib_event): Adjust.
9509 (check_status_catch_solib): Adjust.
9510 * solib.c (update_solib_list): Adjust.
9511 * ui-out.h (class ui_out) <field_string>: New overload.
9512 * ui-out.c (ui_out::field_string): New overload.
9514 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9516 * progspace.h (struct program_space): Add constructor and
9517 destructor, initialize fields.
9518 (add_program_space): Remove.
9519 * progspace.c (add_program_space): Rename to...
9520 (program_space::program_space): ... this.
9521 (release_program_space): Rename to...
9522 (program_space::~program_space): ... this.
9523 (delete_program_space): Use delete to delete program_space.
9524 (initialize_progspace): Use new to allocate program_space.
9525 * inferior.c (add_inferior_with_spaces): Likewise.
9526 (clone_inferior_command): Likewise.
9527 * infrun.c (follow_fork_inferior): Likewise.
9528 (handle_vfork_child_exec_or_exit): Likewise.
9530 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9532 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9533 (delim_string_to_char_ptr_vec): Return std::vector of
9534 gdb::unique_xmalloc_ptr.
9535 (dirnames_to_char_ptr_vec_append): Take std::vector of
9536 gdb::unique_xmalloc_ptr.
9537 (dirnames_to_char_ptr_vec): Return std::vector of
9538 gdb::unique_xmalloc_ptr.
9539 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9540 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9541 (delim_string_to_char_ptr_vec): Return an std::vector of
9542 gdb::unique_xmalloc_ptr, adjust the code.
9543 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9544 gdb::unique_xmalloc_ptr, adjust the code.
9545 (dirnames_to_char_ptr_vec): Return an std::vector of
9546 gdb::unique_xmalloc_ptr, adjust the code.
9547 * auto-load.c (auto_load_safe_path_vec): Change type to
9548 std::vector of gdb::unique_xmalloc_ptr.
9549 (auto_load_expand_dir_vars): Return an std::vector of
9550 gdb::unique_xmalloc_ptr, adjust the code.
9551 (auto_load_safe_path_vec_update): Adjust.
9552 (filename_is_in_auto_load_safe_path_vec): Adjust.
9553 (auto_load_objfile_script_1): Adjust.
9554 * build-id.c (build_id_to_debug_bfd): Adjust.
9555 * linux-thread-db.c (thread_db_load_search): Adjust.
9556 * source.c (add_path): Adjust.
9558 * symfile.c (find_separate_debug_file): Adjust.
9559 * utils.c (do_free_char_ptr_vec): Remove.
9560 (make_cleanup_free_char_ptr_vec): Remove.
9562 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9565 * common/pathstuff.c: Conditionally include "<windows.h>".
9567 2018-03-01 Georg Sauthoff <mail@georg.so>
9570 * gcore.in: Quote variables and switch interpreter to bash.
9572 2018-03-01 Tom Tromey <tom@tromey.com>
9574 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9575 assertion. Add assertion for discriminant_index.
9576 (quirk_rust_enum): Use correct base type name in univariant case.
9578 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9580 * record.c (get_call_history_modifiers): Return a
9582 (cmd_record_call_history): Adjust.
9583 * record-btrace.c (record_btrace_call_history): Adjust.
9584 (record_btrace_call_history_range): Adjust.
9585 (record_btrace_call_history_from): Adjust.
9586 * target-debug.h (target_debug_print_record_print_flags): New.
9587 * target-delegates.c: Re-generate.
9588 * target.c (target_call_history): Change flags type.
9589 (target_call_history_from): Likewise.
9590 (target_call_history_range): Likewise.
9591 * target.h (struct target_ops) <target_call_history>: Likewise.
9592 (target_call_history_from): Likewise.
9593 (target_call_history_range): Likewise.
9595 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9596 Simon Marchi <simon.marchi@polymtl.ca>
9598 * common/common-utils.c: Include "sys/stat.h".
9599 (is_regular_file): Move here from "source.c"; change return
9601 * common/common-utils.h (is_regular_file): New prototype.
9602 * common/pathstuff.c (contains_dir_separator): New function.
9603 * common/pathstuff.h (contains_dir_separator): New prototype.
9604 * source.c: Don't include "sys/stat.h".
9605 (is_regular_file): Move to "common/common-utils.c".
9607 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9609 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9610 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9611 * auto-load.c: Include "common/pathstuff.h".
9612 * common/common-def.h (current_directory): Move here.
9613 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9615 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9617 * common/pathstuff.c: New file.
9618 * common/pathstuff.h: New file.
9619 * compile/compile.c: Include "common/pathstuff.h".
9620 * defs.h (current_directory): Move to "common/common-defs.h".
9621 * dwarf2read.c: Include "common/pathstuff.h".
9623 * guile/scm-safe-call.c: Likewise.
9624 * linux-thread-db.c: Likewise.
9626 * nto-tdep.c: Likewise.
9627 * objfiles.c: Likewise.
9628 * source.c: Likewise.
9629 * symtab.c: Likewise.
9630 * utils.c: Include "common/pathstuff.h".
9631 (gdb_realpath): Move to "common/pathstuff.c".
9632 (gdb_realpath_keepfile): Likewise.
9633 (gdb_abspath): Likewise.
9634 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9635 (gdb_realpath_keepfile): Likewise.
9636 (gdb_abspath): Likewise.
9638 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9640 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9641 wildcard process pid for super_resume for kernels with a
9644 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9646 * compile/compile.c (get_args): Add additional comments
9647 explaining function.
9649 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9650 Tom Tromey <tom@tromey.com>
9652 * target.h (memory_write_request_s): Remove typedef. Don't define
9654 (target_write_memory_blocks): Change argument to std::vector.
9655 (struct memory_write_request): Add constructor.
9656 * target-memory.c (compare_block_starting_address): Return bool.
9657 Change argument types.
9658 (claim_memory): Change arguments to use std::vector.
9659 (split_regular_and_flash_blocks, blocks_to_erase)
9660 (compute_garbled_blocks): Likewise.
9661 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9662 (target_write_memory_blocks): Change argument to std::vector.
9663 * symfile.c (struct load_section_data): Add constructor and
9664 destructor. Use std::vector for "requests".
9665 (struct load_progress_data): Add initializers.
9666 (load_section_callback): Update. Use "new".
9667 (clear_memory_write_data): Remove.
9668 (generic_load): Update.
9670 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9672 * arch/aarch64.h: Use common/tdesc.h.
9674 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9676 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9677 architecture with a 64-bit ABI.
9679 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9681 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9682 ahead of target description loading.
9684 2018-02-26 Tom Tromey <tom@tromey.com>
9686 * stack.c (backtrace_command_1): Update.
9687 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9689 * python/py-framefilter.c (py_print_frame)
9690 (gdbpy_apply_frame_filter): Change type of "flags".
9691 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9693 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9694 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9695 * extension.h (enum frame_filter_flag): Rename from
9697 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9698 (apply_ext_lang_frame_filter): Change type of "flags".
9699 * extension.c (apply_ext_lang_frame_filter): Change type of
9701 * extension-priv.h (struct extension_language_ops)
9702 <apply_frame_filter>: Change type of "flags".
9704 2018-02-26 Tom Tromey <tom@tromey.com>
9707 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9708 off-by-one in py_end computation.
9709 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9711 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9714 2018-02-26 Tom Tromey <tom@tromey.com>
9716 * dwarf2read.c (struct variant_field): New.
9717 (struct nextfield) <variant>: New field.
9718 (dwarf2_add_field): Handle DW_TAG_variant_part.
9719 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9720 discriminated union.
9721 (read_structure_type): Handle DW_TAG_variant_part.
9722 (handle_struct_member_die): New function, extracted from
9723 process_structure_scope. Handle DW_TAG_variant.
9724 (process_structure_scope): Handle discriminated unions. Call
9725 handle_struct_member_die.
9727 2018-02-26 Tom Tromey <tom@tromey.com>
9729 * rust-lang.h (rust_last_path_segment): Declare.
9730 * rust-lang.c (rust_last_path_segment): Now public. Change
9732 (struct disr_info): Remove.
9733 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9734 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9735 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9736 (rust_enum_p, rust_enum_variant): New function.
9737 (rust_underscore_fields): Remove "offset" parameter.
9738 (rust_print_enum): New function.
9739 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9740 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9741 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9743 (rust_internal_print_type): New function, from rust_print_type.
9745 (rust_print_type): Call rust_internal_print_type.
9746 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9747 Update enum handling.
9748 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9749 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9750 (rust_union_quirks): New functions.
9751 (process_full_comp_unit, process_full_type_unit): Call
9753 (process_structure_scope): Update rust_unions if necessary.
9755 2018-02-26 Tom Tromey <tom@tromey.com>
9757 * value.h (value_union_variant): Declare.
9758 * valops.c (value_union_variant): New function.
9759 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9760 (struct discriminant_info): New.
9761 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9763 (struct main_type) <flag_discriminated_union>: New field.
9765 2018-02-26 Tom Tromey <tom@tromey.com>
9767 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9768 unittests/unpack-selftests.c.
9769 * unittests/unpack-selftests.c: New file.
9770 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9772 2018-02-26 Yao Qi <yao.qi@linaro.org>
9774 * dwarf2read.c (struct partial_die_info) <read>: New method.
9775 (read_partial_die): Remove the declaration.
9776 (load_partial_dies): Update.
9777 (partial_die_info::partial_die_info):
9778 (read_partial_die): Change it to partial_die_info::read.
9780 2018-02-26 Yao Qi <yao.qi@linaro.org>
9782 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9783 (fixup_partial_die): Remove declaration.
9784 (scan_partial_symbols): Update.
9785 (partial_die_parent_scope): Likewise.
9786 (partial_die_full_name): Likewise.
9787 (fixup_partial_die): Change it to partial_die_info::fixup.
9789 2018-02-26 Yao Qi <yao.qi@linaro.org>
9791 * dwarf2read.c (read_partial_die): Update the declaration.
9792 (load_partial_dies): Caller update.
9793 (read_partial_die): Remove one argument abbrev_len.
9795 2018-02-26 Yao Qi <yao.qi@linaro.org>
9797 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9798 assignment operator.
9799 (load_partial_dies): Use ctor and copy ctor.
9800 (read_partial_die): Update.
9801 (dwarf2_cu::find_partial_die): Use ctor.
9803 2018-02-26 Yao Qi <yao.qi@linaro.org>
9805 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9806 (find_partial_die_in_comp_unit): Change it to
9807 dwarf2_cu::find_partial_die.
9808 (find_partial_die): Update.
9810 2018-02-26 Yao Qi <yao.qi@linaro.org>
9812 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9815 2018-02-26 Yao Qi <yao.qi@linaro.org>
9817 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9819 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9821 * arch/amd64.h: Use common/tdesc.h.
9822 * arch/i386.c: Likewise.
9823 * arch/i386.h: Likewise.
9824 * arch/tic6x.c: Likewise.
9825 * arch/tdesc.h: Move file from here...
9826 * common/tdesc.h: ...to here.
9827 * features/aarch64-core.c: Regenerate.
9828 * features/aarch64-fpu.c: Regenerate.
9829 * features/i386/32bit-avx.c: Regenerate.
9830 * features/i386/32bit-avx512.c: Regenerate.
9831 * features/i386/32bit-core.c: Regenerate.
9832 * features/i386/32bit-linux.c: Regenerate.
9833 * features/i386/32bit-mpx.c: Regenerate.
9834 * features/i386/32bit-pkeys.c: Regenerate.
9835 * features/i386/32bit-sse.c: Regenerate.
9836 * features/i386/64bit-avx.c: Regenerate.
9837 * features/i386/64bit-avx512.c: Regenerate.
9838 * features/i386/64bit-core.c: Regenerate.
9839 * features/i386/64bit-linux.c: Regenerate.
9840 * features/i386/64bit-mpx.c: Regenerate.
9841 * features/i386/64bit-pkeys.c: Regenerate.
9842 * features/i386/64bit-segments.c: Regenerate.
9843 * features/i386/64bit-sse.c: Regenerate.
9844 * features/i386/x32-core.c: Regenerate.
9845 * features/tic6x-c6xp.c: Regenerate.
9846 * features/tic6x-core.c: Regenerate.
9847 * features/tic6x-gp.c: Regenerate.
9848 * target-descriptions.c: Use common/tdesc.h.
9849 * target-descriptions.h: Likewise.
9851 2018-02-24 Tom Tromey <tom@tromey.com>
9853 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9854 (try_thread_db_load_from_dir, thread_db_load_search): Use
9856 (info_auto_load_libthread_db_compare): Return bool. Change
9858 (info_auto_load_libthread_db): Use std::vector, std::string.
9861 2018-02-24 Tom Tromey <tom@tromey.com>
9863 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9865 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9867 * gdbarch.c: Rebuild.
9868 * gdbarch.h: Rebuild.
9869 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9870 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9871 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9874 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9876 * gdbtypes.h (sect_offset): Change type to uint64_t.
9877 (sect_offset_str): New function.
9878 * dwarf2read.c (create_addrmap_from_aranges): Use
9880 (error_check_comp_unit_head): Likewise.
9881 (create_debug_type_hash_table): Likewise.
9882 (read_cutu_die_from_dwo): Likewise.
9883 (init_cutu_and_read_dies): Likewise.
9884 (init_cutu_and_read_dies_no_follow): Likewise.
9885 (process_psymtab_comp_unit_reader): Likewise.
9886 (partial_die_parent_scope): Likewise.
9887 (peek_die_abbrev): Likewise.
9888 (process_queue): Likewise.
9889 (dwarf2_physname): Likewise.
9890 (read_namespace_alias): Likewise.
9891 (read_import_statement): Likewise.
9892 (create_dwo_cu_reader): Likewise.
9893 (create_cus_hash_table): Likewise.
9894 (lookup_dwo_cutu): Likewise.
9895 (inherit_abstract_dies): Likewise.
9896 (read_func_scope): Likewise.
9897 (read_call_site_scope): Likewise.
9898 (dwarf2_add_member_fn): Likewise.
9899 (read_common_block): Likewise.
9900 (read_module_type): Likewise.
9901 (read_typedef): Likewise.
9902 (read_subrange_type): Likewise.
9903 (load_partial_dies): Likewise.
9904 (read_partial_die): Likewise.
9905 (find_partial_die): Likewise.
9906 (read_str_index): Likewise.
9907 (dwarf2_string_attr): Likewise.
9908 (build_error_marker_type): Likewise.
9909 (lookup_die_type): Likewise.
9910 (dump_die_shallow): Likewise.
9911 (follow_die_ref): Likewise.
9912 (dwarf2_fetch_die_loc_sect_off): Likewise.
9913 (dwarf2_fetch_constant_bytes): Likewise.
9914 (follow_die_sig): Likewise.
9915 (get_signatured_type): Likewise.
9916 (get_DW_AT_signature_type): Likewise.
9917 (dwarf2_find_containing_comp_unit): Likewise.
9918 (set_die_type): Likewise.
9920 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9922 * arch/aarch64.c: Include "common-defs.h".
9923 * arch/amd64.c: Likewise.
9924 * arch/i386.c: Likewise.
9926 2018-02-21 Tom Tromey <tom@tromey.com>
9928 * value.h: (extract_field_op): Update.
9929 * eval.c (extract_field_op): Return a const char *.
9930 * expression.h (parse_expression_for_completion): Update.
9931 * completer.c (complete_expression): Update.
9932 (add_struct_fields): Make fieldname const.
9933 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9934 (mark_completion_tag, parse_exp_in_context_1): Update.
9935 (parse_expression_for_completion): Change "name" to
9936 unique_xmalloc_ptr*.
9938 2018-02-21 Tom Tromey <tom@tromey.com>
9940 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9942 2018-02-21 Yao Qi <yao.qi@linaro.org>
9944 * avr-tdep.c (avr_read_pc): Change parameter type to
9946 * gdbarch.sh (read_pc): Likewise.
9947 * gdbarch.c: Re-generated.
9948 * gdbarch.h: Re-generated.
9949 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9951 * ia64-tdep.c (ia64_read_pc): Likewise.
9952 * mips-tdep.c (mips_read_pc): Likewise.
9953 * spu-tdep.c (spu_read_pc): Likewise.
9955 2018-02-21 Yao Qi <yao.qi@linaro.org>
9957 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9958 * regcache-dump.c: New file.
9959 * regcache.c: Move register_dump to regcache-dump.c.
9960 (maintenance_print_registers): Likewise.
9961 (maintenance_print_raw_registers): Likewise.
9962 (maintenance_print_cooked_registers): Likewise.
9963 (maintenance_print_register_groups): Likewise.
9964 (maintenance_print_remote_registers): Likewise.
9965 (_initialize_regcache): Likewise.
9966 * regcache.h (register_dump): Moved from regcache.c.
9968 2018-02-21 Yao Qi <yao.qi@linaro.org>
9970 * regcache.c (regcache::regcache): Update.
9971 (regcache::invalidate): Move it to detached_regcache::invalidate.
9972 (get_thread_arch_aspace_regcache): Update.
9973 (regcache::raw_update): Update.
9974 (regcache::cooked_read): Remove some code.
9975 (regcache::cooked_read_value): Likewise.
9976 (regcache::raw_write): Remove assert on m_readonly_p.
9977 (regcache::raw_supply_integer): Move it to
9978 detached_regcache::raw_supply_integer.
9979 (regcache::raw_supply_zeroed): Likewise.
9980 * regcache.h (detached_regcache) <raw_supply_integer>: New
9982 <raw_supply_zeroed, invalidate>: Likewise.
9983 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9984 <invalidate>: Likewise.
9985 <m_readonly_p>: Removed.
9987 2018-02-21 Yao Qi <yao.qi@linaro.org>
9989 * infcmd.c (get_return_value): Let stop_regs point to
9990 get_current_regcache.
9991 * regcache.c (regcache::regcache): Remove.
9992 (register_dump_reg_buffer): New class.
9993 (regcache_print): Adjust.
9994 * regcache.h (regcache): Remove constructors.
9996 2018-02-21 Yao Qi <yao.qi@linaro.org>
9998 * regcache.c (class register_dump): New class.
9999 (register_dump_regcache, register_dump_none): New class.
10000 (register_dump_remote, register_dump_groups): New class.
10001 (regcache_print): Update.
10002 * regcache.h (regcache_dump_what): Move it to regcache.c.
10003 (regcache) <dump>: Remove.
10005 2018-02-21 Yao Qi <yao.qi@linaro.org>
10007 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10009 (jit_unwind_reg_set_impl): Call raw_supply.
10010 (jit_frame_sniffer): Use reg_buffer_rw.
10011 * record-full.c (record_full_core_regbuf): Change its type.
10012 (record_full_core_open_1): Use reg_buffer_rw.
10013 (record_full_close): Likewise.
10014 (record_full_core_fetch_registers): Use regcache->raw_supply.
10015 (record_full_core_store_registers): Likewise.
10016 * regcache.c (regcache::get_register_status): Move it to
10018 (regcache_raw_set_cached_value): Remove.
10019 (regcache::raw_set_cached_value): Remove.
10020 (regcache::raw_write): Call raw_supply.
10021 (regcache::raw_supply): Move it to reg_buffer_rw.
10022 * regcache.h (regcache_raw_set_cached_value): Remove.
10023 (reg_buffer_rw): New class.
10025 2018-02-21 Yao Qi <yao.qi@linaro.org>
10027 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10028 readonly_detached_regcache.
10029 (dummy_frame_prev_register): Use regcache->cooked_read.
10030 * frame.c (frame_save_as_regcache): Change return type.
10031 (frame_pop): Update.
10032 * frame.h (frame_save_as_regcache): Update declaration.
10033 * inferior.h (get_infcall_suspend_state_regcache): Update
10035 * infrun.c (infcall_suspend_state) <registers>: use
10036 readonly_detached_regcache.
10037 (save_infcall_suspend_state): Don't use regcache_dup.
10038 (get_infcall_suspend_state_regcache): Change return type.
10039 * linux-fork.c (struct fork_info) <savedregs>: Change to
10040 readonly_detached_regcache.
10042 (fork_save_infrun_state): Don't use regcache_dup.
10043 (info_checkpoints_command): Adjust.
10044 * mi/mi-main.c (register_changed_p): Update declaration.
10045 (mi_cmd_data_list_changed_registers): Use
10046 readonly_detached_regcache.
10047 (register_changed_p): Change parameter type to
10048 readonly_detached_regcache.
10049 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10050 readonly_detached_regcache.
10051 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10052 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10054 (regcache::save): Move it to reg_buffer.
10055 (regcache::restore): Change parameter type.
10056 (regcache_dup): Remove.
10057 * regcache.h (reg_buffer) <save>: New method.
10058 (readonly_detached_regcache): New class.
10059 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10060 readonly_detached_regcache.
10061 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10063 2018-02-21 Yao Qi <yao.qi@linaro.org>
10065 * frame.c (frame_save_as_regcache): Use regcache method save.
10066 (frame_pop): Use regcache method restore.
10067 * infrun.c (restore_infcall_suspend_state): Likewise.
10068 * linux-fork.c (fork_load_infrun_state): Likewise.
10069 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10071 * regcache.c (regcache_save): Remove.
10072 (regcache::restore): More asserts.
10073 (regcache_cpy): Remove.
10074 * regcache.h (regcache_save): Remove the declaration.
10075 (regcache::restore): Move from private to public.
10076 Remove the friend declaration of regcache_cpy.
10077 (regcache_cpy): Remove declaration.
10079 2018-02-21 Yao Qi <yao.qi@linaro.org>
10081 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10082 parameter type to 'readable_regcache *'.
10083 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10084 * arm-tdep.c (arm_neon_quad_read): Likewise.
10085 (arm_pseudo_read): Likewise.
10086 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10087 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10088 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10089 * gdbarch.c: Re-generated.
10090 * gdbarch.h: Re-generated.
10091 * gdbarch.sh (pseudo_register_read): Change parameter type to
10092 'readable_regcache *'.
10093 (pseudo_register_read_value): Likewise.
10094 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10095 (h8300_pseudo_register_read): Likewise.
10096 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10097 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10098 (i386_pseudo_register_read_into_value): Likewise.
10099 (i386_pseudo_register_read_value): Likewise.
10100 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10102 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10103 * m32c-tdep.c (m32c_raw_read): Likewise.
10104 (m32c_read_flg): Likewise.
10105 (m32c_banked_register): Likewise.
10106 (m32c_banked_read): Likewise.
10107 (m32c_sb_read): Likewise.
10108 (m32c_part_read): Likewise.
10109 (m32c_cat_read): Likewise.
10110 (m32c_r3r2r1r0_read): Likewise.
10111 (m32c_pseudo_register_read): Likewise.
10112 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10113 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10114 (mep_pseudo_cr64_read): Likewise.
10115 (mep_pseudo_register_read): Likewise.
10116 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10117 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10118 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10119 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10120 (regcache::cooked_read): Likewise.
10121 (regcache::cooked_read_value): Likewise.
10122 (regcache_cooked_read_signed):
10123 (regcache::cooked_read): Likewise.
10124 * regcache.h (readable_regcache): New class.
10125 (regcache): Inherit readable_regcache. Move some methods to
10127 * rl78-tdep.c (rl78_pseudo_register_read): Change
10128 parameter type to 'readable_regcache *'.
10129 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10130 (e500_pseudo_register_read): Change parameter type to
10131 'readable_regcache *'.
10132 (dfp_pseudo_register_read): Likewise.
10133 (vsx_pseudo_register_read): Likewise.
10134 (efpr_pseudo_register_read): Likewise.
10135 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10136 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10137 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10138 (sh64_pseudo_register_read): Likewise.
10139 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10140 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10141 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10142 (spu_pseudo_register_read): Likewise.
10143 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10144 (xtensa_pseudo_register_read): Likewise.
10146 2018-02-21 Yao Qi <yao.qi@linaro.org>
10148 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10149 (regcache::arch): Move it to reg_buffer::arch.
10150 (regcache::register_buffer): Likewise.
10151 (regcache::assert_regnum): Likewise.
10152 (regcache::num_raw_registers): Likewise.
10153 * regcache.h (reg_buffer): New class.
10154 (regcache): Inherit reg_buffer.
10156 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10158 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10159 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10161 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10163 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10165 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10167 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10168 (SFILES): Remove common/*.c files.
10169 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10170 * common/common.host: Add common reference.
10171 * configure.ac: Likewise.
10172 * configure: Regenerate.
10174 2018-02-16 Yao Qi <yao.qi@linaro.org>
10176 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10177 (block_initialize_namespace): Use new.
10178 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10179 (dwarf2_free_objfile): Use delete.
10180 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10181 (copy_type_recursive): Use new.
10182 * gdb_obstack.h (allocate_on_obstack): New.
10184 2018-02-15 Yao Qi <yao.qi@linaro.org>
10187 * inferior.c (exit_inferior_1): Reset inf->control.
10189 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10191 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10194 2018-02-14 Pedro Alves <palves@redhat.com>
10196 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10197 frame_cleanup_after_sniffer on exception.
10199 2018-02-14 Tom Tromey <tom@tromey.com>
10201 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10203 (solib_bfd_open): Make pathname const.
10204 * solib.c (solib_bfd_open): Make pathname const.
10205 * solib-spu.c (spu_bfd_fopen): Make name const.
10206 (spu_bfd_open): Make pathname const.
10207 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10208 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10210 2018-02-14 Tom Tromey <tom@tromey.com>
10212 * symfile.c (symfile_bfd_open): Update.
10213 * source.h (openp, source_full_path_of, find_and_open_source):
10214 Change argument type to unique_xmalloc_ptr.
10215 * source.c (openp): Take a unique_xmalloc_ptr.
10216 (source_full_path_of, find_and_open_source): Likewise.
10217 (open_source_file, symtab_to_fullname): Update.
10218 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10219 unique_xmalloc_ptr.
10220 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10221 (exec_file_find): Update.
10222 * psymtab.c (psymtab_to_fullname): Update.
10223 * nto-tdep.h (nto_find_and_open_solib): Update.
10224 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10225 unique_xmalloc_ptr.
10226 * exec.c (exec_file_attach): Update.
10227 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10228 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10230 2018-02-14 Tom Tromey <tom@tromey.com>
10232 * solib.c: Include source.h.
10233 * nto-tdep.c: Include source.h.
10234 * mi/mi-cmd-env.c: Include source.h.
10235 * infcmd.c: Include source.h.
10236 * exec.c: Include source.h.
10237 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10238 (add_path, directory_switch, source_path, init_source_path): Move
10240 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10241 (add_path, directory_switch, source_path, init_source_path):
10244 2018-02-14 Tom Tromey <tom@tromey.com>
10246 * solist.h (exec_file_find, solib_find): Return
10247 unique_xmalloc_ptr.
10248 (solib_bfd_fopen): Take a const char *.
10249 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10250 (exec_file_find, solib_find): Likewise.
10251 (solib_bfd_fopen): Do not take ownership of "pathname".
10252 (solib_bfd_open): Use unique_xmalloc_ptr.
10253 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10254 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10255 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10256 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10258 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10260 * ada-lang.c (name_match_type_from_name): Remove reference to
10261 ada_name_for_lookup in function's documentation.
10262 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10264 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10266 * defs.h (enum openp_flags): New enum.
10267 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10268 Move to enum openp_flags.
10269 (openp_flags): New enum flags.
10270 (openp): Change parameter type to openp_flags.
10271 * source.c (openp): Change parameter type to openp_flags.
10272 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10273 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10275 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10277 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10280 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10282 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10284 (class dwarf2_queue_guard): ...the destructor of this new class.
10285 (dw2_do_instantiate_symtab): Create instance of the new class
10286 dwarf2_queue_guard, remove cleanup.
10288 2018-02-09 Tom Tromey <tom@tromey.com>
10290 * source.c (find_source_lines): Don't reference past the end of
10293 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10295 * remote.c (remote_btrace_maybe_reopen): Change error message.
10296 * btrace.c (btrace_enable): Likewise.
10297 (parse_xml_btrace): Likewise.
10298 (parse_xml_btrace_conf): Likewise.
10300 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10302 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10303 (linux_enable_pt, linux_enable_bts): Call
10304 diagnose_perf_event_open_fail.
10306 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10308 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10309 Remove parameter and change return type. Update callers. Move it.
10310 (linux_enable_bts, linux_enable_pt): Improve error message.
10311 (linux_enable_pt): Remove zero buffer size check.
10312 (linux_enable_btrace): Improve error messages. Remove NULL return
10315 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10317 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10318 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10319 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10320 (linux_supports_pt, linux_supports_btrace): Remove.
10321 (linux_enable_bts): Call cpu_supports_bts.
10322 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10323 * remote.c (remote_supports_btrace): Remove.
10324 (init_remote_ops): Remove remote_supports_btrace.
10325 * target-delegates.c: Regenerated.
10326 * target.c (target_supports_btrace): Remove.
10327 * target.h (target_ops) <to_supports_btrace>: Remove
10328 (target_supports_btrace): Remove.
10329 * x86-linux-nat.c (x86_linux_create_target): Remove
10330 linux_supports_btrace.
10332 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10334 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10336 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10337 exception and use message in own exception.
10339 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10341 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10342 (perf_event_pt_event_type): Use gdb_file_up.
10343 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10344 scoped_fd, and scoped_mmap.
10346 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10348 * common/scoped_mmap.h: New.
10349 * unittests/scoped_mmap-selftest.c: New.
10350 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10351 unittests/scoped_mmap-selftest.c.
10353 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10355 * common/scoped_fd.h: New.
10356 * unittests/scoped_fd-selftest.c: New.
10357 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10358 unittests/scoped_fd-selftest.c.
10360 2018-02-09 Tom Tromey <tom@tromey.com>
10362 * auto-load.c (auto_load_section_scripts): Use
10363 gdb::unique_xmalloc_ptr.
10365 2018-02-09 Tom Tromey <tom@tromey.com>
10367 * auto-load.c (execute_script_contents): Use std::string.
10369 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10371 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10372 Python function, rather than a new command.
10374 2018-02-08 Tom Tromey <tom@tromey.com>
10376 * solib.c (solib_find_1): Use std::string.
10377 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10379 2018-02-08 Tom Tromey <tom@tromey.com>
10381 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10383 2018-02-08 Tom Tromey <tom@tromey.com>
10385 * source.c (find_source_lines): Use gdb::def_vector.
10387 2018-02-08 Tom Tromey <tom@tromey.com>
10389 * macrocmd.c (struct temporary_macro_definition): New.
10390 (macro_define_command): Use temporary_macro_definition. Remove
10392 (free_macro_definition_ptr): Remove.
10394 2018-02-08 Tom Tromey <tom@tromey.com>
10396 * macroexp.c (maybe_expand): Use std::string.
10398 2018-02-08 Tom Tromey <tom@tromey.com>
10400 * macroexp.c (struct macro_buffer): Add initializers for some
10402 (init_buffer, init_shared_buffer, free_buffer)
10403 (free_buffer_return_text): Remove.
10404 (macro_buffer): New constructors.
10405 (~macro_buffer): New destructor.
10406 (macro_buffer::set_shared): New method.
10407 (macro_buffer::resize_buffer, macro_buffer::appendc)
10408 (macro_buffer::appendmem): Now methods, not free functions.
10409 (set_token, append_tokens_without_splicing, stringify)
10410 (macro_stringify): Update.
10411 (gather_arguments): Change return type. Remove argc_p argument,
10412 add args_ptr argument. Use std::vector.
10413 (substitute_args): Remove argc argument. Accept std::vector.
10414 (expand): Update. Use std::vector.
10415 (scan, macro_expand, macro_expand_next): Update.
10417 2018-02-08 Tom Tromey <tom@tromey.com>
10419 * symtab.c (default_collect_symbol_completion_matches_break_on):
10420 Use unique_xmalloc_ptr.
10421 * macroscope.h: (sal_macro_scope, user_macro_scope)
10422 (default_macro_scope): Return unique_xmalloc_ptr.
10423 * macroscope.c (sal_macro_scope, user_macro_scope)
10424 (default_macro_scope): Return unique_xmalloc_ptr.
10425 * macroexp.h (macro_expand, macro_expand_once): Return
10426 unique_xmalloc_ptr.
10427 * macroexp.c (macro_expand, macro_expand_once): Return
10428 unique_xmalloc_ptr.
10429 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10430 (info_macro_command, info_macros_command): Use
10431 unique_xmalloc_ptr.
10432 * compile/compile-c-support.c (write_macro_definitions): Use
10433 unique_xmalloc_ptr.
10434 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10436 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10438 * value.c (value_static_field): Assign field type instead of
10439 containing type when returning an optimized out value.
10441 2018-02-06 Yao Qi <yao.qi@linaro.org>
10443 * ft32-tdep.c (ft32_read_pc): Remove.
10444 (ft32_write_pc): Remove.
10445 (ft32_gdbarch_init): Update.
10446 * m32r-tdep.c (m32r_read_pc): Remove.
10447 (m32r_gdbarch_init): Update.
10448 * mep-tdep.c (mep_read_pc): Remove.
10449 (mep_gdbarch_init): Update.
10450 * microblaze-tdep.c (microblaze_write_pc): Remove.
10451 (microblaze_gdbarch_init): Update.
10452 * mn10300-tdep.c (mn10300_read_pc): Remove.
10453 (mn10300_write_pc): Remove.
10454 (mn10300_gdbarch_init): Update.
10455 * moxie-tdep.c (moxie_read_pc): Remove.
10456 (moxie_write_pc): Remove.
10457 (moxie_gdbarch_init): Update.
10459 2018-02-06 Yao Qi <yao.qi@linaro.org>
10461 * expprint.c (print_subexp_standard): Handle
10462 OP_F77_UNDETERMINED_ARGLIST.
10463 (dump_subexp_body_standard): Likewise.
10465 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10467 * target-descriptions.c (tdesc_element_visitor) Add empty
10469 (tdesc_type): Move make_gdb_type from here.
10470 (tdesc_type_builtin): Likewise.
10471 (tdesc_type_vector): Likewise.
10472 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10473 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10474 (make_gdb_type_union): Likewise.
10475 (make_gdb_type_flags): Likewise.
10476 (make_gdb_type_enum): Likewise.
10477 (make_gdb_type): New function.
10478 (tdesc_register_type): Use static make_gdb_type.
10480 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10482 * infcmd.c (default_print_one_register_info): Align natural-format
10483 column values consistently one under another.
10484 (pad_to_column): New function.
10486 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10488 * dwarf2read.c (dwarf2_physname): Move commment.
10490 2018-02-01 Leszek Swirski <leszeks@google.com>
10492 * varobj.c (varobj_formatted_print_options): Allow recursive
10493 pretty printing if pretty printing is enabled.
10495 2018-02-01 Leszek Swirski <leszeks@google.com>
10497 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10498 names after a structop as a filename.
10500 2018-02-01 Yao Qi <yao.qi@linaro.org>
10502 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10503 (arm_record_coproc_data_proc): Likewise.
10505 2018-02-01 Yao Qi <yao.qi@linaro.org>
10507 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10509 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10511 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10512 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10514 2018-01-31 Pedro Alves <palves@redhat.com>
10516 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10517 * inflow.c (child_terminal_save_inferior): Wrap reference to
10518 tcgetpgrp in HAVE_TERMIOS_H.
10519 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10521 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10522 always iterate over all inferiors.
10523 (gdbsim_cntrl_c): Adjust.
10524 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10526 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10528 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10529 index type is objfile-owned if the element type is as well.
10531 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10535 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10537 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10538 "features/s390x-linux64.c".
10539 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10540 s390_linux32 and s390x_linux64.
10541 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10543 * s390-tdep.c: Include "features/s390-linux32.c" and
10544 "features/s390x-linux64.c".
10545 (s390_tdesc_valid): Add check for tdesc_has_registers.
10546 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10547 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10548 tdesc_s390x_linux64.
10549 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10550 tdesc_s390x_linux64 to...
10551 * s390-tdep.h: ...here.
10553 2018-01-30 Pedro Alves <palves@redhat.com>
10556 * config.in, configure: Regenerate.
10557 * configure.ac: Check for getpgid.
10558 * go32-nat.c (go32_pass_ctrlc): New.
10559 (go32_target): Install it.
10560 * inf-child.c (inf_child_target): Install
10561 child_terminal_save_inferior, child_pass_ctrlc and
10563 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10564 (inf_ptrace_target): No longer install it.
10565 * infcmd.c (interrupt_target_1): Adjust.
10566 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10567 (child_interrupt): Declare.
10568 (inferior::terminal_state): New.
10569 * inflow.c (struct terminal_info): Update comments.
10570 (inferior_process_group): Delete.
10571 (terminal_is_ours): Delete.
10572 (gdb_tty_state): New.
10573 (child_terminal_init): Adjust.
10574 (is_gdb_terminal, sharing_input_terminal_1)
10575 (sharing_input_terminal): New functions.
10576 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10577 Set the process's actual process group in the foreground if
10578 possible. Handle is_ours_for_output/is_ours distinction. Don't
10579 mark terminal as the inferior's if not sharing GDB's terminal.
10580 Don't check attach_flag.
10581 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10582 pass down a target_terminal_state.
10583 (child_terminal_save_inferior): New, factored out from ...
10584 (child_terminal_ours_1): ... this. Handle
10585 target_terminal_state::is_ours_for_output.
10586 (child_interrupt, child_pass_ctrlc): New.
10587 (inflow_inferior_exit): Clear the inferior's terminal_state.
10588 (copy_terminal_info): Copy the inferior's terminal state.
10589 (_initialize_inflow): Remove reference to terminal_is_ours.
10590 * inflow.h (inferior_process_group): Delete.
10591 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10592 * procfs.c (procfs_target): Don't install procfs_interrupt.
10593 (procfs_interrupt): Delete.
10594 * remote.c (remote_serial_quit_handler): Adjust.
10595 (remote_interrupt): Remove ptid parameter. Adjust.
10596 * target-delegates.c: Regenerate.
10597 * target.c: Include "terminal.h".
10598 (target_terminal::terminal_state): Rename to ...
10599 (target_terminal::m_terminal_state): ... this.
10600 (target_terminal::init): Adjust.
10601 (target_terminal::inferior): Adjust to per-inferior
10603 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10604 (target_terminal::ours, target_terminal::ours_for_output): Use
10605 target_terminal_is_ours_kind.
10606 (target_interrupt): Remove ptid parameter. Adjust.
10607 (default_target_pass_ctrlc): Adjust.
10608 * target.h (target_ops::to_terminal_save_inferior): New field.
10609 (target_ops::to_interrupt): Remove ptid_t parameter.
10610 (target_interrupt): Remove ptid_t parameter. Update comment.
10611 (target_pass_ctrlc): Update comment.
10612 * target/target.h (target_terminal_state): New scoped enum,
10613 factored out of ...
10614 (target_terminal::terminal_state): ... here.
10615 (target_terminal::inferior): Update comments.
10616 (target_terminal::restore_inferior): New.
10617 (target_terminal::is_inferior, target_terminal::is_ours)
10618 (target_terminal::is_ours_for_output): Adjust.
10619 (target_terminal::scoped_restore_terminal_state): Adjust to
10620 rename, and call restore_inferior() instead of inferior().
10621 (target_terminal::scoped_restore_terminal_state::m_state): Change
10623 (target_terminal::terminal_state): Rename to ...
10624 (target_terminal::m_terminal_state): ... this and change type.
10626 2018-01-30 Pedro Alves <palves@redhat.com>
10628 * linux-nat.c (wait_for_signal): New function.
10629 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10631 (async_terminal_is_ours)
10632 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10633 (linux_nat_add_target): Don't override
10634 to_terminal_inferior/to_terminal_ours.
10636 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10638 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10640 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10642 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10643 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10644 dwarf2_per_objfile_free here.
10645 (dwarf2_per_objfile_free): Remove.
10646 (_initialize_dwarf2_read): Don't register
10647 dwarf2_per_objfile_free as a registry cleanup.
10649 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10651 Avoid compilation errors in MinGW native builds
10653 The error is triggered by including python-internal.h, and the
10656 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10657 from build-gnulib/import/math.h:27,
10658 from d:/usr/Python26/include/pyport.h:235,
10659 from d:/usr/Python26/include/Python.h:58,
10660 from python/python-internal.h:94,
10661 from python/py-arch.c:24:
10662 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10666 This happens because Python headers define 'hypot' to expand t
10667 '_hypot' in the Windows builds.
10668 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10669 'hypoth'. This avoids a compilation error.
10671 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10673 * MAINTAINERS (Write After Approval): Fix ordering.
10675 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10677 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10679 2018-01-26 Alan Modra <amodra@gmail.com>
10681 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10682 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10683 Remove nop. Make const. Comment.
10684 (powerpc32_plt_stub_so_2): New.
10685 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10686 Correct count. Update uses.
10687 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10688 Move common code reading PLT entry word. Correct
10689 powerpc32_plt_stub PLT address calculation.
10690 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10691 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10692 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10693 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10694 (ppc64_standard_linkage8): Likewise.
10695 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10696 Correct insns description.
10697 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10699 2018-01-24 Pedro Alves <palves@redhat.com>
10701 GCC PR libstdc++/83906
10702 * gdbtypes.c (operator==(const dynamic_prop &,
10703 const dynamic_prop &)): New.
10704 (operator==(const range_bounds &, const range_bounds &)): New.
10705 (check_types_equal): Use them instead of memcmp.
10706 * gdbtypes.h (operator==(const dynamic_prop &,
10707 const dynamic_prop &)): Declare.
10708 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10709 (operator==(const range_bounds &, const range_bounds &)): Declare.
10710 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10712 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10714 * s390-linux-tdep.c (s390_record_address_mask)
10715 (s390_record_calc_disp_common, s390_record_calc_disp)
10716 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10717 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10718 (s390_process_record): Move to s390-tdep.c.
10719 (s390_linux_init_abi_any): Adjust.
10720 * s390-tdep.c (s390_record_address_mask)
10721 (s390_record_calc_disp_common, s390_record_calc_disp)
10722 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10723 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10724 (s390_process_record): Moved from s390-linux-tdep.c
10725 (s390_gdbarch_init): Adjust.
10727 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10729 * s390-linux-nat.c (s390-tdep.h): New include.
10730 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10731 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10732 (ALLDEPFILES): Add s390-tdep.c.
10733 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10734 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10735 * s390-tdep.h: ...this. New file.
10736 * s390-linux-tdep.c (s390-tdep.h): New include.
10737 (_initialize_s390_tdep): Rename to...
10738 (_initialize_s390_linux_tdep): ...this and adjust.
10739 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10740 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10742 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10743 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10744 (s390_is_partial_instruction, s390_software_single_step)
10745 (is_non_branch_ril, s390_displaced_step_copy_insn)
10746 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10747 (s390_prologue_data, s390_addr, s390_store, s390_load)
10748 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10749 (s390_register_call_saved, s390_guess_tracepoint_registers)
10750 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10751 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10752 (s390_pseudo_register_name, s390_pseudo_register_type)
10753 (s390_pseudo_register_read, s390_pseudo_register_write)
10754 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10755 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10756 (s390_addr_bits_remove, s390_address_class_type_flags)
10757 (s390_address_class_type_flags_to_name)
10758 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10759 (s390_function_arg_float, s390_function_arg_vector)
10760 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10761 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10762 (s390_frame_align, s390_register_return_value, s390_return_value)
10763 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10764 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10765 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10766 (s390_trad_frame_prev_register, s390_unwind_cache)
10767 (s390_prologue_frame_unwind_cache)
10768 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10769 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10770 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10771 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10772 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10773 (s390_frame_base_address, s390_local_base_address)
10774 (s390_frame_base, s390_gcc_target_options)
10775 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10776 (s390_validate_reg_range, s390_tdesc_valid)
10777 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10778 * s390-tdep.c: ...this. New file.
10780 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10782 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10783 (s390_process_record, s390_gdbarch_tdep_alloc)
10784 (s390_linux_init_abi_any): Use/set new hook.
10786 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10788 * s390-linux-tdep.c (osabi.h): New include.
10789 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10790 (s390_linux_init_abi_any): New functions.
10791 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10793 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10795 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10796 tdesc_has_registers check
10798 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10800 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10801 (s390_validate_reg_range): New macro.
10802 (s390_gdbarch_init): Adjust.
10804 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10806 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10807 (s390_gdbarch_tdep_alloc): Adjust.
10808 (s390_gdbarch_init): Adjust.
10810 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10812 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10813 <have_tdb>: Change type to bool.
10814 (s390_gdbarch_tdep_alloc): Adjust.
10815 (s390_gdbarch_init): Adjust.
10817 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10819 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10820 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10821 (s390_gdbarch_tdep_alloc): New function.
10822 (s390_gdbarch_init): Allocate tdep at start and use its fields
10823 instead of separate variables.
10825 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10827 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10828 when looking for cached gdbarch and add comment for remaining.
10830 2018-01-22 Pedro Alves <palves@redhat.com>
10831 Sergio Durigan Junior <sergiodj@redhat.com>
10833 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10836 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10838 * MAINTAINERS: Update my company e-mail address.
10840 2018-01-22 Yao Qi <yao.qi@linaro.org>
10842 * regcache.c (cooked_write_test): New function.
10843 (_initialize_regcache): Register the test.
10845 2018-01-22 Yao Qi <yao.qi@linaro.org>
10847 * ia64-tdep.c (ia64_pseudo_register_read): Call
10848 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10849 * m32c-tdep.c (m32c_cat_read): Likewise.
10850 (m32c_r3r2r1r0_read): Likewise.
10851 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10852 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10854 2018-01-22 Yao Qi <yao.qi@linaro.org>
10856 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10857 method raw_read instead of regcache_raw_read.
10858 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10859 * arm-tdep.c (arm_neon_quad_read): Likewise.
10860 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10861 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10862 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10863 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10864 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10865 (i386_pseudo_register_read_into_value): Likewise.
10866 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10867 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10868 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10869 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10870 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10871 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10872 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10873 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10874 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10876 2018-01-22 Yao Qi <yao.qi@linaro.org>
10878 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10879 * configure.tgt: Remove target mt.
10880 * mt-tdep.c: Remove.
10881 * regcache.c (cooked_read_test): Remove the check for mt.
10883 2018-01-22 Yao Qi <yao.qi@linaro.org>
10885 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10886 instead of gdbarch_pseudo_register_read_value.
10888 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10890 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10893 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10895 * linespec.c (create_sals_line_offset): Remove code that preserved
10896 the symtab_and_line's line number.
10898 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10900 * varobj.c (varobj_create): Don't set valid_block when creating a
10903 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10905 * varobj.c (varobj_create): Remove out of date comment.
10907 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10910 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10911 updating innermost block.
10912 * parse.c (innermost_block_tracker::update): Take extra type
10913 parameter, and check types match before updating innermost block.
10914 (write_dollar_variable): Update innermost block for registers.
10915 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10916 (innermost_block_tracker::innermost_block_tracker): Initialise
10918 (innermost_block_tracker::reset): Take type parameter.
10919 (innermost_block_tracker::update): Take type parameter, and pass
10920 type through as needed.
10921 (innermost_block_tracker::m_types): New member.
10922 * varobj.c (varobj_create): Pass type when reseting innermost
10925 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10927 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10928 * ada-lang.c (resolve_subexp): Likewise.
10929 * breakpoint.c (set_breakpoint_condition) Likewise.
10930 (watch_command_1) Likewise.
10931 * c-exp.y (variable): Likewise.
10932 * d-exp.y (PrimaryExpression): Likewise.
10933 * f-exp.y (variable): Likewise.
10934 * go-exp.y (variable): Likewise.
10935 * m2-exp.y (variable): Likewise.
10936 * objfiles.c (objfile::~objfile): Likewise.
10937 * p-exp.y (variable): Likewise.
10938 * parse.c (innermost_block): Change type.
10939 * parser-defs.h (class innermost_block_tracker): New.
10940 (innermost_block): Change to innermost_block_tracker.
10941 * printcmd.c (display_command): Switch to innermost_block API.
10942 (do_one_display): Likewise.
10943 * rust-exp.y (do_one_display): Likewise.
10944 * symfile.c (clear_symtab_users): Likewise.
10945 * varobj.c (varobj_create): Switch to innermost_block API, replace
10946 use of innermost_block with block stored on varobj object.
10948 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10950 * expression.h (innermost_block): Remove declaration.
10951 * varobj.c: Add 'parser-defs.h' include.
10953 2018-01-19 Tom Tromey <tom@tromey.com>
10955 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10956 symbols in the static and global blocks.
10958 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10960 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10961 gdb_ptrace.h, and move including gdb_wait.h ...
10962 * nat/linux-ptrace.h: ... to here.
10964 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10966 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10967 inf_ptrace_detach_success.
10968 (inf_ptrace_detach_success): Add inferior parameter, use it
10969 instead of inferior_ptid, pass it to detach_inferior.
10970 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10972 * inferior.c (detach_inferior): Add overload that takes an
10974 * inferior.h (detach_inferior): Likewise.
10975 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10976 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10977 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10979 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10981 * target.h (struct target_ops) <to_detach>: Add inferior
10983 (target_detach): Likewise.
10984 * target.c (dispose_inferior): Pass inferior down.
10985 (target_detach): Pass inferior down. Assert that it is equal to
10986 the current inferior.
10987 * aix-thread.c (aix_thread_detach): Pass inferior down.
10988 * corefile.c (core_file_command): Pass current_inferior() down.
10989 * corelow.c (core_detach): Add inferior parameter.
10990 * darwin-nat.c (darwin_detach): Likewise.
10991 * gnu-nat.c (gnu_detach): Likewise.
10992 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10993 * infcmd.c (detach_command): Pass current_inferior() down to
10995 * infrun.c (follow_fork_inferior): Pass parent_inf to
10997 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10999 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11000 * linux-thread-db.c (thread_db_detach): Likewise.
11001 * nto-procfs.c (procfs_detach): Likewise.
11002 * procfs.c (procfs_detach): Likewise.
11003 * record.c (record_detach): Likewise.
11004 * record.h (struct inferior): Forward-declare.
11005 (record_detach): Add inferior parameter.
11006 * remote-sim.c (gdbsim_detach): Likewise.
11007 * remote.c (remote_detach_1): Likewise.
11008 (remote_detach): Likewise.
11009 (extended_remote_detach): Likewise.
11010 * sol-thread.c (sol_thread_detach): Likewise.
11011 * target-debug.h (target_debug_print_inferior_p): New macro.
11012 * target-delegates.c: Re-generate.
11013 * top.c (kill_or_detach): Pass inferior down to target_detach.
11014 * windows-nat.c (windows_detach): Add inferior parameter.
11016 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11018 * target.h (struct target_ops) <to_detach>: Remove args
11020 (target_detach): Likewise.
11021 * target.c (dispose_inferior): Adjust.
11022 (target_detach): Remove args parameter, adjust.
11023 * aix-thread.c (aix_thread_detach): Adjust.
11024 * corefile.c (core_file_command): Adjust.
11025 * corelow.c (core_detach): Adjust.
11026 * darwin-nat.c (darwin_detach): Adjust.
11027 * gnu-nat.c (gnu_detach): Adjust.
11028 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11029 * infcmd.c (detach_command): Adjust
11030 * infrun.c (follow_fork_inferior): Adjust.
11031 (handle_vfork_child_exec_or_exit): Adjust.
11032 * linux-fork.c (linux_fork_detach): Remove args parameter.
11033 * linux-fork.h (linux_fork_detach): Likewise.
11034 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11035 * linux-thread-db.c (thread_db_detach): Likewise.
11036 * nto-procfs.c (procfs_detach): Likewise.
11037 * procfs.c (procfs_detach): Likewise.
11038 (do_detach): Remove signo parameter.
11039 * record.c (record_detach): Remove args parameter.
11040 * record.h (record_detach): Likewise.
11041 * remote-sim.c (gdbsim_detach): Likewise.
11042 * remote.c (remote_detach_1): Likewise.
11043 (remote_detach): Likewise.
11044 (extended_remote_detach): Likewise.
11045 * sol-thread.c (sol_thread_detach): Likewise.
11046 * target-delegates.c: Re-generate.
11047 * top.c (struct qt_args) <args>: Remove field.
11048 (kill_or_detach): Don't pass args.
11049 (quit_force): Don't set args.
11050 * windows-nat.c (windows_detach): Remove args parameter.
11052 2018-01-19 Yao Qi <yao.qi@linaro.org>
11054 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11055 (arm_linux_init_abi): Install it.
11057 2018-01-19 Yao Qi <yao.qi@linaro.org>
11059 * osabi.c (gdb_osabi_names): Extend the regexp for
11060 arm-linux-gnueabihf.
11062 2018-01-18 Yao Qi <yao.qi@linaro.org>
11064 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11066 (abbrev_table::add_abbrev): Update.
11067 (abbrev_table::lookup_abbrev): Update.
11069 2018-01-18 Yao Qi <yao.qi@linaro.org>
11071 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11073 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11075 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11078 2018-01-17 Tom Tromey <tom@tromey.com>
11080 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11082 2018-01-17 Tom Tromey <tom@tromey.com>
11084 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11085 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11086 (create_array_type_with_stride): Update.
11087 * dwarf2read.c (set_die_type): Update.
11089 2018-01-17 Tom Tromey <tom@tromey.com>
11091 * dwarf2read.c (delayed_method_info): Remove typedef.
11092 (dwarf2_cu::method_info): Now a std::vector.
11093 (add_to_method_list): Update.
11094 (free_delayed_list): Remove.
11095 (compute_delayed_physnames): Update.
11096 (process_full_comp_unit, process_full_type_unit): Clear the method
11097 list. Remove cleanups.
11098 (psymtab_include_file_name): Add name_holder parameter. Use
11099 unique_xmalloc_ptr.
11100 (dwarf_decode_lines): Update.
11102 2018-01-17 Tom Tromey <tom@tromey.com>
11103 Simon Marchi <simon.marchi@ericsson.com>
11105 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11106 (dwarf2_per_objfile::free_cached_comp_units)
11107 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11108 (init_cutu_and_read_dies_no_follow): Update.
11109 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11110 (dwarf2_cu::~dwarf2_cu): New.
11111 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11112 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11114 2018-01-17 Tom Tromey <tom@tromey.com>
11115 Simon Marchi <simon.marchi@ericsson.com>
11117 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11118 (struct die_reader_specs) <abbrev_table>: New member.
11119 (struct abbrev_table): Add constructor.
11120 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11121 <abbrev_obstack>: Now an auto_obstack.
11122 (abbrev_table_up): New typedef.
11123 (init_cu_die_reader): Add abbrev_table parameter.
11124 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11125 Add result_dwo_abbrev_table.
11126 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11127 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11129 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11131 (skip_children): Update.
11132 (abbrev_table::alloc_abbrev): Rename from
11133 abbrev_table_alloc_abbrev.
11134 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11135 (abbrev_table::lookup_abbrev): Rename from
11136 abbrev_table_lookup_abbrev.
11137 (abbrev_table_read_table): Return abbrev_table_up.
11138 (abbrev_table_free, abbrev_table_free_cleanup)
11139 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11140 (load_partial_dies): Update.
11142 2018-01-17 Tom Tromey <tom@tromey.com>
11144 * dwarf2read.c (dwarf2_compute_name): Update comment.
11145 (read_func_scope, read_variable): Update.
11146 (new_symbol): Remove.
11147 (new_symbol_full): Rename to new_symbol.
11149 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11152 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11153 a warning instead of throwing an error, set section size to 0 and return
11155 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11157 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11159 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11161 (linux_ptrace_attach_fail_reason_string): Likewise.
11162 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11164 (linux_ptrace_attach_fail_reason_string): Likewise.
11165 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11167 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11169 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11171 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11174 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11175 checking for fs_base/gs_base fields in struct user_regs_struct.
11176 * configure: Regenerate.
11178 2018-01-17 Yao Qi <yao.qi@linaro.org>
11180 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11182 (aarch64_linux_init_abi): Install it to gdbarch hook
11183 gcc_target_options.
11185 2018-01-15 Pedro Alves <palves@redhat.com>
11187 * common/signals-state-save-restore.c
11188 (save_original_signals_state): Fix typos.
11190 2017-01-12 Tom Tromey <tom@tromey.com>
11191 Sergio Durigan Junior <sergiodj@redhat.com>
11193 * Makefile.in (install-only): Install gdb-add-index.
11195 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11197 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11199 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11201 * infrun.c (keep_going_pass_signal): Clear step-over info when
11202 insert_breakpoints fails.
11204 2018-01-11 Pedro Alves <palves@redhat.com>
11207 * infrun.c (resume): Rename to ...
11208 (resume_1): ... this.
11209 (resume): Reimplement as wrapper around resume_1.
11211 2018-01-11 Pedro Alves <palves@redhat.com>
11214 * remote.c (remote_parse_stop_reply): Default to the last-set
11215 general thread instead of to 'magic_null_ptid'.
11217 2018-01-10 Pedro Alves <palves@redhat.com>
11219 * language.h (language_get_symbol_name_matcher): Rename ...
11220 (get_symbol_name_matcher): ... this.
11221 * language.c (language_get_symbol_name_matcher): Ditto.
11222 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11225 2018-01-10 Pedro Alves <palves@redhat.com>
11229 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11230 Adjust to use language_get_symbol_name_matcher instead of
11231 language_defn::la_get_symbol_name_matcher.
11232 * language.c (language_get_symbol_name_matcher): If in Ada mode
11233 and the lookup name is a verbatim match, return Ada's matcher.
11234 * language.h (language_get_symbol_name_matcher): Adjust comment.
11235 (ada_lookup_name_info::verbatim_p):: New method.
11237 2018-01-10 Pedro Alves <palves@redhat.com>
11240 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11241 minsym's language is language_auto or language_cplus, pass down
11242 language_ada instead.
11243 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11245 2018-01-10 Pedro Alves <palves@redhat.com>
11248 * minsyms.c (linkage_name_str): New function.
11249 (iterate_over_minimal_symbols): Use it.
11251 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11253 * NEWS: Document that 'info proc' now works on FreeBSD.
11255 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11257 * configure.ac: Check for kinfo_getfile in libutil.
11258 * configure: Regenerate.
11259 * config.in: Regenerate.
11260 * fbsd-nat.c: Include "fbsd-tdep.h".
11261 (fbsd_fetch_cmdline): New.
11262 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11263 rather than calling error.
11264 (fbsd_info_proc): New.
11265 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11266 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11267 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11269 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11271 * fbsd-nat.c (struct free_deleter): Remove.
11272 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11274 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11276 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11277 NULL for an empty pathname.
11279 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11281 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11282 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11283 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11284 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11285 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11286 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11287 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11288 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11289 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11290 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11291 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11292 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11293 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11294 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11295 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11297 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11299 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11300 (gnu_xfer_auxv): New function.
11301 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11302 TARGET_OBJECT_AUXV.
11304 2018-01-08 Yao Qi <yao.qi@linaro.org>
11305 Simon Marchi <simon.marchi@ericsson.com>
11307 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11309 (COMMON_OBS): Remove selftest.o.
11310 * configure.ac: Append selftest-arch.c and common/selftest.c to
11311 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11312 * configure: Re-generated.
11313 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11315 (maintenance_info_selftests): Likewise.
11317 2018-01-08 Xavier Roirand <roirand@adacore.com>
11319 * ada-valprint.c (val_print_packed_array_elements): Use
11320 proper number of elements when printing an array indexed
11321 by an enumeration type.
11323 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11325 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11326 (dw2_get_file_names_reader): Adjust.
11327 (lookup_dwo_signatured_type): Adjust.
11328 (lookup_dwp_signatured_type): Adjust.
11329 (lookup_signatured_type): Adjust.
11330 (create_type_unit_group): Adjust.
11331 (get_type_unit_group): Adjust.
11332 (process_psymtab_comp_unit_reader): Adjust.
11333 (build_type_psymtabs_reader): Adjust.
11334 (scan_partial_symbols): Adjust.
11335 (add_partial_symbol): Adjust.
11336 (add_partial_subprogram): Adjust.
11337 (peek_die_abbrev): Adjust.
11338 (fixup_go_packaging): Adjust.
11339 (process_imported_unit_die): Adjust.
11340 (dwarf2_compute_name): Adjust.
11341 (dwarf2_physname): Adjust.
11342 (read_import_statement): Adjust.
11343 (handle_DW_AT_stmt_list): Adjust.
11344 (read_file_scope): Adjust.
11345 (read_func_scope): Adjust.
11346 (read_lexical_block_scope): Adjust.
11347 (read_call_site_scope): Adjust.
11348 (read_variable): Adjust.
11349 (dwarf2_rnglists_process): Adjust.
11350 (dwarf2_ranges_process): Adjust.
11351 (dwarf2_ranges_read): Adjust.
11352 (dwarf2_get_pc_bounds): Adjust.
11353 (dwarf2_record_block_ranges): Adjust.
11354 (dwarf2_add_field): Adjust.
11355 (dwarf2_add_member_fn): Adjust.
11356 (read_structure_type): Adjust.
11357 (process_structure_scope): Adjust.
11358 (read_enumeration_type): Adjust.
11359 (read_array_type): Adjust.
11360 (mark_common_block_symbol_computed): Adjust.
11361 (read_common_block): Adjust.
11362 (read_namespace_type): Adjust.
11363 (read_namespace): Adjust.
11364 (read_module_type): Adjust.
11365 (read_tag_pointer_type): Adjust.
11366 (read_tag_ptr_to_member_type): Adjust.
11367 (read_tag_string_type): Adjust.
11368 (read_subroutine_type): Adjust.
11369 (read_typedef): Adjust.
11370 (read_base_type): Adjust.
11371 (attr_to_dynamic_prop): Adjust.
11372 (read_subrange_type): Adjust.
11373 (read_unspecified_type): Adjust.
11374 (dwarf2_read_abbrevs): Adjust.
11375 (load_partial_dies): Adjust.
11376 (read_partial_die): Adjust.
11377 (find_partial_die): Adjust.
11378 (guess_partial_die_structure_name): Adjust.
11379 (fixup_partial_die): Adjust.
11380 (read_attribute_value): Adjust.
11381 (read_addr_index): Adjust.
11382 (read_addr_index_from_leb128): Adjust.
11383 (read_str_index): Adjust.
11384 (dwarf2_string_attr): Adjust.
11385 (get_debug_line_section): Adjust.
11386 (dwarf_decode_line_header): Adjust.
11387 (lnp_state_machine::check_line_address): Adjust.
11388 (dwarf_decode_lines_1): Adjust.
11389 (dwarf_decode_lines): Adjust.
11390 (dwarf2_start_symtab): Adjust.
11391 (var_decode_location): Adjust.
11392 (new_symbol_full): Adjust.
11393 (dwarf2_const_value_data): Adjust.
11394 (dwarf2_const_value_attr): Adjust.
11395 (dwarf2_const_value): Adjust.
11396 (die_type): Adjust.
11397 (die_containing_type): Adjust.
11398 (build_error_marker_type): Adjust.
11399 (lookup_die_type): Adjust.
11400 (guess_full_die_structure_name): Adjust.
11401 (anonymous_struct_prefix): Adjust.
11402 (determine_prefix): Adjust.
11403 (dwarf2_name): Adjust.
11404 (follow_die_ref_or_sig): Adjust.
11405 (follow_die_offset): Adjust.
11406 (follow_die_ref): Adjust.
11407 (follow_die_sig_1): Adjust.
11408 (follow_die_sig): Adjust.
11409 (get_signatured_type): Adjust.
11410 (get_DW_AT_signature_type): Adjust.
11411 (decode_locdesc): Adjust.
11412 (dwarf_decode_macros): Adjust.
11413 (cu_debug_loc_section): Adjust.
11414 (fill_in_loclist_baton): Adjust.
11415 (dwarf2_symbol_mark_computed): Adjust.
11416 (init_one_comp_unit): Don't assign
11417 dwarf2_cu::dwarf2_per_objfile.
11418 (set_die_type): Adjust.
11420 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11422 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11423 <dwarf2_per_objfile>: New field.
11424 (dwarf2_per_objfile): Remove global.
11425 (get_dwarf2_per_objfile): New function.
11426 (set_dwarf2_per_objfile): New function.
11427 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11428 dwarf2_per_objfile.
11429 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11430 (read_abbrev_offset): Likewise.
11431 (read_indirect_string): Likewise.
11432 (read_indirect_line_string): Likewise.
11433 (read_indirect_string_at_offset): Likewise.
11434 (read_indirect_string_from_dwz): Likewise.
11435 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11436 dwarf2_per_objfile.
11437 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11438 (create_all_comp_units): Change objfile parameter to
11439 dwarf2_per_objfile.
11440 (create_all_type_units): Likewise.
11441 (process_queue): Add dwarf2_per_objfile parameter.
11442 (read_and_check_comp_unit_head): Likewise.
11443 (lookup_dwo_unit_in_dwp): Likewise.
11444 (get_dwp_file): Likewise.
11445 (process_cu_includes): Likewise.
11446 (struct free_dwo_file_cleanup_data): New struct.
11447 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11448 set_dwarf2_per_objfile.
11449 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11450 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11451 context, adjust calls.
11452 (dw2_instantiate_symtab): Likewise.
11453 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11454 (dw2_get_cu): Likewise.
11455 (create_cu_from_index_list): Change objfile parameter to
11456 dwarf2_per_objfile.
11457 (create_cus_from_index_list): Get dwarf2_per_objfile from
11458 context, adjust calls.
11459 (create_cus_from_index): Likewise.
11460 (create_signatured_type_table_from_index): Change objfile
11461 parameter to dwarf2_per_objfile.
11462 (create_signatured_type_table_from_debug_names): Change objfile
11463 parameter to dwarf2_per_objfile.
11464 (create_addrmap_from_index): Likewise.
11465 (create_addrmap_from_aranges): Likewise.
11466 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11467 (dw2_setup): Remove.
11468 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11470 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11471 get_dwarf2_per_objfile.
11472 (dw2_forget_cached_source_info): Likewise.
11473 (dw2_map_symtabs_matching_filename): Likewise.
11474 (struct dw2_symtab_iterator) <index>: Remove.
11475 <dwarf2_per_objfile>: New field.
11476 (dw2_symtab_iter_init): Replace index parameter with
11477 dwarf2_per_objfile.
11478 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11479 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11480 (dw2_print_stats): Likewise.
11481 (dw2_dump): Likewise.
11482 (dw2_expand_symtabs_for_function): Likewise.
11483 (dw2_expand_all_symtabs): Likewise.
11484 (dw2_expand_symtabs_with_fullname): Likewise.
11485 (dw2_expand_marked_cus): Replace index and objfile parameters
11486 with dwarf2_per_objfile.
11487 (dw_expand_symtabs_matching_file_matcher): Add
11488 dwarf2_per_objfile parameter and adjust calls.
11489 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11491 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11492 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11494 (create_cus_from_debug_names_list): Replace objfile parameter
11495 with dwarf2_per_objfile and adjust calls.
11496 (create_cus_from_debug_names): Likewise.
11497 (dwarf2_read_debug_names): Likewise.
11498 (mapped_debug_names::namei_to_name): Adjust call.
11499 (dw2_debug_names_iterator::next): Likewise.
11500 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11501 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11502 (dw2_debug_names_dump): Likewise.
11503 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11504 (dw2_debug_names_expand_symtabs_matching): Likewise.
11505 (dwarf2_initialize_objfile): Likewise.
11506 (dwarf2_build_psymtabs): Likewise.
11507 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11509 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11510 (read_and_check_comp_unit_head): Likewise.
11511 (read_abbrev_offset): Likewise.
11512 (create_debug_type_hash_table): Likewise.
11513 (create_debug_types_hash_table): Likewise.
11514 (create_all_type_units): Replace objfile parameter with
11515 dwarf2_per_objfile.
11516 (add_type_unit): Add dwarf2_per_objfile parameter.
11517 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11518 with dwarf2_per_objfile.
11519 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11520 (lookup_dwp_signatured_type): Likewise.
11521 (lookup_signatured_type): Likewise.
11522 (read_cutu_die_from_dwo): Likewise.
11523 (init_tu_and_read_dwo_dies): Likewise.
11524 (init_cutu_and_read_dies): Likewise.
11525 (init_cutu_and_read_dies_no_follow): Likewise.
11526 (allocate_type_unit_groups_table): Add objfile parameter.
11527 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11528 (get_type_unit_group): Likewise.
11529 (process_psymtab_comp_unit): Update call.
11530 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11531 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11532 (print_tu_stats): Likewise.
11533 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11534 in void* parameter.
11535 (build_type_psymtabs): Change objfile parameter to
11536 dwarf2_per_objfile.
11537 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11538 passed in void* parameter.
11539 (process_skeletonless_type_units): Change objfile parameter to
11540 dwarf2_per_objfile.
11541 (set_partial_user): Likewise.
11542 (dwarf2_build_psymtabs_hard): Likewise.
11543 (read_comp_units_from_section): Likewise.
11544 (create_all_comp_units): Likewise.
11545 (scan_partial_symbols): Update calls.
11546 (add_partial_symbol): Likewise.
11547 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11548 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11549 (process_queue): Add dwarf2_per_objfile parameter.
11550 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11551 (compute_compunit_symtab_includes): Likewise.
11552 (process_cu_includes): Add dwarf2_per_objfile parameter.
11553 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11554 (process_full_type_unit): Likewise.
11555 (process_imported_unit_die): Update call.
11556 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11557 (read_file_scope): Likewise.
11558 (allocate_dwo_file_hash_table): Add objfile parameter.
11559 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11560 (create_cus_hash_table): Likewise.
11561 (create_dwp_hash_table): Likewise.
11562 (create_dwo_unit_in_dwp_v1): Likewise.
11563 (create_dwp_v2_section): Likewise.
11564 (create_dwo_unit_in_dwp_v2): Likewise.
11565 (lookup_dwo_unit_in_dwp): Likewise.
11566 (try_open_dwop_file): Likewise.
11567 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11568 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11569 cleanup to include a reference to dwarf2_per_objfile.
11570 (open_dwp_file): Add dwarf2_per_objfile parameter.
11571 (open_and_init_dwp_file): Likewise.
11572 (get_dwp_file): Likewise.
11573 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11574 (queue_and_load_all_dwo_tus): Update call.
11575 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11577 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11578 (dwarf2_ranges_process): Likewise.
11579 (dwarf2_get_pc_bounds): Likewise.
11580 (mark_common_block_symbol_computed): Likewise.
11581 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11582 (dwarf2_read_abbrevs): Update call.
11583 (read_partial_die): Use dwarf2_per_objfile from cu.
11584 (find_partial_die): Likewise.
11585 (fixup_partial_die): Likewise.
11586 (read_attribute_value): Likewise.
11587 (read_indirect_string_at_offset_from): Add objfile parameter.
11588 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11590 (read_indirect_string_from_dwz): Add objfile parameter.
11591 (read_indirect_string): Add objfile parameter.
11592 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11593 (read_addr_index): Use dwarf2_per_objfile from cu.
11594 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11596 (read_str_index): Use dwarf2_per_objfile from cu.
11597 (get_debug_line_section): Likewise.
11598 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11599 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11600 (new_symbol_full): Use dwarf2_per_objfile from cu.
11601 (build_error_marker_type): Likewise.
11602 (lookup_die_type): Likewise.
11603 (determine_prefix): Likewise.
11604 (follow_die_offset): Likewise.
11605 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11606 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11607 (dwarf2_fetch_die_type_sect_off): Likewise.
11608 (dwarf2_get_die_type): Likewise.
11609 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11610 (get_signatured_type): Likewise.
11611 (get_DW_AT_signature_type): Likewise.
11612 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11613 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11614 (cu_debug_loc_section): Likewise.
11615 (fill_in_loclist_baton): Likewise.
11616 (dwarf2_symbol_mark_computed): Likewise.
11617 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11618 dwarf2_per_objfile.
11619 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11621 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11622 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11623 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11624 (set_die_type): Use dwarf2_free_objfile from cu.
11625 (get_die_type_at_offset): Likewise.
11626 (dwarf2_per_objfile_free): Don't assign global variable.
11627 (debug_names) <constructor>: Add dwarf2_per_objfile
11628 parameter, update m_debugstrlookup construction.
11629 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11631 <m_dwarf2_per_objfile>: New field.
11632 <lookup>: Use m_dwarf2_per_objfile.
11633 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11634 (psyms_seen_size): Likewise.
11635 (write_gdbindex): Replace objfile parameter with
11636 dwarf2_per_objfile.
11637 (write_debug_names): Likewise.
11638 (write_psymtabs_to_index): Likewise.
11639 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11642 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11644 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11645 <dwarf2_per_objfile>: New field.
11646 (struct dwarf2_per_cu_data) <objfile>: Remove.
11647 <dwarf2_per_objfile>: New field.
11648 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11650 (create_signatured_type_table_from_index): Likewise.
11651 (create_debug_type_hash_table): Likewise.
11652 (fill_in_sig_entry_from_dwo_entry): Likewise.
11653 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11654 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11656 (create_partial_symtab): Access objfile through
11657 dwarf2_per_objfile.
11658 (process_psymtab_comp_unit_reader): Likewise.
11659 (read_comp_units_from_section): Likewise.
11660 (scan_partial_symbols): Likewise.
11661 (add_partial_symbol): Likewise.
11662 (add_partial_subprogram): Likewise.
11663 (peek_die_abbrev): Likewise.
11664 (fixup_go_packaging): Likewise.
11665 (process_full_comp_unit): Likewise.
11666 (process_full_type_unit): Likewise.
11667 (process_imported_unit_die): Likewise.
11668 (dwarf2_compute_name): Likewise.
11669 (dwarf2_physname): Likewise.
11670 (read_import_statement): Likewise.
11671 (create_cus_hash_table): Assign dwarf2_physname instead of
11673 (read_func_scope): Access objfile through dwarf2_per_objfile.
11674 (read_lexical_block_scope): Likewise.
11675 (read_call_site_scope): Likewise.
11676 (read_variable): Likewise.
11677 (dwarf2_rnglists_process): Likewise.
11678 (dwarf2_ranges_process): Likewise.
11679 (dwarf2_ranges_read): Likewise.
11680 (dwarf2_record_block_ranges): Likewise.
11681 (dwarf2_add_field): Likewise.
11682 (dwarf2_add_member_fn): Likewise.
11683 (read_structure_type): Likewise.
11684 (process_structure_scope): Likewise.
11685 (read_enumeration_type): Likewise.
11686 (read_array_type): Likewise.
11687 (read_common_block): Likewise.
11688 (read_namespace_type): Likewise.
11689 (read_namespace): Likewise.
11690 (read_module_type): Likewise.
11691 (read_tag_pointer_type): Likewise.
11692 (read_tag_ptr_to_member_type): Likewise.
11693 (read_tag_string_type): Likewise.
11694 (read_subroutine_type): Likewise.
11695 (read_typedef): Likewise.
11696 (read_base_type): Likewise.
11697 (attr_to_dynamic_prop): Likewise.
11698 (read_subrange_type): Likewise.
11699 (read_unspecified_type): Likewise.
11700 (load_partial_dies): Likewise.
11701 (read_partial_die): Likewise.
11702 (find_partial_die): Likewise.
11703 (guess_partial_die_structure_name): Likewise.
11704 (fixup_partial_die): Likewise.
11705 (read_attribute_value): Likewise.
11706 (read_addr_index_from_leb128): Likewise.
11707 (dwarf2_read_addr_index): Likewise.
11708 (dwarf2_string_attr): Likewise.
11709 (lnp_state_machine::check_line_address): Likewise.
11710 (dwarf_decode_lines_1): Likewise.
11711 (dwarf_decode_lines): Likewise.
11712 (dwarf2_start_symtab): Likewise.
11713 (var_decode_location): Likewise.
11714 (new_symbol_full): Likewise.
11715 (dwarf2_const_value_data): Likewise.
11716 (dwarf2_const_value_attr): Likewise.
11717 (dwarf2_const_value): Likewise.
11718 (die_type): Likewise.
11719 (die_containing_type): Likewise.
11720 (lookup_die_type): Likewise.
11721 (guess_full_die_structure_name): Likewise.
11722 (anonymous_struct_prefix): Likewise.
11723 (dwarf2_name): Likewise.
11724 (follow_die_ref_or_sig): Likewise.
11725 (follow_die_offset): Likewise.
11726 (follow_die_ref): Likewise.
11727 (dwarf2_fetch_die_loc_sect_off): Likewise.
11728 (dwarf2_fetch_constant_bytes): Likewise.
11729 (dwarf2_fetch_die_type_sect_off): Likewise.
11730 (dwarf2_get_die_type): Likewise.
11731 (follow_die_sig): Likewise.
11732 (decode_locdesc): Likewise.
11733 (dwarf2_per_cu_objfile): Likewise.
11734 (dwarf2_per_cu_text_offset): Likewise.
11735 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11737 (set_die_type): Access objfile through
11738 dwarf2_per_objfile.
11740 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11742 * valprint.c (converted_character_d): Remove typedef.
11743 (DEF_VEC_O (converted_character_d)): Remove.
11744 (count_next_character): Use std::vector.
11745 (print_converted_chars_to_obstack): Likewise.
11746 (generic_printstr): Likewise.
11748 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11750 * xml-support.h (struct gdb_xml_value): Add constructor.
11751 <value>: Change type to unique_xmalloc_ptr.
11752 (gdb_xml_value_s): Remove typedef.
11753 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11754 (gdb_xml_element_start_handler): Change parameter type to
11756 (xml_find_attribute): Likewise.
11757 * xml-support.c (xml_find_attribute): Change parameter type to
11758 std::vector and adjust.
11759 (gdb_xml_values_cleanup): Remove.
11760 (gdb_xml_parser::start_element): Adjust to std::vector.
11761 (xinclude_start_include): Change paraeter type to std::vector
11763 * btrace.c (check_xml_btrace_version): Likewise.
11764 (parse_xml_btrace_block): Likewise.
11765 (parse_xml_btrace_pt_config_cpu): Likewise.
11766 (parse_xml_btrace_pt): Likewise.
11767 (parse_xml_btrace_conf_bts): Likewise.
11768 (parse_xml_btrace_conf_pt): Likewise.
11769 * memory-map.c (memory_map_start_memory): Likewise.
11770 (memory_map_start_property): Likewise.
11771 * osdata.c (osdata_start_osdata): Likewise.
11772 (osdata_start_item): Likewise.
11773 (osdata_start_column): Likewise.
11774 * remote.c (start_thread): Likewise.
11775 * solib-aix.c (library_list_start_library): Likewise.
11776 (library_list_start_list): Likewise.
11777 * solib-svr4.c (library_list_start_library): Likewise.
11778 (svr4_library_list_start_list): Likewise.
11779 * solib-target.c (library_list_start_segment): Likewise.
11780 (library_list_start_section): Likewise.
11781 (library_list_start_library): Likewise.
11782 (library_list_start_list): Likewise.
11783 * tracepoint.c (traceframe_info_start_memory): Likewise.
11784 (traceframe_info_start_tvar): Likewise.
11785 * xml-syscall.c (syscall_start_syscall): Likewise.
11786 * xml-tdesc.c (tdesc_start_target): Likewise.
11787 (tdesc_start_feature): Likewise.
11788 (tdesc_start_reg): Likewise.
11789 (tdesc_start_union): Likewise.
11790 (tdesc_start_struct): Likewise.
11791 (tdesc_start_flags): Likewise.
11792 (tdesc_start_enum): Likewise.
11793 (tdesc_start_field): Likewise.
11794 (tdesc_start_enum_value): Likewise.
11795 (tdesc_start_vector): Likewise.
11797 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11799 * extension.h (struct xmethod_worker) <clone>: Remove.
11800 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11802 (python_xmethod_worker::clone): Remove.
11803 * valops.c (find_overload_match): Use std::move instead of
11806 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11808 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11809 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11810 <free_xmethod_worker_data>: Remove.
11811 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11812 <get_xmethod_arg_types>: Remove.
11813 <get_xmethod_result_type>: Remove.
11814 <invoke_xmethod>: Remove.
11815 * extension.c (new_xmethod_worker): Remove.
11816 (clone_xmethod_worker): Remove.
11817 (get_matching_xmethod_workers): Return void, pass std::vector by
11819 (get_xmethod_arg_types): Rename to...
11820 (xmethod_worker::get_arg_types): ... this, and adjust.
11821 (get_xmethod_result_type): Rename to...
11822 (xmethod_worker::get_result_type): ... this, and adjust.
11823 (invoke_xmethod): Remove.
11824 (free_xmethod_worker): Remove.
11825 (free_xmethod_worker_vec): Remove.
11826 * extension.h (enum ext_lang_rc): Move here from
11828 (struct xmethod_worker): Add constructor and destructor.
11831 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11832 virtual pure methods.
11833 <get_arg_types, get_result_type>: New methods.
11834 (xmethod_worker_ptr): Remove typedef.
11835 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11836 (xmethod_worker_vec): Remove typedef.
11837 (xmethod_worker_up): New typedef.
11838 (invoke_xmethod): Remove.
11839 (clone_xmethod_worker): Remove.
11840 (free_xmethod_worker): Remove.
11841 (free_xmethod_worker_vec): Remove.
11842 (get_xmethod_arg_types): Remove.
11843 (get_xmethod_result_type): Remove.
11844 * valops.c (find_method_list): Use std::vector, don't use
11845 intermediate vector.
11846 (value_find_oload_method_list): Use std::vector.
11847 (find_overload_match): Use std::vector.
11848 (find_oload_champ): Use std::vector.
11849 * value.c (value_free): Use operator delete.
11850 (value_of_xmethod): Rename to...
11851 (value_from_xmethod): ... this. Don't assign
11852 xmethod_worker::value, take rvalue-reference.
11853 (result_type_of_xmethod): Adjust.
11854 (call_xmethod): Adjust.
11855 * value.h: Include extension.h.
11856 (struct xmethod_worker): Don't forward-declare.
11857 (value_of_xmethod): Rename to...
11858 (value_from_xmethod): ... this, take rvalue-reference.
11859 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11860 (struct python_xmethod_worker): ... this, add constructor and
11862 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11863 (gdbpy_free_xmethod_worker_data): Rename to...
11864 (python_xmethod_worker::~python_xmethod_worker): ... this and
11866 (gdbpy_clone_xmethod_worker_data): Rename to...
11867 (python_xmethod_worker::clone): ... this and adjust.
11868 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11870 (gdbpy_get_xmethod_arg_types): Rename to...
11871 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11872 (gdbpy_get_xmethod_result_type): Rename to...
11873 (python_xmethod_worker::do_get_result_type): ... this and
11875 (gdbpy_invoke_xmethod): Rename to...
11876 (python_xmethod_worker::invoke): ... this and adjust.
11877 (new_python_xmethod_worker): Rename to...
11878 (python_xmethod_worker::python_xmethod_worker): ... this and
11880 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11882 (gdbpy_free_xmethod_worker_data): Remove.
11883 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11884 (gdbpy_get_xmethod_arg_types): Remove.
11885 (gdbpy_get_xmethod_result_type): Remove.
11886 (gdbpy_invoke_xmethod): Remove.
11887 * python/python.c (python_extension_ops): Remove obsolete
11890 2018-01-05 Pedro Alves <palves@redhat.com>
11893 * common/signals-state-save-restore.c
11894 (save_original_signals_state): New parameter 'quiet'. Warn if we
11895 find a custom handler preinstalled, instead of internal erroring.
11896 But only warn if !quiet.
11897 * common/signals-state-save-restore.h
11898 (save_original_signals_state): New parameter 'quiet'.
11899 * main.c (captured_main_1): Move save_original_signals_state call
11900 after option handling, and pass QUIET.
11902 2018-01-05 Pedro Alves <palves@redhat.com>
11904 * spu-tdep.c (spu_catch_start): Pass
11905 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11907 2018-01-05 Pedro Alves <palves@redhat.com>
11910 * ada-lang.c (literal_symbol_name_matcher): New function.
11911 (ada_get_symbol_name_matcher): Use it for
11912 symbol_name_match_type::SEARCH_NAME.
11913 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11914 it down instead of assuming symbol_name_match_type::FULL.
11915 * block.h (block_lookup_symbol): New parameter 'match_type'.
11916 * c-valprint.c (print_unpacked_pointer): Use
11917 lookup_symbol_search_name instead of lookup_symbol.
11918 * compile/compile-object-load.c (get_out_value_type): Pass down
11919 symbol_name_match_type::SEARCH_NAME.
11920 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11921 symbol_name_match_type::FULL.
11922 * cp-support.c (cp_get_symbol_name_matcher): Handle
11923 symbol_name_match_type::SEARCH_NAME.
11924 * infrun.c (insert_exception_resume_breakpoint): Use
11925 lookup_symbol_search_name.
11926 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11927 * psymtab.c (maintenance_check_psymtabs): Use
11928 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11929 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11930 SYMBOL_SEARCH_NAME.
11931 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11932 if symbol_name_match_type::SEARCH_NAME.
11933 (lookup_symbol_in_language): Pass down
11934 symbol_name_match_type::FULL.
11935 (lookup_symbol_search_name): New.
11936 (lookup_language_this): Pass down
11937 symbol_name_match_type::SEARCH_NAME.
11938 (lookup_symbol_aux, lookup_local_symbol): New parameter
11939 'match_type'. Pass it down.
11940 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11941 (lookup_symbol_search_name): New declaration.
11942 (lookup_symbol_in_block): New 'match_type' parameter.
11944 2018-01-05 Pedro Alves <palves@redhat.com>
11947 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11949 (ada_lookup_symbol): Reimplement in terms of
11950 ada_lookup_symbol_list, bits factored out from
11951 ada_lookup_encoded_symbol.
11953 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11955 * ada-exp.y (write_object_renaming): When subscripting an array
11956 using a symbol as the index, pass the block in call to
11957 ada_lookup_encoded_symbol when looking that symbol up.
11959 2018-01-05 Jerome Guitton <guitton@adacore.com>
11961 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11964 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11966 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11967 the case where VALUE_LVAL (val0) is not lval_memory.
11969 2018-01-05 Xavier Roirand <roirand@adacore.com>
11971 * ada-valprint.c (print_optional_low_bound): Handle
11972 character-indexed array printing like boolean-indexed array
11975 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11977 * NEWS: Create a new section for the next release branch.
11978 Rename the section of the current branch, now that it has
11981 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11983 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11984 * version.in: Bump version to 8.1.50.DATE-git.
11986 2018-01-03 Xavier Roirand <roirand@adacore.com>
11988 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11990 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11992 (default_exception_support_info) <catch_handlers_sym>: Add field.
11993 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11994 (ada_exception_name_addr_1): Add "catch handlers" handling.
11995 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11996 Update all callers.
11997 (create_excep_cond_exprs) <ex>: Add parameter.
11998 (re_set_exception): Update create_excep_cond_exprs call.
11999 (print_it_exception, print_one_exception, print_mention_exception)
12000 (print_recreate_exception): Add "catch handler" handling.
12001 (allocate_location_catch_handlers, re_set_catch_handlers)
12002 (check_status_catch_handlers, print_it_catch_handlers)
12003 (print_one_catch_handlers, print_mention_catch_handlers)
12004 (print_recreate_catch_handlers): New function.
12005 (catch_handlers_breakpoint_ops): New variable.
12006 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12007 Add parameter. Add "catch handler" handling.
12008 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12009 Add "catch handler" handling.
12010 (ada_exception_catchpoint_cond_string): Add "catch handler"
12012 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12014 (catch_ada_handlers_command): New function.
12015 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12016 operations structure.
12017 (_initialize_ada_language): Add "catch handlers" command entry.
12018 * NEWS: Document "catch handlers" feature.
12020 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12022 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12023 account when creating the array type of the slice.
12024 (ada_value_slice): Likewise.
12026 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12028 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12030 (create_array_type_with_stride): Add byte_stride_prop parameter.
12031 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12032 New parameter. Update all callers in this file.
12033 (array_type_has_dynamic_stride): New function.
12034 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12035 of arrays with dynamic byte strides.
12036 * dwarf2read.c (read_array_type): Add support for dynamic
12037 DW_AT_byte_stride attributes.
12039 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12041 * dwarf2read.c (read_unspecified_type): Treat
12042 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12044 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12046 Update copyright year range in all GDB files.
12048 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12050 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12051 and gdb/testsuite/gdb.base/step-line.c.
12053 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12055 * copyright.py (main): Dump the contents of
12056 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12057 even if BY_HAND is empty.
12059 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12061 * top.c (print_gdb_version): Update Copyright year in version
12064 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12066 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12068 For older changes see ChangeLog-2017.
12074 version-control: never