1 2018-08-27 Tom Tromey <tom@tromey.com>
4 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
7 2018-08-27 Tom Tromey <tom@tromey.com>
9 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
11 (ppc64_standard_linkage1, ppc64_standard_linkage2)
12 (ppc64_standard_linkage3, ppc64_standard_linkage4)
13 (ppc64_standard_linkage5, ppc64_standard_linkage6)
14 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
17 2018-08-27 Tom Tromey <tom@tromey.com>
19 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
20 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
22 2018-08-27 Tom Tromey <tom@tromey.com>
24 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
25 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
27 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
29 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
31 * sparc-linux-tdep.c (sparc32_linux_sigframe)
32 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
33 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
35 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
36 (ppc64_linux_sigaction_tramp_frame)
37 (ppc32_linux_sighandler_tramp_frame)
38 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
39 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
40 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
41 * mn10300-linux-tdep.c (am33_linux_sigframe)
42 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
43 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
44 * mips-linux-tdep.c (mips_linux_o32_sigframe)
45 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
46 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
47 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
48 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
49 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
50 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
51 * microblaze-linux-tdep.c
52 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
53 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
54 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
55 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
56 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
57 * common/common-types.h (ULONGEST_MAX): New define.
58 (CORE_ADDR_MAX): Fix formatting.
59 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
60 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
61 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
62 (arm_linux_rt_sigreturn_tramp_frame)
63 (arm_eabi_linux_sigreturn_tramp_frame)
64 (arm_eabi_linux_rt_sigreturn_tramp_frame)
65 (thumb2_eabi_linux_sigreturn_tramp_frame)
66 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
67 (arm_linux_restart_syscall_tramp_frame)
68 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
69 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
70 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
72 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
74 2018-08-27 Tom Tromey <tom@tromey.com>
76 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
78 * mips-tdep.c (mips_deal_with_atomic_sequence)
79 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
80 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
81 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
82 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
84 * aarch64-tdep.c (aarch64_software_single_step): Use
87 2018-08-27 Tom Tromey <tom@tromey.com>
89 * linespec.c (complete_linespec_component): Add cast to "char".
90 * completer.c (completion_tracker::build_completion_result): Add
93 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
95 * solist.h (struct solist, struct target_so_ops): Fix
98 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
100 * ada-tasks.c (ada_task_info_s): Remove typedef.
101 (DEF_VEC_O(ada_task_info_s)): Remove.
102 (struct ada_tasks_inferior_data): Initialize fields.
103 <task_list>: Make an std::vector.
104 (get_ada_tasks_inferior_data): Allocate with new.
105 (ada_get_task_number): Adjust.
106 (get_task_number_from_id): Likewise.
107 (valid_task_id): Likewise.
108 (ada_get_task_info_from_ptid): Likewise.
109 (iterate_over_live_ada_tasks): Likewise.
110 (add_ada_task): Likewise.
111 (read_known_tasks): Likewise.
112 (ada_build_task_list): Likewise.
113 (print_ada_task_info): Likewise.
114 (info_task): Likewise.
115 (task_command_1): Likewise.
117 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
119 * ada-lang.c (add_angle_brackets): Return std::string.
121 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
123 * python/py-threadevent.c (py_get_event_thread): Initialize
126 2018-08-24 Pedro Alves <palves@redhat.com>
128 * python/py-bpevent.c (create_breakpoint_event_object): Use
130 * python/py-continueevent.c (emit_continue_event): Use
132 * python/py-exitedevent.c (create_exited_event_object): Return a
134 (emit_exited_event): Use copy-initialization.
135 * python/py-inferior.c (python_new_inferior)
136 (python_inferior_deleted, add_thread_object): Use
138 * python/py-infevents.c (create_inferior_call_event_object)
139 (create_register_changed_event_object)
140 (create_memory_changed_event_object): Return a gdbpy_ref<>.
141 (emit_inferior_call_event, emit_memory_changed_event)
142 (emit_register_changed_event): Use copy-initialization.
143 * python/py-newobjfileevent.c (create_new_objfile_event_object):
144 Return a gdbpy_ref<>.
145 (emit_new_objfile_event): Use copy-initialization.
146 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
147 (emit_clear_objfiles_event): Use copy-initialization.
148 * python/py-signalevent.c (create_signal_event_object): Use
150 * python/py-threadevent.c (create_thread_event_object): Use
153 2018-08-24 Pedro Alves <palves@redhat.com>
154 Simon Marchi <simon.marchi@ericsson.com>
157 * python/py-continueevent.c: Include "gdbthread.h".
158 (create_continue_event_object): Add intro comment. Add 'ptid'
159 parameter. Use it to find thread to pass to
160 create_thread_event_object.
161 (emit_continue_event): Pass PTID down to
162 create_continue_event_object.
163 * python/py-event.h (py_get_event_thread): Declare.
164 (create_thread_event_object): Remove default from 'thread'
166 * python/py-stopevent.c (create_stop_event_object): Use
168 * python/py-threadevent.c (get_event_thread): Rename to ...
169 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
170 and use it to find the thread.
171 (create_thread_event_object): Assert that THREAD isn't null.
172 Don't find the event thread here.
174 2018-08-23 Kevin Buettner <kevinb@redhat.com>
176 * block.h (blockrange, blockranges): New struct declarations.
177 (struct block): Add new field named `ranges'.
178 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
179 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
180 macros for accessing ranges in struct block.
181 (make_blockranges): New declaration.
182 block.c (make_blockranges): New function.
183 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
185 * symtab.h (find_pc_partial_function): Add new parameter `block'.
186 * blockframe.c (cache_pc_function_block): New static global.
187 (clear_pc_function_cache): Clear cache_pc_function_block.
188 (find_pc_partial_function): Move comment to symtab.h. Add
189 support for non-contiguous blocks.
190 * cli/cli-cmds.c (block.h): Include.
191 (print_disassembly): Handle printing of non-contiguous blocks.
192 (disassemble_current_function): Likewise.
193 (disassemble_command): Likewise.
195 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
197 * blockframe.c (get_pc_function_start): Likewise.
198 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
199 (gcc_symbol_address): Likewise.
200 * compile/compile-object-run.c (compile_object_run): Likewise.
201 * compile/compile.c (get_expr_block_and_pc): Likewise.
202 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
203 (func_addr_to_tail_call_list): Likewise.
204 * findvar.c (default_read_var_value): Likewise.
205 * inline-frame.c (inline_frame_this_id): Likewise.
206 (skip-inline_frames): Likewise.
207 * infcmd.c (until_next_command): Likewise.
208 * linespec.c (convert_linespec_to_sals): Likewise.
209 * parse.c (parse_exp_in_context_1): Likewise.
210 * printcmd.c (build_address_symbolic): likewise.
211 (info_address_command): Likewise.
212 symtab.c (find_function_start_sal): Likewise.
213 (skip_prologue_sal): Likewise.
214 (find_function_alias_target): Likewise.
215 (find_gnu_ifunc): Likewise.
216 * stack.c (find_frame_funname): Likewise.
217 * symtab.c (fixup_symbol_section): Likewise.
218 (find_function_start_sal): Likewise.
219 (skip_prologue_sal): Likewsie.
220 (find_function_alias_target): Likewise.
221 (find_gnu_ifunc): Likewise.
222 * tracepoint.c (info_scope_command): Likewise.
223 * value.c (value_fn_field): Likewise.
225 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
226 in place of find_pc_partial_function.
227 * blockframe.c (find_function_entry_range_from_pc): New function.
228 * symtab.h (find_function_entry_range_from_pc): Declare and document.
229 * objfiles.c (objfile_relocate1): Relocate start and end addresses
230 for each range in a block.
233 2018-08-23 Xavier Roirand <roirand@adacore.com>
235 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
238 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
240 * solib-svr4.c (read_program_headers_from_bfd): Return
241 gdb::optional<gdb::byte_vector>.
242 (svr4_exec_displacement): Adjust.
244 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
246 * solib-svr4.c (read_program_header): Return
247 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
248 (find_program_interpreter): Return
249 gdb::optional<gdb::byte_vector>.
250 (scan_dyntag_auxv): Adjust.
251 (enable_break): Adjust.
252 (svr4_exec_displacement): Adjust.
254 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
256 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
257 * inf-child.c (inf_child_target::terminal_save_inferior): New.
259 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
261 * guile/scm-string.c (gdbscm_scm_from_printf): Use
263 * guile/scm-utils.c (gdbscm_printf): Likewise.
264 * serial.c (serial_printf): Likewise.
265 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
267 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
269 * stack.c (print_frame): Print frame architecture when printing on
271 * NEWS: Mention new "arch" attribute in frame output.
273 2018-08-21 Alan Hayward <alan.hayward@arm.com>
275 * arch/aarch64.h (aarch64_regnum): Update comment.
277 2018-08-21 Alan Hayward <alan.hayward@arm.com>
279 * NEWS: Add SVE to 8.2 section.
281 2018-08-21 Pedro Alves <palves@redhat.com>
283 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
284 out from gdbscm_parse_function_args.
285 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
286 gdbscm_parse_function_args_1.
288 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
291 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
294 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
296 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
298 2018-08-19 Michael Spang <spang@google.com>
301 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
304 2018-08-18 Kevin Buettner <kevinb@redhat.com>
306 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
307 dwarf_variable_value.
308 * dwarf2-frame.c (class dwarf_expr_executor):
309 Add override for dwarf_variable_value.
310 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
311 (class symbol_needs_eval_context): Likewise.
312 (indirect_synthetic_pointer): Add forward declaration.
313 (sect_variable_value): New function.
314 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
315 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
316 for DW_OP_GNU_variable_value.
318 2018-08-16 Tom Tromey <tom@tromey.com>
320 * top.c (read_command_file): Update.
321 (command_line_input): Remove "repeat" argument.
322 * ada-lang.c (get_selections): Update.
323 * linespec.c (decode_line_2): Update.
324 * defs.h (command_line_input): Remove argument.
325 * cli/cli-script.c (read_next_line): Update.
326 * python/py-gdb-readline.c: Update.
328 2018-08-17 Tom Tromey <tom@tromey.com>
330 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
333 2018-08-15 Tom Tromey <tom@tromey.com>
335 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
337 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
339 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
340 If used, use find_pc_partial_function to find address range
342 * mi/mi-main.c (mi_cmd_list_features): Report
343 "data-disassemble-a-option" feature.
344 * NEWS: Mention new -data-disassemble option -a.
346 2018-08-13 Tom Tromey <tom@tromey.com>
348 * common/common-defs.h (_FORTIFY_SOURCE): Define.
350 2018-08-13 Alan Hayward <alan.hayward@arm.com>
352 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
353 (aarch64_linux_collect_sve_regset): Likewise.
354 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
355 * regcache.h (regcache_map_entry_size): New function.
357 2018-08-13 Alan Hayward <alan.hayward@arm.com>
359 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
360 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
361 (SVE_HEADER_VL_LENGTH): Likewise.
362 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
363 (SVE_HEADER_FLAGS_LENGTH): Likewise.
364 (SVE_HEADER_RESERVED_LENGTH): Likewise.
365 (SVE_HEADER_SIZE_OFFSET): Likewise.
366 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
367 (SVE_HEADER_VL_OFFSET): Likewise.
368 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
369 (SVE_HEADER_FLAGS_OFFSET): Likewise.
370 (SVE_HEADER_RESERVED_OFFSET): Likewise.
371 (SVE_HEADER_SIZE): Likewise.
372 (aarch64_linux_core_read_vq): Add function.
373 (aarch64_linux_core_read_description): Check for SVE section.
375 2018-08-13 Alan Hayward <alan.hayward@arm.com>
377 * aarch64-fbsd-tdep.c
378 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
380 * aarch64-linux-tdep.c
381 (aarch64_linux_iterate_over_regset_sections): Likewise.
383 (alpha_linux_iterate_over_regset_sections):
385 (alphanbsd_iterate_over_regset_sections): Likewise.
387 (amd64fbsd_iterate_over_regset_sections): Likewise.
389 (amd64_linux_iterate_over_regset_sections): Likewise.
391 (armbsd_iterate_over_regset_sections): Likewise.
393 (arm_fbsd_iterate_over_regset_sections): Likewise.
395 (arm_linux_iterate_over_regset_sections): Likewise.
396 * corelow.c (get_core_registers_cb): Likewise.
397 (core_target::fetch_registers): Likewise.
398 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
399 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
400 * gdbarch.h (void): Regenerate.
401 * gdbarch.sh: Add supply_size and collect_size.
402 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
403 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
404 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
405 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
406 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
407 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
408 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
409 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
410 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
411 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
412 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
413 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
414 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
415 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
416 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
417 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
418 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
419 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
420 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
421 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
422 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
423 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
424 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
425 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
426 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
427 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
428 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
429 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
430 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
431 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
433 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
435 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
438 2018-08-10 Keith Seitz <keiths@redhat.com>
440 * compile/compile-c-support.c (add_code_header, add_code_footer):
441 Move into policy class.
442 (c_push_user_expression, pop_user_expression_nop)
443 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
444 (compile_program): New host class.
445 (c_compile_program): New typedef.
446 (c_compute_porgram): Use c_compile_program.
448 2018-08-10 Keith Seitz <keiths@redhat.com>
450 * compile/compile-internal.h (compile_instance::~compile_instance):
451 Remove calls to htab_delete.
452 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
453 * compile.c (compile_instance::compile_instance): Initialize
454 htab unique pointers.
455 (compile_instance::get_cached_type, compile_instance::insert_type)
456 (compile_instance::error_symbol_once): Update for unique_ptr.
458 2018-08-10 Keith Seitz <keiths@redhat.com>
460 * compile/compile-c-symbols.c (struct symbol_error)
461 (hash_symbol_error, eq_symbol_error, del_symbol_error)
462 (compile_instance::insert_symbol_error)
463 (compile_instance::error_symbol_once): Move to ...
464 * compile/compile.c: ... here.
466 2018-08-10 Keith Seitz <keiths@redhat.com>
468 * compile/compile-c-support.c (c_get_compile_context): Use `new'
469 instead of `new_compile_instance'.
470 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
472 If the symbol error map is not initialized, create it.
473 (generate_c_for_for_one_symbol): Do not check/initialize
474 the symbol error map.
475 * compile/compile-c-types.c (compile_c_instance): Make a class.
477 (compile_instance::compile_instance): Initialize the type cache.
478 (get_cached_type): New function.
479 (insert_type): Update description.
480 (compile_c_instance::m_default_cflags): Define.
481 (convert_type): Update description. Use get_cached_type.
482 (delete_instance): Moved to destructor.
483 (new_compile_instance): Moved to constructor.
484 * compile/compile-c.h (compile_c_instance): Make class inheriting
485 from compile_instance.
486 <base>: Remove field.
487 <type_map, symbol_err_map>: Move to base class.
488 <c_plugin>: Rename to `m_plugin' and remove pointer type.
489 * compile/compile-internal.h (compile_instance): Make class.
490 <type_map_t, symbol_err_map_t>: Define.
491 <fe>: Rename to `m_gcc_fe'.
492 <scope, block, gcc_target_options>: Add `m_' prefix.
493 <m_type_map, m_symbol_err_map>: New fields, moved from
496 (convert_type, new_compile_instance): Remove.
497 * compile/compile.c (cleanup_compile_instance): Remove.
498 (compile_to_object): Use unique_ptr to eliminate cleanups.
499 (compile_instance::set_print_callback, compile_instance::version)
500 (compile_instance::set_verbose)
501 (compile_instance::set_driver_filename)
502 (compile_instance::set_triplet_regexp)
503 (compile_instance::set_arguments)
504 (compile_instance::set_source_file)
505 (compile_instance::compile): Define.
507 2018-08-10 Keith Seitz <keiths@redhat.com>
509 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
510 * compile/compile-c-types.c: Define GCC_METHODN macros and include
511 gcc-c-fe.def to define C plugin.
512 (delete_instance): Delete `c_plugin'.
513 (new_compile_instance): Initialize `c_plugin'.
514 * compile/compile-c.h: Include gcc_c_plugin.h.
515 (struct compile_c_instance) <c_plugin>: New member.
516 * gcc-c-plugin.h: New file.
517 Update all callers with API change.
519 2018-08-10 Keith Seitz <keiths@redhat.com>
521 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
522 (HFILES_NO_SRCDIR): ... to here.
523 Add compile-internal.h and compile-c.h.
524 * compile/compile-c-support.c: Include compile-c.h.
525 * compile/compile-c-symbols.c: Include compile-c.h.
526 (generate_c_for_variable_locations): Update comment.
527 * compile/compile-c-types.c: Include compile-c.h.
528 * compile/compile-c.h: New file -- moved C language declarations
529 from other files here.
530 * compile/compile-internal.h: Do not include hashtab.h or
532 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
533 (gcc_convert_symbol, gcc_symbol_address)
534 (generate_c_for_variable_locations, c_get_mode_for_size)
535 (c_get_range_decl_name): Definitions moved to compile-c.h.
536 * compile/compile-loc2c.c: Include compile-c.h.
538 2018-08-10 Keith Seitz <keiths@redhat.com>
540 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
541 (c_symbol_substitution_name): ... this.
544 2018-08-10 Keith Seitz <keiths@redhat.com>
546 * compile/compile-c-support.c (c_compute_program): Use
547 unique_xmalloc_ptr to eliminate cleanup.
548 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
549 Return a unique_xmalloc_ptr and eliminate cleanup.
550 * compile/compile-internal.h (generate_c_for_variable_locations):
551 Return unique_xmalloc_ptr and update description.
553 2018-08-10 Alan Hayward <alan.hayward@arm.com>
555 * corelow.c (core_target::get_core_register_section): Rename
556 min_size to section_min_size.
558 2018-08-09 Jim Wilson <jimw@sifive.com>
560 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
561 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
562 * NEWS: Mention new GNU/Linux RISC-V target.
563 * configure.host: Add riscv*-*-linux*.
564 * configure.nat: Add riscv*.
565 * configure.tgt: Add riscv*-*-linux*.
566 * riscv-linux-nat.c: New file.
567 * riscv-linux-tdep.c: New file.
569 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
571 * infrun.c (resume): Make static, add forward declaration.
572 (proceed): Update header comment.
573 * infrun.h (resume): Delete declaration.
575 2018-08-09 Tom Tromey <tom@tromey.com>
577 * riscv-tdep.h: Minor formatting fixes.
579 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
581 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
582 * dwarf-index-cache.c (create_dir_and_check): Likewise.
583 (test_mkdir_recursive): Likewise.
584 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
586 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
588 * valarith.c (value_subscripted_rvalue): If an array is not in
589 memory, and we don't know the upper bound, then we can't know that
590 the requested element exists or not.
592 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
594 * target.c (str_comma_list_concat_elem): Fix typo in comment.
595 (target_options_to_string): Add comment.
597 2018-08-08 Tom Tromey <tom@tromey.com>
599 * unittests/scoped_mmap-selftests.c: Check result of "write".
601 2018-08-08 Jim Wilson <jimw@sifive.com>
603 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
604 (decode_register_index_short): New.
605 (decode_j_type_insn, decode_cj_type_insn): New.
606 (decode_b_type_insn, decode_cb_type_insn): New.
607 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
608 local xlen. Check xlen when decoding ambiguous compressed insns. In
609 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
610 is_c_sw_insn instead of is_sw_insn.
611 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
612 (riscv_software_single_step): New.
613 * riscv-tdep.h (riscv_software_single_step): Declare.
615 * riscv-tdep.c (riscv_isa_xlen): Drop static.
616 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
618 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
621 * target.c (dispose_inferior): Don't dispose of inferiors that are
624 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
626 * remote.c (remote_target::download_tracepoint): Change char* to
629 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
631 * target.h (target_options_to_string): Return an std::string.
632 * target.c (str_comma_list_concat_elem): Return void, use
634 (do_option): Likewise.
635 (target_options_to_string): Return an std::string.
636 * linux-nat.c (linux_nat_target::wait): Adjust.
637 * target-debug.h (target_debug_print_options): Adjust.
639 2018-08-07 Tom Tromey <tom@tromey.com>
641 * Makefile.in (CPPFLAGS): New variable.
642 (INTERNAL_CPPFLAGS): Use it.
644 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
646 * NEWS: Mention the index cache.
648 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
650 * common/pathstuff.h (get_standard_cache_dir): New.
651 * common/pathstuff.c (get_standard_cache_dir): New.
652 * build-id.h (build_id_to_string): New.
653 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
654 DEBUG_STR_SUFFIX): Move to here.
655 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
656 DEBUG_STR_SUFFIX): Move from there.
657 (write_psymtabs_to_index): Make non-static, add basename
658 parameter. Write to temporary files, rename when done.
659 (save_gdb_index_command): Adjust call to
660 write_psymtabs_to_index.
661 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
663 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
664 (get_gdb_index_contents_from_cache): New.
665 (get_gdb_index_contents_from_cache_dwz): New.
666 (dwarf2_initialize_objfile): Read index from cache.
667 (dwarf2_build_psymtabs): Save to index.
668 * dwarf-index-cache.h: New file.
669 * dwarf-index-cache.c: New file.
670 * dwarf-index-write.h: New file.
672 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
674 * gnulib/aclocal.m4: Re-generate.
675 * gnulib/config.in: Re-generate.
676 * gnulib/configure: Re-generate.
677 * gnulib/import/Makefile.am: Re-generate.
678 * gnulib/import/Makefile.in: Re-generate.
679 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
680 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
681 * gnulib/import/m4/mkdir.m4: New file.
682 * gnulib/import/mkdir.c: New file.
683 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
686 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
688 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
689 * common/scoped_mmap.c: New file.
690 * common/scoped_mmap.h (destroy): New method.
691 (~scoped_mmap, reset): Use destroy.
692 (scoped_mmap): New move constructor.
693 (mmap_file): New declaration.
694 * unittests/scoped_mmap-selftests.c (test_normal,
695 test_invalid_filename, run_tests): New functions.
696 (_initialize_scoped_mmap_selftests): Register selftest.
698 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
700 * dwarf2read.c (read_gdb_index_from_section): Rename to...
701 (read_gdb_index_from_buffer): ... this. Remove section
702 parameter, add buffer parameter.
703 (get_gdb_index_contents_ftype,
704 get_gdb_index_contents_dwz_ftype): New typedefs.
705 (dwarf2_read_gdb_index): Add callback parameters to get the
707 (get_gdb_index_contents_from_section): New.
708 (dwarf2_initialize_objfile): Update call to
709 dwarf2_read_gdb_index.
711 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
713 * common/filestuff.h (gdb_fopen_cloexec): New overload.
714 (gdb_open_cloexec): Likewise.
715 * nat/linux-osdata.c (command_from_pid): Use string_printf.
716 (commandline_from_pid): Likewise.
717 (linux_xfer_osdata_threads): Likewise.
718 (linux_xfer_osdata_fds): Likewise.
719 * ada-lang.c (is_package_name): Likewise.
720 * auxv.c (procfs_xfer_auxv): Likewise.
721 * breakpoint.c (print_one_breakpoint_location): Use
723 (print_one_catch_solib): Use string_printf.
724 * coff-pe-read.c (add_pe_exported_sym): Likewise.
725 (add_pe_forwarded_sym): Likewise.
726 * dwarf2read.c (create_type_unit_group): Likewise.
727 (build_error_marker_type): Likewise.
728 * infcall.c (get_function_name): Likewise.
729 * valprint.c (print_converted_chars_to_obstack): Likewise.
730 * xtensa-tdep.c (xtensa_register_type): Likewise.
732 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
734 * remote.c (remote_target::download_tracepoint): Fix format
737 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
739 * tracefile.c: Include common/byte-vector.h.
740 (trace_save): Change type of buf to gdb::byte_vector. Initialize
741 with trace_regblock_size if needed. Update uses of buf.
743 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
745 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
746 std::vector<unsigned char>.
747 * tracepoint.c (collection_list::collection_list): Remove
748 m_regs_mask initializer from initializer list. Resize
749 m_regs_mask using the largest remote register number.
750 (collection_list::add_remote_register): Remove size check on
751 m_regs_mask. Use at to access element.
752 (collection_list::stringify): Change type of temp_buf to
753 gdb::char_vector. Update uses of temp_buf. Resize if needed to
754 stringify the register mask. Use pack_hex_byte for the register
757 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
759 * tracepoint.h (class collection_list) <add_register>: Remove.
760 <add_remote_register, add_ax_registers, add_local_register>:
762 <add_memrange>: Add scope parameter.
763 * tracepoint.c (encode_actions_1): Likewise.
764 (collection_list::add_register): Rename to ...
765 (collection_list::add_remote_register): ... this. Update
767 (collection_list::add_ax_registers, add_local_register): New
769 (collection_list::add_memrange): Add scope parameter. Call
770 add_local_register instead of add_register.
771 (finalize_tracepoint_aexpr): New function.
772 (collection_list::collect_symbol): Update calls to add_memrange.
773 Call add_local_register instead of add_register. Call
774 add_ax_registers. Call finalize_tracepoint_aexpr.
775 (encode_actions_1): Get remote regnos for $reg action. Call
776 add_remote_register, add_ax_registers, and add_local_register.
777 Update call to add_memrange. Call finalize_tracepoint_aexpr.
778 (validate_actionline): Call finalize_tracepoint_aexpr.
780 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
782 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
783 Replace array buf with gdb::char_vector buf, of size
784 get_remote_packet_size (). Replace references to buf and
785 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
786 and xsnprintf with snprintf. Raise errors if the buffer is too
789 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
791 * remote.c (remote_target::download_tracepoint): Fix the has_more
792 predicate in the QTDP action list iteration.
794 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
796 * remote.c (remote_target::download_tracepoint): Fix indentation
799 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
801 * proc-api.c (_initialize_proc_api): Remove c, unused.
802 * procfs.c (procfs_init_inferior): Remove signals, unused.
803 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
806 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
807 Andrew Burgess <andrew.burgess@embecosm.com>
809 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
810 'W_STOPCODE (0)' as this could be ambiguous.
812 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
814 * ser-tcp.c (net_open): Fix thinko when deciding whether to
815 disable TCP's Nagle algorithm (use "ai_protocol" instead of
818 2018-08-02 Tom Tromey <tom@tromey.com>
821 * dwarf2read.c (read_func_scope): Set symtab on template parameter
823 (process_structure_scope): Likewise.
825 2018-08-02 Xavier Roirand <roirand@adacore.com>
828 * darwin-nat.c (darwin_kill_inferior): Fix handling of
831 2018-08-02 Tom Tromey <tom@tromey.com>
833 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
834 (darwin_suspend_inferior, darwin_resume_inferior)
835 (darwin_decode_notify_message, darwin_resume_inferior_threads)
836 (darwin_check_new_threads): Check result of get_darwin_inferior.
838 2018-07-31 Joel Brobecker <brobecker@adacore.com>
842 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
844 * varobj.c (varobj_get_path_expr_parent): Report an error if
845 parent is a dynamic varobj.
847 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
849 * gnulib/aclocal.m4: Re-generate.
850 * gnulib/config.in: Re-generate.
851 * gnulib/configure: Re-generate.
852 * gnulib/import/Makefile.in: Re-generate.
853 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
854 * gnulib/import/m4/onceonly.m4: Re-generate.
856 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
858 * target-descriptions.c (struct xml_test_tdesc): New.
859 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
860 (record_xml_tdesc): Update.
861 (maintenance_check_xml_descriptions): Update.
862 * target-descriptions.h (record_xml_tdesc): Update comment.
864 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
866 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
867 checking array bounds are defined.
869 2018-07-30 Tom Tromey <tom@tromey.com>
871 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
872 irreflexivity violation.
874 2018-07-30 Tom Tromey <tom@tromey.com>
876 * cli/cli-decode.c (lookup_cmd): Remove lint code.
877 * value.c (unpack_long): Remove lint code.
878 * valops.c (value_ind): Remove lint code.
879 * valarith.c (value_x_binop, value_x_unop, value_equal)
880 (value_pos): Remove lint code.
882 2018-07-28 Tom de Vries <tdevries@suse.de>
884 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
885 with undefined upper bound as <optimized out>.
887 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
889 * gcore.in: Rename variable "name" to "prefix". Expand
892 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
894 * windows-nat.c (windows_nat_target::create_inferior): Update to
895 call close() in global namespace.
897 2018-07-26 Tom Tromey <tom@tromey.com>
899 * dwarf-index-write.c (add_address_entry): Don't add objfile
901 * dbxread.c (find_stab_function): Rename from
902 find_stab_function_addr. Return a bound_minimal_symbol.
903 (read_dbx_symtab): Use raw_text_low, raw_text_high.
904 Don't add objfile offsets.
905 (end_psymtab): Use raw_text_low, raw_text_high,
906 MSYMBOL_VALUE_RAW_ADDRESS.
907 (read_ofile_symtab): Update.
908 (process_one_symbol): Update.
909 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
911 (dw2_relocate): Remove.
912 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
914 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
916 (process_psymtab_comp_unit_reader, add_partial_symbol)
917 (add_partial_subprogram, dwarf2_ranges_read): Update.
918 (load_partial_dies): Update.
919 (add_address_entry): Don't add objfile offsets.
920 (dwarf2_build_include_psymtabs): Update.
921 (create_addrmap_from_aranges): Don't add objfile offsets.
922 (dw2_find_pc_sect_compunit_symtab): Update.
923 * mdebugread.c (parse_symbol): Don't add objfile offsets.
924 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
926 (parse_partial_symbols): Don't add objfile offsets. Use
927 raw_text_low, raw_text_high. Update.
928 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
929 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
930 or call 'relocate' quick function. Clear psymbol_map.
931 * psympriv.h (struct partial_symbol) <address>: Add section
933 <set_unrelocated_address>: Rename from set_address.
934 <raw_text_low, raw_text_high>: New methods.
935 <text_low, text_high>: Add objfile parameter.
936 (add_psymbol_to_bcache): Add 'section' parameter. Call
937 set_unrelocated_address.
938 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
939 (find_pc_psymbol): Update.
940 (fixup_psymbol_section, relocate_psymtabs): Remove.
941 (dump_psymtab, psym_functions): Update.
942 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
944 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
945 (start_psymtab_common): Update.
946 * symfile-debug.c (debug_qf_relocate): Remove.
947 (debug_sym_quick_functions): Update.
948 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
949 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
952 2018-07-26 Tom Tromey <tromey@redhat.com>
954 * dbxread.c (end_psymtab): Use text_high_valid and
956 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
957 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
958 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
960 <text_low_valid, text_high_valid>: New fields.
961 <set_text_low, set_text_high>: Update.
962 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
964 2018-07-26 Tom Tromey <tom@tromey.com>
966 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
968 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
969 textlow and texthigh fields.
970 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
972 * mdebugread.c (parse_lines, parse_partial_symbols)
973 (psymtab_to_symtab_1): Update.
974 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
975 Rename fields. Update comment. Now private.
976 <text_low, text_high, set_text_low, set_text_high>: New methods.
977 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
978 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
979 (start_psymtab_common, maintenance_info_psymtabs)
980 (maintenance_check_psymtabs): Update.
981 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
983 (scan_xcoff_symtab): Update.
985 2018-07-26 Tom Tromey <tromey@redhat.com>
987 * psympriv.h (struct partial_symbol) <unrelocated_address,
988 address, set_address>: New methods.
989 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
990 (fixup_psymbol_section, relocate_psymtabs): Update.
991 (print_partial_symbols): Add 'objfile' parameter. Update.
992 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
995 2018-07-26 Tom Tromey <tom@tromey.com>
997 * dwarf-index-write.c (write_psymbols, debug_names::insert)
998 (debug_names::write_psymbols): Update.
999 * psympriv.h (struct partial_symbol): Derive from
1000 general_symbol_info.
1001 <obj_section>: New method.
1002 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1003 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1004 (find_pc_sect_psymbol, fixup_psymbol_section)
1005 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1006 (print_partial_symbols, recursively_search_psymtabs)
1007 (compare_psymbols, psymbol_hash, psymbol_compare)
1008 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1009 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1011 2018-07-26 Tom Tromey <tromey@redhat.com>
1013 * dbxread.c (end_psymtab): Remove dead code.
1015 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1017 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1018 DWARF unwinders are disabled.
1019 * dwarf2-frame.c: Add dwarf2read.h include.
1020 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1022 (dwarf2_frame_unwinders_enabled_p): Define.
1023 (show_dwarf_unwinders_enabled_p): New function.
1024 (_initialize_dwarf2_frame): Register switch to control DWARF
1026 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1027 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1028 (show_dwarf_cmdlist): Remove static keyword.
1029 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1030 (show_dwarf_cmdlist): Declare.
1031 * NEWS: Document new feature.
1033 2018-07-26 Tom de Vries <tdevries@suse.de>
1035 PR breakpoints/23366
1036 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1038 2018-07-26 Tom de Vries <tdevries@suse.de>
1040 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1041 DW_AT_count can't be translated to a dynamic prop.
1043 2018-07-25 Tom de Vries <tdevries@suse.de>
1045 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1048 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1050 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1052 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1054 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1056 2018-07-24 Keith Seitz <keiths@redhat.comt
1059 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1060 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1061 instead of add_symbol_to_list.
1062 (read_file_scope): Call prepare_one_comp_unit before reading
1065 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1067 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1069 2018-07-24 Tom Tromey <tom@tromey.com>
1071 * utils.c (malloc, realloc, free): Don't declare.
1072 * configure, config.in: Rebuild.
1073 * configure.ac: Don't check for declarations of free, malloc, or
1076 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1078 * aarch64-linux-nat.c
1079 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1081 * arm-linux-nat.c (fetch_regs): Likewise.
1082 (store_regs): Likewise.
1083 (fetch_vfp_regs): Likewise.
1084 (store_vfp_regs): Likewise.
1085 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1086 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1087 (arm_linux_nat_target::insert_watchpoint): Likewise.
1088 (arm_linux_nat_target::remove_watchpoint): Likewise.
1089 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1091 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1093 * ppc-linux-nat.c (fetch_register): Likewise.
1094 (fetch_all_gp_regs): Likewise.
1095 (fetch_ppc_registers): Likewise.
1096 (store_all_gp_regs): Likewise.
1097 (store_ppc_registers): Likewise.
1098 (hwdebug_insert_point): Likewise.
1099 (can_use_watchpoint_cond_accel): Likewise.
1100 * remote-sim.c (gdb_os_write_stdout): Likewise.
1102 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1103 Tom Tromey <tom@tromey.com>
1105 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1107 * configure: Rebuild.
1109 2018-07-22 Tom Tromey <tom@tromey.com>
1111 * regformats/regdat.sh: Define xmltarget_${name} inside
1112 #ifndef IN_PROCESS_AGENT.
1114 2018-07-22 Tom Tromey <tom@tromey.com>
1116 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1118 2018-07-22 Tom Tromey <tom@tromey.com>
1120 * symfile.c (reread_symbols): Notify iter, not objfile.
1122 2018-07-22 Tom Tromey <tom@tromey.com>
1124 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1126 (ravenscar_thread_target::prepare_to_store): Likewise.
1128 2018-07-22 Tom Tromey <tom@tromey.com>
1130 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1131 unused variable. Call value_fetch_lazy when needed.
1132 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1133 Remove unused variable. Call value_fetch_lazy when needed.
1135 2018-07-22 Tom Tromey <tom@tromey.com>
1137 * m32c-tdep.c (mark_dma): Return void.
1138 (make_regs): Remove unused declarations.
1140 2018-07-22 Tom Tromey <tom@tromey.com>
1142 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1143 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1144 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1145 bkscm_get_valid_block_smob_arg_unsafe for effect.
1147 2018-07-22 Tom Tromey <tom@tromey.com>
1149 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1152 2018-07-22 Tom Tromey <tom@tromey.com>
1154 * windows-nat.c (saved_context): Conditionally define.
1155 * remote.c (remote_target::remote_btrace_maybe_reopen):
1156 Conditionally declare "warned".
1157 * inflow.c (sigquit_ours): Conditionally define.
1158 (new_tty): Move "tty" declaration inside #if.
1159 * guile/guile.c (guile_datadir): Conditionally define.
1160 * charset.c (set_be_le_names): Move some declarations inside #if.
1161 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1163 (parse_xml_btrace_conf): Likewise.
1165 2018-07-22 Tom Tromey <tom@tromey.com>
1167 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1169 2018-07-22 Tom Tromey <tom@tromey.com>
1171 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1172 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1173 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1174 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1175 * stack.c (frame_apply_level_command): Remove unused variable.
1176 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1177 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1178 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1180 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1181 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1182 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1184 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1185 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1187 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1188 Remove unused variable.
1189 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1191 * common/tdesc.c (print_xml_feature::visit): Remove unused
1193 * compile/compile-object-load.c (store_regs): Remove unused
1195 * complaints.c (clear_complaints): Remove unused variable.
1196 * corelow.c (core_target_open): Remove unused variable.
1197 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1199 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1201 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1203 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1205 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1207 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1209 * ia64-tdep.c (examine_prologue): Remove unused variable.
1210 * infcall.c (run_inferior_call): Remove unused variable.
1211 * inferior.c (exit_inferior): Remove unused variable.
1212 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1213 * linespec.c (decode_line_2): Remove unused variable.
1214 * linux-nat.c (super_close): Remove.
1215 * linux-tdep.c (linux_info_proc): Remove unused variable.
1216 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1217 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1218 Remove unused variable.
1219 * parse.c (find_minsym_type_and_address): Remove unused variable.
1220 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1222 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1224 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1226 * record-btrace.c (record_btrace_target::store_registers): Remove
1228 (cmd_show_record_btrace_cpu): Remove unused variable.
1229 * riscv-tdep.c (riscv_register_reggroup_p)
1230 (riscv_push_dummy_call, riscv_return_value): Remove unused
1232 * rust-exp.y (literal): Remove unused variable.
1233 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1235 <STRUCTOP_ANONYMOUS>: Likewise.
1236 * s390-linux-tdep.c (s390_linux_init_abi_31)
1237 (s390_linux_init_abi_64): Remove unused variable.
1238 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1239 (file_select_thread, net_windows_open, _initialize_ser_windows):
1240 Remove unused variables.
1241 * symtab.c (find_pc_sect_line): Remove unused variable.
1242 * target-memory.c (compute_garbled_blocks): Remove unused
1244 (target_write_memory_blocks): Remove unused variable.
1245 * target.c (target_stack::unpush): Remove unused variables.
1246 * tracepoint.c (start_tracing, all_tracepoint_actions)
1247 (merge_uploaded_trace_state_variables)
1248 (print_one_static_tracepoint_marker): Remove unused variable.
1249 * unittests/basic_string_view/element_access/char/1.cc (test01):
1250 Remove unused variable.
1251 * windows-nat.c (windows_continue, windows_add_all_dlls)
1252 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1253 Remove unused variables.
1255 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1257 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1258 attr_profile in HAVE_ELF.
1259 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1262 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1264 * frame.c (frame_register_unwind): Change parameter name.
1265 (frame_unwind_register): Likewise.
1266 (frame_unwind_register_value): Likewise.
1267 (frame_unwind_register_signed): Likewise.
1268 (frame_unwind_register_unsigned): Likewise.
1269 * frame.h (frame_register_unwind): Likewise.
1270 (frame_unwind_register): Likewise.
1271 (frame_unwind_register_value): Likewise.
1272 (frame_unwind_register_signed): Likewise.
1273 (frame_unwind_register_unsigned): Likewise.
1274 (frame_unwind_arch): Likewise.
1276 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1278 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1281 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1283 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1284 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1287 2018-07-20 Keith Seitz <keiths@redhat.com>
1289 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1290 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1291 m_compunit_symtab, m_language>: Add "m_" prefix.
1293 * buildsym.c: Update all uses.
1295 2018-07-20 Tom Tromey <tom@tromey.com>
1297 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1298 * buildsym.h (record_line_ftype): Remove typedef.
1300 2018-07-20 Tom Tromey <tom@tromey.com>
1302 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1303 (end_expandable_symtab): Likewise.
1304 (end_symtab_get_static_block): Likewise.
1305 (end_symtab_from_static_block): Likewise.
1306 * buildsym-legacy.c (augment_type_symtab): Remove.
1307 (end_expandable_symtab): Remove.
1308 (end_symtab_get_static_block): Remove.
1309 (end_symtab_from_static_block): Remove.
1311 2018-07-20 Tom Tromey <tom@tromey.com>
1313 * dwarf2read.c: Include buildsym.h.
1314 (struct dwarf2_cu) <builder>: New method.
1315 (fixup_go_packaging): Update.
1316 (process_full_comp_unit, process_full_type_unit): Update. Don't
1317 use scoped_free_pendings.
1318 (using_directives): Add "cu" parameter, remove "language".
1319 (read_import_statement, setup_type_unit_groups, )
1320 (read_func_scope, read_lexical_block_scope)
1321 (dwarf2_record_block_ranges, read_namespace): Update.
1322 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1323 (lnp_state_machine::handle_end_sequence): Update.
1324 (class lnp_state_machine) <m_cu>: New member.
1325 <m_record_line_callback>: Remove.
1326 <m_currently_recording_lines>: New member.
1327 (lnp_state_machine::handle_set_file): Update.
1328 (noop_record_line): Remove.
1329 (dwarf_record_line_p): Add cu parameter.
1330 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1331 (lnp_state_machine::record_line)
1332 (lnp_state_machine::lnp_state_machine)
1333 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1334 (dwarf_decode_lines): Update.
1335 (dwarf2_start_subfile): Add cu parameter.
1336 (dwarf2_start_symtab, new_symbol): Update.
1337 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1338 Remove dwarf2_per_objfile parameter.
1339 (dwarf_decode_macros): Update.
1341 2018-07-20 Tom Tromey <tom@tromey.com>
1343 * stabsread.c (define_symbol): Update.
1344 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1345 * dwarf2read.c (new_symbol): Update.
1346 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1347 * cp-namespace.c: Include buildsym.h.
1348 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1349 * buildsym-legacy.c (get_buildsym_compunit): New function.
1351 2018-07-20 Tom Tromey <tom@tromey.com>
1353 * xcoffread.c: Include buildsym-legacy.h.
1354 * windows-nat.c: Include buildsym-legacy.h.
1355 * stabsread.c: Include buildsym-legacy.h.
1356 * mdebugread.c: Include buildsym-legacy.h.
1357 * buildsym-legacy.h: New file.
1358 * buildsym-legacy.c: New file, from buildsym.c.
1359 * go32-nat.c: Include buildsym-legacy.h.
1360 * dwarf2read.c: Include buildsym-legacy.h.
1361 * dbxread.c: Include buildsym-legacy.h.
1362 * cp-namespace.c: Include buildsym-legacy.h.
1363 * coffread.c: Include buildsym-legacy.h.
1364 * buildsym.h: Move some contents to buildsym-legacy.h.
1365 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1367 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1369 2018-07-20 Tom Tromey <tom@tromey.com>
1371 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1372 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1373 (buildsym_compunit::buildsym_compunit)
1374 (buildsym_compunit::~buildsym_compunit)
1375 (buildsym_compunit::get_macro_table): Define.
1377 2018-07-20 Tom Tromey <tom@tromey.com>
1379 * buildsym.c (reset_symtab_globals): Remove.
1380 (buildsym_compunit::end_symtab_from_static_block): Update.
1381 (buildsym_compunit::augment_type_symtab): Update.
1382 (end_symtab_from_static_block): Call free_buildsym_compunit.
1383 (augment_type_symtab, end_symtab, end_expandable_symtab):
1386 2018-07-20 Tom Tromey <tom@tromey.com>
1388 * arch-utils.c: Do not include buildsym.h.
1389 * mipsread.c: Do not include buildsym.h.
1390 * machoread.c: Do not include buildsym.h.
1391 * elfread.c: Do not include buildsym.h.
1393 2018-07-20 Tom Tromey <tom@tromey.com>
1395 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1397 (buildsym_compunit): Add new constructor.
1398 (struct buildsym_compunit) <get_last_source_file, finish_block,
1399 record_block_range, start_subfile, patch_subfile_names,
1400 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1401 set_last_source_start_addr, get_last_source_start_addr,
1402 get_local_using_directives, set_local_using_directives,
1403 get_global_using_directives, outermost_context_p,
1404 get_current_context_stack, get_context_stack_depth,
1405 get_current_subfile, get_local_symbols, get_file_symbols,
1406 get_global_symbols, record_debugformat, record_producer,
1407 push_context, pop_context, end_symtab_get_static_block,
1408 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1410 <record_pending_block, finish_block_internal, make_blockvector,
1411 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1415 2018-05-22 Tom Tromey <tom@tromey.com>
1417 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1419 (finish_block_internal): Update.
1421 2018-07-20 Tom Tromey <tom@tromey.com>
1423 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1425 (finish_block_internal): Update.
1427 2018-07-20 Tom Tromey <tom@tromey.com>
1429 * buildsym.h (EXTERN): Don't define or undef.
1430 * buildsym.c (EXTERN): Don't define.
1432 2018-07-20 Tom Tromey <tom@tromey.com>
1434 * buildsym.c: Remove TODO comment.
1436 2018-07-20 Tom Tromey <tom@tromey.com>
1438 * coffread.c (coff_symtab_read): Update.
1439 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1440 (xcoff_new_init): Update.
1441 * mipsread.c (mipscoff_new_init): Update.
1442 * mdebugread.c (mdebug_build_psymtabs): Update.
1443 * elfread.c (elf_new_init): Update.
1444 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1446 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1447 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1448 (stabsect_build_psymtabs): Update.
1449 * buildsym.h (buildsym_init): Don't declare.
1450 * buildsym.c: Update comment.
1451 (prepare_for_building): Remove.
1452 (start_symtab, restart_symtab): Update.
1453 (reset_symtab_globals): Update comment.
1454 (buildsym_init): Remove.
1456 2018-07-20 Tom Tromey <tom@tromey.com>
1458 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1459 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1460 (read_enum_type, common_block_start, common_block_end)
1461 (cleanup_undefined_types_1, finish_global_stabs): Update.
1462 * mdebugread.c (psymtab_to_symtab_1): Update.
1463 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1464 (read_lexical_block_scope, new_symbol): Update.
1465 * dbxread.c (process_one_symbol): Update.
1466 * coffread.c (coff_symtab_read, process_coff_symbol)
1467 (coff_read_enum_type): Update.
1468 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1470 (get_local_symbols, get_file_symbols, get_global_symbols): New
1472 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1474 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1475 (~scoped_free_pendings): Update.
1476 (finish_block, prepare_for_building, reset_symtab_globals)
1477 (end_symtab_get_static_block, end_symtab_with_blockvector)
1478 (augment_type_symtab, push_context): Update.
1479 (get_local_symbols, get_file_symbols, get_global_symbols): New
1481 (buildsym_init): Update.
1483 2018-07-20 Tom Tromey <tom@tromey.com>
1485 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1486 (process_full_type_unit): Likewise.
1487 (dwarf2_start_symtab): Set list_in_scope.
1489 2018-07-20 Tom Tromey <tom@tromey.com>
1491 * dwarf2read.c (process_psymtab_comp_unit_reader)
1492 (build_type_psymtabs_reader): Do not set list_in_scope.
1494 2018-07-20 Tom Tromey <tom@tromey.com>
1496 * buildsym.c (free_pendings): Remove.
1497 (add_symbol_to_list, scoped_free_pendings)
1498 (finish_block_internal, buildsym_init): Update.
1500 2018-07-20 Tom Tromey <tom@tromey.com>
1502 * xcoffread.c (read_xcoff_symtab): Update.
1503 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1505 * dbxread.c (process_one_symbol): Update.
1506 * coffread.c (coff_symtab_read): Update.
1507 * buildsym.h (finish_block): Update.
1508 * buildsym.c (finish_block): Remove "listhead" argument.
1509 (end_symtab_get_static_block): Update.
1511 2018-07-20 Tom Tromey <tom@tromey.com>
1513 * buildsym.h (class scoped_free_pendings): Remove constructor.
1514 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1516 <m_pending_block_obstack, m_pending_blocks>: New members.
1517 (pending_block_obstack, pending_blocks): Remove.
1518 (scoped_free_pendings::scoped_free_pendings): Default.
1519 (~scoped_free_pendings): Update.
1520 (free_pending_blocks): Remove.
1521 (finish_block_internal, record_pending_block, make_blockvector)
1522 (end_symtab_get_static_block, augment_type_symtab, push_context)
1523 (buildsym_init): Update.
1525 2018-07-20 Tom Tromey <tom@tromey.com>
1527 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1528 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1530 (pending_addrmap, pending_addrmap_obstack)
1531 (pending_addrmap_interesting): Remove.
1532 (scoped_free_pendings, record_block_range, make_blockvector)
1533 (prepare_for_building, reset_symtab_globals, buildsym_init):
1536 2018-07-20 Tom Tromey <tom@tromey.com>
1538 * xcoffread.c (process_linenos): Update.
1539 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1540 * mdebugread.c (psymtab_to_symtab_1): Update.
1541 * dwarf2read.c (setup_type_unit_groups)
1542 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1543 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1544 * dbxread.c (process_one_symbol): Update.
1545 * coffread.c (coff_symtab_read, enter_linenos)
1546 (process_coff_symbol): Update.
1547 * buildsym.h (current_subfile): Don't declare.
1548 (get_current_subfile): Declare.
1549 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1551 (start_subfile, free_buildsym_compunit, push_subfile)
1552 (prepare_for_building, start_symtab): Update.
1553 (get_current_subfile): New function.
1555 2018-07-20 Tom Tromey <tom@tromey.com>
1557 * coffread.c (coff_symtab_read): Update.
1558 * xcoffread.c (read_xcoff_symtab): Update.
1559 * dwarf2read.c (new_symbol): Update.
1560 (read_func_scope, read_lexical_block_scope): Update.
1561 * dbxread.c (process_one_symbol): Update.
1562 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1563 (outermost_context_p): Remove macro.
1564 (outermost_context_p, get_current_context_stack)
1565 (get_context_stack_depth): Declare.
1566 (pop_context): Return struct context_stack.
1567 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1569 (context_stack_size): Remove.
1570 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1571 (prepare_for_building, end_symtab_get_static_block)
1572 (augment_type_symtab, push_context): Update.
1573 (pop_context): Return struct context_stack.
1574 (outermost_context_p, get_current_context_stack)
1575 (get_context_stack_depth): New functions.
1576 (buildsym_init): Update.
1578 2018-07-20 Tom Tromey <tom@tromey.com>
1580 * rust-exp.y: Now a pure parser. Update all rules.
1581 (%union): Move earlier.
1582 (current_parser, work_obstack): Remove globals.
1583 (rust_parser, ~rust_parser): Update.
1584 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1585 lex_character, lex_number, lex_string, lex_identifier,
1586 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1587 convert_name, convert_params_to_expression,
1588 convert_ast_to_expression, ast_basic_type, ast_operation,
1589 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1590 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1591 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1592 ast_array_type, ast_slice_type, ast_reference_type,
1593 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1594 (rust_parse): Update.
1595 (rustyyerror, rustyylex): Add parser parameter.
1596 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1597 (rust_lex_stringish_test, rust_lex_test_sequence)
1598 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1599 (rust_lex_test_push_back, rust_lex_tests): Update.
1601 2018-07-19 Pedro Alves <palves@redhat.com>
1603 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1604 gdb::unique_xmalloc_ptr.
1605 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1606 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1607 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1608 copy-initialization.
1609 * guile/scm-pretty-print.c (ppscm_print_children): Use
1610 gdb::unique_xmalloc_ptr instead of cleanups.
1611 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1612 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1613 gdb::unique_xmalloc_ptr.
1614 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1615 Adjust to use gdb::unique_xmalloc_ptr.
1616 * guile/scm-utils.c (extract_arg): Adjust.
1617 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1618 gdb::unique_xmalloc_ptr instead of a cleanup.
1620 2018-07-19 Tom Tromey <tom@tromey.com>
1622 * utils.c (do_value_free_to_mark)
1623 (make_cleanup_value_free_to_mark): Remove.
1624 * utils.h (make_cleanup_value_free_to_mark): Remove.
1626 2018-07-19 Pedro Alves <palves@redhat.com>
1628 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1629 forwarding reference.
1631 2018-07-18 Pedro Alves <palves@redhat.com>
1633 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1634 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1637 2018-07-18 Pedro Alves <palves@redhat.com>
1639 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1641 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1643 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1644 directly instead of a cleanup.
1645 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1646 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1647 (vlscm_binop_gdbthrow): New, factored out from ...
1648 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1649 (vlscm_rich_compare): Use gdbscm_wrap.
1650 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1651 instead of a cleanup.
1652 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1654 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1655 Use xfree directly instead of a cleanup.
1656 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1657 Adjust to use gdbscm_wrap and scoped_value_mark.
1658 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1659 (gdbscm_value_address, gdbscm_value_dereference)
1660 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1662 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1663 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1665 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1666 gdbscm_wrap and scoped_value_mark.
1667 (gdbscm_value_to_string): Use xfree directly instead of a
1668 cleanup. Move 'buffer' unique_ptr to TRY scope.
1669 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1670 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1672 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1673 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1675 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1678 2018-07-18 Tom de Vries <tdevries@suse.de>
1680 * findvar.c (default_read_var_value): Also resolve dynamic type for
1681 LOC_OPTIMIZED_OUT vars.
1683 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1685 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1688 2018-07-17 Tom Tromey <tom@tromey.com>
1690 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1691 (compute_enum_list, pascm_set_param_value_x)
1692 (gdbscm_parameter_value): Update.
1693 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1694 (gdbscm_scm_to_host_string): Update.
1695 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1697 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1698 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1699 * guile/scm-string.c (gdbscm_scm_to_string): Return
1701 (gdbscm_scm_to_host_string): Likewise.
1703 2018-07-17 Tom Tromey <tom@tromey.com>
1705 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1706 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1707 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1708 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1711 2018-07-17 Tom Tromey <tom@tromey.com>
1713 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1714 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1716 * guile/scm-cmd.c (cmdscm_function): Update.
1717 * guile/scm-pretty-print.c
1718 (ppscm_print_exception_unless_memory_error): Update.
1719 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1720 Return unique_xmalloc_ptr.
1722 2018-07-17 Tom Tromey <tom@tromey.com>
1724 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1727 2018-07-17 Jim Wilson <jimw@sifive.com>
1729 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1730 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1731 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1732 unecessary braces after EF_RISCV_RVC test. Delete call to
1733 set_gdbarch_decr_pc_after_break.
1735 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1736 RISCV_LAST_FP_REGNUM + 1.
1737 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1739 2018-07-17 Tom Tromey <tom@tromey.com>
1741 * configure.ac: Remove --disable-gdbcli.
1742 * configure: Rebuild.
1743 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1744 (SUBDIR_CLI_CFLAGS): Remove.
1745 (SFILES): Use SUBDIR_CLI_SRCS.
1746 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1748 2018-07-17 Tom Tromey <tom@tromey.com>
1751 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1753 2018-07-16 Jim Wilson <jimw@sifive.com>
1755 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1757 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1759 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1761 (libunwind_frame_sniffer): Likewise.
1762 (libunwind_frame_prev_register): Likewise.
1763 (libunwind_sigtramp_frame_sniffer): Likewise.
1764 * ia64-tdep.c (ia64_access_reg): Likewise.
1765 (ia64_access_rse_reg): Likewise.
1766 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1767 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1769 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1771 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1773 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1775 * remote-sim.c (gdbsim_target::close,
1776 gdbsim_target::mourn_inferior): Remove unused variables.
1778 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1780 * ia64-tdep.c (ktab_buf): New global.
1781 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1782 (get_kernel_table): Adjust.
1784 2018-07-16 Tom Tromey <tom@tromey.com>
1786 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1787 * dwarf2read.c (using_directives, new_symbol): Use
1788 outermost_context_p.
1789 * dbxread.c (process_one_symbol): Use outermost_context_p.
1790 * coffread.c (coff_symtab_read): Use outermost_context_p.
1792 2018-07-16 Tom Tromey <tom@tromey.com>
1794 * dwarf2read.c (using_directives, read_func_scope)
1795 (read_lexical_block_scope): Update.
1796 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1797 * buildsym.h (local_using_directives, global_using_directives):
1799 (get_local_using_directives, set_local_using_directives)
1800 (get_global_using_directives): Declare.
1801 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1802 m_global_using_directives>: New members.
1803 (finish_block_internal, prepare_for_building)
1804 (reset_symtab_globals, end_symtab_get_static_block)
1805 (push_context): Update.
1806 (get_local_using_directives, set_local_using_directives)
1807 (get_global_using_directives): New functions.
1808 (buildsym_init): Update.
1810 2018-07-16 Tom Tromey <tom@tromey.com>
1812 * xcoffread.c (xcoff_initial_scan): Don't call
1813 free_pending_blocks.
1814 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1815 * buildsym.h (class scoped_free_pendings): Add constructor.
1816 (free_pending_blocks): Don't declare.
1817 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1818 (free_pending_blocks): Now static.
1820 2018-07-16 Tom Tromey <tom@tromey.com>
1822 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1823 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1825 (struct subfile_stack): Remove.
1826 (subfile_stack): Remove.
1827 (push_subfile, pop_subfile, buildsym_init): Update.
1829 2018-07-16 Tom Tromey <tom@tromey.com>
1831 * buildsym.c (push_subfile): Use gdb_assert.
1832 (pop_subfile): Use gdb_assert.
1834 2018-07-16 Tom Tromey <tom@tromey.com>
1836 * buildsym.h (merge_symbol_lists): Remove.
1837 * buildsym.c (merge_symbol_lists): Remove.
1839 2018-07-16 Tom Tromey <tom@tromey.com>
1841 * stabsread.c (scan_file_globals): Update comment.
1842 * stabsread.h (scan_file_globals): Move from buildsym.h.
1843 * buildsym.h (scan_file_globals): Move to stabsread.h.
1845 2018-07-16 Tom Tromey <tom@tromey.com>
1847 * xcoffread.c (xcoff_new_init): Update.
1848 * mipsread.c (mipscoff_new_init): Update.
1849 * mdebugread.c (mdebug_build_psymtabs): Update.
1850 * elfread.c (elf_new_init): Update.
1851 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1852 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1853 * buildsym.h (buildsym_new_init): Don't declare.
1854 * buildsym.c (buildsym_new_init): Remove.
1856 2018-07-16 Tom Tromey <tom@tromey.com>
1858 * stabsread.h (within_function): Move from buildsym.h.
1859 * stabsread.c (start_stabs): Clear within_function.
1860 * coffread.c (coff_start_symtab): Clear within_function.
1861 * buildsym.h (within_function): Move to stabsread.h.
1862 * buildsym.c (prepare_for_building): Update.
1864 2018-07-16 Tom Tromey <tom@tromey.com>
1866 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1867 * dwarf2read.c (dwarf2_start_symtab): Don't set
1868 processing_gcc_compilation.
1869 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1871 2018-07-16 Tom Tromey <tom@tromey.com>
1873 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1874 (next_symbol_text_func): Move from buildsym.h.
1875 * stabsread.c (hashname): Move from buildsym.c.
1876 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1877 (next_symbol_text_func, hashname): Move to stabsread.h.
1878 * buildsym.c: Don't include bcache.h
1879 (hashname): Move to stasbread.c.
1881 2018-07-16 Tom Tromey <tom@tromey.com>
1883 * buildsym.h (context_stack_size): Don't declare.
1884 * buildsym.c (context_stack_size): New global.
1886 2018-07-16 Tom Tromey <tom@tromey.com>
1888 * dbxread.c (processing_acc_compilation): New global.
1889 * buildsym.h (processing_acc_compilation): Don't declare.
1891 2018-07-16 Tom Tromey <tom@tromey.com>
1893 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1894 * dbxread.c (read_ofile_symtab): Update.
1895 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1896 * buildsym.h (last_source_start_addr): Remove.
1897 (set_last_source_start_addr, get_last_source_start_addr):
1899 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1901 (struct buildsym_compunit) <m_last_source_start_addr>: New
1903 (prepare_for_building): Remove start_addr parameter.
1904 (start_symtab, restart_symtab, end_symtab_get_static_block)
1905 (end_symtab_with_blockvector): Update.
1906 (set_last_source_start_addr, get_last_source_start_addr): New
1909 2018-07-16 Tom Tromey <tom@tromey.com>
1911 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1913 (have_line_numbers): Remove.
1914 (record_line, prepare_for_building, end_symtab_get_static_block)
1915 (augment_type_symtab): Update.
1917 2018-07-16 Tom Tromey <tom@tromey.com>
1919 * buildsym.c (~buildsym_compunit): Free the macro table.
1920 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1922 <m_pending_macros>: New member.
1923 (pending_macros): Remove.
1924 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1925 (reset_symtab_globals, end_symtab_get_static_block)
1926 (end_symtab_with_blockvector, augment_type_symtab)
1927 (buildsym_init): Update.
1929 2018-07-16 Tom Tromey <tom@tromey.com>
1931 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1933 (buildsym_compunit::set_last_source_file): New method.
1934 <m_last_source_file>: New member.
1935 (prepare_for_building): Remove "name" parameter.
1936 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1937 (last_source_file): Remove.
1938 (set_last_source_file, get_last_source_file): Update.
1940 2018-07-16 Tom Tromey <tom@tromey.com>
1942 * buildsym.c (prepare_for_building): Add assert.
1944 2018-07-16 Tom Tromey <tom@tromey.com>
1946 * buildsym.c (~buildsym_compunit): Update.
1947 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1948 (start_subfile, patch_subfile_names)
1949 (end_symtab_with_blockvector): Update.
1951 2018-07-16 Tom Tromey <tom@tromey.com>
1953 * buildsym.c (struct buildsym_compunit): Add constructor,
1954 destructor, initializers.
1955 (start_buildsym_compunit): Remove.
1956 (free_buildsym_compunit): Use "delete".
1957 (start_symtab, restart_symtab): Use "new".
1959 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1961 * symfile.c (set_objfile_default_section_offset): Remove struct
1964 2018-07-14 Stafford Horne <shorne@gmail.com>
1966 * (Responsible Maintainers): Add myself as or1k maintainer.
1968 2018-07-13 Tom Tromey <tom@tromey.com>
1970 * symfile.c (set_objfile_default_section_offset): Use extra braces
1973 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1975 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1978 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1980 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1981 unittests/cli-utils-selftests.c
1982 * unittests/cli-utils-selftests.c: New file.
1984 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1986 * NEWS: Mention new commands. Mention change to 'thread apply'.
1988 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1990 * thread.c (thr_try_catch_cmd): New function.
1991 (thread_apply_all_command): Handle qcs flags.
1992 (thread_apply_command): Handle qcs flags.
1993 (taas_command): New function.
1994 (tfaas_command): New function.
1995 (_initialize_thread): Update to setup the new commands 'taas
1996 and 'tfaas'. Change doc string for 'thread apply'.
1998 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2000 * stack.c: (trailing_outermost_frame): New function, mostly
2001 extracted from backtrace_command_1.
2002 (leading_innermost_frame): New function.
2003 (backtrace_command_1): Update to call trailing_outermost_frame.
2004 (frame_apply_command_count): New function.
2005 (frame_apply_level_command): New function.
2006 (frame_apply_all_command): New function.
2007 (frame_apply_command): New function.
2008 (faas_command): New function.
2009 (frame_cmd_list): New variable.
2010 (_initialize_stack): Update to setup the new commands 'frame apply'
2013 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2015 * cli-utils.c (number_or_range_parser::get_number): Only handle
2016 numbers or convenience var as numbers.
2017 (parse_flags): New function.
2018 (parse_flags_qcs): New function.
2019 (number_or_range_parser::finished): Ensure parsing end is detected
2020 before end of string.
2021 * cli-utils.h (parse_flags): New function.
2022 (parse_flags_qcs): New function.
2023 (number_or_range_parser): Remove m_finished bool.
2024 (number_or_range_parser::skip_range): Set m_in_range to false.
2026 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2028 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2031 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2032 Jan Kratochvil <jan.kratochvil@redhat.com>
2033 Paul Fertser <fercerpav@gmail.com>
2034 Tsutomu Seki <sekiriki@gmail.com>
2035 Pedro Alves <palves@redhat.com>
2037 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2038 'unittests/parse-connection-spec-selftests.c'.
2039 (COMMON_SFILES): Add 'common/netstuff.c'.
2040 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2041 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2042 * common/netstuff.c: New file.
2043 * common/netstuff.h: New file.
2044 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2045 (wait_for_connect): Update comment. New parameter
2046 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2047 Use 'sock' directly instead of 'scb->fd'.
2048 (try_connect): New function, with code from 'net_open'.
2049 (net_open): Rewrite main loop to deal with multiple
2050 sockets/addresses. Handle IPv6-style hostnames; implement
2051 support for IPv6 connections.
2052 * unittests/parse-connection-spec-selftests.c: New file.
2054 2018-07-11 Pedro Alves <palves@redhat.com>
2057 * remote.c (remote_target::remote_detach_pid): Call
2058 set_current_process.
2060 2018-07-11 Pedro Alves <palves@redhat.com>
2062 * h8300-tdep.c (h8300_gdbarch_init): Remove
2063 set_gdbarch_ecoff_reg_to_regnum calls.
2065 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2068 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2069 offsets/sizes for static members of a class/struct.
2071 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2073 * target-descriptions.c (tdesc_register_bitsize): Rename.
2074 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2075 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2076 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2078 2018-07-10 Tom Tromey <tom@tromey.com>
2080 * breakpoint.c (moribund_locations): Now static and a
2082 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2083 (build_bpstat_chain, update_global_location_list)
2084 (breakpoint_retire_moribund): Update.
2085 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2088 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2090 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2091 (riscv_register_reggroup_p): Use new function, remove unneeded
2093 (riscv_push_dummy_call): Extend assert to compare against xlen or
2094 flen based on register type.
2096 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2098 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2100 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2102 * remote.c (show_hardware_watchpoint_limit): New function.
2103 (show_hardware_watchpoint_length_limit): New function.
2104 (show_hardware_breakpoint_limit): New function.
2105 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2106 where appropriate, update help text.
2108 2018-07-09 Tom Tromey <tom@tromey.com>
2110 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2111 (CLIBS): Don't mention NAT_CLIBS.
2113 2018-07-09 Tom Tromey <tom@tromey.com>
2115 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2116 (LIBGDB_OBS, clean mostlyclean): Update.
2117 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2119 2018-07-09 Tom Tromey <tom@tromey.com>
2121 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2122 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2123 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2125 2018-07-09 Tom Tromey <tom@tromey.com>
2127 * Makefile.in (ALLDEPFILES): Remove exec.c.
2128 (COMMON_OBS): Remove exec.o.
2129 (COMMON_SFILES): Add exec.c.
2131 2018-07-09 Tom Tromey <tom@tromey.com>
2133 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2135 2018-07-09 Tom Tromey <tom@tromey.com>
2137 * Makefile.in (clean mostlyclean): Remove stamp-version.
2138 (version.c): Depend on stamp-version.
2139 (stamp-version): New rule, from version.c rule.
2141 2018-07-09 Tom Tromey <tom@tromey.com>
2143 * Makefile.in (init.c): Depend on stamp-init.
2144 (stamp-init): New rule, from init.c rule.
2145 (clean mostlyclean): Remove stamp-init.
2147 2018-07-09 Tom Tromey <tom@tromey.com>
2149 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2150 SUBDIR_GCC_COMPILE_SRCS.
2152 2018-07-09 Tom Tromey <tom@tromey.com>
2154 * Makefile.in (init.c): Remove some unused sed rules.
2156 2018-07-09 Tom Tromey <tom@tromey.com>
2158 * Makefile.in (TSOBS): Remove.
2159 (INIT_FILES): Update.
2160 (LIBGDB_OBS): Update.
2161 (COMMON_SFILES): Add inflow.c.
2162 (SFILES): Remove inflow.c.
2164 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2166 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2168 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2170 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2171 get_saveloc_name, is_signal_frame_name, step_name,
2172 init_remote_name, create_addr_space_name,
2173 destroy_addr_space_name, search_unwind_table_name,
2174 find_dyn_list_name): Constify.
2176 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2178 * darwin-nat.c (darwin_pthread_kill): New function.
2179 (darwin_resume_thread): Use darwin_pthread_kill.
2181 2018-07-05 Tom de Vries <tdevries@suse.de>
2183 * macroexp.c (macro_buffer) <operator=>: New member function.
2185 2018-07-04 Tom Tromey <tom@tromey.com>
2187 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2189 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2191 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2192 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2193 * maint.c: Likewise.
2196 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2198 * NEWS: Create a new section for the next release branch.
2199 Rename the section of the current branch, now that it has
2202 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2204 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2205 * version.in: Bump version to 8.2.50.DATE-git.
2207 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2208 Pedro Alves <palves@redhat.com>
2210 * linux-nat.c (linux_init_ptrace): Rename to ...
2211 (linux_init_ptrace_procfs): ... this. Call
2212 linux_proc_init_warnings.
2213 (linux_nat_target::post_attach)
2214 (linux_nat_target::post_startup_inferior): Adjust.
2215 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2216 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2218 2018-07-04 Tom de Vries <tdevries@suse.de>
2220 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2222 (read_comp_unit_head): ... here.
2224 2018-07-03 Tom Tromey <tom@tromey.com>
2226 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2227 (stop_tracing, tstatus_command)
2228 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2229 (print_one_static_tracepoint_marker): Update.
2230 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2232 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2234 (all_tracepoints, static_tracepoints_here): Return std::vector.
2236 2018-07-03 Tom Tromey <tom@tromey.com>
2238 * common/ptid.c (ptid_equal): Remove.
2239 * common/ptid.h (ptid_equal): Don't declare.
2240 * ada-tasks.c: Update.
2241 * breakpoint.c: Update.
2242 * common/agent.c: Update.
2243 * corelow.c: Update.
2244 * darwin-nat-info.c: Update.
2245 * darwin-nat.c: Update.
2247 * dtrace-probe.c: Update.
2248 * dummy-frame.c: Update.
2249 * fbsd-nat.c: Update.
2251 * gdbthread.h: Update.
2252 * gnu-nat.c: Update.
2253 * go32-nat.c: Update.
2254 * inf-loop.c: Update.
2255 * inf-ptrace.c: Update.
2256 * infcall.c: Update.
2260 * linux-fork.c: Update.
2261 * linux-nat.c: Update.
2262 * linux-thread-db.c: Update.
2263 * mi/mi-cmd-var.c: Update.
2264 * mi/mi-interp.c: Update.
2265 * mi/mi-main.c: Update.
2266 * nto-procfs.c: Update.
2267 * ppc-linux-tdep.c: Update.
2269 * python/py-inferior.c: Update.
2270 * python/py-record-btrace.c: Update.
2271 * python/py-record.c: Update.
2272 * ravenscar-thread.c: Update.
2273 * regcache.c: Update.
2274 * remote-sim.c: Update.
2276 * sol-thread.c: Update.
2279 * tui/tui-stack.c: Update.
2281 * windows-nat.c: Update.
2282 * windows-tdep.c: Update.
2284 2018-07-03 Tom Tromey <tom@tromey.com>
2286 * common/ptid.c (ptid_match): Remove.
2287 * common/ptid.h (ptid_match): Don't declare.
2288 * fbsd-nat.c: Update.
2291 * linux-nat.c: Update.
2292 * record-btrace.c: Update.
2293 * regcache.c: Update.
2296 2018-07-03 Tom Tromey <tom@tromey.com>
2298 * common/ptid.c (ptid_tid_p): Remove.
2299 * common/ptid.h (ptid_tid_p): Don't declare.
2300 * sol-thread.c: Update.
2302 2018-07-03 Tom Tromey <tom@tromey.com>
2304 * common/ptid.c (ptid_lwp_p): Remove.
2305 * common/ptid.h (ptid_lwp_p): Don't declare.
2306 * fbsd-nat.c: Update.
2307 * linux-nat.c: Update.
2308 * nat/linux-procfs.c: Update.
2309 * nat/x86-linux-dregs.c: Update.
2310 * sol-thread.c: Update.
2312 2018-07-03 Tom Tromey <tom@tromey.com>
2314 * common/ptid.c (ptid_is_pid): Remove.
2315 * common/ptid.h (ptid_is_pid): Don't declare.
2317 * linux-nat.c: Update.
2318 * mi/mi-interp.c: Update.
2322 2018-07-03 Tom Tromey <tom@tromey.com>
2324 * common/ptid.c (ptid_get_tid): Remove.
2325 * common/ptid.h (ptid_get_tid): Don't declare.
2326 * ada-tasks.c: Update.
2327 * aix-thread.c: Update.
2328 * bsd-uthread.c: Update.
2329 * darwin-nat.c: Update.
2330 * fbsd-nat.c: Update.
2331 * i386-darwin-nat.c: Update.
2333 * linux-tdep.c: Update.
2334 * nto-procfs.c: Update.
2335 * ppc-ravenscar-thread.c: Update.
2336 * python/py-infthread.c: Update.
2337 * ravenscar-thread.c: Update.
2338 * sol-thread.c: Update.
2339 * sparc-ravenscar-thread.c: Update.
2340 * windows-nat.c: Update.
2342 2018-07-03 Tom Tromey <tom@tromey.com>
2344 * common/ptid.c (ptid_get_lwp): Remove.
2345 * common/ptid.h (ptid_get_lwp): Don't declare.
2346 * aarch64-linux-nat.c: Update.
2347 * ada-tasks.c: Update.
2348 * aix-thread.c: Update.
2349 * amd64-linux-nat.c: Update.
2350 * arm-linux-nat.c: Update.
2351 * corelow.c: Update.
2352 * fbsd-nat.c: Update.
2353 * fbsd-tdep.c: Update.
2354 * gnu-nat.c: Update.
2355 * i386-cygwin-tdep.c: Update.
2356 * i386-gnu-nat.c: Update.
2357 * i386-linux-nat.c: Update.
2358 * ia64-linux-nat.c: Update.
2359 * inf-ptrace.c: Update.
2361 * linux-fork.c: Update.
2362 * linux-nat.c: Update.
2363 * linux-tdep.c: Update.
2364 * linux-thread-db.c: Update.
2365 * mips-linux-nat.c: Update.
2366 * nat/aarch64-linux-hw-point.c: Update.
2367 * nat/aarch64-linux.c: Update.
2368 * nat/linux-btrace.c: Update.
2369 * nat/linux-osdata.c: Update.
2370 * nat/linux-procfs.c: Update.
2371 * nat/x86-linux-dregs.c: Update.
2372 * obsd-nat.c: Update.
2373 * ppc-fbsd-nat.c: Update.
2374 * ppc-linux-nat.c: Update.
2376 * python/py-infthread.c: Update.
2377 * ravenscar-thread.c: Update.
2379 * s390-linux-nat.c: Update.
2380 * sol-thread.c: Update.
2381 * sol2-tdep.c: Update.
2382 * spu-linux-nat.c: Update.
2383 * x86-linux-nat.c: Update.
2384 * xtensa-linux-nat.c: Update.
2386 2018-07-03 Tom Tromey <tom@tromey.com>
2388 * common/ptid.c (ptid_get_pid): Remove.
2389 * common/ptid.h (ptid_get_pid): Don't declare.
2390 * aarch64-linux-nat.c: Update.
2391 * ada-lang.c: Update.
2392 * aix-thread.c: Update.
2393 * alpha-bsd-nat.c: Update.
2394 * amd64-fbsd-nat.c: Update.
2395 * amd64-linux-nat.c: Update.
2396 * arm-linux-nat.c: Update.
2397 * arm-nbsd-nat.c: Update.
2399 * break-catch-syscall.c: Update.
2400 * breakpoint.c: Update.
2401 * bsd-uthread.c: Update.
2402 * corelow.c: Update.
2404 * darwin-nat.c: Update.
2405 * fbsd-nat.c: Update.
2406 * fbsd-tdep.c: Update.
2408 * gnu-nat.c: Update.
2409 * hppa-nbsd-nat.c: Update.
2410 * hppa-obsd-nat.c: Update.
2411 * i386-fbsd-nat.c: Update.
2412 * ia64-linux-nat.c: Update.
2413 * inf-ptrace.c: Update.
2415 * inferior.c: Update.
2416 * inferior.h: Update.
2419 * linux-fork.c: Update.
2420 * linux-nat.c: Update.
2421 * linux-tdep.c: Update.
2422 * linux-thread-db.c: Update.
2423 * m68k-bsd-nat.c: Update.
2424 * mi/mi-interp.c: Update.
2425 * mi/mi-main.c: Update.
2426 * mips-linux-nat.c: Update.
2427 * mips-nbsd-nat.c: Update.
2428 * mips64-obsd-nat.c: Update.
2429 * nat/aarch64-linux-hw-point.c: Update.
2430 * nat/aarch64-linux.c: Update.
2431 * nat/linux-btrace.c: Update.
2432 * nat/linux-osdata.c: Update.
2433 * nat/linux-procfs.c: Update.
2434 * nat/x86-linux-dregs.c: Update.
2435 * nto-procfs.c: Update.
2436 * obsd-nat.c: Update.
2437 * ppc-linux-nat.c: Update.
2438 * ppc-nbsd-nat.c: Update.
2439 * ppc-obsd-nat.c: Update.
2440 * proc-service.c: Update.
2442 * python/py-inferior.c: Update.
2443 * python/py-infthread.c: Update.
2444 * ravenscar-thread.c: Update.
2446 * remote-sim.c: Update.
2448 * rs6000-nat.c: Update.
2449 * s390-linux-nat.c: Update.
2450 * sh-nbsd-nat.c: Update.
2451 * sol-thread.c: Update.
2452 * sparc-nat.c: Update.
2453 * sparc64-tdep.c: Update.
2454 * spu-linux-nat.c: Update.
2455 * spu-tdep.c: Update.
2456 * target-debug.h: Update.
2459 * tid-parse.c: Update.
2460 * tracefile-tfile.c: Update.
2461 * vax-bsd-nat.c: Update.
2462 * windows-nat.c: Update.
2463 * x86-linux-nat.c: Update.
2464 * x86-nat.c: Update.
2466 2018-07-03 Tom Tromey <tom@tromey.com>
2468 * common/ptid.c (pid_to_ptid): Remove.
2469 * common/ptid.h (pid_to_ptid): Don't declare.
2470 * aix-thread.c: Update.
2471 * arm-linux-nat.c: Update.
2472 * common/ptid.c: Update.
2473 * common/ptid.h: Update.
2474 * corelow.c: Update.
2476 * darwin-nat.c: Update.
2477 * fbsd-nat.c: Update.
2478 * fork-child.c: Update.
2479 * gnu-nat.c: Update.
2480 * go32-nat.c: Update.
2481 * inf-ptrace.c: Update.
2483 * inferior.c: Update.
2485 * linux-fork.c: Update.
2486 * linux-nat.c: Update.
2487 * nat/aarch64-linux-hw-point.c: Update.
2488 * nat/fork-inferior.c: Update.
2489 * nat/x86-linux-dregs.c: Update.
2490 * nto-procfs.c: Update.
2491 * obsd-nat.c: Update.
2493 * progspace.c: Update.
2495 * rs6000-nat.c: Update.
2496 * s390-linux-nat.c: Update.
2497 * sol-thread.c: Update.
2498 * spu-linux-nat.c: Update.
2501 * tracefile-tfile.c: Update.
2502 * windows-nat.c: Update.
2504 2018-07-03 Tom Tromey <tom@tromey.com>
2506 * common/ptid.h (ptid_build): Don't declare.
2507 * common/ptid.c (ptid_build): Remove.
2508 * aix-thread.c: Update.
2509 * bsd-kvm.c: Update.
2510 * bsd-uthread.c: Update.
2511 * common/agent.c: Update.
2512 * common/ptid.c: Update.
2513 * common/ptid.h: Update.
2514 * corelow.c: Update.
2515 * darwin-nat.c: Update.
2516 * fbsd-nat.c: Update.
2517 * gnu-nat.c: Update.
2518 * linux-fork.c: Update.
2519 * linux-nat.c: Update.
2520 * linux-thread-db.c: Update.
2521 * nat/linux-osdata.c: Update.
2522 * nat/linux-procfs.c: Update.
2523 * nto-procfs.c: Update.
2524 * obsd-nat.c: Update.
2525 * proc-service.c: Update.
2527 * ravenscar-thread.c: Update.
2528 * remote-sim.c: Update.
2530 * sol-thread.c: Update.
2532 * windows-nat.c: Update.
2534 2018-07-03 Tom Tromey <tom@tromey.com>
2536 * infrun.c (follow_exec): Use exit_inferior_silent.
2537 * inferior.c (exit_inferior_num_silent): Remove.
2538 * inferior.h (exit_inferior_num_silent): Don't declare.
2540 2018-07-03 Tom Tromey <tom@tromey.com>
2543 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2544 inferior_ptid on error.
2546 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2547 Simon Marchi <simon.marchi@polymtl.ca>
2550 * disasm.h (gdb_disassembler): Add
2551 `m_disassembler_options_holder'. member
2552 * disasm.c (get_all_disassembler_options): New function.
2553 (gdb_disassembler::gdb_disassembler): Use it.
2554 (gdb_buffered_insn_length_init_dis): Likewise.
2555 (gdb_buffered_insn_length): Adjust accordingly.
2556 (set_disassembler_options): Handle options with arguments.
2557 (show_disassembler_options_sfunc): Likewise. Add a leading new
2558 line if showing options with descriptions.
2559 (disassembler_options_completer): Adapt to using the
2560 `disasm_options_and_args_t' structure.
2561 * mips-tdep.c (mips_disassembler_options): New variable.
2562 (mips_disassembler_options_o32): Likewise.
2563 (mips_disassembler_options_n32): Likewise.
2564 (mips_disassembler_options_n64): Likewise.
2565 (gdb_print_insn_mips): Don't set `disassembler_options'.
2566 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2568 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2569 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2570 `gdbarch_disassembler_options_implicit' and
2571 `gdbarch_valid_disassembler_options'.
2572 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2573 `disasm_options_and_args_t' structure.
2574 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2576 (valid_disassembler_options): Switch from `disasm_options_t' to
2577 the `disasm_options_and_args_t' structure.
2578 * NEWS: Document `set disassembler-options' support for the MIPS
2580 * gdbarch.h: Regenerate.
2581 * gdbarch.c: Regenerate.
2583 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2585 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2587 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2589 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2590 parameter in call to amd64_target_description.
2591 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2592 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2593 (amd64fbsd_init_abi): Likewise.
2594 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2595 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2596 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2597 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2599 2018-06-29 Pedro Alves <palves@redhat.com>
2601 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2602 "segments" parameter.
2603 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2604 (_initialize_amd64_tdep): Update call to
2605 amd64_create_target_description.
2606 (amd64_target_description): Add "segments" parameter. Adjust
2607 the implementation to use it.
2608 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2609 call to amd64_create_target_description.
2610 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2611 * gdb/arch/amd64.h (amd64_create_target_description): Add
2612 "segments" register.
2613 * gdb/arch/amd64.c (amd64_create_target_description): Add
2614 "segments" parameter. Call create_feature_i386_64bit_segments
2615 only if SEGMENTS is true.
2616 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2617 call to amd64_create_target_description.
2619 2018-06-29 Pedro Alves <palves@redhat.com>
2621 * thread.c (thread_target_id_str): New, factored out from ...
2622 (print_thread_info_1): ... here. Use it to compute the max
2623 "Target Id" column width.
2625 2018-06-29 Pedro Alves <palves@redhat.com>
2627 * remote.c (remote_target::extra_thread_info): Delete
2628 'display_buf' and 'n' locals. from the cache, regardless of
2629 packet mechanims is in use. Use cache for qThreadExtra and qP
2632 2018-06-29 Pedro Alves <palves@redhat.com>
2634 * blockframe.c (find_pc_sect_containing_function): New function.
2635 * breakpoint.c (print_breakpoint_location): Don't call
2636 find_pc_sect_function.
2637 * linespec.c (create_sals_line_offset): Record the location's
2639 * linespec.c (convert_address_location_to_sals): Fill in sal's
2640 symbol with find_pc_sect_containing_function.
2641 * symtab.c (find_function_start_sal): Rename to ...
2642 (find_function_start_sal_1): ... this.
2643 (find_function_start_sal): Reimplement as wrapper around
2644 find_function_start_sal_1, and use
2645 find_pc_sect_containing_function to fill in the sal's symbol.
2646 (find_function_start_sal(symbol*, bool)): Adjust.
2647 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2649 (find_pc_sect_containing_function): Declare.
2651 2018-06-29 Pedro Alves <palves@redhat.com>
2653 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2654 true if the the location has no symbol.
2656 2018-06-28 Tom Tromey <tom@tromey.com>
2658 * NEWS: Mention --enable-codesign.
2659 * silent-rules.mk (ECHO_SIGN): New variable.
2660 * configure.ac: Add --enable-codesign.
2661 * configure: Rebuild.
2662 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2663 (gdb$(EXEEXT)): Optionally invoke codesign.
2665 2018-06-28 Pedro Alves <palves@redhat.com>
2667 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2669 (switch_to_thread_no_regs): Adjust comment.
2670 * infcmd.c (stop_pc): Delete.
2671 (post_create_inferior, info_program_command): Replace references
2672 to stop_pc with references to thread_info->suspend.stop_pc.
2673 * inferior.h (stop_pc): Delete declaration.
2674 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2675 (handle_inferior_event_1, handle_signal_stop)
2676 (process_event_stop_test, keep_going_stepped_thread)
2677 (handle_step_into_function, handle_step_into_function_backward)
2678 (print_stop_location): Replace references to stop_pc with
2679 references to thread_info->suspend.stop_pc.
2680 (struct infcall_suspend_state) <stop_pc>: Delete field.
2681 (save_infcall_suspend_state, restore_infcall_suspend_state):
2682 Remove references to inf_stat->stop_pc.
2683 * linux-fork.c (fork_load_infrun_state): Likewise.
2684 * record-btrace.c (record_btrace_set_replay): Likewise.
2685 * record-full.c (record_full_goto_entry): Likewise.
2686 * remote.c (print_one_stopped_thread): Likewise.
2687 * target.c (target_resume): Extend comment.
2688 * thread.c (set_executing_thread): New.
2689 (set_executing): Use it.
2690 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2691 Remove references to stop_pc.
2693 2018-06-28 Pedro Alves <palves@redhat.com>
2695 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2696 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2698 2018-06-28 Tom Tromey <tom@tromey.com>
2700 * coffread.c (coff_symfile_finish): Update.
2701 * xcoffread.c (xcoff_symfile_finish): Update.
2702 * elfread.c (elf_symfile_finish): Update.
2703 * symfile.h (dwarf2_free_objfile): Don't declare.
2704 * dwarf2read.c (_initialize_dwarf2_read): Use
2705 register_objfile_data_with_cleanup.
2706 (dwarf2_free_objfile): Now static. Change signature.
2708 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2710 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2711 option "-o" to add-symbol-file-load to add an offset to each
2712 section's load address.
2713 * symfile.c (set_objfile_default_section_offset): New function.
2715 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2717 * symfile.c (add_symbol_file_command): Make sure that sections
2718 with the same name are sorted in the same order.
2720 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2722 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2723 require the second argument. If omitted, load sections at the
2724 addresses specified in the file.
2726 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2728 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2729 (_initialize_symfile): Add option "-o" to symbol-file to add an
2730 offset to each section of the symbol file.
2732 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2734 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2736 2018-06-27 Tom Tromey <tom@tromey.com>
2738 * stack.c (_initialize_stack): Update "func" help text.
2740 2018-06-27 Tom Tromey <tom@tromey.com>
2742 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2744 (unwind_infopy_str, pyuw_create_unwind_info)
2745 (unwind_infopy_add_saved_register, pyuw_sniffer)
2746 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2748 (struct saved_reg): Add constructor.
2749 <value>: Now a gdbpy_ref<>.
2751 2018-06-27 Tom Tromey <tom@tromey.com>
2753 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2755 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2757 * gdb-gdb.py.in: Format using autopep8.
2759 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2761 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2762 (type_lookup_function): Recognize CORE_ADDR values.
2764 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2766 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2769 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2771 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2774 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2776 * gdb-gdb.py: Move to...
2777 * gdb-gdb.py.in: ... here.
2778 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2779 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2781 (distclean): Remove gdb-gdb.py when cleaning.
2782 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2783 * configure: Re-generate.
2785 2018-06-27 Pedro Alves <palves@redhat.com>
2787 * proc-service.c (get_ps_regcache): New.
2788 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2789 (ps_lsetfpregs): Use it.
2791 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2794 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2795 (dwarf_decode_lines_1): Adjust.
2797 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2799 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2801 <info_proc>: Likewise.
2803 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2805 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2806 to windows_fetch_one_register, and only handle the case of
2807 fetching one register. Move the code that reloads the context
2808 and iterates over all registers if R is negative to...
2809 (windows_nat_target::fetch_registers): ... here.
2810 (do_windows_store_inferior_registers): Rename to
2811 windows_store_one_register, and only handle the case of storing
2812 one register. Move the code that handles the case where r is
2814 (windows_nat_target::store_registers) ... here.
2816 2018-06-26 Tom Tromey <tom@tromey.com>
2819 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2820 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2822 (rust_internal_print_type): Add podata parameter.
2823 (rust_print_type): Update.
2825 2018-06-26 Tom Tromey <tom@tromey.com>
2827 * typeprint.h (struct print_offset_data) <update, finish,
2828 maybe_print_hole>: New methods.
2829 <indentation>: New constant.
2830 * typeprint.c (print_offset_data::indentation): Define.
2831 (print_offset_data::maybe_print_hole, print_offset_data::update)
2832 (print_offset_data::finish): Move from c-typeprint.c and rename.
2833 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2834 (print_spaces_filtered_with_print_options): Update.
2835 (c_print_type_union_field_offset, maybe_print_hole)
2836 (c_print_type_struct_field_offset): Move to typeprint.c and
2838 (c_type_print_base_struct_union): Update.
2840 2018-06-25 Pedro Alves <palves@redhat.com>
2842 * gdbthread.h (thread_info_ref, delete_thread)
2843 (delete_thread_silent, first_thread_of_inferior)
2844 (any_thread_of_inferior, switch_to_thread)
2845 (enable_thread_stack_temporaries)
2846 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2847 (get_last_thread_stack_temporary)
2848 (value_in_thread_stack_temporaries, can_access_registers_thread):
2849 Spell out "struct thread_info" instead of just "thread_info".
2850 * inferior.h (notice_new_inferior): Likewise.
2852 2018-06-25 Pedro Alves <palves@redhat.com>
2854 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2855 pass thread_info pointer to delete_thread.
2856 (windows_nat_target::detach): Pass inferior pointer to
2858 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2860 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2861 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2862 and pass a thread_info pointer to delete_thread.
2863 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2864 pass thread_info pointer to delete_thread.
2865 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2866 delete_thread_silent call.
2867 * procfs.c (procfs_target::detach): Pass inferior pointer to
2869 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2870 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2871 delete_thread_silent call.
2872 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2873 pass thread_info pointer to delete_thread.
2874 (windows_nat_target::detach): Pass inferior pointer to
2877 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2879 * regcache.c (readable_regcache::read_part): Fix asserts.
2880 (reg_buffer::raw_collect_part): New function.
2881 (regcache::write_part): Fix asserts.
2882 (reg_buffer::raw_supply_part): New function.
2883 (regcache::transfer_regset_register): New helper function.
2884 (regcache::transfer_regset): Call new functions.
2885 (regcache_supply_regset): Use gdb_byte*.
2886 (regcache::supply_regset): Likewise.
2887 (regcache_collect_regset): Likewise.
2888 (regcache::collect_regset): Likewise.
2889 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2890 (reg_buffer::raw_supply_part): Likewise.
2891 (regcache::transfer_regset_register): Likewise.
2892 (regcache::transfer_regset): Use gdb_byte*.
2894 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2896 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2898 2018-06-21 Pedro Alves <palves@redhat.com>
2900 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2901 instead of a ptid_t. All callers adjusted.
2902 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2904 (print_ada_task_info, display_current_task_id, task_command_1):
2906 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2908 (breakpoint_kind): Adjust.
2909 (remove_breakpoints_pid): Rename to ...
2910 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2911 pointer. All callers adjusted.
2912 (bpstat_clear_actions): Use inferior_thread.
2913 (get_bpstat_thread): New.
2914 (bpstat_do_actions): Use it.
2915 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2916 to take a thread_info pointer. All callers adjusted.
2917 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2918 (breakpoint_re_set_thread): Use inferior_thread.
2919 * breakpoint.h (struct inferior): Forward declare.
2920 (bpstat_stop_status): Update.
2921 (remove_breakpoints_pid): Delete.
2922 (remove_breakpoints_inf): New.
2923 * bsd-uthread.c (bsd_uthread_target::wait)
2924 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2925 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2926 (maint_btrace_packet_history_cmd)
2927 (maint_btrace_clear_packet_history_cmd): Adjust.
2928 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2930 * cli/cli-interp.c: Include "inferior.h".
2931 * common/refcounted-object.h (struct
2932 refcounted_object_ref_policy): New.
2933 * compile/compile-object-load.c: Include gdbthread.h.
2934 (store_regs): Use inferior_thread.
2935 * corelow.c (core_target::close): Use current_inferior.
2936 (core_target_open): Adjust to use first_thread_of_inferior and use
2937 the current inferior.
2938 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2939 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2940 <thread>: ... this new field. All references adjusted.
2941 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2942 Take a thread_info pointer instead of a ptid_t.
2943 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2944 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2945 thread_info pointer instead of a ptid_t.
2946 * elfread.c: Include "inferior.h".
2947 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2948 Use inferior_thread.
2949 * eval.c (evaluate_subexp): Likewise.
2950 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2952 * gdb_proc_service.h (struct thread_info): Forward declare.
2953 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2954 <thread>: ... this new field. All references adjusted.
2955 * gdbarch.h, gdbarch.c: Regenerate.
2956 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2957 'thread' parameter. All implementations and callers adjusted.
2958 * gdbthread.h (thread_info) <set_running>: New method.
2959 (delete_thread, delete_thread_silent): Take a thread_info pointer
2961 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2962 (first_thread_of_process): Delete, replaced by ...
2963 (first_thread_of_inferior): ... this new function. All callers
2965 (any_live_thread_of_process): Delete, replaced by ...
2966 (any_live_thread_of_inferior): ... this new function. All callers
2968 (switch_to_thread, switch_to_no_thread): Declare.
2969 (is_executing): Delete.
2970 (enable_thread_stack_temporaries): Update comment.
2971 <enable_thread_stack_temporaries>: Take a thread_info pointer
2972 instead of a ptid_t. Incref the thread.
2973 <~enable_thread_stack_temporaries>: Decref the thread.
2976 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2977 (get_last_thread_stack_temporary)
2978 (value_in_thread_stack_temporaries, can_access_registers_thread):
2979 Take a thread_info pointer instead of a ptid_t. All callers
2981 * infcall.c (get_call_return_value): Use inferior_thread.
2982 (run_inferior_call): Work with thread pointers instead of ptid_t.
2983 (call_function_by_hand_dummy): Work with thread pointers instead
2984 of ptid_t. Use thread_info_ref.
2985 * infcmd.c (proceed_thread_callback): Access thread's state
2987 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2988 access thread's state directly.
2989 (continue_command): Use inferior_thread.
2990 (info_program_command): Use find_thread_ptid and access thread
2992 (proceed_after_attach_callback): Use thread state directly.
2993 (notice_new_inferior): Take a thread_info pointer instead of a
2994 ptid_t. All callers adjusted.
2995 (exit_inferior): Take an inferior pointer instead of a pid. All
2997 (exit_inferior_silent): New.
2998 (detach_inferior): Delete.
2999 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3000 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3001 (detach_inferior_command, kill_inferior_command): Use
3002 find_inferior_id instead of valid_gdb_inferior_id and
3003 gdb_inferior_id_to_pid.
3004 (inferior_command): Use inferior and thread pointers.
3005 * inferior.h (struct thread_info): Forward declare.
3006 (notice_new_inferior): Take a thread_info pointer instead of a
3007 ptid_t. All callers adjusted.
3008 (detach_inferior): Delete declaration.
3009 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3010 instead of a pid. All callers adjusted.
3011 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3012 (valid_gdb_inferior_id): Delete.
3013 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3014 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3015 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3017 <inf>: ... this new field.
3018 <step_ptid>: Delete, replaced by ...
3019 <step_thread>: ... this new field.
3020 (get_displaced_stepping_state): Take an inferior pointer instead
3021 of a pid. All callers adjusted.
3022 (displaced_step_in_progress_any_inferior): Adjust.
3023 (displaced_step_in_progress_thread): Take a thread pointer instead
3024 of a ptid_t. All callers adjusted.
3025 (displaced_step_in_progress, add_displaced_stepping_state): Take
3026 an inferior pointer instead of a pid. All callers adjusted.
3027 (get_displaced_step_closure_by_addr): Adjust.
3028 (remove_displaced_stepping_state): Take an inferior pointer
3029 instead of a pid. All callers adjusted.
3030 (displaced_step_prepare_throw, displaced_step_prepare)
3031 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3032 All callers adjusted.
3033 (start_step_over): Adjust.
3034 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3035 displaced step queue.
3036 (do_target_resume): Adjust.
3037 (fetch_inferior_event): Use inferior_thread.
3038 (context_switch, get_inferior_stop_soon): Take an
3039 execution_control_state pointer instead of a ptid_t. All callers
3041 (switch_to_thread_cleanup): Delete.
3042 (stop_all_threads): Use scoped_restore_current_thread.
3043 * inline-frame.c: Include "gdbthread.h".
3044 (inline_state) <inline_state>: Take a thread pointer instead of a
3045 ptid_t. All callers adjusted.
3046 <ptid>: Delete, replaced by ...
3047 <thread>: ... this new field.
3048 (find_inline_frame_state): Take a thread pointer instead of a
3049 ptid_t. All callers adjusted.
3050 (skip_inline_frames, step_into_inline_frame)
3051 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3052 pointer instead of a ptid_t. All callers adjusted.
3053 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3054 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3055 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3057 * linux-nat.c (get_detach_signal): Likewise.
3058 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3059 (thread_db_notice_clone): Adjust.
3060 (thread_db_find_new_threads_silently)
3061 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3062 a thread pointer instead of a ptid_t. All callers adjusted.
3063 * mi/mi-cmd-var.c: Include "inferior.h".
3064 (mi_cmd_var_update_iter): Update to use thread pointers.
3065 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3067 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3069 (mi_output_running): ... this new function.
3070 (mi_on_resume_1): Adjust to use it.
3071 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3072 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3074 (interrupt_thread_callback): : Adjust to use thread and inferior
3076 * proc-service.c: Include "gdbthread.h".
3077 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3078 * progspace-and-thread.c: Include "inferior.h".
3079 * progspace.c: Include "inferior.h".
3080 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3081 hold a reference to an inferior_object.
3082 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3084 * python/py-inferior.c (struct inferior_object): Give the type a
3085 tag name instead of a typedef.
3086 (python_on_normal_stop): No need to check if the current thread is
3088 (inferior_to_inferior_object): Change return type to
3089 inferior_object. All callers adjusted.
3090 (find_thread_object): Delete, bits factored out to ...
3091 (thread_to_thread_object): ... this new function.
3092 * python/py-infthread.c (create_thread_object): Use
3093 inferior_to_inferior_object.
3094 (thpy_is_stopped): Use thread pointer directly.
3095 (gdbpy_selected_thread): Use inferior_thread.
3096 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3097 field, replaced with ...
3098 <thread>: ... this new field. All users adjusted.
3099 (btpy_insn_or_gap_new): Drop const.
3100 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3102 * python/py-record.c: Include "gdbthread.h".
3103 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3104 a ptid_t. All callers adjusted.
3105 (gdbpy_current_recording): Use inferior_thread.
3106 * python/py-record.h (recpy_record_object) <ptid>: Delete
3107 field, replaced with ...
3108 <thread>: ... this new field. All users adjusted.
3109 (recpy_element_object) <ptid>: Delete
3110 field, replaced with ...
3111 <thread>: ... this new field. All users adjusted.
3112 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3113 a ptid_t. All callers adjusted.
3114 * python/py-threadevent.c: Include "gdbthread.h".
3115 (get_event_thread): Use thread_to_thread_object.
3116 * python/python-internal.h (struct inferior_object): Forward
3118 (find_thread_object, find_inferior_object): Delete declarations.
3119 (thread_to_thread_object, inferior_to_inferior_object): New
3121 * record-btrace.c: Include "inferior.h".
3122 (require_btrace_thread): Use inferior_thread.
3123 (record_btrace_frame_sniffer)
3124 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3125 (get_thread_current_frame): Use scoped_restore_current_thread and
3127 (get_thread_current_frame): Use thread pointer directly.
3128 (record_btrace_replay_at_breakpoint): Use thread's inferior
3130 * record-full.c: Include "inferior.h".
3131 * regcache.c: Include "gdbthread.h".
3132 (get_thread_arch_regcache): Use the inferior's address space
3134 (get_thread_regcache, registers_changed_thread): New.
3135 * regcache.h (get_thread_regcache(thread_info *thread)): New
3137 (registers_changed_thread): New.
3138 (remote_target) <remote_detach_1>: Swap order of parameters.
3139 (remote_add_thread): <remote_add_thread>: Return the new thread.
3140 (get_remote_thread_info(ptid_t)): New overload.
3141 (remote_target::remote_notice_new_inferior): Use thread pointers
3143 (remote_target::process_initial_stop_replies): Use
3144 thread_info::set_running.
3145 (remote_target::remote_detach_1, remote_target::detach)
3146 (extended_remote_target::detach): Adjust.
3147 * stack.c (frame_show_address): Use inferior_thread.
3148 * target-debug.h (target_debug_print_thread_info_pp): New.
3149 * target-delegates.c: Regenerate.
3150 * target.c (default_thread_address_space): Delete.
3151 (memory_xfer_partial_1): Use current_inferior.
3152 (target_detach): Use current_inferior.
3153 (target_thread_address_space): Delete.
3154 (generic_mourn_inferior): Use current_inferior.
3155 * target.h (struct target_ops) <thread_address_space>: Delete.
3156 (target_thread_address_space): Delete.
3157 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3159 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3160 thread pointer instead of a ptid_t. Adjust all callers.
3161 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3162 (first_thread_of_process): Delete, replaced by ...
3163 (first_thread_of_inferior): ... this new function. All callers
3165 (any_thread_of_process): Rename to ...
3166 (any_thread_of_inferior): ... this, and take an inferior pointer.
3167 (any_live_thread_of_process): Rename to ...
3168 (any_live_thread_of_inferior): ... this, and take an inferior
3170 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3171 (value_in_thread_stack_temporaries)
3172 (get_last_thread_stack_temporary): Take a thread pointer instead
3173 of a ptid_t. Adjust all callers.
3174 (thread_info::set_running): New.
3175 (validate_registers_access): Use inferior_thread.
3176 (can_access_registers_ptid): Rename to ...
3177 (can_access_registers_thread): ... this, and take a thread
3179 (print_thread_info_1): Adjust to compare thread pointers instead
3181 (switch_to_no_thread, switch_to_thread): Make extern.
3182 (scoped_restore_current_thread::~scoped_restore_current_thread):
3183 Use m_thread pointer directly.
3184 (scoped_restore_current_thread::scoped_restore_current_thread):
3185 Use inferior_thread.
3186 (thread_command): Use thread pointer directly.
3187 (thread_num_make_value_helper): Use inferior_thread.
3188 * top.c (execute_command): Use inferior_thread.
3189 * tui/tui-interp.c: Include "inferior.h".
3190 * varobj.c (varobj_create): Use inferior_thread.
3191 (value_of_root_1): Use find_thread_global_id instead of
3192 global_thread_id_to_ptid.
3194 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3196 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3198 (regcache::write_part): Likewise.
3199 (readable_regcache::cooked_read_part): Update comment.
3200 (readable_regcache::cooked_write_part): Likewise.
3201 * regcache.h: (readable_regcache::read_part): Likewise.
3202 (regcache::write_part): Likewise.
3204 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3205 Dirk Schubert <dirk.schubert@arm.com>
3207 * aarch64-linux-nat.c (post_attach): New.
3208 (aarch64_linux_nat_target::post_attach): Override post_attach to
3209 record the number of hardware debug registers.
3211 2018-06-20 Tom Tromey <tom@tromey.com>
3213 * python/py-param.c (add_setshow_generic): Make parameters const.
3214 (parmpy_init): Update.
3216 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3218 * regcache.h (regcache_cooked_read_ftype): Rename to...
3219 (register_read_ftype): ...this, change type to function_view.
3220 (class reg_buffer) <save>: Remove src parameter.
3221 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3222 parameter non-const in first overload. Remove src parameter in
3224 * regcache.c (do_cooked_read): Remove.
3225 (readonly_detached_regcache::readonly_detached_regcache): Make
3226 parameter non-const, adjust call to other constructor.
3227 (reg_buffer::save): Remove src parameter.
3228 * frame.c (do_frame_register_read): Remove.
3229 (frame_save_as_regcache): Use lambda function.
3230 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3231 parameter to ppu2spu_data *.
3232 (ppu2spu_sniffer): Use lambda function.
3234 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3236 * record-full.c (record_full_target::insert_breakpoint): Remove
3237 "struct" keyword, add const.
3239 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3241 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3242 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3243 * configure.ac: Remove AC_PREREQ, add missing quoting.
3244 * gnulib/configure.ac: Modernize usage of
3245 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3246 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3247 (AUTOMAKE_VERSION): Bump to 1.15.1.
3248 * configure: Re-generate.
3249 * config.in: Re-generate.
3250 * aclocal.m4: Re-generate.
3251 * gnulib/aclocal.m4: Re-generate.
3252 * gnulib/config.in: Re-generate.
3253 * gnulib/configure: Re-generate.
3254 * gnulib/import/Makefile.in: Re-generate.
3256 2018-06-19 Pedro Alves <palves@redhat.com>
3258 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3259 (lookup_minimal_symbol_by_pc_section): ... here with
3260 gdb_assert_not_reached added.
3262 2018-06-19 Pedro Alves <palves@redhat.com>
3264 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3265 parameter with a block parameter. Compare location's block symbol
3266 with the frame's block instead of addresses.
3267 (skip_inline_frames): Pass the current block instead of the
3268 frame's address. Break out as soon as we determine the frame
3269 should not be skipped.
3271 2018-06-18 Tom Tromey <tom@tromey.com>
3273 * solib-aix.c (solib_aix_get_section_offsets): Return
3275 (solib_aix_solib_create_inferior_hook): Update.
3277 2018-06-18 Tom Tromey <tom@tromey.com>
3279 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3281 2018-06-18 Tom Tromey <tom@tromey.com>
3283 * solib-frv.c (frv_relocate_main_executable): Use
3285 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3288 2018-06-18 Tom Tromey <tom@tromey.com>
3290 * objfiles.h (inhibit_section_map_updates): Update.
3291 (resume_section_map_updates, resume_section_map_updates_cleanup):
3293 * solib-svr4.c (svr4_handle_solib_event): Update.
3294 * objfiles.c (inhibit_section_map_updates): Return
3295 scoped_restore_tmpl<int>.
3296 (resume_section_map_updates, resume_section_map_updates_cleanup):
3299 2018-06-18 Tom Tromey <tom@tromey.com>
3301 * valprint.h (read_string): Update.
3302 * valprint.c (read_string): Change type of "buffer".
3303 (val_print_string): Update.
3304 * python/py-value.c (valpy_string): Update.
3305 * language.h (struct language_defn) <la_get_string>: Change
3307 (default_get_string, c_get_string): Update.
3308 * language.c (default_get_string): Change type of "buffer".
3309 * guile/scm-value.c (gdbscm_value_to_string): Update.
3310 * c-lang.c (c_get_string): Change type of "buffer".
3312 2018-06-18 Tom Tromey <tom@tromey.com>
3314 * ser-mingw.c (struct pipe_state_destroyer): New.
3315 (pipe_state_up): New typedef.
3316 (cleanup_pipe_state): Remove.
3317 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3319 2018-06-18 Tom Tromey <tom@tromey.com>
3321 * rust-lang.h (rust_yyerror): Don't declare.
3322 * rust-lang.c (rust_language_defn): Update.
3323 * rust-exp.y (yyerror): Now static.
3324 * parse.c (parse_exp_in_context_1): Update.
3325 * p-lang.h (p_yyerror): Don't declare.
3326 * p-lang.c (p_language_defn): Update.
3327 * p-exp.y (yyerror): Now static.
3328 * opencl-lang.c (opencl_language_defn): Update.
3329 * objc-lang.c (objc_language_defn): Update.
3330 * m2-lang.h (m2_yyerror): Don't declare.
3331 * m2-lang.c (m2_language_defn): Update.
3332 * m2-exp.y (yyerror): Now static.
3333 * language.h (struct language_defn) <la_error>: Remove.
3334 * language.c (unk_lang_error): Remove.
3335 (unknown_language_defn, auto_language_defn): Remove.
3336 * go-lang.h (go_yyerror): Don't declare.
3337 * go-lang.c (go_language_defn): Update.
3338 * go-exp.y (yyerror): Now static.
3339 * f-lang.h (f_yyerror): Don't declare.
3340 * f-lang.c (f_language_defn): Update.
3341 * f-exp.y (yyerror): Now static.
3342 * d-lang.h (d_yyerror): Don't declare.
3343 * d-lang.c (d_language_defn): Update.
3344 * d-exp.y (yyerror): Now static.
3345 * c-lang.h (c_yyerror): Don't declare.
3346 * c-lang.c (c_language_defn, cplus_language_defn)
3347 (asm_language_defn, minimal_language_defn): Update.
3348 * c-exp.y (yyerror): Now static.
3349 * ada-lang.h (ada_yyerror): Don't declare.
3350 * ada-lang.c (ada_language_defn): Update.
3351 * ada-exp.y (yyerror): Now static.
3353 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3355 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3356 (store_sveregs_to_thread): Likewise.
3357 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3358 (aarch64_linux_store_inferior_registers): Likewise.
3359 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3361 (aarch64_sve_regs_copy_to_regcache): Likewise.
3362 (aarch64_sve_regs_copy_from_regcache): Likewise.
3363 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3365 (aarch64_sve_regs_copy_to_regcache): Likewise.
3366 (aarch64_sve_regs_copy_from_regcache): Likewise.
3367 (sve_context): Structure from Linux headers.
3368 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3369 (SVE_SIG_ZREG_SIZE): Likewise.
3370 (SVE_SIG_PREG_SIZE): Likewise.
3371 (SVE_SIG_FFR_SIZE): Likewise.
3372 (SVE_SIG_REGS_OFFSET): Likewise.
3373 (SVE_SIG_ZREGS_OFFSET): Likewise.
3374 (SVE_SIG_ZREG_OFFSET): Likewise.
3375 (SVE_SIG_ZREGS_SIZE): Likewise.
3376 (SVE_SIG_PREGS_OFFSET): Likewise.
3377 (SVE_SIG_PREG_OFFSET): Likewise.
3378 (SVE_SIG_PREGS_SIZE): Likewise.
3379 (SVE_SIG_FFR_OFFSET): Likewise.
3380 (SVE_SIG_REGS_SIZE): Likewise.
3381 (SVE_SIG_CONTEXT_SIZE): Likewise.
3382 (SVE_PT_REGS_MASK): Likewise.
3383 (SVE_PT_REGS_FPSIMD): Likewise.
3384 (SVE_PT_REGS_SVE): Likewise.
3385 (SVE_PT_VL_INHERIT): Likewise.
3386 (SVE_PT_VL_ONEXEC): Likewise.
3387 (SVE_PT_REGS_OFFSET): Likewise.
3388 (SVE_PT_FPSIMD_OFFSET): Likewise.
3389 (SVE_PT_FPSIMD_SIZE): Likewise.
3390 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3391 (SVE_PT_SVE_PREG_SIZE): Likewise.
3392 (SVE_PT_SVE_FFR_SIZE): Likewise.
3393 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3394 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3395 (__SVE_SIG_TO_PT): Likewise.
3396 (SVE_PT_SVE_OFFSET): Likewise.
3397 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3398 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3399 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3400 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3401 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3402 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3403 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3404 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3405 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3406 (SVE_PT_SVE_SIZE): Likewise.
3407 (SVE_PT_SIZE): Likewise.
3408 (HAS_SVE_STATE): New define.
3410 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3412 * nat/aarch64-sve-linux-sigcontext.h: New file.
3413 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3415 (SVE_VQ_MIN): Likewise.
3416 (SVE_VQ_MAX): Likewise.
3417 (SVE_VL_MIN): Likewise.
3418 (SVE_VL_MAX): Likewise.
3419 (SVE_NUM_ZREGS): Likewise.
3420 (SVE_NUM_PREGS): Likewise.
3421 (sve_vl_valid): Likewise.
3422 (struct user_sve_header): Likewise.
3424 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3425 Richard Bunt <Richard.Bunt@arm.com>
3427 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3428 was requested by GDB.
3430 2018-06-15 Tom de Vries <tdevries@suse.de>
3432 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3434 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3436 * gnulib/update-gnulib.sh: Print expected versions of
3439 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3441 * arch-utils.c (default_type_align): Use type_length_units.
3442 * gdbtypes.c (type_align): Use type_length_units.
3444 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3446 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3447 of 'define' command.
3449 2018-06-14 Tom de Vries <tdevries@suse.de>
3452 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3453 get_no_prettyformat_print_options.
3455 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3457 * sparc-nat.h: Include target.h.
3458 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3459 <fetch_registers>: Remove this argument in function call.
3460 <store_registers>: Remove this argument in function call, remove
3462 <low_forget_process>: Call sparc64_forget_process instead of
3463 sparc_forget_process.
3465 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3467 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3468 (procfs_target::make_corefile_notes): Adjust to new
3469 target_read_alloc return type.
3471 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3472 Stephen Roberts <stephen.roberts@arm.com>
3475 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3476 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3477 Move should_notify_stop local into more inner scope.
3479 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3480 Stephen Roberts <stephen.roberts@arm.com>
3483 * infrun.c (resume_1): Add call to mark_async_event_handler.
3485 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3487 * infrun.c (do_target_wait): Change old version of $pc printed.
3489 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3491 * dwarf2read.c (read_index_from_section): Rename to...
3492 (read_gdb_index_from_section): ... this, update all callers.
3493 (dwarf2_read_index): Rename to...
3494 (dwarf2_read_gdb_index): ... this, update all callers.
3496 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3498 * gdb/hppa-linux-nat.c
3499 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3500 hppa_linux_nat_target::fetch_registers.
3502 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3504 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3505 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3506 (AARCH64_DWARF_SVE_FFR): Likewise.
3507 (AARCH64_DWARF_SVE_P0): Likewise.
3508 (AARCH64_DWARF_SVE_Z0): Likewise.
3510 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3512 * common/common-regcache.h (raw_compare): New function.
3513 * regcache.c (regcache::raw_compare): Likewise.
3514 * regcache.h (regcache::raw_compare): New declaration.
3516 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3518 * common/common-regcache.h (reg_buffer_common): New structure.
3519 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3520 (reg_buffer::raw_supply): Likewise.
3521 (reg_buffer::raw_supply_integer): Likewise.
3522 (reg_buffer::raw_supply_zeroed): Likewise.
3523 (reg_buffer::raw_collect): Likewise.
3524 (reg_buffer::raw_collect_integer): Likewise.
3525 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3526 (reg_buffer::raw_supply): Likewise.
3527 (reg_buffer::raw_supply_integer): Likewise.
3528 (reg_buffer::raw_supply_zeroed): Likewise.
3529 (reg_buffer::raw_collect): Likewise.
3530 (reg_buffer::raw_collect_integer): Likewise.
3532 2018-06-10 Tom Tromey <tom@tromey.com>
3534 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3535 (class remote_state) <stop_reply_queue>: Now std::vector.
3536 (remote_state::~remote_state)
3537 (remote_target::stop_reply_queue_length): Update.
3538 (struct queue_iter_param, remove_child_of_pending_fork)
3539 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3540 (check_pending_event_prevents_wildcard_vcont_callback)
3541 (remove_stop_reply_for_inferior)
3542 (remove_stop_reply_of_remote_state)
3543 (remote_notif_remove_once_on_match)
3544 (stop_reply_match_ptid_and_ws)
3545 (remote_kill_child_of_pending_fork): Remove.
3546 (remote_target::remove_new_fork_children)
3547 (remote_target::check_pending_events_prevent_wildcard_vcont)
3548 (remote_target::discard_pending_stop_replies)
3549 (remote_target::discard_pending_stop_replies_in_queue)
3550 (remote_target::remote_notif_remove_queued_reply)
3551 (remote_target::queued_stop_reply)
3552 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3553 (remote_target::wait, remote_target::kill_new_fork_children)
3554 (remote_target::async): Update.
3556 2018-06-10 Tom Tromey <tom@tromey.com>
3558 * record-full.c (record_full_arch_list_cleanups): Remove.
3559 (record_full_message): Use try/catch.
3560 (record_full_wait_cleanups): Remove.
3561 (record_full_wait_1): Use try/catch.
3562 (record_full_restore): Likewise.
3564 2018-06-10 Tom Tromey <tom@tromey.com>
3566 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3567 declare VEC. Add constructor.
3568 <in_target_beneath>: Now bool.
3569 (record_full_breakpoints): Now a std::vector, static.
3570 (record_full_sync_record_breakpoints)
3571 (record_full_init_record_breakpoints)
3572 (record_full_target::insert_breakpoint)
3573 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3575 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3577 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3578 * serial.c (serial_interface_lookup): Remove struct keyword.
3580 2018-06-10 Tom Tromey <tom@tromey.com>
3582 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3584 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3586 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3588 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3589 "beneath" as a method.
3590 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3591 Use "beneath" as a method.
3593 2018-06-10 Tom Tromey <tom@tromey.com>
3595 * tracefile.c (struct trace_file_writer_deleter): New.
3596 <operator()>: Rename from trace_file_writer_xfree.
3597 (trace_file_writer_up): New typedef.
3598 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3600 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3602 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3603 <m_registers, m_register_status>: Change type to
3605 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3608 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3610 * common/common-regcache.h (enum register_status): Add
3611 underlying type "signed char".
3612 * regcache.h (reg_buffer) <m_register_status>: Change type to
3614 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3615 register_status instead of signed char.
3616 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3617 (reg_buffer::get_register_status): Remove cast.
3618 (readable_regcache::raw_read): Remove cast.
3619 (readable_regcache::cooked_read): Remove cast.
3621 2018-06-09 Tom Tromey <tom@tromey.com>
3623 * source.c (reverse_search_command, forward_search_command): Use
3626 2018-06-09 Tom Tromey <tom@tromey.com>
3628 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3629 (serial_ops_list): Now static, std::vector.
3630 (serial_interface_lookup, serial_add_interface): Update.
3632 2018-06-09 Tom Tromey <tom@tromey.com>
3634 * dwarf2read.c (process_cu_includes): Update.
3635 (process_full_comp_unit): Update.
3636 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3639 2018-06-08 Paul Koning <paul_koning@dell.com>
3643 * python/python.c (do_start_initialization):
3644 Avoid call to internal Python API.
3645 (init__gdb_module): New function.
3647 2018-06-08 Gary Benson <gbenson@redhat.com>
3649 * linux-thread-db.c (valprint.h): New include.
3650 (struct check_thread_db_info): New structure.
3651 (check_thread_db_on_load, tdb_testinfo): New static globals.
3652 (check_thread_db, check_thread_db_callback): New functions.
3653 (try_thread_db_load_1): Run integrity checks if requested.
3654 (maintenance_check_libthread_db): New function.
3655 (_initialize_thread_db): Register "maint check libthread-db"
3656 and "maint set/show check-libthread-db".
3657 * NEWS: Mention the above new commands.
3659 2018-06-08 Tom Tromey <tom@tromey.com>
3661 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3664 2018-06-08 Tom Tromey <tom@tromey.com>
3666 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3668 2018-06-08 Tom Tromey <tom@tromey.com>
3670 * common/btrace-common.h (struct btrace_data): Add constructor,
3671 destructor, move assignment operator.
3672 <empty, clear, fini>: New methods.
3673 <format>: Initialize.
3674 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3675 (btrace_data_empty): Don't declare.
3676 * common/btrace-common.c (btrace_data_init): Remove.
3677 (btrace_data::fini): Rename from btrace_data_fini.
3678 (btrace_data::empty): Rename from btrace_data_empty.
3679 (btrace_data::clear): Rename from btrace_data_clear. Return
3681 * btrace.h (make_cleanup_btrace_data): Don't declare.
3682 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3683 (parse_xml_btrace): Update.
3684 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3685 (maint_btrace_clear_packet_history_cmd): Update.
3687 2018-06-07 Pedro Alves <palves@redhat.com>
3689 * target.h (target_ops) <beneath>: Now a method. All references
3691 (class target_stack): New.
3692 * target.c (g_target_stack): New.
3693 (g_current_top_target): Delete.
3694 (current_top_target): Get the top target out of g_target_stack.
3695 (target_stack::push, target_stack::unpush): New.
3696 (push_target, unpush_target): Reimplement.
3697 (target_is_pushed): Reimplement in terms of g_target_stack.
3698 (target_ops::beneath, target_stack::find_beneath): New.
3700 2018-06-07 Pedro Alves <palves@redhat.com>
3702 * target.h (find_target_beneath): Delete declaration.
3703 * target.c (find_target_beneath): Delete definition.
3704 * aix-thread.c: All callers of find_target_beneath adjusted to
3705 call target_ops::beneath instead.
3706 * bsd-uthread.c: Likewise.
3707 * linux-thread-db.c: Likewise.
3708 * ravenscar-thread.c: Likewise.
3709 * sol-thread.c: Likewise.
3710 * spu-multiarch.c: Likewise.
3712 2018-06-07 Pedro Alves <palves@redhat.com>
3714 * target.h (target_ops) <beneath>: Now a method. All references
3716 (target_ops) <m_beneath>: New.
3717 * target.c (target_ops::beneath): New.
3718 * corelow.c: Adjust all references to target_ops::beneath.
3719 * linux-thread-db.c: Likewise.
3720 * make-target-delegates: Likewise.
3721 * record-btrace.c: Likewise.
3722 * record-full.c: Likewise.
3723 * remote.c: Likewise.
3724 * target.c: Likewise.
3725 * target-delegates.c: Regenerate.
3727 2018-06-07 Pedro Alves <palves@redhat.com>
3729 * target.h (target_stack): Delete.
3730 (current_top_target): Declare function.
3731 * target.c (target_stack): Delete.
3732 (g_current_top_target): New.
3733 (current_top_target): New function.
3734 * auxv.c: Use current_top_target instead of target_stack
3736 * avr-tdep.c: Likewise.
3737 * breakpoint.c: Likewise.
3738 * corefile.c: Likewise.
3739 * elfread.c: Likewise.
3741 * exceptions.c: Likewise.
3742 * frame.c: Likewise.
3743 * gdbarch-selftests.c: Likewise.
3744 * gnu-v3-abi.c: Likewise.
3745 * ia64-tdep.c: Likewise.
3746 * ia64-vms-tdep.c: Likewise.
3747 * infcall.c: Likewise.
3748 * infcmd.c: Likewise.
3749 * infrun.c: Likewise.
3750 * linespec.c: Likewise.
3751 * linux-tdep.c: Likewise.
3752 * minsyms.c: Likewise.
3753 * ppc-linux-nat.c: Likewise.
3754 * ppc-linux-tdep.c: Likewise.
3755 * procfs.c: Likewise.
3756 * regcache.c: Likewise.
3757 * remote.c: Likewise.
3758 * rs6000-tdep.c: Likewise.
3759 * s390-linux-nat.c: Likewise.
3760 * s390-tdep.c: Likewise.
3761 * solib-aix.c: Likewise.
3762 * solib-darwin.c: Likewise.
3763 * solib-dsbt.c: Likewise.
3764 * solib-spu.c: Likewise.
3765 * solib-svr4.c: Likewise.
3766 * solib-target.c: Likewise.
3767 * sparc-tdep.c: Likewise.
3768 * sparc64-tdep.c: Likewise.
3769 * spu-tdep.c: Likewise.
3770 * symfile.c: Likewise.
3771 * symtab.c: Likewise.
3772 * target-descriptions.c: Likewise.
3773 * target-memory.c: Likewise.
3774 * target.c: Likewise.
3775 * target.h: Likewise.
3776 * tracefile-tfile.c: Likewise.
3777 * tracepoint.c: Likewise.
3778 * valops.c: Likewise.
3779 * valprint.c: Likewise.
3780 * value.c: Likewise.
3781 * windows-tdep.c: Likewise.
3782 * mi/mi-main.c: Likewise.
3784 2018-06-07 Tom Tromey <tom@tromey.com>
3786 * valprint.h (build_address_symbolic): Declare.
3787 * printcmd.c (print_address_symbolic): Update.
3788 (build_address_symbolic): Change "name" and "filename" to
3790 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3792 * defs.h (build_address_symbolic): Remove declaration.
3794 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3796 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3797 (aarch64_vnv_type): Add function.
3798 (aarch64_pseudo_register_name): Add V regs for SVE.
3799 (aarch64_pseudo_register_type): Likewise.
3800 (aarch64_pseudo_register_reggroup_p): Likewise.
3801 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3802 (aarch64_pseudo_read_value): Add V regs for SVE.
3803 (aarch64_pseudo_write_2): Use V0 offset for SVE
3804 (aarch64_pseudo_write): Add V regs for SVE.
3805 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3807 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3809 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3810 (sve_vl_from_vq): Likewise.
3812 2018-06-05 Tom Tromey <tom@tromey.com>
3814 * cli/cli-cmds.c (show_version): Update.
3815 * top.c (print_gdb_version): Add "interactive" parameter.
3817 * main.c (captured_main_1): Update.
3818 * top.h (print_gdb_version): Add "interactive" parameter and a
3821 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3823 * common/enum-flags.h: Add trailing semicolon to example in
3826 2018-06-05 Tom Tromey <tom@tromey.com>
3829 * NEWS: Add entry about pager.
3830 * utils.c (pagination_disabled_for_command): New global.
3831 (prompt_for_continue): Allow "c" response to prompt.
3832 (reinitialize_more_filter): Clear
3833 pagination_disabled_for_command.
3834 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3836 2018-06-04 Tom Tromey <tom@tromey.com>
3838 * ada-lang.h (ada_lookup_symbol_list): Update.
3839 * ada-lang.c (resolve_subexp): Update.
3840 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3842 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3843 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3844 results parameter to std::vector.
3845 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3847 * ada-exp.y (block_lookup): Update.
3848 (select_possible_type_sym): Change type of syms. Remove nsyms
3850 (write_var_or_type, write_name_assoc): Update.
3852 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3854 * windows-nat.c (windows_nat_target::xfer_partial): Return
3855 TARGET_XFER_E_IO if we need to delegate to the target beneath
3856 but BENEATH is NULL.
3858 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3860 * Makefile.in (config.status): Add configure.nat as a
3863 2018-06-04 Tom Tromey <tom@tromey.com>
3865 * cp-name-parser.y (cpname_state): Add method declarations.
3866 (HANDLE_QUAL): Update.
3867 (cpname_state::d_grab, cpname_state::fill_comp)
3868 (cpname_state::make_operator, cpname_state::make_dtor)
3869 (cpname_state::make_builtin_type, cpname_state::make_name)
3870 (cpname_state::d_qualify, cpname_state::d_int_type)
3871 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3872 (%union): Move earlier.
3874 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3876 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3878 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3880 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3881 (aarch64_pseudo_write_1): Likewise.
3882 (aarch64_pseudo_read_value): Use helper.
3883 (aarch64_pseudo_write): Likewise.
3885 2018-06-04 Pedro Alves <palves@redhat.com>
3887 * darwin-nat.c (darwin_ops): Delete.
3888 (darwin_attach_pid): Use get_native_target.
3890 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3892 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3893 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3895 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3897 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3898 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3899 (aarch64_gdbarch_init): Check for SVE.
3900 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3902 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3904 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3905 * aarch64-tdep.h (aarch64_read_description): Likewise.
3906 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3907 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3908 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3909 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3910 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3912 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3914 * value.c (value_fetch_lazy_bitfield): New.
3915 (value_fetch_lazy_memory): New.
3916 (value_fetch_lazy_register): New.
3917 (value_fetch_lazy): Factor out to smaller functions.
3919 2018-06-01 Tom Tromey <tom@tromey.com>
3921 * cp-name-parser.y (backslashable, represented): Now const.
3923 2018-06-01 Tom Tromey <tom@tromey.com>
3925 * cp-name-parser.y: Include parser-defs.h.
3926 (parser_fprintf): Remove declaration.
3928 2018-06-01 Tom Tromey <tom@tromey.com>
3930 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3932 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3933 (global_result): Remove globals.
3934 (struct cpname_state): New.
3935 (yyparse): Don't declare.
3936 (yylex, yyerror): Move declarations after %union.
3937 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3938 (make_name): Add state parameter.
3940 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3942 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3944 (yylex): Add lvalp, state parameters.
3945 (yyerror): Add state parameter.
3946 (cp_demangled_name_to_comp): Update.
3948 2018-06-01 Tom Tromey <tom@tromey.com>
3950 * cp-name-parser.y (parser_fprintf): Declare.
3951 (GDB_YY_REMAP_PREFIX): Define.
3952 Include yy-remap.h. Don't redefine yy* identifiers.
3954 2018-06-01 Tom Tromey <tom@tromey.com>
3956 * python/py-type.c (typy_legacy_template_argument): Update.
3957 * cp-support.h (cp_demangled_name_to_comp): Update.
3958 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3959 parameter to be a "std::string *".
3962 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3964 * ada-lex.l: Include "diagnostics.h" instead of
3965 "common/diagnostics.h".
3966 * unittests/environ-selftests.c: Likewise.
3967 * common/diagnostics.h: Moved to ../include.
3969 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3971 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3972 to language_mode_manual while calling breakpoint_re_set_one.
3974 2018-06-01 Tom Tromey <tom@tromey.com>
3976 * valops.c (value_cast_structs, destructor_name_p): Update.
3977 * symtab.c (gdb_mangle_name): Update.
3978 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3980 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3981 (pascal_object_print_value_fields, pascal_object_print_value):
3983 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3984 * linespec.c (find_methods): Update.
3985 * gdbtypes.h (type_name_no_tag): Remove.
3986 (type_name_or_error): Rename from type_name_no_tag_or_error.
3987 * gdbtypes.c (type_name_no_tag): Remove.
3988 (type_name_or_error): Rename from type_name_no_tag_or_error.
3989 (lookup_struct_elt_type, check_typedef): Update.
3990 * expprint.c (print_subexp_standard): Update.
3991 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3992 * d-namespace.c (d_lookup_nested_symbol): Update.
3993 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3994 (cp_print_class_member): Update.
3995 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3996 * completer.c (add_struct_fields): Update.
3997 * c-typeprint.c (cp_type_print_derivation_info)
3998 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4000 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4001 (ada_prefer_type, ada_is_exception_sym): Update.
4003 2018-06-01 Tom Tromey <tom@tromey.com>
4005 * valops.c (enum_constant_from_type, value_namespace_elt)
4006 (value_maybe_namespace_elt): Update.
4007 * valarith.c (find_size_for_pointer_math): Update.
4008 * target-descriptions.c (make_gdb_type): Update.
4009 * symmisc.c (print_symbol): Update.
4010 * stabsread.c (define_symbol, read_type)
4011 (complain_about_struct_wipeout, add_undefined_type)
4012 (cleanup_undefined_types_1): Update.
4013 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4014 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4015 (rust_internal_print_type, rust_composite_type)
4016 (rust_evaluate_funcall, rust_evaluate_subexp)
4017 (rust_inclusive_range_type_p): Update.
4018 * python/py-type.c (typy_get_tag): Update.
4019 * p-typeprint.c (pascal_type_print_base): Update.
4020 * mdebugread.c (parse_symbol, parse_type): Update.
4021 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4023 * guile/scm-type.c (gdbscm_type_tag): Update.
4024 * go-lang.c (sixg_string_p): Update.
4025 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4027 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4028 (TYPE_TAG_NAME): Remove.
4029 * gdbtypes.c (type_name_no_tag): Simplify.
4030 (check_typedef, check_types_equal, recursive_dump_type)
4031 (copy_type_recursive, arch_composite_type): Update.
4032 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4033 in summary mode when needed.
4034 * eval.c (evaluate_funcall): Update.
4035 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4036 (process_structure_scope, read_enumeration_type)
4037 (read_namespace_type, read_module_type, determine_prefix): Update.
4038 * cp-support.c (inspect_type): Update.
4039 * coffread.c (process_coff_symbol, decode_base_type): Update.
4040 * c-varobj.c (c_is_path_expr_parent): Update.
4041 * c-typeprint.c (c_type_print_base_struct_union): Update.
4042 (c_type_print_base_1): Update. Print struct/class/union/enum in
4043 summary when using C language.
4044 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4045 (gen_maybe_namespace_elt): Update.
4046 * ada-lang.c (ada_type_name): Simplify.
4047 (empty_record, ada_template_to_fixed_record_type_1)
4048 (template_to_static_fixed_type)
4049 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4051 2018-06-01 Tom Tromey <tom@tromey.com>
4053 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4055 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4056 (c_print_type): Update.
4057 (c_print_type): New overload.
4058 (c_type_print_varspec_prefix, c_type_print_args)
4059 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4060 (c_type_print_base_struct_union, c_type_print_base_1)
4061 (cp_type_print_method_args): Add "language" parameter.
4062 (c_type_print_base): Update.
4063 * c-lang.h (c_print_type): Add new overload.
4065 2018-06-01 Tom Tromey <tom@tromey.com>
4067 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4068 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4070 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4072 * aarch64-tdep.c (aarch64_sve_register_names): New const
4074 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4075 (AARCH64_SVE_Z_REGS_NUM): New define.
4076 (AARCH64_SVE_P_REGS_NUM): Likewise.
4077 (AARCH64_SVE_NUM_REGS): Likewise.
4079 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4081 * nat/linux-ptrace.h [__alpha__]
4082 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4085 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4087 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4088 the endianness selected.
4089 * NEWS: Document `set endian auto' mode operation update.
4091 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4093 * Makefile.in: Add new header.
4094 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4095 (sve_vl_from_vg): Likewise.
4096 (sve_vq_from_vl): Likewise.
4097 (sve_vl_from_vq): Likewise.
4098 (sve_vq_from_vg): Likewise.
4099 (sve_vg_from_vq): Likewise.
4100 * configure.nat: Add new c file.
4101 * nat/aarch64-sve-linux-ptrace.c: New file.
4102 * nat/aarch64-sve-linux-ptrace.h: New file.
4104 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4106 * aarch64-linux-nat.c (aarch64_linux_read_description):
4108 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4110 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4111 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4112 (aarch64_gdbarch_init): Add parmeter zero.
4113 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4114 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4115 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4117 * doc/gdb.texinfo: Describe SVE feature
4118 * features/aarch64-sve.c: New file.
4120 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4123 * gdbarch.sh (significant_addr_bit): Default to zero when
4124 not set by target architecture.
4125 * gdbarch.c: Re-generated.
4126 * utils.c (address_significant): Update.
4128 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4130 * stack.c (func_command): Remove trailing newline in call to error.
4132 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4134 * regcache.h (regcache_raw_collect): Remove, update callers to
4135 use regcache::raw_collect.
4136 * regcache.c (regcache_raw_collect): Remove.
4138 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4140 * regcache.h (regcache_raw_supply): Remove, update callers to
4141 use detached_regcache::raw_supply.
4142 * regcache.c (regcache_raw_supply): Remove.
4144 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4146 * regcache.h (regcache_cooked_write_part): Remove, update
4147 callers to use regcache::cooked_write_part.
4148 * regcache.c (regcache_cooked_write_part): Remove.
4150 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4152 * regcache.h (regcache_cooked_read_part): Remove, update callers
4153 to use readable_regcache::cooked_read_part.
4154 * regcache.c (regcache_cooked_read_part): Remove.
4156 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4158 * regcache.h (regcache_cooked_read_value): Remove, update
4159 callers to use readable_regcache::cooked_read_value.
4160 * regcache.c (regcache_cooked_read_value): Remove.
4162 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4164 * regcache.h (regcache_cooked_write): Remove, update callers to
4165 use regcache::cooked_write.
4166 * regcache.c (regcache_cooked_write): Remove.
4168 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4170 * regcache.h (regcache_invalidate): Remove, update callers to
4171 use detached_regcache::invalidate instead.
4172 * regcache.c (regcache_invalidate): Remove.
4174 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4176 * regcache.h (regcache_raw_write_part): Remove, update callers
4177 to use regcache::raw_write_part instead.
4178 * regcache.c (regcache_raw_write_part): Remove.
4180 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4182 * regcache.h (regcache_raw_read_part): Remove, update callers to
4183 use readable_regcache::raw_read_part instead.
4184 * regcache.c (regcache_raw_read_part): Remove.
4186 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4188 * regcache.h (regcache_cooked_read): Remove, update callers to
4189 use readable_regcache::cooked_read instead.
4190 * regcache.c (regcache_cooked_read): Remove.
4192 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4194 * regcache.h (regcache_raw_write): Remove, update callers to use
4195 regcache::raw_write instead.
4196 * regcache.c (regcache_raw_write): Remove.
4198 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4200 * regcache.h (regcache_raw_read): Remove, update callers to use
4201 readable_regcache::raw_read instead.
4202 * regcache.c (regcache_raw_read): Remove.
4204 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4206 * regcache.h (regcache_raw_update): Remove, update callers to
4207 use readable_regcache::raw_update instead.
4208 * regcache.c (regcache_raw_update): Remove.
4210 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4212 * regcache.h (regcache_register_status): Remove, update callers
4213 to use reg_buffer::get_register_status directly instead.
4214 * regcache.c (regcache_register_status): Remove.
4216 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4218 * regcache.h (regcache_get_ptid): Remove, update all callers to
4219 call regcache::ptid instead.
4220 * regcache.c (regcache_get_ptid): Remove.
4222 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4224 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4226 2018-05-30 Pedro Alves <palves@redhat.com>
4228 * common/common-exceptions.h (exception_rethrow): Use
4231 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4233 * breakpoint.c (print_solib_event, check_status_catch_solib):
4234 Remove struct keyword in range-based for loops.
4235 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4236 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4238 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4240 * symfile.c (addr_info_make_relative): Likewise.
4241 * thread.c (value_in_thread_stack_temporaries): Likewise.
4243 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4246 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4247 aggregate type to get its real type before accessing it.
4249 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4251 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4252 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4253 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4254 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4255 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4256 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4257 * printcmd.c (info_address_command): Likewise.
4259 2018-05-29 Tom Tromey <tom@tromey.com>
4261 * windows-nat.c (handle_exception): Update fall-through comment.
4263 2018-05-29 Tom Tromey <tom@tromey.com>
4265 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4266 (struct program_space) <added_solibs>: Now a std::vector.
4267 * breakpoint.c (print_solib_event): Update.
4268 (check_status_catch_solib): Update.
4269 * progspace.c (clear_program_space_solib_cache): Update.
4270 * solib.c (update_solib_list): Update.
4272 2018-05-29 Tom Tromey <tom@tromey.com>
4274 * python/py-type.c (typy_richcompare): Update.
4275 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4276 * gdbtypes.h (types_deeply_equal): Return bool.
4277 (types_equal): Likewise.
4278 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4280 (check_types_equal): Change worklist to std::vector. Return
4282 (struct type_equality_entry): Add constructor.
4283 (compare_maybe_null_strings): Return bool.
4284 (check_types_worklist): Return bool. Change worklist to
4286 (types_deeply_equal): Use std::vector.
4287 (types_equal): Return bool.
4288 (compare_maybe_null_strings): Simplify.
4290 2018-05-29 Tom Tromey <tom@tromey.com>
4292 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4294 2018-05-29 Tom Tromey <tom@tromey.com>
4296 * objc-lang.h: Don't include cp-support.h.
4297 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4300 2018-05-27 Tom Tromey <tom@tromey.com>
4302 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4304 2018-05-25 Tom Tromey <tom@tromey.com>
4306 * value.c (value::location): Initialize.
4308 2018-05-25 Tom Tromey <tom@tromey.com>
4310 * dbxread.c (init_bincl_list): Remove.
4311 (bincl_list): Now a std::vector.
4312 (bincls_allocated, next_bincl): Remove.
4313 (free_bincl_list, do_free_bincl_list_cleanup)
4314 (make_cleanup_free_bincl_list): Remove.
4315 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4317 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4318 (struct header_file_location): Add constructor.
4319 (add_bincl_to_list): Remove.
4321 2018-05-25 Tom Tromey <tom@tromey.com>
4323 * tui/tui.c (tui_enable): Update.
4324 * mi/mi-interp.c (mi_interp::init): Update.
4325 * interps.h (class interp) <name>: New method.
4326 <m_name>: Rename from name.
4327 (~scoped_restore_interp): Update.
4328 * interps.c (interp::interp): Update.
4329 (interp_add, interp_set, interp_lookup_existing)
4330 (current_interp_named_p): Update.
4332 2018-05-25 Tom Tromey <tom@tromey.com>
4334 * interps.c (interp_name): Remove.
4335 * mi/mi-interp.c (mi_interp::init): Update.
4336 * interps.h (interp_name): Remove.
4337 (~scoped_restore_interp): Update.
4338 * tui/tui.c (tui_enable): Update.
4340 2018-05-25 Tom Tromey <tom@tromey.com>
4342 * utils.c (fputs_maybe_filtered): Update.
4343 * linespec.c (decode_line_full): Update.
4344 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4345 (mi_print_breakpoint_for_event, mi_solib_loaded)
4346 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4347 (mi_user_selected_context_changed): Update.
4348 * mi/mi-main.c (mi_execute_command): Update.
4349 * cli/cli-script.c (execute_control_command): Update.
4350 * python/python.c (execute_gdb_command): Update.
4351 * solib.c (info_sharedlibrary_command): Update.
4352 * interps.c (interp_ui_out): Remove.
4353 * interps.h (interp_ui_out): Remove.
4355 2018-05-25 Tom Tromey <tom@tromey.com>
4357 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4358 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4359 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4361 2018-05-25 Tom Tromey <tom@tromey.com>
4363 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4364 * interps.c (interp_exec): Use scoped_restore.
4366 2018-05-25 Tom Tromey <tom@tromey.com>
4368 * remote.c (remote_target::remote_file_get): Use
4370 (remote_target::remote_file_put): Likewise.
4372 2018-05-25 Tom Tromey <tom@tromey.com>
4374 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4376 (get_pe_section_index, add_pe_exported_sym): Update.
4377 (read_pe_exported_syms): Use gdb::def_vector.
4379 2018-05-25 Tom Tromey <tom@tromey.com>
4381 * frame.c (remove_prev_frame): Remove.
4382 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4384 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4386 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4388 * mips-linux-nat.c (supply_fpregset): Always call
4389 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4390 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4391 `mips_fill_fpregset'.
4392 * mips-linux-tdep.c (mips_supply_fpregset)
4393 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4394 (mips_fill_fpregset_wrapper): Remove functions.
4395 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4396 (mips_linux_fpregset): Remove variable.
4397 (mips_linux_iterate_over_regset_sections): Use
4398 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4399 (mips_linux_o32_sigframe_init): Remove comment.
4401 2018-05-25 Pedro Alves <palves@redhat.com>
4403 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4404 (struct readahead_cache, struct packet_reg, struct
4405 remote_arch_state, class remote_state): Move higher up in the
4407 (remote_target::m_remote_state): Now an object instead of a pointer.
4408 (remote_target::get_remote_state): Adjust.
4410 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4412 * stack.c (select_and_print_frame): Delete.
4413 (struct function_bounds): Move struct within function.
4414 (func_command): Most content moved into new function
4415 find_frame_for_function, use new function, print result, add
4417 (find_frame_for_function): New function, now returns a result.
4419 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4421 * stack.c (iterate_over_block_arg_vars): Fix comment.
4422 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4424 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4428 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4430 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4432 * frame.h (class scoped_restore_selected_frame): New class.
4433 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4434 of any exception, use scoped_restore_selected_frame to restore the
4437 2018-05-24 Pedro Alves <palves@redhat.com>
4439 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4442 2018-05-23 Tom Tromey <tom@tromey.com>
4444 * complaints.c (struct complaints): Remove.
4445 (symfile_complaint_book): Remove.
4446 (series): New global.
4447 (complaint_internal): Update.
4448 (clear_complaints): Update.
4450 2018-05-23 Tom Tromey <tom@tromey.com>
4452 * complaints.c (counters): New global.
4453 (struct complain): Remove.
4454 (struct complaints) <root>: Remove.
4455 (complaint_sentinel): Remove.
4456 (symfile_complaint_book): Update.
4457 (find_complaint) Remove.
4458 (complaint_internal, clear_complaints): Update.
4460 2018-05-23 Tom Tromey <tom@tromey.com>
4462 * complaints.c (struct complain) <file, line>: Remove.
4463 (find_complaint): Remove file, line parameters.
4464 (complaint_internal): Update.
4466 2018-05-23 Tom Tromey <tom@tromey.com>
4468 * complaints.c (vcomplaint): Remove.
4469 (complaint_internal) Merge in contents of vcomplaint.
4471 2018-05-23 Tom Tromey <tom@tromey.com>
4473 * complaints.c (struct complaints) <explanation>: Remove.
4474 (symfile_explanations): Remove.
4475 (symfile_complaint_book): Update.
4476 (vcomplaint): Update.
4477 (struct explanation): Remove.
4479 2018-05-23 Tom Tromey <tom@tromey.com>
4481 * complaints.c (symfile_complaints): Remove.
4482 (complaint_internal): Remove "complaints" parameter.
4483 (clear_complaints, vcomplaint): Remove "c" parameter.
4484 (get_complaints): Remove.
4485 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4486 (dwarf2_debug_line_missing_file_complaint)
4487 (dwarf2_debug_line_missing_end_sequence_complaint)
4488 (dwarf2_complex_location_expr_complaint)
4489 (dwarf2_const_value_length_mismatch_complaint)
4490 (dwarf2_section_buffer_overflow_complaint)
4491 (dwarf2_macro_malformed_definition_complaint)
4492 (dwarf2_invalid_attrib_class_complaint)
4493 (create_addrmap_from_index, dw2_symtab_iter_next)
4494 (dw2_expand_marked_cus)
4495 (dw2_debug_names_iterator::find_vec_in_debug_names)
4496 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4497 (create_debug_type_hash_table, init_cutu_and_read_dies)
4498 (partial_die_parent_scope, add_partial_enumeration)
4499 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4500 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4501 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4502 (create_cus_hash_table, create_dwp_hash_table)
4503 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4504 (dwarf2_rnglists_process, dwarf2_ranges_process)
4505 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4506 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4507 (handle_struct_member_die, process_structure_scope)
4508 (read_array_type, read_common_block, read_module_type)
4509 (read_tag_pointer_type, read_typedef, read_base_type)
4510 (read_subrange_type, load_partial_dies, partial_die_info::read)
4511 (partial_die_info::read, partial_die_info::read)
4512 (partial_die_info::read, read_checked_initial_length_and_offset)
4513 (dwarf2_string_attr, read_formatted_entries)
4514 (dwarf_decode_line_header)
4515 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4516 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4517 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4518 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4519 (get_signatured_type, get_DW_AT_signature_type)
4520 (decode_locdesc, file_file_name, consume_improper_spaces)
4521 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4522 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4523 (dwarf2_symbol_mark_computed, set_die_type)
4524 (read_attribute_value): Update.
4525 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4527 * dbxread.c (unknown_symtype_complaint)
4528 (lbrac_mismatch_complaint, repeated_header_complaint)
4529 (set_namestring, function_outside_compilation_unit_complaint)
4530 (read_dbx_symtab, process_one_symbol): Update.
4531 * gdbtypes.c (stub_noname_complaint): Update.
4532 * windows-nat.c (handle_unload_dll): Update.
4533 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4534 (decode_base_type): Update.
4535 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4536 (eb_complaint, record_include_begin, record_include_end)
4537 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4538 (process_xcoff_symbol, read_symbol)
4539 (function_outside_compilation_unit_complaint)
4540 (scan_xcoff_symtab): Update.
4541 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4542 * buildsym.c (finish_block_internal, make_blockvector)
4543 (end_symtab_get_static_block, augment_type_symtab): Update.
4544 * dtrace-probe.c (dtrace_process_dof)
4545 (dtrace_static_probe_ops::get_probes): Update.
4546 * complaints.h (struct complaint): Don't declare.
4547 (symfile_complaints): Remove.
4548 (complaint_internal): Remove "complaints" parameter.
4549 (complaint): Likewise.
4550 (clear_complaints): Likewise.
4551 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4552 (reread_symbols): Update.
4553 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4554 (dwarf2_frame_cache, decode_frame_entry): Update.
4555 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4556 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4557 (info_selectors_command): Update.
4558 * macrotab.c (macro_include, check_for_redefinition)
4559 (macro_undef): Update.
4560 * objfiles.c (filter_overlapping_sections): Update.
4561 * stabsread.c (invalid_cpp_abbrev_complaint)
4562 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4563 (define_symbol, error_type, read_type, rs6000_builtin_type)
4564 (stabs_method_name_from_physname, read_member_functions)
4565 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4566 (attach_fields_to_type, complain_about_struct_wipeout)
4567 (read_range_type, read_args, common_block_start)
4568 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4570 * mdebugread.c (index_complaint, unknown_ext_complaint)
4571 (basic_type_complaint, bad_tag_guess_complaint)
4572 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4573 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4574 (parse_procedure, parse_lines)
4575 (function_outside_compilation_unit_complaint)
4576 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4577 (bad_tag_guess_complaint, reg_value_complaint): Update.
4578 * cp-support.c (demangled_name_complaint): Update.
4579 * macroscope.c (sal_macro_scope): Update.
4580 * dwarf-index-write.c (class debug_names): Update.
4582 2018-05-23 Tom Tromey <tom@tromey.com>
4584 * complaints.c (clear_complaints): Remove "noisy" parameter.
4585 * complaints.h (clear_complaints): Update.
4586 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4587 (reread_symbols): Update.
4589 2018-05-23 Tom Tromey <tom@tromey.com>
4591 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4593 (vcomplaint, clear_complaints): Update.
4594 (symfile_explanations): Remove some messages.
4596 2018-05-23 Tom Tromey <tom@tromey.com>
4598 * complaints.c (internal_complaint): Remove.
4599 * complaints.h (internal_complaint): Remove.
4601 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4603 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4605 2018-05-22 Pedro Alves <palves@redhat.com>
4607 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4608 (remote_fileio_badfd, remote_fileio_return_errno)
4609 (remote_fileio_return_success, remote_fileio_func_open)
4610 (remote_fileio_func_open, remote_fileio_func_close)
4611 (remote_fileio_func_read, remote_fileio_func_write)
4612 (remote_fileio_func_lseek, remote_fileio_func_rename)
4613 (remote_fileio_func_unlink, remote_fileio_func_stat)
4614 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4615 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4616 remote_target parameter.
4617 (remote_fio_func_map) <func>: Add remote_target parameter.
4618 (do_remote_fileio_request, remote_fileio_request):
4619 * remote-fileio.h (remote_fileio_request):
4620 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4621 remote_target parameter.
4622 (remote_notif_process, handle_notification): Adjust to pass down
4624 (remote_notif_state_allocate): Add remote_target parameter. Save
4626 * remote-notif.h (struct remote_target): Forward declare.
4627 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4628 remote_target parameter.
4629 (struct remote_notif_state) <remote>: New field.
4630 (remote_notif_ack, remote_notif_parse): Add remote_target
4632 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4633 remote_target parameter.
4634 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4635 (threads_listing_context, rmt_thread_action, protocol_feature)
4636 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4637 (packet_result, struct threads_listing_context, remote_state):
4638 Move definitions and declarations higher up.
4639 (remote_target) <~remote_target>: Declare.
4640 (remote_download_command_source, remote_file_put, remote_file_get)
4641 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4642 (remote_hostio_pread_vFile, remote_hostio_send_command)
4643 (remote_hostio_set_filesystem, remote_hostio_open)
4644 (remote_hostio_close, remote_hostio_unlink, remote_state)
4645 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4646 (get_memory_write_packet_size, get_memory_read_packet_size)
4647 (append_pending_thread_resumptions, remote_detach_1)
4648 (append_resumption, remote_resume_with_vcont)
4649 (add_current_inferior_and_thread, wait_ns, wait_as)
4650 (process_stop_reply, remote_notice_new_inferior)
4651 (process_initial_stop_replies, remote_add_thread)
4652 (btrace_sync_conf, remote_btrace_maybe_reopen)
4653 (remove_new_fork_children, kill_new_fork_children)
4654 (discard_pending_stop_replies, stop_reply_queue_length)
4655 (check_pending_events_prevent_wildcard_vcont)
4656 (discard_pending_stop_replies_in_queue, stop_reply)
4657 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4658 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4659 (remote_interrupt_as, remote_interrupt_ns)
4660 (remote_get_noisy_reply, remote_query_attached)
4661 (remote_add_inferior, remote_current_thread, get_current_thread)
4662 (set_thread, set_general_thread, set_continue_thread)
4663 (set_general_process, write_ptid)
4664 (remote_unpack_thread_info_response, remote_get_threadinfo)
4665 (parse_threadlist_response, remote_get_threadlist)
4666 (remote_threadlist_iterator, remote_get_threads_with_ql)
4667 (remote_get_threads_with_qxfer)
4668 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4669 (get_offsets, remote_check_symbols, remote_supported_packet)
4670 (remote_query_supported, remote_packet_size)
4671 (remote_serial_quit_handler, remote_detach_pid)
4672 (remote_vcont_probe, remote_resume_with_hc)
4673 (send_interrupt_sequence, interrupt_query)
4674 (remote_notif_get_pending_events, fetch_register_using_p)
4675 (send_g_packet, process_g_packet, fetch_registers_using_g)
4676 (store_register_using_P, store_registers_using_G)
4677 (set_remote_traceframe, check_binary_download)
4678 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4679 (remote_xfer_live_readonly_partial, remote_read_bytes)
4680 (remote_send_printf, remote_flash_write, readchar)
4681 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4682 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4683 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4684 (extended_remote_disable_randomization, extended_remote_run)
4685 (send_environment_packet, extended_remote_environment_support)
4686 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4687 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4688 (packet_command): Now methods of ...
4689 (remote_target): ... this class.
4690 (m_remote_state) <remote_target>: New field.
4691 (struct remote_state) <stop_reply_queue,
4692 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4694 (remote_state::remote_state): Allocate stop_reply_queue.
4695 (remote_state): Delete global.
4696 (get_remote_state_raw): Delete.
4697 (remote_target::get_remote_state): Allocate m_remote_state on
4699 (get_current_remote_target): New.
4700 (remote_ops, extended_remote_ops): Delete.
4701 (wait_forever_enabled_p, remote_async_inferior_event_token):
4702 Delete, moved to struct remote_state.
4703 (remote_target::close): Delete self. Destruction bits split to
4705 (remote_target::~remote_target): ... this.
4706 (show_memory_packet_size): Adjust to use
4707 get_current_remote_target.
4708 (struct protocol_feature) <func>: Add remote_target parameter.
4709 All callers adjusted.
4710 (curr_quit_handler_target): New.
4711 (remote_serial_quit_handler): Reimplement.
4712 (remote_target::open_1): Adjust to use get_current_remote_target.
4713 Heap-allocate remote_target/extended_remote_target instances.
4714 (vcont_builder::vcont_builder): Add remote_target parameter, and
4715 save it in m_remote. All callers adjusted.
4716 (vcont_builder::m_remote): New field.
4717 (vcont_builder::restart, vcont_builder::flush)
4718 (vcont_builder::push_action): Use it.
4719 (remote_target::commit_resume): Use it.
4720 (struct queue_iter_param) <remote>: New field.
4721 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4722 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4723 (check_pending_event_prevents_wildcard_vcont_callback)
4724 (remote_target::check_pending_events_prevent_wildcard_vcont)
4725 (remote_target::discard_pending_stop_replies)
4726 (remote_target::discard_pending_stop_replies_in_queue)
4727 (remote_target::remote_notif_remove_queued_reply): Fill in
4729 (remote_notif_get_pending_events): New.
4730 (remote_target::readchar, remote_target::remote_serial_write):
4731 Save/restore curr_quit_handler_target.
4733 (kill_new_fork_children): Fill in 'remote' field.
4734 (packet_command): Use get_current_remote_target, defer to
4735 remote_target method of same name.
4736 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4737 parameter, and save it in m_remote. All callers adjusted.
4738 (scoped_remote_fd::release): Use m_remote.
4739 (scoped_remote_fd::m_remote): New field.
4740 (remote_file_put, remote_file_get, remote_file_delete): Use
4741 get_current_remote_target, defer to remote_target method of same
4743 (remote_btrace_reset): Add remote_state paremeter. Update all
4745 (remote_async_inferior_event_handler). Pass down 'data'.
4746 (remote_new_objfile): Use get_current_remote_target.
4747 (remote_target::vcont_r_supported): New.
4748 (set_range_stepping): Use get_current_remote_target and
4749 remote_target::vcont_r_supported.
4750 (_initialize_remote): Don't allocate 'remote_state' and
4751 'stop_reply_queue' globals.
4752 * remote.h (struct remote_target): Forward declare.
4753 (getpkt, putpkt, remote_notif_get_pending_events): Add
4754 'remote_target' parameter.
4756 2018-05-22 Pedro Alves <palves@redhat.com>
4758 * remote.c (vcont_builder): Now a class. Make all data members
4760 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4762 (vcont_builder_restart): Rename to ...
4763 (vcont_builder::restart): ... this.
4764 (vcont_builder_flush): Rename to ...
4765 (vcont_builder::flush): ... this.
4766 (vcont_builder_push_action): Rename to ...
4767 (vcont_builder::push_action): ... this.
4768 (remote_target::commit_resume): Adjust.
4770 2018-05-22 Pedro Alves <palves@redhat.com>
4772 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4773 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4774 (get_fixed_memory_packet_size): New.
4775 (get_memory_packet_size): Use it.
4776 (set_memory_packet_size): Don't override the config size with
4777 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4778 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4779 Don't refer to get_memory_packet_size if not connected to a remote
4780 target. Show "(default)" if configured size is 0.
4782 2018-05-22 Pedro Alves <palves@redhat.com>
4784 * remote.c (remote_target::mourn_inferior): Move
4785 discard_pending_stop_replies call here from ...
4786 (_initialize_remote): ... here.
4788 2018-05-22 Pedro Alves <palves@redhat.com>
4790 * remote.c (compare_section_command): Remove set_general_process
4793 2018-05-22 Pedro Alves <palves@redhat.com>
4795 * remote.c (struct packet_reg, struct remote_arch_state):
4796 Move higher up in the file.
4797 (remote_state) <m_arch_states>: Store remote_arch_state values
4798 instead of remote_arch_state pointers.
4799 (remote_state::get_remote_arch_state): Adjust.
4801 2018-05-22 Pedro Alves <palves@redhat.com>
4803 * remote.c: Include <unordered_map>.
4804 (remote_state): Now a class.
4805 (remote_state) <get_remote_arch_state>: Declare method.
4806 <get_remote_arch_state>: New field.
4807 (remote_arch_state) <remote_arch_state>: Declare ctor.
4808 <regs>: Now a unique_ptr.
4809 (remote_gdbarch_data_handle): Delete.
4810 (get_remote_arch_state): Delete.
4811 (remote_state::get_remote_arch_state): New.
4812 (get_remote_state): Adjust to call remote_state's
4813 get_remote_arch_state method.
4814 (init_remote_state): Delete, bits factored out to ...
4815 (remote_arch_state::remote_arch_state): ... this new method.
4816 (get_remote_packet_size, get_memory_packet_size)
4817 (process_g_packet, remote_target::fetch_registers)
4818 (remote_target::prepare_to_store, store_registers_using_G)
4819 (remote_target::store_registers, remote_target::get_trace_status):
4820 Adjust to call remote_state's method.
4821 (_initialize_remote): Remove reference to
4822 remote_gdbarch_data_handle.
4824 2018-05-22 Pedro Alves <palves@redhat.com>
4826 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4827 pread>: New method declarations.
4828 (remote_target::open_1): Adjust.
4829 (readahead_cache_invalidate): Rename to ...
4830 (readahead_cache::invalidate): ... this, and adjust to be a class
4832 (readahead_cache_invalidate_fd): Rename to ...
4833 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4835 (remote_hostio_pwrite): Adjust.
4836 (remote_hostio_pread_from_cache): Rename to ...
4837 (readahead_cache::pread): ... this, and adjust to be a class
4839 (remote_hostio_close): Adjust.
4841 2018-05-22 Pedro Alves <palves@redhat.com>
4843 * remote.c (remote_hostio_close_cleanup): Delete.
4844 (class scoped_remote_fd): New.
4845 (remote_file_put, remote_file_get): Use it.
4847 2018-05-22 Pedro Alves <palves@redhat.com>
4849 (struct vCont_action_support): Use bool and initialize all fields.
4850 (struct readahead_cache): Initialize all fields.
4851 (remote_state): Use bool and initialize all fields.
4852 (remote_state::remote_state, remote_state::~remote_state): New.
4853 (new_remote_state): Delete.
4854 (_initialize_remote): Use new to allocate remote_state.
4856 2018-05-22 Pedro Alves <palves@redhat.com>
4860 * c-exp.y: Include "c-support.h".
4861 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4862 of tolower. Use c_ident_is_alpha to scan names.
4863 * c-lang.c: Include "c-support.h".
4864 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4865 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4866 * c-support.h: New file, with bits factored out from ...
4867 * cp-name-parser.y: ... this file.
4868 Include "c-support.h".
4869 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4870 c-support.h and renamed.
4871 (symbol_end, yylex): Adjust.
4873 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4875 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4876 parameter type to CORE_ADDR.
4877 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4878 parameter type in declaration to CORE_ADDR.
4879 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4880 target_auxv_search to get AT_HWCAP and use the result to get the
4882 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4883 to CORE_ADDR. Remove the cast of the return value to unsigned
4884 long. Fix error predicate of target_auxv_search.
4885 (ppc_linux_nat_target::read_description): Change the type of the
4886 hwcap variable to CORE_ADDR.
4888 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4890 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4891 if the size of fpscr is larger than 32 bits.
4893 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4895 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4896 (ppc32_linux_vsxregmap): New global.
4897 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4898 regcache_supply_regset, and regcache_collect_regset.
4899 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4900 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4901 (fetch_vsx_register, store_vsx_register): Remove.
4902 (fetch_vsx_registers): Add regno parameter. Get regset using
4903 ppc_linux_vsxregset. Use regset to supply registers.
4904 (store_vsx_registers): Add regno parameter. Get regset using
4905 ppc_linux_vsxregset. Use regset to collect registers.
4906 (fetch_register): Call fetch_vsx_registers instead of
4908 (store_register): Call store_vsx_registers instead of
4910 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4911 new regno parameter.
4912 (store_ppc_registers): Call store_vsx_registers with -1 for the
4913 new regno parameter.
4914 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4915 (ppc_collect_vsxregset): Remove.
4917 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4919 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4921 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4922 for vector register offset fields.
4923 (ppc64_fbsd_reg_offsets): Likewise.
4924 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4925 to vector register offset fields.
4926 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4927 to vector register offset fields.
4928 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4929 vector register offset fields.
4930 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4931 initializers for vector register offset fields.
4932 (rs6000_aix64_reg_offsets): Likewise.
4933 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4934 (ppc_supply_vrregset): Remove.
4935 (ppc_collect_vrregset): Remove.
4936 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4937 (ppc_linux_vrregset) : New function.
4938 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4939 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4940 (ppc32_linux_vrregset): Remove.
4941 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4942 and use result instead of ppc32_linux_vrregset.
4943 (ppc32_linux_reg_offsets): Remove initializers for vector register
4945 (ppc64_linux_reg_offsets): Likewise.
4946 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4947 * ppc-linux-nat.c: Include regset.h.
4948 (gdb_vrregset_t): Adjust comment to account for little-endian
4950 (supply_vrregset, fill_vrregset): Remove.
4951 (fetch_altivec_register, store_altivec_register): Remove.
4952 (fetch_altivec_registers): Add regno parameter. Get regset using
4953 ppc_linux_vrregset. Use regset to supply registers.
4954 (store_altivec_registers): Add regno parameter. Get regset using
4955 ppc_linux_vrregset. Use regset to collect registers.
4956 (fetch_register): Call fetch_altivec_registers instead of
4957 fetch_altivec_register.
4958 (store_register): Call store_altivec_registers instead of
4959 store_altivec_register.
4960 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4961 the new regno parameter.
4962 (store_ppc_registers): Call store_altivec_registers with -1 for
4963 the new regno parameter.
4965 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4967 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4968 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4969 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4970 (gdb_vrregset_t): Change array type size to
4971 PPC_LINUX_SIZEOF_VRREGSET.
4972 (gdb_vsxregset_t): Change array type size to
4973 PPC_LINUX_SIZEOF_VSXREGSET.
4974 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4975 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4976 PPC_LINUX_SIZEOF_VSXREGSET.
4978 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4980 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4981 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4983 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4984 ppc_linux_target_wordsize with tid.
4985 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4987 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4988 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4989 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4990 tid parameter. Remove static specifier.
4991 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4992 (ppc_linux_target_wordsize): New declaration.
4994 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4996 * arch/ppc-linux-common.c: New file.
4997 * arch/ppc-linux-common.h: New file.
4998 * arch/ppc-linux-tdesc.h: New file.
4999 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5000 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5001 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5002 arch/ppc-linux-tdesc.h.
5003 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5004 arch/ppc-linux-tdesc.h.
5005 (ppc_linux_nat_target::read_description): Remove target
5006 description matching code. Fill a ppc_linux_features struct and
5007 call ppc_linux_match_description with it. Move comment about ISA
5008 2.05 to ppc-linux-common.c.
5009 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5010 arch/ppc-linux-tdesc.h.
5011 (ppc_linux_core_read_description): Remove target description
5012 matching code. Fill a ppc_linux_features struct and call
5013 ppc_linux_match_description with it.
5014 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5015 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5016 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5017 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5018 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5019 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5020 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5021 (tdesc_powerpc_e500l): Remove.
5023 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5025 * ada-lang.c (catch_assert_command): Pass empty string instead
5026 of NULL for excep_string argument.
5028 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5030 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5031 the width of the requested register exceeds the width of the
5034 2018-05-21 Tom Tromey <tom@tromey.com>
5036 * printcmd.c (output_command): Remove.
5037 (output_command_const): Rename to output_command.
5038 * valprint.h (output_command): Rename from output_command_const.
5039 * tracepoint.c (trace_dump_actions): Call output_command.
5041 2018-05-21 Tom Tromey <tom@tromey.com>
5043 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5044 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5045 * ada-lang.h (create_ada_exception_catchpoint): Update.
5046 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5048 (create_excep_cond_exprs, ~ada_catchpoint)
5049 (should_stop_exception, print_one_exception)
5050 (print_mention_exception, print_recreate_exception): Update.
5051 (ada_get_next_arg): Remove.
5052 (catch_ada_exception_command_split): Use std::string. Change type
5053 of "excep_string", "cond_string".
5054 (catch_ada_exception_command): Update.
5055 (create_ada_exception_catchpoint): Change type of excep_string.
5056 (ada_exception_sal): Remove excep_string parameter.
5057 (~ada_catchpoint): Remove.
5059 2018-05-21 Tom Tromey <tom@tromey.com>
5061 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5064 2018-05-21 Tom Tromey <tom@tromey.com>
5066 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5067 Return unique_xmalloc_ptr.
5068 (print_it_exception): Update.
5070 2018-05-21 Tom Tromey <tom@tromey.com>
5072 * tracepoint.c (trace_dump_actions): Use std::string.
5074 2018-05-21 Tom Tromey <tom@tromey.com>
5076 * symfile.c (reread_symbols): Use std::string for original_name.
5078 2018-05-21 Tom Tromey <tom@tromey.com>
5080 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5081 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5084 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5086 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5088 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5089 * objfiles.c (get_objfile_bfd_data): Allocate
5090 objfile_per_bfd_storage with obstack_new when allocating on
5093 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5095 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5097 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5098 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5099 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5100 (add_pending): Likewise.
5101 (parse_symbol): Likewise.
5102 (parse_partial_symbols): Likewise.
5103 (psymtab_to_symtab_1): Likewise.
5104 (new_psymtab): Likewise.
5105 (elfmdebug_build_psymtabs): Likewise.
5106 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5107 * objfiles.c (get_objfile_bfd_data): Likewise.
5108 (objfile_register_static_link): Likewise.
5109 * psymtab.c (allocate_psymtab): Likewise.
5110 * stabsread.c (read_member_functions): Likewise.
5111 * xcoffread.c (xcoff_end_psymtab): Likewise.
5113 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5115 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5116 compiler supports std::is_trivially_constructible.
5117 * common/poison.h: Include obstack.h.
5118 (IsMallocable): Define to is_trivially_constructible if the
5119 compiler supports it, define to true_type otherwise.
5123 (XOBNEWVEC): Redefine.
5124 * gdb_obstack.h (obstack_zalloc): New.
5125 (OBSTACK_ZALLOC): Redefine.
5126 (obstack_calloc): New.
5127 (OBSTACK_CALLOC): Redefine.
5129 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5130 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5132 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5133 obstack_calloc/obstack_zalloc.
5134 (gdbarch_obstack_zalloc): Remove.
5135 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5137 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5139 * stack.c (backtrace_command_1): Remove useless variable int i.
5141 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5143 * stack.c (print_frame_info): Fix comment.
5145 2018-05-18 Tom Tromey <tom@tromey.com>
5147 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5148 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5149 (~dwarf2_per_objfile): Update
5150 (dwarf2_get_dwz_file): Use new.
5151 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5154 2018-05-18 Tom Tromey <tom@tromey.com>
5156 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5158 * dwarf2read.c (struct dwp_file): Add constructor and
5160 (open_and_init_dwp_file): Return a unique_ptr.
5161 (dwarf2_per_objfile, create_dwp_hash_table)
5162 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5163 (lookup_dwo_unit_in_dwp): Update.
5164 (open_and_init_dwp_file, get_dwp_file): Update.
5166 2018-05-18 Tom Tromey <tom@tromey.com>
5168 * dwarf2read.c (dwarf2_per_objfile): Update.
5169 (struct mapped_index): Add initializers.
5170 (dwarf2_read_index): Use new.
5171 (dw2_symtab_iter_init): Update.
5172 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5175 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5177 * dwarf2read.c (mapped_index) <total_size>: Remove.
5179 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5181 * unittests/format_pieces-selftests.c (test_format_specifier):
5184 2018-05-18 Tom Tromey <tom@tromey.com>
5186 * c-typeprint.c (maybe_print_hole): New function.
5187 (c_print_type_struct_field_offset): Update.
5188 (c_type_print_base_struct_union): Call maybe_print_hole.
5190 2018-05-17 Keith Seitz <keiths@redhat.com>
5192 * breakpoint.c (build_bpstat_chain): New function, moved from
5194 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5195 If no stop chain is passed, call build_bpstat_chain to build it.
5196 * breakpoint.h (build_bpstat_chain): Declare.
5197 (bpstat_stop_status): Move documentation here from breakpoint.c.
5198 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5199 build the stop chain and pass it to skip_inline_frames.
5200 Pass this stop chain to bpstat_stop_status.
5201 * inline-frame.c: Include breakpoint.h.
5202 (stopped_by_user_bp_inline_frame): New function.
5203 (skip_inline_frames): Add parameter `stop_chain'.
5204 Move documention to inline-frame.h.
5205 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5206 whether the frame should be elided.
5207 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5208 Add moved documentation and update for new parameter.
5210 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5213 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5214 unittests/format_pieces-selftests.c.
5215 * common/format.h (format_piece) <operator==>: New.
5216 (format_pieces) <operator[]>: Remove.
5217 * common/format.c (format_pieces::format_pieces): Handle \e.
5218 * unittests/format_pieces-selftests.c: New.
5220 2018-05-17 Tom Tromey <tom@tromey.com>
5223 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5224 (dw2_instantiate_symtab): Add skip_partial parameter.
5225 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5226 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5227 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5228 (dw2_expand_symtabs_matching_one)
5229 (dw2_find_pc_sect_compunit_symtab)
5230 (dw2_debug_names_lookup_symbol)
5231 (dw2_debug_names_expand_symtabs_for_function): Update.
5232 (init_cutu_and_read_dies): Add skip_partial parameter.
5233 (process_psymtab_comp_unit, build_type_psymtabs_1)
5234 (process_skeletonless_type_unit, load_partial_comp_unit)
5235 (psymtab_to_symtab_1): Update.
5236 (load_full_comp_unit): Add skip_partial parameter.
5237 (process_imported_unit_die, dwarf2_read_addr_index)
5238 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5239 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5240 (read_signatured_type): Update.
5242 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5244 * value.c (release_value): Remove unused variable.
5245 (record_latest_value): Likewise.
5246 (access_value_history): Likewise.
5247 (preserve_values): Likewise.
5249 2018-05-17 Tom Tromey <tom@tromey.com>
5251 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5254 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5257 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5258 Also handle registers whose width is not a multiple of
5260 (linux_nat_trad_target::store_register): Likewise.
5262 2018-05-16 Tom Tromey <tom@tromey.com>
5264 * gdbcore.h (core_bfd): Redefine.
5265 * corelow.c (core_target::close): Update.
5266 (core_target_open): Update.
5267 * progspace.h (struct program_space) <cbfd>: Now a
5270 2018-05-16 Tom Tromey <tom@tromey.com>
5273 * symfile-add-flags.h (enum symfile_add_flags)
5274 <SYMFILE_NOT_FILENAME>: New constant.
5275 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5276 objfile name from BFD.
5277 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5278 * minidebug.c (find_separate_debug_file_in_section): Put
5279 ".gnu_debugdata" into BFD's file name.
5281 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5283 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5286 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5289 * aarch64-tdep.c (aarch64_analyze_prologue,
5290 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5291 Indicate not interested in errors.
5293 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5295 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5296 Supply the MIPS_ZERO_REGNUM register.
5298 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5300 * mips-tdep.c (mask_address_var): Make variable static.
5302 2018-05-14 Tom Tromey <tom@tromey.com>
5304 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5306 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5308 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5309 FXSAVE_ADDR for the mxcsr register.
5311 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5313 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5315 2018-05-11 Pedro Alves <palves@redhat.com>
5317 * corelow.c (core_target) <core_target>: No longer inline.
5318 Initialize m_core_gdbarch, m_core_vec and build the section table
5320 <~core_target>: New.
5321 <core_gdbarch, get_core_register_section>: New methods.
5322 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5323 factored out from ...
5324 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5326 (sniff_core_bfd): Add gdbarch parameter.
5327 (core_close): Delete, merged into ...
5328 (core_target::close): ... here. Delete self.
5329 (core_close_cleanup): Delete.
5330 (core_target_open): Allocate a core_target on the heap. Use a
5331 unique_ptr instead of a cleanup. Bits moved into the core_target
5332 ctor. Adjust to use core_target methods instead of globals.
5333 (get_core_register_section): Rename to ...
5334 (core_target::get_core_register_section): ... this and adjust.
5335 (struct get_core_registers_cb_data): New.
5336 (get_core_registers_cb): Use it. Use bool.
5337 (core_target::fetch_registers, core_target::files_info)
5338 (core_target::xfer_partial, core_target::read_description)
5339 (core_target::pid_to, core_target::thread_name): Adjust to
5340 reference class fields instead of globals.
5341 * target.h (struct target_ops_deleter, target_ops_up): New.
5343 2018-05-11 Pedro Alves <palves@redhat.com>
5345 * corefile.c (core_file_command): Move to corelow.c.
5346 * corelow.c (the_core_target): Delete.
5347 (core_file_command): Moved from corefile.c. Check exec_bfd
5348 instead of the_core_target. Use target_detach instead of calling
5349 into the_core_target directly.
5350 (maybe_say_no_core_file_now): New.
5351 (core_target::detach): Use it.
5352 (_initialize_corelow): Remove references to the_core_target.
5353 * gdbcore.h (the_core_target): Delete.
5355 2018-05-11 Tom Tromey <tromey@redhat.com>
5356 Pedro Alves <palves@redhat.com>
5358 * corefile.c (core_bfd): Remove.
5359 * gdbcore.h (core_bfd): Now a macro.
5360 * progspace.h (struct program_space) <cbfd>: New field.
5362 2018-05-11 Tom Tromey <tom@tromey.com>
5364 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5367 2018-05-10 Tom Tromey <tom@tromey.com>
5369 * configure: Rebuild.
5370 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5372 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5375 * regformats/regdat.sh: Adjust script, following the addition
5376 of the new expedite_regs parameter to init_target_desc.
5378 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5381 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5382 set_gdbarch_significant_addr_bit.
5383 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5384 set_gdbarch_significant_addr_bit.
5385 * utils.c (address_significant): Update to sign extend addr.
5387 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5389 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5390 (xtensa_linux_init_abi): Limit tdep->num_regs by
5391 tdep->num_nopriv_regs.
5392 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5393 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5396 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5398 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5400 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5402 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5403 (I387_MXCSR_INIT_VAL): New constant.
5404 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5405 buffer if it was supplied by the inferior.
5406 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5407 (i387_xsave_get_clear_bv): New function.
5408 (i387_supply_xsave): Only read x87 control registers from the
5409 xsave buffer if the feature is enabled, and the state will have
5410 been written, otherwise, provide a suitable default.
5411 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5412 including x87 control registers. Update control registers if they
5413 have changed from the default value, and mark features as enabled
5415 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5417 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5419 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5421 2018-05-07 Tom Tromey <tom@tromey.com>
5423 * configure: Rebuild.
5424 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5426 2018-05-07 Tom Tromey <tom@tromey.com>
5429 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5430 bit. Use correct value for VDIV.
5432 2018-05-04 Tom Tromey <tom@tromey.com>
5434 * configure: Rebuild.
5435 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5437 2018-05-04 Tom Tromey <tom@tromey.com>
5439 * linux-record.c (record_linux_system_call) <case
5440 RECORD_SYS_RECVFROM>: Add "break".
5442 2018-05-04 Tom Tromey <tom@tromey.com>
5444 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5445 Add missing "break".
5446 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5447 Add missing "break".
5449 2018-05-04 Tom Tromey <tom@tromey.com>
5451 * rs6000-tdep.c (ppc_process_record_op4)
5452 (ppc_process_record_op63): Add fall-through comment.
5454 2018-05-04 Tom Tromey <tom@tromey.com>
5456 * i386-tdep.c (i386_process_record): Add fall-through comment.
5458 2018-05-04 Tom Tromey <tom@tromey.com>
5460 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5463 2018-05-04 Tom Tromey <tom@tromey.com>
5465 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5466 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5467 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5469 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5471 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5474 2018-05-04 Tom Tromey <tom@tromey.com>
5476 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5478 2018-05-04 Tom Tromey <tom@tromey.com>
5480 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5481 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5482 * symfile.c (section_is_mapped): Fix fall-through comment.
5483 * stabsread.c (define_symbol, read_member_functions): Fix
5484 fall-through comment.
5485 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5487 * remote.c (remote_wait_as): Fix fall-through comment.
5488 * p-exp.y (yylex): Fix fall-through comment.
5489 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5491 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5492 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5493 * jv-exp.y (yylex): Fix fall-through comment.
5494 * go-exp.y (lex_one_token): Fix fall-through comment.
5495 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5496 fall-through comment.
5497 * f-exp.y (yylex): Fix fall-through comment.
5498 * dwarf2read.c (process_die): Fix fall-through comments.
5499 * dbxread.c (process_one_symbol): Fix fall-through comment.
5500 * d-exp.y (lex_one_token): Fix fall-through comment.
5501 * cp-name-parser.y (yylex): Fix fall-through comment.
5502 * coffread.c (coff_symtab_read): Fix fall-through comment.
5503 * c-exp.y (lex_one_token): Fix fall-through comment.
5504 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5506 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5509 2018-05-04 Tom Tromey <tom@tromey.com>
5512 * NEWS: Mention gdb.execute change.
5513 * gdbcmd.h (execute_control_command): Don't declare.
5514 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5515 execute_control_commands, execute_control_commands_to_string.
5516 * cli/cli-script.h (execute_control_commands)
5517 (execute_control_commands_to_string): Declare.
5518 (execute_control_command): Add from_tty parameter.
5519 * cli/cli-script.c (execute_control_commands)
5520 (execute_control_commands_to_string): New functions.
5521 (execute_user_command): Use execute_control_commands.
5522 (execute_control_command_1): Add "from_tty" parameter. Update.
5523 (execute_control_command): Likewise.
5525 2018-05-04 Tom Tromey <tom@tromey.com>
5528 * NEWS: Mention that breakpoint commands are writable.
5529 * python/py-breakpoint.c (bppy_set_commands): New function.
5530 (breakpoint_object_getset) <"commands">: Use it.
5532 2018-05-04 Tom Tromey <tom@tromey.com>
5534 * tracepoint.c (actions_command): Update.
5535 * mi/mi-cmd-break.c (mi_command_line_array)
5536 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5537 (mi_read_next_line): Remove.
5538 (mi_cmd_break_commands): Update.
5539 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5541 * cli/cli-script.c (get_command_line): Update.
5542 (process_next_line): Use function_view. Constify.
5543 (recurse_read_control_structure, read_command_lines)
5544 (read_command_lines_1): Change argument types to function_view.
5545 (do_define_command, document_command): Update.
5546 * breakpoint.h (check_tracepoint_command): Don't declare.
5547 * breakpoint.c (check_tracepoint_command): Remove.
5548 (commands_command_1, create_tracepoint_from_upload): Update.
5550 2018-05-04 Tom Tromey <tom@tromey.com>
5553 * cli/cli-script.h (enum command_control_type) <define_control>:
5555 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5556 (build_command_line, execute_control_command_1)
5557 (process_next_line): Likewise.
5558 (do_define_command): New function, extracted from define_command.
5559 (define_command): Use it.
5561 2018-05-04 Tom Tromey <tom@tromey.com>
5563 * tracepoint.c (actions_command): Update.
5564 * cli/cli-script.h (read_command_lines): Update.
5565 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5566 (MAX_TMPBUF): Remove define.
5567 (define_command): Use string_printf.
5568 (document_command): Likewise.
5569 * breakpoint.c (commands_command_1): Update.
5571 2018-05-04 Tom Tromey <tom@tromey.com>
5573 * top.c (execute_command): Update.
5574 * cli/cli-script.h (print_command_lines): Now varargs.
5575 * cli/cli-script.c (print_command_lines): Now varargs.
5576 (execute_control_command_1) <case while_control, case if_control>:
5579 2018-05-04 Tom Tromey <tom@tromey.com>
5581 * tracepoint.c (all_tracepoint_actions): Rename from
5582 all_tracepoint_actions_and_cleanup. Change return type.
5583 (actions_command, encode_actions_1, encode_actions)
5584 (trace_dump_actions, tdump_command): Update.
5585 * remote.c (remote_download_command_source): Update.
5586 * python/python.c (gdbpy_eval_from_control_command)
5587 (python_command, python_interactive_command): Update.
5588 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5589 * guile/guile.c (guile_command)
5590 (gdbscm_eval_from_control_command, guile_command): Update.
5591 * compile/compile.c (compile_code_command)
5592 (compile_print_command, compile_to_object): Update.
5593 * cli/cli-script.h (struct command_lines_deleter): New.
5594 (counted_command_line): New typedef.
5595 (struct command_line): Add constructor, destructor.
5596 <body_list>: Remove.
5597 <body_list_0, body_list_1>: New members.
5598 (command_line_up): Remove typedef.
5599 (read_command_lines, read_command_lines_1, get_command_line):
5601 (copy_command_lines): Don't declare.
5602 * cli/cli-script.c (build_command_line): Use "new".
5603 (get_command_line): Return counted_command_line.
5604 (print_command_lines, execute_user_command)
5605 (execute_control_command_1, while_command, if_command): Update.
5606 (realloc_body_list): Remove.
5607 (process_next_line, recurse_read_control_structure): Update.
5608 (read_command_lines, read_command_lines_1): Return counted_command_line.
5609 (free_command_lines): Use "delete".
5610 (copy_command_lines): Remove.
5611 (define_command, document_command, show_user_1): Update.
5612 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5613 a counted_command_line.
5614 * breakpoint.h (counted_command_line): Remove typedef.
5615 (breakpoint_set_commands): Update.
5616 * breakpoint.c (check_no_tracepoint_commands)
5617 (validate_commands_for_breakpoint): Update.
5618 (breakpoint_set_commands): Change commands to be a
5619 counted_command_line.
5620 (commands_command_1, update_dprintf_command_list)
5621 (create_tracepoint_from_upload): Update.
5623 2018-05-04 Tom Tromey <tom@tromey.com>
5625 * cli/cli-decode.h (cmd_list_element): New constructor.
5626 (~cmd_list_element): New destructor.
5627 (struct cmd_list_element): Add initializers.
5628 * cli/cli-decode.c (do_add_cmd): Use "new".
5629 (delete_cmd): Use "delete".
5631 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5632 Pedro Alves <palves@redhat.com>
5634 PR breakpoints/19806 and support for PR external/20207.
5635 * NEWS: Mention Aarch64 watchpoint improvements.
5636 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5637 watchpoints and PR external/20207 watchpoints.
5638 * nat/aarch64-linux-hw-point.c
5639 (kernel_supports_any_contiguous_range): New.
5640 (aarch64_watchpoint_offset): New.
5641 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5642 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5643 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5644 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5645 next_addr_orig_p. Support PR external/20207 watchpoints.
5646 (aarch64_downgrade_regs): New.
5647 (aarch64_dr_state_insert_one_point): New parameters offset and
5649 (aarch64_dr_state_remove_one_point): Likewise.
5650 (aarch64_handle_breakpoint): Update caller.
5651 (aarch64_handle_aligned_watchpoint): Likewise.
5652 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5654 (aarch64_linux_set_debug_regs): Remove const from state. Call
5655 aarch64_downgrade_regs.
5656 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5657 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5658 (DR_CONTROL_MASK): ... this.
5659 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5660 (unsigned int aarch64_watchpoint_offset): New prototype.
5661 (aarch64_linux_set_debug_regs): Remove const from state.
5662 * utils.c (align_up, align_down): Move to ...
5663 * common/common-utils.c (align_up, align_down): ... here.
5664 * utils.h (align_up, align_down): Move to ...
5665 * common/common-utils.h (align_up, align_down): ... here.
5667 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5669 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5670 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5671 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5672 Re-implement to match the ABI as summarized in GCC's
5673 gcc/config/sparc/sparc.c. All callers updated.
5674 (sparc32_store_arguments): Remove assertion.
5676 2018-05-04 Tom Tromey <tom@tromey.com>
5678 * printcmd.c: Don't include tui.h.
5679 (decode_format): Use skip_spaces.
5681 2018-05-04 Tom Tromey <tom@tromey.com>
5684 * printcmd.c (last_count): New global.
5685 (x_command): Use saved count when repeating.
5687 2018-05-04 Tom Tromey <tom@tromey.com>
5689 * nto-procfs.c (do_closedir_cleanup): Remove.
5690 (procfs_pidlist): Use gdb_dir_up.
5691 * procfs.c (do_closedir_cleanup): Remove.
5692 (proc_update_threads): Use gdb_dir_up.
5693 * common/filestuff.h (struct gdb_dir_deleter): New.
5694 (gdb_dir_up): New typedef.
5696 2018-05-04 Tom Tromey <tom@tromey.com>
5698 * ada-lang.c (print_mention_exception): Use std::string.
5700 2018-05-04 Tom Tromey <tom@tromey.com>
5702 * ada-lang.c (create_excep_cond_exprs): Update.
5703 (ada_exception_catchpoint_cond_string): Use std::string.
5705 2018-05-04 Tom Tromey <tom@tromey.com>
5707 * ada-lang.c (xget_renaming_scope): Return std::string.
5708 (old_renaming_is_invisible): Update.
5710 2018-05-04 Tom Tromey <tom@tromey.com>
5712 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5713 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5715 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5717 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5719 2018-05-04 Tom Tromey <tom@tromey.com>
5721 * remote.c (remote_query_supported_append): Change type.
5722 (remote_check_symbols): Update.
5724 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5727 * configure.ac: Prepend libpython.
5728 * python/python-config.py: Likewise.
5729 * configure: Regenerate.
5731 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5733 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5735 2018-05-03 Pedro Alves <palves@redhat.com>
5738 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5739 override. Write 'true' instead of '1'.
5740 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5743 2018-05-02 Pedro Alves <palves@redhat.com>
5745 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5746 add_inf_child_target.
5747 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5748 add_inf_child_target.
5749 * aix-thread.c (aix_thread_target_info): New.
5750 (aix_thread_target) <shortname, longname, doc>: Delete.
5752 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5753 add_inf_child_target.
5754 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5755 add_inf_child_target.
5756 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5757 add_inf_child_target.
5758 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5759 add_inf_child_target.
5760 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5761 add_inf_child_target.
5762 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5763 add_inf_child_target.
5764 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5765 add_inf_child_target.
5766 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5767 add_inf_child_target.
5768 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5769 add_inf_child_target.
5770 * bfd-target.c (target_bfd_target_info): New.
5771 (target_bfd) <shortname, longname, doc>: Delete.
5773 * bsd-kvm.c (bsd_kvm_target_info): New.
5774 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5776 (bsd_kvm_target::open): Rename to ...
5777 (bsd_kvm_target_open): ... this. Adjust.
5778 * bsd-uthread.c (bsd_uthread_target_info): New.
5779 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5781 * corefile.c (core_file_command): Adjust.
5782 * corelow.c (core_target_info): New.
5783 (core_target) <shortname, longname, doc>: Delete.
5785 (core_target::open): Rename to ...
5786 (core_target_open): ... this. Adjust.
5787 * ctf.c (ctf_target_info): New.
5788 (ctf_target) <shortname, longname, doc>: Delete.
5790 (ctf_target::open): Rename to ...
5791 (ctf_target_open): ... this.
5792 (_initialize_ctf): Adjust.
5793 * exec.c (exec_target_info): New.
5794 (exec_target) <shortname, longname, doc>: Delete.
5796 (exec_target::open): Rename to ...
5797 (exec_target_open): ... this.
5798 * gdbcore.h (core_target_open): Declare.
5799 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5800 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5801 add_inf_child_target.
5802 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5803 add_inf_child_target.
5804 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5805 add_inf_child_target.
5806 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5807 add_inf_child_target.
5808 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5809 add_inf_child_target.
5810 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5811 add_inf_child_target.
5812 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5813 add_inf_child_target.
5814 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5815 add_inf_child_target.
5816 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5817 add_inf_child_target.
5818 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5819 add_inf_child_target.
5820 * inf-child.c (inf_child_target_info): New.
5821 (inf_child_target::info): New.
5822 (inf_child_open_target): Remove 'target' parameter. Use
5823 get_native_target instead.
5824 (inf_child_target::open): Delete.
5825 (add_inf_child_target): New.
5826 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5829 (add_inf_child_target): Declare.
5830 (inf_child_open_target): Declare.
5831 * linux-thread-db.c (thread_db_target_info): New.
5832 (thread_db_target) <shortname, longname, doc>: Delete.
5834 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5835 add_inf_child_target.
5836 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5837 add_inf_child_target.
5838 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5839 add_inf_child_target.
5840 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5841 add_inf_child_target.
5842 * make-target-delegates (print_class): Adjust.
5843 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5844 add_inf_child_target.
5845 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5846 add_inf_child_target.
5847 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5848 add_inf_child_target.
5849 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5850 add_inf_child_target.
5851 * nto-procfs.c (nto_native_target_info): New.
5852 (nto_procfs_target_native) <shortname, longname, doc>:
5855 (nto_procfs_target_info): New.
5856 (nto_procfs_target_procfs) <shortname, longname, doc>:
5859 (init_procfs_targets): Adjust.
5860 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5861 add_inf_child_target.
5862 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5863 add_inf_child_target.
5864 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5865 add_inf_child_target.
5866 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5867 add_inf_child_target.
5868 * ravenscar-thread.c (ravenscar_target_info): New.
5869 (ravenscar_thread_target) <shortname, longname, doc>:
5872 * record-btrace.c (record_btrace_target_info):
5873 (record_btrace_target) <shortname, longname, doc>: Delete.
5875 (record_btrace_target::open): Rename to ...
5876 (record_btrace_target_open): ... this. Adjust.
5877 * record-full.c (record_longname, record_doc): New.
5878 (record_full_base_target) <shortname, longname, doc>: Delete.
5880 (record_full_target_info): New.
5881 (record_full_target): <shortname>: Delete.
5883 (record_full_core_open_1, record_full_open_1): Update comments.
5884 (record_full_base_target::open): Rename to ...
5885 (record_full_open): ... this.
5886 (cmd_record_full_restore): Update.
5887 (_initialize_record_full): Update.
5888 * remote-sim.c (remote_sim_target_info): New.
5889 (gdbsim_target) <shortname, longname, doc>: Delete.
5891 (gdbsim_target::open): Rename to ...
5892 (gdbsim_target_open): ... this.
5893 (_initialize_remote_sim): Adjust.
5894 * remote.c (remote_doc): New.
5895 (remote_target_info): New.
5896 (remote_target) <shortname, longname, doc>: Delete.
5898 (extended_remote_target_info): New.
5899 (extended_remote_target) <shortname, longname, doc>: Delete.
5901 (remote_target::open_1): Make static. Adjust.
5902 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5903 * s390-linux-nat.c (_initialize_s390_nat): Use
5904 add_inf_child_target.
5905 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5906 add_inf_child_target.
5907 * sol-thread.c (thread_db_target_info): New.
5908 (sol_thread_target) <shortname, longname, doc>: Delete.
5910 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5911 add_inf_child_target.
5912 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5913 add_inf_child_target.
5914 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5915 add_inf_child_target.
5916 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5917 add_inf_child_target.
5918 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5919 add_inf_child_target.
5920 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5921 add_inf_child_target.
5922 * spu-linux-nat.c (_initialize_spu_nat): Use
5923 add_inf_child_target.
5924 * spu-multiarch.c (spu_multiarch_target_info): New.
5925 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5927 * target-delegates.c: Regenerate.
5928 * target.c: Include <unordered_map>.
5929 (target_ops_p): Delete.
5930 (DEF_VEC_P(target_ops_p)): Delete.
5931 (target_factories): New.
5932 (test_target_info): New.
5933 (test_target_ops::info): New.
5934 (open_target): Adjust to use target_factories.
5935 (add_target_with_completer): Rename to ...
5936 (add_target): ... this. Change prototype. Register target_info
5937 and open callback in target_factories. Register target_info in
5938 command context instead of target_ops.
5939 (add_target): Delete old implementation.
5940 (add_deprecated_target_alias): Change prototype. Adjust.
5941 (the_native_target): New.
5942 (set_native_target, get_native_target): New.
5943 (find_default_run_target): Use the_native_target.
5944 (find_attach_target, find_run_target): Simplify.
5945 (target_ops::open): Delete.
5946 (dummy_target_info): New.
5947 (dummy_target::shortname, dummy_target::longname)
5948 (dummy_target::doc): Delete.
5949 (dummy_target::info): New.
5950 (debug_target::shortname, debug_target::longname)
5951 (debug_target::doc): Delete.
5952 (debug_target::info): New.
5953 * target.h (struct target_info): New.
5954 (target_ops::~target_ops): Add comment.
5955 (target_ops::info): New.
5956 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5957 longer virtual. Implement in terms of target_info.
5958 (set_native_target, get_native_target): Declare.
5959 (target_open_ftype): New.
5960 (add_target, add_target_with_completer)
5961 (add_deprecated_target_alias): Change prototype.
5962 (test_target) <shortname, longname, doc>: Delete.
5964 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5965 add_inf_child_target.
5966 * tracefile-tfile.c (tfile_target_info): New.
5967 (tfile_target) <shortname, longname, doc>: Delete.
5969 (tfile_target::open): Rename to ...
5970 (tfile_target_open): ... this.
5971 (_initialize_tracefile_tfile): Adjust.
5972 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5973 add_inf_child_target.
5974 * windows-nat.c (_initialize_windows_nat): Use
5975 add_inf_child_target.
5976 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5977 add_inf_child_target.
5979 2018-05-02 Pedro Alves <palves@redhat.com>
5981 * linux-nat.h (linux_nat_target) <low_new_thread,
5982 low_delete_thread, low_new_fork, low_forget_process,
5983 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5984 New virtual methods.
5985 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5986 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5987 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5988 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5989 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5991 * linux-fork.c (delete_fork): Adjust to call low method.
5992 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5993 (linux_nat_new_fork, linux_nat_forget_process_hook)
5994 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5995 (linux_nat_status_is_event):
5996 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5997 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5999 (sigtrap_is_event): Rename to ...
6000 (linux_nat_target::low_status_is_event): ... this.
6001 (linux_nat_set_status_is_event): Delete.
6002 (save_stop_reason, linux_nat_wait_1)
6003 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6005 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6006 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6007 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6008 (linux_nat_set_prepare_to_resume): Delete.
6009 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6010 low virtual methods.
6011 * amd64-linux-nat.c: Likewise.
6012 * arm-linux-nat.c: Likewise.
6013 * i386-linux-nat.c: Likewise.
6014 * ia64-linux-nat.c: Likewise.
6015 * mips-linux-nat.c: Likewise.
6016 * ppc-linux-nat.c: Likewise.
6017 * s390-linux-nat.c: Likewise.
6018 * sparc64-linux-nat.c: Likewise.
6019 * x86-linux-nat.c: Likewise.
6020 * x86-linux-nat.h: Include "nat/x86-linux.h".
6021 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6022 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6025 2018-05-02 Pedro Alves <palves@redhat.com>
6027 * target.h (target_ops)
6028 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6029 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6030 stopped_by_watchpoint, have_continuable_watchpoint,
6031 stopped_data_address, watchpoint_addr_within_range,
6032 can_accel_watchpoint_condition, can_run, thread_alive,
6033 has_all_memory, has_memory, has_stack, has_registers,
6034 has_execution, can_async_p, is_async_p, supports_non_stop,
6035 always_non_stop_p, can_execute_reverse, supports_multi_process,
6036 supports_enable_disable_tracepoint,
6037 supports_disable_randomization, supports_string_tracing,
6038 supports_evaluation_of_breakpoint_conditions,
6039 can_run_breakpoint_commands, filesystem_is_local,
6040 can_download_tracepoint, get_trace_state_variable_value,
6041 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6042 record_is_replaying, record_will_replay,
6043 augmented_libraries_svr4_read>: Adjust to return bool.
6044 * aarch64-linux-nat.c: All implementations adjusted.
6045 * aix-thread.c: All implementations adjusted.
6046 * arm-linux-nat.c: All implementations adjusted.
6047 * breakpoint.c: All implementations adjusted.
6048 * bsd-kvm.c: All implementations adjusted.
6049 * bsd-uthread.c: All implementations adjusted.
6050 * corelow.c: All implementations adjusted.
6051 * ctf.c: All implementations adjusted.
6052 * darwin-nat.c: All implementations adjusted.
6053 * darwin-nat.h: All implementations adjusted.
6054 * exec.c: All implementations adjusted.
6055 * fbsd-nat.c: All implementations adjusted.
6056 * fbsd-nat.h: All implementations adjusted.
6057 * gnu-nat.c: All implementations adjusted.
6058 * gnu-nat.h: All implementations adjusted.
6059 * go32-nat.c: All implementations adjusted.
6060 * ia64-linux-nat.c: All implementations adjusted.
6061 * inf-child.c: All implementations adjusted.
6062 * inf-child.h: All implementations adjusted.
6063 * inf-ptrace.c: All implementations adjusted.
6064 * inf-ptrace.h: All implementations adjusted.
6065 * linux-nat.c: All implementations adjusted.
6066 * linux-nat.h: All implementations adjusted.
6067 * mips-linux-nat.c: All implementations adjusted.
6068 * nto-procfs.c: All implementations adjusted.
6069 * ppc-linux-nat.c: All implementations adjusted.
6070 * procfs.c: All implementations adjusted.
6071 * ravenscar-thread.c: All implementations adjusted.
6072 * record-btrace.c: All implementations adjusted.
6073 * record-full.c: All implementations adjusted.
6074 * remote-sim.c: All implementations adjusted.
6075 * remote.c: All implementations adjusted.
6076 * s390-linux-nat.c: All implementations adjusted.
6077 * sol-thread.c: All implementations adjusted.
6078 * spu-multiarch.c: All implementations adjusted.
6079 * target-delegates.c: All implementations adjusted.
6080 * target.c: All implementations adjusted.
6081 * target.h: All implementations adjusted.
6082 * tracefile-tfile.c: All implementations adjusted.
6083 * tracefile.c: All implementations adjusted.
6084 * tracefile.h: All implementations adjusted.
6085 * windows-nat.c: All implementations adjusted.
6086 * x86-linux-nat.h: All implementations adjusted.
6087 * x86-nat.h: All implementations adjusted.
6089 2018-05-02 Pedro Alves <palves@redhat.com>
6091 * make-target-delegates (scan_target_h): Don't trim lines here.
6092 Replace sequences of tabs and/or whitespace with a single
6094 (top level, parsing methods): Trim each line before processing it
6097 2018-05-02 Pedro Alves <palves@redhat.com>
6098 John Baldwin <jhb@freebsd.org>
6100 * target.h (enum strata) <debug_stratum>: New.
6101 (struct target_ops) <all delegation methods>: Replace by C++
6102 virtual methods, and drop "to_" prefix. All references updated
6104 <to_shortname, to_longname, to_doc, to_data,
6105 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6106 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6107 virtual methods. All references updated throughout.
6108 <can_attach, supports_terminal_ours, can_create_inferior,
6109 get_thread_control_capabilities, attach_no_wait>: New
6111 <insert_breakpoint, remove_breakpoint>: Now
6112 TARGET_DEFAULT_NORETURN methods.
6113 <info_proc>: Now returns bool.
6115 (OPS_MAGIC): Delete.
6116 (current_target): Delete. All references replaced by references
6118 (target_stack): ... this. New.
6119 (target_shortname, target_longname): Adjust.
6120 (target_can_run): Now a function declaration.
6121 (default_child_has_all_memory, default_child_has_memory)
6122 (default_child_has_stack, default_child_has_registers)
6123 (default_child_has_execution): Remove target_ops parameter.
6124 (complete_target_initialization): Delete.
6125 (memory_breakpoint_target): New template class.
6126 (test_target_ops): Refactor as a C++ class with virtual methods.
6127 * make-target-delegates (NAME_PART): Tighten.
6128 (POINTER_PART, CP_SYMBOL): New.
6129 (SIMPLE_RETURN_PART): Reimplement.
6130 (VEC_RETURN_PART): Expect less.
6131 (RETURN_PART, VIRTUAL_PART): New.
6132 (METHOD): Adjust to C++ virtual methods.
6133 (scan_target_h): Remove reference to C99.
6134 (dname): Output "target_ops::" prefix.
6135 (write_function_header): Adjust to output a C++ class method.
6136 (write_declaration): New.
6137 (write_delegator): Adjust to output a C++ class method.
6138 (tdname): Output "dummy_target::" prefix.
6139 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6141 (tdefault_names, debug_names): Delete.
6142 (return_types, tdefaults, styles, argtypes_array): New.
6143 (top level): All methods are delegators.
6145 (top level): Print dummy_target and debug_target classes.
6146 * target-delegates.c: Regenerate.
6147 * target-debug.h (target_debug_print_enum_info_proc_what)
6148 (target_debug_print_thread_control_capabilities)
6149 (target_debug_print_thread_info_p): New.
6150 * target.c (dummy_target): Delete.
6151 (the_dummy_target, the_debug_target): New.
6152 (target_stack): Now extern.
6153 (set_targetdebug): Push/unpush debug target.
6154 (default_child_has_all_memory, default_child_has_memory)
6155 (default_child_has_stack, default_child_has_registers)
6156 (default_child_has_execution): Remove target_ops parameter.
6157 (complete_target_initialization): Delete.
6158 (add_target_with_completer): No longer call
6159 complete_target_initialization.
6160 (target_supports_terminal_ours): Use regular delegation.
6161 (update_current_target): Delete.
6162 (push_target): No longer check magic number. Don't call
6163 update_current_target.
6164 (unpush_target): Don't call update_current_target.
6165 (target_is_pushed): No longer check magic number.
6166 (target_require_runnable): Skip for all stratums over
6168 (target_ops::info_proc): New.
6169 (target_info_proc): Use find_target_at and
6170 find_default_run_target.
6171 (target_supports_disable_randomization): Use regular delegation.
6172 (target_get_osdata): Use find_target_at.
6173 (target_ops::open, target_ops::close, target_ops::can_attach)
6174 (target_ops::attach, target_ops::can_create_inferior)
6175 (target_ops::create_inferior, target_ops::can_run)
6176 (target_can_run): New.
6177 (default_fileio_target): Use regular delegation.
6178 (target_ops::fileio_open, target_ops::fileio_pwrite)
6179 (target_ops::fileio_pread, target_ops::fileio_fstat)
6180 (target_ops::fileio_close, target_ops::fileio_unlink)
6181 (target_ops::fileio_readlink): New.
6182 (target_fileio_open_1, target_fileio_unlink)
6183 (target_fileio_readlink): Always call the target method. Handle
6185 (return_zero, return_zero_has_execution): Delete.
6186 (init_dummy_target): Delete.
6187 (dummy_target::dummy_target, dummy_target::shortname)
6188 (dummy_target::longname, dummy_target::doc)
6189 (debug_target::debug_target, debug_target::shortname)
6190 (debug_target::longname, debug_target::doc): New.
6191 (target_supports_delete_record): Use regular delegation.
6192 (setup_target_debug): Delete.
6193 (maintenance_print_target_stack): Skip debug_stratum.
6194 (initialize_targets): Instantiate the_dummy_target and
6196 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6198 (target_auxv_search, fprint_target_auxv): Adjust.
6199 (info_auxv_command): Adjust to use target_stack.
6200 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6201 * exceptions.c (print_flush): Handle a NULL target_stack.
6202 * regcache.c (target_ops_no_register): Refactor as class with
6205 * exec.c (exec_target): New class.
6206 (exec_ops): Now an exec_target.
6207 (exec_open, exec_close_1, exec_get_section_table)
6208 (exec_xfer_partial, exec_files_info, exec_has_memory)
6209 (exec_make_note_section): Refactor as exec_target methods.
6210 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6212 (exec_target::find_memory_regions): New.
6213 (_initialize_exec): Don't call init_exec_ops.
6214 * gdbcore.h (exec_file_clear): Delete.
6216 * corefile.c (core_target): Delete.
6217 (core_file_command): Adjust.
6218 * corelow.c (core_target): New class.
6219 (the_core_target): New.
6220 (core_close): Remove target_ops parameter.
6221 (core_close_cleanup): Adjust.
6222 (core_target::close): New.
6223 (core_open, core_detach, get_core_registers, core_files_info)
6224 (core_xfer_partial, core_thread_alive, core_read_description)
6225 (core_pid_to_str, core_thread_name, core_has_memory)
6226 (core_has_stack, core_has_registers, core_info_proc): Rework as
6227 core_target methods.
6228 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6229 (_initialize_corelow): Initialize the_core_target.
6230 * gdbcore.h (core_target): Delete.
6231 (the_core_target): New.
6233 * ctf.c: (ctf_target): New class.
6234 (ctf_ops): Now a ctf_target.
6235 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6236 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6237 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6239 (init_ctf_ops): Delete.
6240 (_initialize_ctf): Don't call it.
6241 * tracefile-tfile.c (tfile_target): New class.
6242 (tfile_ops): Now a tfile_target.
6243 (tfile_open, tfile_close, tfile_files_info)
6244 (tfile_get_tracepoint_status, tfile_trace_find)
6245 (tfile_fetch_registers, tfile_xfer_partial)
6246 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6247 Refactor as tfile_target methods.
6248 (tfile_xfer_partial_features): Remove target_ops parameter.
6249 (init_tfile_ops): Delete.
6250 (_initialize_tracefile_tfile): Don't call it.
6251 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6252 (tracefile_has_stack, tracefile_has_registers)
6253 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6254 tracefile_target methods.
6255 (init_tracefile_ops): Delete.
6256 (tracefile_target::tracefile_target): New.
6257 * tracefile.h: Include "target.h".
6258 (tracefile_target): New class.
6259 (init_tracefile_ops): Delete.
6261 * spu-multiarch.c (spu_multiarch_target): New class.
6262 (spu_ops): Now a spu_multiarch_target.
6263 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6264 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6265 (spu_search_memory, spu_mourn_inferior): Refactor as
6266 spu_multiarch_target methods.
6267 (init_spu_ops): Delete.
6268 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6269 complete_target_initialization.
6271 * ravenscar-thread.c (ravenscar_thread_target): New class.
6272 (ravenscar_ops): Now a ravenscar_thread_target.
6273 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6274 (ravenscar_thread_alive, ravenscar_pid_to_str)
6275 (ravenscar_fetch_registers, ravenscar_store_registers)
6276 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6277 (ravenscar_stopped_by_hw_breakpoint)
6278 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6279 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6280 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6282 (init_ravenscar_thread_ops): Delete.
6283 (_initialize_ravenscar): Remove references to
6284 init_ravenscar_thread_ops and complete_target_initialization.
6286 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6287 (bsd_uthread_target): New class.
6288 (bsd_uthread_ops): Now a bsd_uthread_target.
6289 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6290 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6291 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6292 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6293 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6294 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6295 (bsd_uthread_target): Delete function.
6296 (_initialize_bsd_uthread): Remove reference to
6297 complete_target_initialization.
6299 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6300 (target_bfd): ... this new class.
6301 (target_bfd_xfer_partial, target_bfd_get_section_table)
6302 (target_bfd_close): Refactor as target_bfd methods.
6303 (target_bfd::~target_bfd): New.
6304 (target_bfd_reopen): Adjust.
6305 (target_bfd::close): New.
6307 * record-btrace.c (record_btrace_target): New class.
6308 (record_btrace_ops): Now a record_btrace_target.
6309 (record_btrace_open, record_btrace_stop_recording)
6310 (record_btrace_disconnect, record_btrace_close)
6311 (record_btrace_async, record_btrace_info)
6312 (record_btrace_insn_history, record_btrace_insn_history_range)
6313 (record_btrace_insn_history_from, record_btrace_call_history)
6314 (record_btrace_call_history_range)
6315 (record_btrace_call_history_from, record_btrace_record_method)
6316 (record_btrace_is_replaying, record_btrace_will_replay)
6317 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6318 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6319 (record_btrace_store_registers, record_btrace_prepare_to_store)
6320 (record_btrace_to_get_unwinder)
6321 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6322 (record_btrace_commit_resume, record_btrace_wait)
6323 (record_btrace_stop, record_btrace_can_execute_reverse)
6324 (record_btrace_stopped_by_sw_breakpoint)
6325 (record_btrace_supports_stopped_by_sw_breakpoint)
6326 (record_btrace_stopped_by_hw_breakpoint)
6327 (record_btrace_supports_stopped_by_hw_breakpoint)
6328 (record_btrace_update_thread_list, record_btrace_thread_alive)
6329 (record_btrace_goto_begin, record_btrace_goto_end)
6330 (record_btrace_goto, record_btrace_stop_replaying_all)
6331 (record_btrace_execution_direction)
6332 (record_btrace_prepare_to_generate_core)
6333 (record_btrace_done_generating_core): Refactor as
6334 record_btrace_target methods.
6335 (init_record_btrace_ops): Delete.
6336 (_initialize_record_btrace): Remove reference to
6337 init_record_btrace_ops.
6338 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6339 the execution_direction global.
6340 (record_full_base_target, record_full_target)
6341 (record_full_core_target): New classes.
6342 (record_full_ops): Now a record_full_target.
6343 (record_full_core_ops): Now a record_full_core_target.
6344 (record_full_target::detach, record_full_target::disconnect)
6345 (record_full_core_target::disconnect)
6346 (record_full_target::mourn_inferior, record_full_target::kill):
6348 (record_full_open, record_full_close, record_full_async): Refactor
6349 as methods of the record_full_base_target class.
6350 (record_full_resume, record_full_commit_resume): Refactor
6351 as methods of the record_full_target class.
6352 (record_full_wait, record_full_stopped_by_watchpoint)
6353 (record_full_stopped_data_address)
6354 (record_full_stopped_by_sw_breakpoint)
6355 (record_full_supports_stopped_by_sw_breakpoint)
6356 (record_full_stopped_by_hw_breakpoint)
6357 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6358 methods of the record_full_base_target class.
6359 (record_full_store_registers, record_full_xfer_partial)
6360 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6361 Refactor as methods of the record_full_target class.
6362 (record_full_can_execute_reverse, record_full_get_bookmark)
6363 (record_full_goto_bookmark, record_full_execution_direction)
6364 (record_full_record_method, record_full_info, record_full_delete)
6365 (record_full_is_replaying, record_full_will_replay)
6366 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6367 (record_full_stop_replaying): Refactor as methods of the
6368 record_full_base_target class.
6369 (record_full_core_resume, record_full_core_kill)
6370 (record_full_core_fetch_registers)
6371 (record_full_core_prepare_to_store)
6372 (record_full_core_store_registers, record_full_core_xfer_partial)
6373 (record_full_core_insert_breakpoint)
6374 (record_full_core_remove_breakpoint)
6375 (record_full_core_has_execution): Refactor
6376 as methods of the record_full_core_target class.
6377 (record_full_base_target::supports_delete_record): New.
6378 (init_record_full_ops): Delete.
6379 (init_record_full_core_ops): Delete.
6380 (record_full_save): Refactor as method of the
6381 record_full_base_target class.
6382 (_initialize_record_full): Remove references to
6383 init_record_full_ops and init_record_full_core_ops.
6385 * remote.c (remote_target, extended_remote_target): New classes.
6386 (remote_ops): Now a remote_target.
6387 (extended_remote_ops): Now an extended_remote_target.
6388 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6389 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6390 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6391 (remote_pass_signals, remote_set_syscall_catchpoint)
6392 (remote_program_signals, )
6393 (remote_thread_always_alive): Remove target_ops parameter.
6394 (remote_thread_alive, remote_thread_name)
6395 (remote_update_thread_list, remote_threads_extra_info)
6396 (remote_static_tracepoint_marker_at)
6397 (remote_static_tracepoint_markers_by_strid)
6398 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6399 (remote_open): Refactor as methods of remote_target.
6400 (extended_remote_open, extended_remote_detach)
6401 (extended_remote_attach, extended_remote_post_attach):
6402 (extended_remote_supports_disable_randomization)
6403 (extended_remote_create_inferior): : Refactor as method of
6404 extended_remote_target.
6405 (remote_set_permissions, remote_open_1, remote_detach)
6406 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6407 (remote_resume, remote_commit_resume, remote_stop)
6408 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6409 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6410 (remote_prepare_to_store, remote_store_registers)
6411 (remote_flash_erase, remote_flash_done, remote_files_info)
6412 (remote_kill, remote_mourn, remote_insert_breakpoint)
6413 (remote_remove_breakpoint, remote_insert_watchpoint)
6414 (remote_watchpoint_addr_within_range)
6415 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6416 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6417 (remote_supports_stopped_by_sw_breakpoint)
6418 (remote_stopped_by_hw_breakpoint)
6419 (remote_supports_stopped_by_hw_breakpoint)
6420 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6421 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6422 (remote_verify_memory): Refactor as methods of remote_target.
6423 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6425 (remote_xfer_partial, remote_get_memory_xfer_limit)
6426 (remote_search_memory, remote_rcmd, remote_memory_map)
6427 (remote_pid_to_str, remote_get_thread_local_address)
6428 (remote_get_tib_address, remote_read_description): Refactor as
6429 methods of remote_target.
6430 (remote_target::fileio_open, remote_target::fileio_pwrite)
6431 (remote_target::fileio_pread, remote_target::fileio_close): New.
6432 (remote_hostio_readlink, remote_hostio_fstat)
6433 (remote_filesystem_is_local, remote_can_execute_reverse)
6434 (remote_supports_non_stop, remote_supports_disable_randomization)
6435 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6436 (remote_supports_enable_disable_tracepoint)
6437 (remote_supports_string_tracing)
6438 (remote_can_run_breakpoint_commands, remote_trace_init)
6439 (remote_download_tracepoint, remote_can_download_tracepoint)
6440 (remote_download_trace_state_variable, remote_enable_tracepoint)
6441 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6442 (remote_trace_start, remote_get_trace_status)
6443 (remote_get_tracepoint_status, remote_trace_stop)
6444 (remote_trace_find, remote_get_trace_state_variable_value)
6445 (remote_save_trace_data, remote_get_raw_trace_data)
6446 (remote_set_disconnected_tracing, remote_core_of_thread)
6447 (remote_set_circular_trace_buffer, remote_traceframe_info)
6448 (remote_get_min_fast_tracepoint_insn_len)
6449 (remote_set_trace_buffer_size, remote_set_trace_notes)
6450 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6451 (remote_disable_btrace, remote_teardown_btrace)
6452 (remote_read_btrace, remote_btrace_conf)
6453 (remote_augmented_libraries_svr4_read, remote_load)
6454 (remote_pid_to_exec_file, remote_can_do_single_step)
6455 (remote_execution_direction, remote_thread_handle_to_thread_info):
6456 Refactor as methods of remote_target.
6457 (init_remote_ops, init_extended_remote_ops): Delete.
6458 (remote_can_async_p, remote_is_async_p, remote_async)
6459 (remote_thread_events, remote_upload_tracepoints)
6460 (remote_upload_trace_state_variables): Refactor as methods of
6462 (_initialize_remote): Remove references to init_remote_ops and
6463 init_extended_remote_ops.
6465 * remote-sim.c (gdbsim_target): New class.
6466 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6467 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6468 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6469 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6470 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6471 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6472 Refactor as methods of gdbsim_target.
6473 (gdbsim_ops): Now a gdbsim_target.
6474 (init_gdbsim_ops): Delete.
6475 (gdbsim_cntrl_c): Adjust.
6476 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6478 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6479 (the_amd64_linux_nat_target): New.
6480 (amd64_linux_fetch_inferior_registers)
6481 (amd64_linux_store_inferior_registers): Refactor as methods of
6482 amd64_linux_nat_target.
6483 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6484 * i386-linux-nat.c: Don't include "linux-nat.h".
6485 (i386_linux_nat_target): New class.
6486 (the_i386_linux_nat_target): New.
6487 (i386_linux_fetch_inferior_registers)
6488 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6489 as methods of i386_linux_nat_target.
6490 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6491 * inf-child.c (inf_child_ops): Delete.
6492 (inf_child_fetch_inferior_registers)
6493 (inf_child_store_inferior_registers): Delete.
6494 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6495 methods of inf_child_target.
6496 (inf_child_target::supports_terminal_ours)
6497 (inf_child_target::terminal_init)
6498 (inf_child_target::terminal_inferior)
6499 (inf_child_target::terminal_ours_for_output)
6500 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6501 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6503 (inf_child_open, inf_child_disconnect, inf_child_close)
6504 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6505 (inf_child_post_startup_inferior, inf_child_can_run)
6506 (inf_child_pid_to_exec_file): Refactor as methods of
6508 (inf_child_follow_fork): Delete.
6509 (inf_child_target::can_create_inferior)
6510 (inf_child_target::can_attach): New.
6511 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6512 (inf_child_target::has_stack, inf_child_target::has_registers)
6513 (inf_child_target::has_execution): New.
6514 (inf_child_fileio_open, inf_child_fileio_pwrite)
6515 (inf_child_fileio_pread, inf_child_fileio_fstat)
6516 (inf_child_fileio_close, inf_child_fileio_unlink)
6517 (inf_child_fileio_readlink, inf_child_use_agent)
6518 (inf_child_can_use_agent): Refactor as methods of
6520 (return_zero, inf_child_target): Delete.
6521 (inf_child_target::inf_child_target): New.
6522 * inf-child.h: Include "target.h".
6523 (inf_child_target): Delete function prototype.
6524 (inf_child_target): New class.
6525 (inf_child_open_target, inf_child_mourn_inferior)
6526 (inf_child_maybe_unpush_target): Delete.
6527 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6528 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6529 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6530 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6531 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6532 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6533 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6534 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6535 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6536 methods of inf_ptrace_target.
6537 (inf_ptrace_target): Delete function.
6538 * inf-ptrace.h: Include "inf-child.h".
6539 (inf_ptrace_target): Delete function declaration.
6540 (inf_ptrace_target): New class.
6541 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6542 * linux-nat.c (linux_target): New.
6543 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6544 (linux_nat_target::~linux_nat_target): New.
6545 (linux_child_post_attach, linux_child_post_startup_inferior)
6546 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6547 (linux_child_remove_fork_catchpoint)
6548 (linux_child_insert_vfork_catchpoint)
6549 (linux_child_remove_vfork_catchpoint)
6550 (linux_child_insert_exec_catchpoint)
6551 (linux_child_remove_exec_catchpoint)
6552 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6553 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6554 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6555 (linux_nat_stopped_data_address)
6556 (linux_nat_stopped_by_sw_breakpoint)
6557 (linux_nat_supports_stopped_by_sw_breakpoint)
6558 (linux_nat_stopped_by_hw_breakpoint)
6559 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6560 (linux_nat_kill, linux_nat_mourn_inferior)
6561 (linux_nat_xfer_partial, linux_nat_thread_alive)
6562 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6563 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6564 (linux_child_static_tracepoint_markers_by_strid)
6565 (linux_nat_is_async_p, linux_nat_can_async_p)
6566 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6567 (linux_nat_supports_multi_process)
6568 (linux_nat_supports_disable_randomization, linux_nat_async)
6569 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6570 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6571 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6572 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6573 methods of linux_nat_target.
6574 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6575 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6577 (check_stopped_by_watchpoint): Adjust.
6578 (linux_xfer_partial): Delete.
6579 (linux_target_install_ops, linux_target, linux_nat_add_target):
6581 (linux_nat_target::linux_nat_target): New.
6582 * linux-nat.h: Include "inf-ptrace.h".
6583 (linux_nat_target): New.
6584 (linux_target, linux_target_install_ops, linux_nat_add_target):
6585 Delete function declarations.
6586 (linux_target): Declare global.
6587 * linux-thread-db.c (thread_db_target): New.
6588 (thread_db_target::thread_db_target): New.
6589 (thread_db_ops): Delete.
6590 (the_thread_db_target): New.
6591 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6592 (thread_db_update_thread_list, thread_db_pid_to_str)
6593 (thread_db_extra_thread_info)
6594 (thread_db_thread_handle_to_thread_info)
6595 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6596 (thread_db_resume): Refactor as methods of thread_db_target.
6597 (init_thread_db_ops): Delete.
6598 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6599 * x86-linux-nat.c: Don't include "linux-nat.h".
6600 (super_post_startup_inferior): Delete.
6601 (x86_linux_nat_target::~x86_linux_nat_target): New.
6602 (x86_linux_child_post_startup_inferior)
6603 (x86_linux_read_description, x86_linux_enable_btrace)
6604 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6605 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6606 methods of x86_linux_nat_target.
6607 (x86_linux_create_target): Delete. Bits folded ...
6608 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6610 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6611 (x86_linux_nat_target): New class.
6612 (x86_linux_create_target): Delete.
6613 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6614 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6615 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6616 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6617 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6618 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6620 (x86_use_watchpoints): Delete.
6621 * x86-nat.h: Include "breakpoint.h" and "target.h".
6622 (x86_use_watchpoints): Delete.
6623 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6624 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6625 (x86_insert_watchpoint, x86_remove_watchpoint)
6626 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6627 (x86_stopped_by_hw_breakpoint): New declarations.
6628 (x86_nat_target): New template class.
6630 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6631 (the_ppc_linux_nat_target): New.
6632 (ppc_linux_fetch_inferior_registers)
6633 (ppc_linux_can_use_hw_breakpoint)
6634 (ppc_linux_region_ok_for_hw_watchpoint)
6635 (ppc_linux_ranged_break_num_registers)
6636 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6637 (ppc_linux_insert_mask_watchpoint)
6638 (ppc_linux_remove_mask_watchpoint)
6639 (ppc_linux_can_accel_watchpoint_condition)
6640 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6641 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6642 (ppc_linux_watchpoint_addr_within_range)
6643 (ppc_linux_masked_watch_num_registers)
6644 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6645 (ppc_linux_read_description): Refactor as methods of
6646 ppc_linux_nat_target.
6647 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6649 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6650 (procfs_target): New class.
6651 (the_procfs_target): New.
6652 (procfs_target): Delete function.
6653 (procfs_auxv_parse, procfs_attach, procfs_detach)
6654 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6655 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6656 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6657 (procfs_create_inferior, procfs_update_thread_list)
6658 (procfs_thread_alive, procfs_pid_to_str)
6659 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6660 (procfs_stopped_data_address, procfs_insert_watchpoint)
6661 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6662 (proc_find_memory_regions, procfs_info_proc)
6663 (procfs_make_note_section): Refactor as methods of procfs_target.
6664 (_initialize_procfs): Adjust.
6665 * sol-thread.c (sol_thread_target): New class.
6666 (sol_thread_ops): Now a sol_thread_target.
6667 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6668 (sol_thread_fetch_registers, sol_thread_store_registers)
6669 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6670 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6671 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6672 (init_sol_thread_ops): Delete.
6673 (_initialize_sol_thread): Adjust. Remove references to
6674 init_sol_thread_ops and complete_target_initialization.
6676 * windows-nat.c (windows_nat_target): New class.
6677 (windows_fetch_inferior_registers)
6678 (windows_store_inferior_registers, windows_resume, windows_wait)
6679 (windows_attach, windows_detach, windows_pid_to_exec_file)
6680 (windows_files_info, windows_create_inferior)
6681 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6682 (windows_close, windows_pid_to_str, windows_xfer_partial)
6683 (windows_get_tib_address, windows_get_ada_task_ptid)
6684 (windows_thread_name, windows_thread_alive): Refactor as
6685 windows_nat_target methods.
6686 (do_initial_windows_stuff): Adjust.
6687 (windows_target): Delete function.
6688 (_initialize_windows_nat): Adjust.
6690 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6691 (darwin_mourn_inferior, darwin_kill_inferior)
6692 (darwin_create_inferior, darwin_attach, darwin_detach)
6693 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6694 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6695 (darwin_supports_multi_process): Refactor as darwin_nat_target
6697 (darwin_resume_to, darwin_files_info): Delete.
6698 (_initialize_darwin_inferior): Rename to ...
6699 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6700 * darwin-nat.h: Include "inf-child.h".
6701 (darwin_nat_target): New class.
6702 (darwin_complete_target): Delete.
6703 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6704 (darwin_target): New.
6705 (i386_darwin_fetch_inferior_registers)
6706 (i386_darwin_store_inferior_registers): Refactor as methods of
6708 (darwin_complete_target): Delete, with ...
6709 (_initialize_i386_darwin_nat): ... bits factored out here.
6711 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6712 (the_alpha_linux_nat_target): New.
6713 (alpha_linux_register_u_offset): Refactor as
6714 alpha_linux_nat_target method.
6715 (_initialize_alpha_linux_nat): Adjust.
6716 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6717 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6718 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6719 methods of linux_nat_trad_target.
6720 (linux_trad_target): Delete.
6721 * linux-nat-trad.h (linux_trad_target): Delete function.
6722 (linux_nat_trad_target): New class.
6723 * mips-linux-nat.c (mips_linux_nat_target): New class.
6724 (super_fetch_registers, super_store_registers, super_close):
6726 (the_mips_linux_nat_target): New.
6727 (mips64_linux_regsets_fetch_registers)
6728 (mips64_linux_regsets_store_registers)
6729 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6730 (mips_linux_register_u_offset, mips_linux_read_description)
6731 (mips_linux_can_use_hw_breakpoint)
6732 (mips_linux_stopped_by_watchpoint)
6733 (mips_linux_stopped_data_address)
6734 (mips_linux_region_ok_for_hw_watchpoint)
6735 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6736 (mips_linux_close): Refactor as methods of mips_linux_nat.
6737 (_initialize_mips_linux_nat): Adjust to C++ification.
6739 * aix-thread.c (aix_thread_target): New class.
6740 (aix_thread_ops): Now an aix_thread_target.
6741 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6742 (aix_thread_fetch_registers, aix_thread_store_registers)
6743 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6744 (aix_thread_thread_alive, aix_thread_pid_to_str)
6745 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6746 Refactor as methods of aix_thread_target.
6747 (init_aix_thread_ops): Delete.
6748 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6749 and complete_target_initialization.
6750 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6751 (rs6000_nat_target): New class.
6752 (the_rs6000_nat_target): New.
6753 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6754 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6755 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6756 (super_create_inferior): Delete.
6757 (_initialize_rs6000_nat): Adjust to C++ification.
6759 * arm-linux-nat.c (arm_linux_nat_target): New class.
6760 (the_arm_linux_nat_target): New.
6761 (arm_linux_fetch_inferior_registers)
6762 (arm_linux_store_inferior_registers, arm_linux_read_description)
6763 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6764 (arm_linux_remove_hw_breakpoint)
6765 (arm_linux_region_ok_for_hw_watchpoint)
6766 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6767 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6768 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6769 arm_linux_nat_target.
6770 (_initialize_arm_linux_nat): Adjust to C++ification.
6772 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6773 (the_aarch64_linux_nat_target): New.
6774 (aarch64_linux_fetch_inferior_registers)
6775 (aarch64_linux_store_inferior_registers)
6776 (aarch64_linux_child_post_startup_inferior)
6777 (aarch64_linux_read_description)
6778 (aarch64_linux_can_use_hw_breakpoint)
6779 (aarch64_linux_insert_hw_breakpoint)
6780 (aarch64_linux_remove_hw_breakpoint)
6781 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6782 (aarch64_linux_region_ok_for_hw_watchpoint)
6783 (aarch64_linux_stopped_data_address)
6784 (aarch64_linux_stopped_by_watchpoint)
6785 (aarch64_linux_watchpoint_addr_within_range)
6786 (aarch64_linux_can_do_single_step): Refactor as methods of
6787 aarch64_linux_nat_target.
6788 (super_post_startup_inferior): Delete.
6789 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6791 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6792 (the_hppa_linux_nat_target): New.
6793 (hppa_linux_fetch_inferior_registers)
6794 (hppa_linux_store_inferior_registers): Refactor as methods of
6795 hppa_linux_nat_target.
6796 (_initialize_hppa_linux_nat): Adjust to C++ification.
6798 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6799 (the_ia64_linux_nat_target): New.
6800 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6801 (ia64_linux_stopped_data_address)
6802 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6803 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6804 ia64_linux_nat_target methods.
6805 (super_xfer_partial): Delete.
6806 (_initialize_ia64_linux_nat): Adjust to C++ification.
6808 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6809 (the_m32r_linux_nat_target): New.
6810 (m32r_linux_fetch_inferior_registers)
6811 (m32r_linux_store_inferior_registers): Refactor as
6812 m32r_linux_nat_target methods.
6813 (_initialize_m32r_linux_nat): Adjust to C++ification.
6815 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6816 (the_m68k_linux_nat_target): New.
6817 (m68k_linux_fetch_inferior_registers)
6818 (m68k_linux_store_inferior_registers): Refactor as
6819 m68k_linux_nat_target methods.
6820 (_initialize_m68k_linux_nat): Adjust to C++ification.
6822 * s390-linux-nat.c (s390_linux_nat_target): New class.
6823 (the_s390_linux_nat_target): New.
6824 (s390_linux_fetch_inferior_registers)
6825 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6826 (s390_insert_watchpoint, s390_remove_watchpoint)
6827 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6828 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6829 (s390_auxv_parse, s390_read_description): Refactor as methods of
6830 s390_linux_nat_target.
6831 (_initialize_s390_nat): Adjust to C++ification.
6833 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6834 (the_sparc_linux_nat_target): New.
6835 (_initialize_sparc_linux_nat): Adjust to C++ification.
6836 * sparc-nat.c (sparc_fetch_inferior_registers)
6837 (sparc_store_inferior_registers): Remove target_ops parameter.
6838 * sparc-nat.h (sparc_fetch_inferior_registers)
6839 (sparc_store_inferior_registers): Remove target_ops parameter.
6840 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6841 (the_sparc64_linux_nat_target): New.
6842 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6844 * spu-linux-nat.c (spu_linux_nat_target): New class.
6845 (the_spu_linux_nat_target): New.
6846 (spu_child_post_startup_inferior, spu_child_post_attach)
6847 (spu_child_wait, spu_fetch_inferior_registers)
6848 (spu_store_inferior_registers, spu_xfer_partial)
6849 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6851 (_initialize_spu_nat): Adjust to C++ification.
6853 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6854 (the_tilegx_linux_nat_target): New.
6855 (fetch_inferior_registers, store_inferior_registers):
6856 Refactor as methods.
6857 (_initialize_tile_linux_nat): Adjust to C++ification.
6859 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6860 (the_xtensa_linux_nat_target): New.
6861 (xtensa_linux_fetch_inferior_registers)
6862 (xtensa_linux_store_inferior_registers): Refactor as
6863 xtensa_linux_nat_target methods.
6864 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6866 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6867 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6868 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6869 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6870 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6871 (fbsd_stopped_by_sw_breakpoint)
6872 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6873 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6874 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6875 (fbsd_post_startup_inferior, fbsd_post_attach)
6876 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6877 (fbsd_set_syscall_catchpoint)
6878 (super_xfer_partial, super_resume, super_wait)
6879 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6880 (fbsd_handle_debug_trap): Remove target_ops parameter.
6881 (fbsd_nat_add_target): Delete.
6882 * fbsd-nat.h: Include "inf-ptrace.h".
6883 (fbsd_nat_add_target): Delete.
6884 (USE_SIGTRAP_SIGINFO): Define.
6885 (fbsd_nat_target): New class.
6887 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6888 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6889 (amd64bsd_target): Delete.
6890 * amd64-bsd-nat.h: New file.
6891 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6893 (amd64_fbsd_nat_target): New class.
6894 (the_amd64_fbsd_nat_target): New.
6895 (amd64fbsd_read_description): Refactor as method of
6896 amd64_fbsd_nat_target.
6897 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6898 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6899 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6900 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6901 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6902 (i386bsd_target): Delete.
6903 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6904 (i386bsd_fetch_inferior_registers)
6905 (i386bsd_store_inferior_registers): Declare.
6906 (i386_bsd_nat_target): New class.
6907 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6908 (the_i386_fbsd_nat_target): New.
6909 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6910 i386_fbsd_nat_target methods.
6911 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6912 (_initialize_i386fbsd_nat): Adjust to C++ification.
6913 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6914 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6915 (_initialize_x86_bsd_nat): Adjust to C++ification.
6916 * x86-bsd-nat.h: Include "x86-nat.h".
6917 (x86bsd_target): Delete declaration.
6918 (x86bsd_nat_target): New class.
6920 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6921 (the_aarch64_fbsd_nat_target): New.
6922 (aarch64_fbsd_fetch_inferior_registers)
6923 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6924 aarch64_fbsd_nat_target.
6925 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6926 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6927 (the_alpha_bsd_nat_target): New.
6928 (alphabsd_fetch_inferior_registers)
6929 (alphabsd_store_inferior_registers): Refactor as
6930 alpha_bsd_nat_target methods.
6931 (_initialize_alphabsd_nat): Refactor as methods of
6932 alpha_bsd_nat_target.
6933 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6934 (the_amd64_nbsd_nat_target): New.
6935 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6936 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6937 (the_amd64_obsd_nat_target): New.
6938 (_initialize_amd64obsd_nat): Adjust to C++ification.
6939 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6940 (the_arm_fbsd_nat_target): New.
6941 (arm_fbsd_fetch_inferior_registers)
6942 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6943 (_initialize_arm_fbsd_nat): Refactor as methods of
6944 arm_fbsd_nat_target.
6945 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6946 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6947 (the_arm_netbsd_nat_target): New.
6948 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6949 arm_netbsd_nat_target.
6950 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6951 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6952 (the_hppa_nbsd_nat_target): New.
6953 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6954 hppa_nbsd_nat_target methods.
6955 (_initialize_hppanbsd_nat): Adjust to C++ification.
6956 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6957 (the_hppa_obsd_nat_target): New.
6958 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6959 methods of hppa_obsd_nat_target.
6960 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6962 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6963 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6965 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6966 (_initialize_i386obsd_nat): Use add_target.
6967 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6968 (the_m68k_bsd_nat_target): New.
6969 (m68kbsd_fetch_inferior_registers)
6970 (m68kbsd_store_inferior_registers): Refactor as methods of
6971 m68k_bsd_nat_target.
6972 (_initialize_m68kbsd_nat): Adjust to C++ification.
6973 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6974 (the_mips_fbsd_nat_target): New.
6975 (mips_fbsd_fetch_inferior_registers)
6976 (mips_fbsd_store_inferior_registers): Refactor as methods of
6977 mips_fbsd_nat_target.
6978 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6980 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6981 (the_mips_nbsd_nat_target): New.
6982 (mipsnbsd_fetch_inferior_registers)
6983 (mipsnbsd_store_inferior_registers): Refactor as methods of
6984 mips_nbsd_nat_target.
6985 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6986 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6987 (the_mips64_obsd_nat_target): New.
6988 (mips64obsd_fetch_inferior_registers)
6989 (mips64obsd_store_inferior_registers): Refactor as methods of
6990 mips64_obsd_nat_target.
6991 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6993 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6995 * nbsd-nat.h: Include "inf-ptrace.h".
6996 (nbsd_nat_target): New class.
6997 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6998 (obsd_wait): Refactor as methods of obsd_nat_target.
6999 (obsd_add_target): Delete.
7000 * obsd-nat.h: Include "inf-ptrace.h".
7001 (obsd_nat_target): New class.
7002 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7003 (the_ppc_fbsd_nat_target): New.
7004 (ppcfbsd_fetch_inferior_registers)
7005 (ppcfbsd_store_inferior_registers): Refactor as methods of
7006 ppc_fbsd_nat_target.
7007 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7009 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7010 (the_ppc_nbsd_nat_target): New.
7011 (ppcnbsd_fetch_inferior_registers)
7012 (ppcnbsd_store_inferior_registers): Refactor as methods of
7013 ppc_nbsd_nat_target.
7014 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7015 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7016 (the_ppc_obsd_nat_target): New.
7017 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7018 methods of ppc_obsd_nat_target.
7019 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7021 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7022 (the_sh_nbsd_nat_target): New.
7023 (shnbsd_fetch_inferior_registers)
7024 (shnbsd_store_inferior_registers): Refactor as methods of
7026 (_initialize_shnbsd_nat): Adjust to C++ification.
7027 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7028 (inf_ptrace_xfer_partial): Delete.
7029 (sparc_xfer_partial, sparc_target): Delete.
7030 * sparc-nat.h (sparc_fetch_inferior_registers)
7031 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7032 (sparc_target): Delete function declaration.
7033 (sparc_target): New template class.
7034 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7035 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7036 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7037 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7039 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7040 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7041 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7042 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7044 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7045 (the_vax_bsd_nat_target): New.
7046 (vaxbsd_fetch_inferior_registers)
7047 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7049 (_initialize_vaxbsd_nat): Adjust to C++ification.
7051 * bsd-kvm.c (bsd_kvm_target): New class.
7052 (bsd_kvm_ops): Now a bsd_kvm_target.
7053 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7054 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7055 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7057 (bsd_kvm_return_one): Delete.
7058 (bsd_kvm_add_target): Adjust to C++ification.
7060 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7061 (nto_procfs_target_procfs): New classes.
7062 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7063 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7064 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7065 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7066 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7067 (procfs_remove_hw_breakpoint, procfs_resume)
7068 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7069 (procfs_kill_inferior, procfs_store_registers)
7070 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7071 as methods of nto_procfs_target.
7072 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7073 (nto_native_ops): Delete.
7074 (procfs_open, procfs_native_open): Delete.
7075 (nto_native_ops): Now an nto_procfs_target_native.
7076 (init_procfs_targets): Adjust to C++ification.
7077 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7078 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7079 Refactor as methods of nto_procfs_target.
7081 * go32-nat.c (go32_nat_target): New class.
7082 (the_go32_nat_target): New.
7083 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7084 (go32_store_registers, go32_xfer_partial, go32_files_info)
7085 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7086 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7087 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7088 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7089 (go32_target): Delete.
7090 (_initialize_go32_nat): Adjust to C++ification.
7092 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7093 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7094 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7095 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7097 (gnu_target): Delete.
7098 * gnu-nat.h (gnu_target): Delete.
7099 (gnu_nat_target): New class.
7100 * i386-gnu-nat.c (gnu_base_target): New.
7101 (i386_gnu_nat_target): New class.
7102 (the_i386_gnu_nat_target): New.
7103 (_initialize_i386gnu_nat): Adjust to C++ification.
7105 2018-05-02 Pedro Alves <palves@redhat.com>
7107 * bfd-target.c (target_bfd_xclose): Rename to ...
7108 (target_bfd_close): ... this.
7109 (target_bfd_reopen): Adjust.
7110 * target.c (target_close): Remove references to to_xclose.
7111 * target.h (target_ops::to_xclose): Delete.
7112 (target_ops::to_close): Update comments.
7114 2018-05-02 Pedro Alves <palves@redhat.com>
7116 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7118 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7119 * inf-ptrace.c (inf_ptrace_register_u_offset)
7120 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7121 (inf_ptrace_store_register, inf_ptrace_store_registers)
7122 (inf_ptrace_trad_target): Move to ...
7123 * linux-nat-trad.c: ... this new file.
7124 * linux-nat-trad.h: New file.
7125 * linux-nat.c (linux_target_install_ops): Make extern.
7126 (linux_trad_target): Delete.
7127 * linux-nat.h (linux_trad_target): Delete declaration.
7128 (linux_target_install_ops): Declare.
7129 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7132 2018-05-02 Pedro Alves <palves@redhat.com>
7134 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7135 procfs_target/add_target here.
7136 * procfs.c (procfs_target): Make static.
7137 (_initialize_procfs): Call add_target here.
7138 * procfs.h (struct target_ops): Remove forward declaration.
7139 (procfs_target): Remove declaration.
7140 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7142 2018-05-02 Pedro Alves <palves@redhat.com>
7144 * procfs.c (procfs_stopped_by_watchpoint)
7145 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7146 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7148 (procfs_use_watchpoints): Delete, move contents...
7149 (procfs_target): ... here.
7150 * procfs.h (procfs_use_watchpoints): Delete declaration.
7151 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7152 procfs_use_watchpoints.
7153 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7154 procfs_use_watchpoints.
7156 2018-05-02 Tom Tromey <tom@tromey.com>
7159 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7160 and var_zuinteger_unlimited.
7161 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7162 and PARAM_ZUINTEGER_UNLIMITED.
7163 (set_parameter_value): Handle var_zuinteger and
7164 var_zuinteger_unlimited.
7165 (add_setshow_generic): Likewise.
7166 (parmpy_init): Likewise.
7168 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7171 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7172 pointer is not null before dereferencing it.
7174 2018-04-30 Tom Tromey <tom@tromey.com>
7176 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7179 2018-04-30 Tom Tromey <tom@tromey.com>
7181 * breakpoint.c (mention): Remove use of is_mi_like_p.
7182 (print_mention_ranged_breakpoint): Likewise.
7183 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7186 2018-04-30 Tom Tromey <tom@tromey.com>
7188 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7190 2018-04-30 Tom Tromey <tom@tromey.com>
7192 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7193 (info_spu_event_command): Remove some uses of is_mi_like_p.
7195 2018-04-30 Tom Tromey <tom@tromey.com>
7197 * python/py-framefilter.c (py_print_single_arg)
7198 (enumerate_locals, py_print_args, py_print_frame): Remove some
7199 uses of is_mi_like_p.
7201 2018-04-30 Tom Tromey <tom@tromey.com>
7204 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7205 * ui-out.h (ui_out::is_mi_like_p): Now const.
7206 (ui_out::do_is_mi_like_p): Now const.
7207 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7209 2018-04-30 Tom Tromey <tom@tromey.com>
7211 * varobj.c (varobj_set_visualizer): Use new_reference.
7212 * python/python.c (gdbpy_decode_line): Use new_reference.
7213 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7216 2018-04-30 Tom Tromey <tom@tromey.com>
7218 * varobj.c (install_new_value): Use new_reference.
7219 * value.h (value_incref): Return void. Swap intro comment with
7221 * value.c (set_value_parent): Use new_reference.
7222 (value_incref): Return void. Update intro comment.
7223 (release_value): Use new_reference.
7224 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7226 2018-04-30 Tom Tromey <tom@tromey.com>
7228 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7229 * gdb_bfd.h (new_bfd_ref): Remove.
7230 (gdb_bfd_open): Update comment.
7231 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7232 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7233 (gdb_bfd_fdopenr): Use new_reference.
7234 * exec.c (exec_file_attach): Use new_reference.
7236 2018-04-30 Tom Tromey <tom@tromey.com>
7238 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7241 2018-04-30 Tom Tromey <tom@tromey.com>
7243 * jit.c (jit_read_code_entry): Use type_align.
7244 * i386-tdep.c (i386_gdbarch_init): Don't call
7245 set_gdbarch_long_long_align_bit.
7246 * gdbarch.sh: Remove long_long_align_bit.
7247 * gdbarch.c, gdbarch.h: Rebuild.
7248 * arc-tdep.c (arc_type_align): New function.
7249 (arc_gdbarch_init): Use arc_type_align. Don't call
7250 set_gdbarch_long_long_align_bit.
7252 2018-04-30 Tom Tromey <tom@tromey.com>
7254 * rust-lang.c (rust_type_alignment): Remove.
7255 (rust_composite_type): Use type_align.
7257 2018-04-30 Tom Tromey <tom@tromey.com>
7259 * NEWS: Mention Type.align.
7260 * python/py-type.c (typy_get_alignof): New function.
7261 (type_object_getset): Add "alignof".
7263 2018-04-30 Tom Tromey <tom@tromey.com>
7267 * std-operator.def (UNOP_ALIGNOF): New operator.
7268 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7270 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7271 * c-lang.c (c_op_print_tab): Add alignof.
7272 * c-exp.y (ALIGNOF): New token.
7273 (exp): Add "ALIGNOF" production.
7274 (ident_tokens): Add _Alignof and alignof.
7276 2018-04-30 Tom Tromey <tom@tromey.com>
7278 * i386-tdep.c (i386_type_align): New function.
7279 (i386_gdbarch_init): Update.
7280 * gdbarch.sh (type_align): New method.
7281 * gdbarch.c, gdbarch.h: Rebuild.
7282 * arch-utils.h (default_type_align): Declare.
7283 * arch-utils.c (default_type_align): New function.
7284 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7285 (struct type) <align_log2>: New field.
7286 <instance_flags>: Now a bitfield.
7287 (TYPE_RAW_ALIGN): New macro.
7288 (type_align, type_raw_align, set_type_align): Declare.
7289 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7291 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7292 (get_alignment, maybe_set_alignment): New functions.
7293 (read_structure_type, read_enumeration_type, read_array_type)
7294 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7295 (read_subrange_type, read_base_type): Set type alignment.
7297 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7299 * dwarf2read.c (read_index_from_section): Use bool.
7301 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7304 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7307 2018-04-29 John Reiser <jreiser@BitWagon.com>
7310 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7311 last step, and do it atomically.
7313 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7315 * compile/compile-c-types.c (convert_int, convert_float):
7318 2018-04-27 Tom Tromey <tom@tromey.com>
7321 * rust-lang.c (rust_inclusive_range_type_p): New function.
7322 (rust_range): Handle inclusive ranges.
7323 (rust_compute_range): Likewise.
7324 * rust-exp.y (struct rust_op) <inclusive>: New field.
7325 (DOTDOTEQ): New constant.
7326 (range_expr): Add "..=" productions.
7327 (operator_tokens): Add "..=" token.
7328 (ast_range): Add "inclusive" parameter.
7329 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7331 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7333 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7334 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7336 * expprint.c (print_subexp_standard): Handle new bounds values.
7337 (dump_subexp_body_standard): Likewise.
7339 2018-04-27 Tom Tromey <tom@tromey.com>
7341 * configure: Rebuild.
7342 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7343 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7345 (class symbol_needs_eval_context): Likewise.
7346 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7347 (mock_mapped_index::symbol_name_at): Use "override". Remove
7349 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7351 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7352 * aarch64-tdep.c (instruction_reader::read): Use "override".
7353 (instruction_reader_test::read): Likewise.
7354 * arm-tdep.c (instruction_reader::read): Use "override".
7355 (instruction_reader_thumb::read): Likewise.
7357 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7360 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7361 instead of remote_send.
7362 (remote_send): Remove.
7364 2018-04-26 Pedro Alves <palves@redhat.com>
7366 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7367 find_function_start_sal instead of find_pc_line.
7369 2018-04-26 Pedro Alves <palves@redhat.com>
7371 * breakpoint.c (set_breakpoint_location_function): Handle
7373 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7374 * elfread.c (elf_symtab_read): Give data symbols with
7375 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7376 (elf_rel_plt_read): Update comment.
7377 * linespec.c (convert_linespec_to_sals): Handle
7379 (minsym_found): Handle mst_data_gnu_ifunc.
7380 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7381 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7382 * parse.c (find_minsym_type_and_address): Handle
7384 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7385 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7386 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7388 <mst_data_gnu_ifunc>: New enumerator.
7390 2018-04-26 Pedro Alves <palves@redhat.com>
7392 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7393 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7394 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7396 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7397 (lookup_minimal_symbol_by_pc): Adjust.
7398 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7399 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7400 * minsyms.h (lookup_msym_prefer): New enum.
7401 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7402 parameter by a lookup_msym_prefer parameter.
7404 2018-04-26 Pedro Alves <palves@redhat.com>
7406 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7407 ends in "@plt" instead of looking at the symbol's section.
7409 2018-04-26 Pedro Alves <palves@redhat.com>
7411 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7413 (find_pc_partial_function_gnu_ifunc): Rename to ...
7414 (find_pc_partial_function): ... this, and remove references to
7416 (find_pc_partial_function): Delete old implementation.
7417 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7419 2018-04-26 Pedro Alves <palves@redhat.com>
7421 * linespec.c (struct bound_minimal_symbol_search_key): New.
7422 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7423 skip first line if we found a GNU ifunc minimal symbol by name.
7424 (compare_msymbols): Change parameters to work with a destructured
7426 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7429 2018-04-26 Pedro Alves <palves@redhat.com>
7431 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7432 ifunc targets here. Instead, if we have an ifunc minsym, use its
7434 (add_location_to_breakpoint): Store the minsym and the objfile in
7435 the breakpoint location.
7436 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7437 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7438 Record the minsym in the sal.
7439 * symtab.h (symtab_and_line) <msymbol>: New field.
7441 2018-04-26 Pedro Alves <palves@redhat.com>
7443 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7444 unless we actually resolved the ifunc.
7446 2018-04-26 Pedro Alves <palves@redhat.com>
7448 * c-exp.y (variable production): Prefer ifunc minsyms over
7449 regular function symbols.
7450 * symtab.c (find_gnu_ifunc): New function.
7451 * minsyms.h (lookup_msym_prefer): New enum.
7452 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7453 parameter by a lookup_msym_prefer parameter.
7454 * symtab.h (find_gnu_ifunc): New declaration.
7456 2018-04-26 Pedro Alves <palves@redhat.com>
7458 * blockframe.c (find_gnu_ifunc_target_type): New function.
7459 (find_function_type): New.
7460 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7461 return a value with a memory address.
7462 (eval_call): For calls to GNU ifunc functions, try to find the
7463 type of the target function from the type that the resolver
7465 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7467 * infcall.c (find_function_return_type): Delete.
7468 (find_function_addr): Add 'function_type' parameter. For calls to
7469 GNU ifunc functions, try to find the type of the target function
7470 from the type that the resolver returns, and return it via
7472 (call_function_by_hand_dummy): Adjust to use the function type
7473 returned by find_function_addr.
7474 (find_function_addr): Add 'function_type' parameter and move
7476 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7479 2018-04-26 Pedro Alves <palves@redhat.com>
7481 * c-exp.y (variable production): Skip finding an alias for ifunc
7484 2018-04-26 Pedro Alves <palves@redhat.com>
7486 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7488 2018-04-25 Pedro Alves <palves@redhat.com>
7490 * infcmd.c (kill_command): Print the pid as string, not the whole
7491 thread's ptid. Add comment. s/has been killed/killed/ in output
7493 * remote.c (remote_detach_1): Print the pid as string, not the
7494 whole thread's ptid.
7496 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7497 Sergio Durigan Junior <sergiodj@redhat.com>
7498 Pedro Alves <palves@redhat.com>
7500 * infcmd.c (kill_command): Print message when inferior has
7502 * inferior.c (print_inferior_events): Remove 'static'. Set as
7504 (add_inferior): Improve message printed when
7505 'print_inferior_events' is on.
7506 (exit_inferior): Remove message printed when
7507 'print_inferior_events' is on.
7508 (detach_inferior): Improve message printed when
7509 'print_inferior_events' is on.
7510 (initialize_inferiors): Use 'add_inferior_silent' to set
7511 'current_inferior_'.
7512 * inferior.h (print_inferior_events): Declare here as
7514 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7515 '[Detaching...]' messages when 'print_inferior_events' is on.
7516 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7517 as prefix/suffix for messages. Remove periods. Fix erroneous
7518 'Detaching after fork from child...', replace it by '... from
7520 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7521 prefix/suffix when printing 'Detaching...' messages. Print
7522 them when 'print_inferior_events' is on.
7523 * remote.c (remote_detach_1): Print message when detaching
7524 from inferior and '!is_fork_parent'.
7526 2018-04-24 Tom Tromey <tom@tromey.com>
7528 * cli-out.h: Reindent.
7530 2018-04-24 Tom Tromey <tom@tromey.com>
7532 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7533 (cli_ui_out::do_field_string): Use fputs_filtered.
7534 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7536 2018-04-23 Tom Tromey <tom@tromey.com>
7538 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7539 gdb::unique_xmalloc_ptr.
7541 2018-04-23 Tom Tromey <tom@tromey.com>
7543 * configure: Rebuild.
7545 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7548 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7549 prepare_for_testing. Set normal_bp to r_debug_state if target
7552 2018-04-21 Pedro Alves <palves@redhat.com>
7553 Rajendra SY <rajendra.sy@gmail.com>
7555 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7556 * remote.c (extended_remote_attach): In all-stop mode, mark the
7557 thread as executing.
7559 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7561 * thread.c (thread_apply_all_command): Fix comment.
7562 (thread_command): Fix comment.
7564 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7566 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7568 * features/aarch64-core.c (create_feature_aarch64_core):
7570 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7572 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7574 * features/i386/32bit-avx512.c
7575 (create_feature_i386_32bit_avx512): Likewise.
7576 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7578 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7580 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7582 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7584 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7586 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7588 * features/i386/64bit-avx512.c
7589 (create_feature_i386_64bit_avx512): Likewise.
7590 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7592 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7594 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7596 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7598 * features/i386/64bit-segments.c
7599 (create_feature_i386_64bit_segments): Likewise.
7600 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7602 * features/i386/x32-core.c
7603 (create_feature_i386_x32_core): Likewise.
7604 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7605 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7606 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7607 * target-descriptions.c: In generated code, don't pass xml
7610 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7612 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7613 (print_xml_feature::visit_post): Likewise.
7614 (print_xml_feature::visit): Likewise.
7615 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7616 (print_xml_feature): Add new class.
7617 * regformats/regdat.sh: Null xmltarget on feature targets.
7618 * target-descriptions.c (struct target_desc): Add xmltarget.
7619 (maintenance_check_tdesc_xml_convert): Add unittest function.
7620 (tdesc_get_features_xml): Add function to get xml.
7621 (maintenance_check_xml_descriptions): Test xml generation.
7622 * xml-tdesc.c (string_read_description_xml): Add function.
7623 * xml-tdesc.h (string_read_description_xml): Add declaration.
7625 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7627 * features/Makefile: Add feature marker to targets with new style
7628 target descriptions.
7629 * regformats/aarch64.dat: Regenerate.
7630 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7631 * regformats/i386/amd64-avx-linux.dat: Likewise.
7632 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7633 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7634 * regformats/i386/amd64-linux.dat: Likewise.
7635 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7636 * regformats/i386/amd64.dat: Likewise.
7637 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7638 * regformats/i386/i386-avx-linux.dat: Likewise.
7639 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7640 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7641 * regformats/i386/i386-linux.dat: Likewise.
7642 * regformats/i386/i386-mmx-linux.dat: Likewise.
7643 * regformats/i386/i386-mpx-linux.dat: Likewise.
7644 * regformats/i386/i386.dat: Likewise.
7645 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7646 * regformats/i386/x32-avx-linux.dat: Likewise.
7647 * regformats/i386/x32-linux.dat: Likewise.
7648 * regformats/tic6x-c62x-linux.dat: Likewise.
7649 * regformats/tic6x-c64x-linux.dat: Likewise.
7650 * regformats/tic6x-c64xp-linux.dat: Likewise.
7651 * regformats/regdat.sh: Parse feature marker.
7653 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7655 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7656 (tdesc_osabi_name): Likewise.
7657 * target-descriptions.c (tdesc_architecture_name): Add new
7659 (tdesc_osabi_name): Likewise.
7661 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7663 * common/tdesc.c (tdesc_predefined_type): Move to here.
7664 (tdesc_named_type): Likewise.
7665 (tdesc_create_vector): Likewise.
7666 (tdesc_create_struct): Likewise.
7667 (tdesc_set_struct_size): Likewise.
7668 (tdesc_create_union): Likewise.
7669 (tdesc_create_flags): Likewise.
7670 (tdesc_create_enum): Likewise.
7671 (tdesc_add_field): Likewise.
7672 (tdesc_add_typed_bitfield): Likewise.
7673 (tdesc_add_bitfield): Likewise.
7674 (tdesc_add_flag): Likewise.
7675 (tdesc_add_enum_value): Likewise.
7676 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7677 (struct tdesc_type_vector): Likewise.
7678 (struct tdesc_type_field): Likewise.
7679 (struct tdesc_type_with_fields): Likewise.
7680 (tdesc_create_enum): Add declaration.
7681 (tdesc_add_typed_bitfield): Likewise.
7682 (tdesc_add_enum_value): Likewise.
7683 * target-descriptions.c (tdesc_type_field): Move from here.
7684 (tdesc_type_builtin): Likewise.
7685 (tdesc_type_vector): Likewise.
7686 (tdesc_type_with_fields): Likewise.
7687 (tdesc_predefined_types): Likewise.
7688 (tdesc_named_type): Likewise.
7689 (tdesc_create_vector): Likewise.
7690 (tdesc_create_struct): Likewise.
7691 (tdesc_set_struct_size): Likewise.
7692 (tdesc_create_union): Likewise.
7693 (tdesc_create_flags): Likewise.
7694 (tdesc_create_enum): Likewise.
7695 (tdesc_add_field): Likewise.
7696 (tdesc_add_typed_bitfield): Likewise.
7697 (tdesc_add_bitfield): Likewise.
7698 (tdesc_add_flag): Likewise.
7699 (tdesc_add_enum_value): Likewise.
7700 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7701 (tdesc_add_typed_bitfield): Likewise.
7702 (tdesc_add_enum_value): Likewise.
7704 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7706 * common/tdesc.c (tdesc_feature::accept): Move to here.
7707 (tdesc_feature::operator==): Likewise.
7708 (tdesc_create_reg): Likewise.
7709 * common/tdesc.h (tdesc_type_kind): Likewise.
7710 (struct tdesc_type): Likewise.
7711 (struct tdesc_feature): Likewise.
7712 * regformats/regdat.sh: Create a feature.
7713 * target-descriptions.c (tdesc_type_kind): Move from here.
7714 (tdesc_type): Likewise.
7715 (tdesc_type_up): Likewise.
7716 (tdesc_feature): Likewise.
7717 (tdesc_create_reg): Likewise.
7719 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7721 * Makefile.in: Add arch/tdesc.c
7722 * common/tdesc.c: New file.
7723 * common/tdesc.h (tdesc_element_visitor): Move to here.
7724 (tdesc_element): Likewise.
7725 (tdesc_reg): Likewise.
7726 (tdesc_reg_up): Likewise.
7727 * regformats/regdef.h (reg): Add offset to constructors.
7728 * target-descriptions.c (tdesc_element_visitor): Move from here.
7729 (tdesc_element): Likewise.
7730 (tdesc_reg): Likewise.
7731 (tdesc_reg_up): Likewise.
7733 2018-04-17 Tom Tromey <tom@tromey.com>
7735 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7738 2018-04-17 Tom Tromey <tom@tromey.com>
7740 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7742 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7744 * symtab.c (print_symbol_info): Skip printing filename and line
7745 number when `last' is NULL.
7746 (symtab_symbol_info): Use empty string instead of NULL for first
7747 invocation of print_symbol_info.
7748 (rbreak_command): Pass NULL to `last' parameter of
7751 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7753 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7756 2018-04-16 Pedro Alves <palves@redhat.com>
7758 * MAINTAINERS (sh): Remove.
7759 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7760 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7761 (ALLDEPFILES): Remove sh64-tdep.c.
7762 * NEWS: Mentions that support for SH-5/SH64 is removed.
7763 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7764 (sh*-*-openbsd*): Ditto.
7765 (sh64-*-elf*): Remove.
7767 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7768 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7769 * sh-tdep.c: No longer include "sh64-tdep.h".
7770 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7771 * sh64-tdep.c, sh64-tdep.h: Remove files.
7773 2018-04-16 Pedro Alves <palves@redhat.com>
7775 * MAINTAINERS: Remove m88k.
7776 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7777 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7778 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7779 * NEWS: Mention that support for m88k was removed.
7780 * configure.host (m88*-*-*): Remove support.
7781 * configure.nat (m88k-*-*): Remove support.
7782 * configure.tgt (m88*-*-openbsd*): Remove.
7783 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7785 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7787 * configure.tgt (x86_tobjs): New variable.
7788 (amd64_tobjs, i386_tobjs): Use it.
7790 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7792 * symtab.c (print_symbol_info): Precede the symbol definition by
7793 the line number when available.
7794 * NEWS: Advertise this enhancement.
7796 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7798 * NEWS (New options): announce set/show record btrace cpu.
7799 * btrace.c: Include record-btrace.h.
7800 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7801 the vendor is unknown.
7802 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7803 Maybe overwrite the btrace configuration's cpu.
7804 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7805 (btrace_fetch): Add cpu parameter. Update callers.
7806 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7807 Maybe overwrite the btrace configuration's cpu. Skip enabling
7808 errata workarounds if the vendor is unknown.
7809 * python/py-record-btrace.c: Include record-btrace.h.
7810 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7811 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7812 * record-btrace.c (record_btrace_cpu_state_kind): New.
7813 (record_btrace_cpu): New.
7814 (set_record_btrace_cpu_cmdlist): New.
7815 (record_btrace_get_cpu): New.
7816 (require_btrace_thread, record_btrace_info)
7817 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7818 (cmd_set_record_btrace_cpu_none): New.
7819 (cmd_set_record_btrace_cpu_auto): New.
7820 (cmd_set_record_btrace_cpu): New.
7821 (cmd_show_record_btrace_cpu): New.
7822 (_initialize_record_btrace): Initialize set/show record btrace cpu
7824 * record-btrace.h (record_btrace_get_cpu): New.
7826 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7828 * record.c (set_record_command): Fix typo in message.
7830 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7832 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7834 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7836 * infrun.c (process_event_stop_test): Call
7837 gdbarch_in_indirect_branch_thunk.
7838 * gdbarch.sh (in_indirect_branch_thunk): New.
7839 * gdbarch.c: Regenerated.
7840 * gdbarch.h: Regenerated.
7843 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7844 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7845 (ALLDEPFILES): Add x86-tdep.c.
7846 * arch-utils.h (default_in_indirect_branch_thunk): New.
7847 * arch-utils.c (default_in_indirect_branch_thunk): New.
7848 * i386-tdep: Include x86-tdep.h.
7849 (i386_in_indirect_branch_thunk): New.
7850 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7852 * amd64-tdep: Include x86-tdep.h.
7853 (amd64_in_indirect_branch_thunk): New.
7854 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7856 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7859 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7860 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7861 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7864 2018-04-12 Tom Tromey <tom@tromey.com>
7866 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7867 (rust_evaluate_subexp): Likewise.
7869 2018-04-12 Pedro Alves <palves@redhat.com>
7871 * procfs.c (procfs_detach): Make forward declaration's prototype
7872 match definition's protototype.
7873 (proc_get_LDT_entry): Remove stale do_cleanups call.
7875 2018-04-12 Pedro Alves <palves@redhat.com>
7877 * target.h (target_ops::to_has_exited): Delete.
7878 (target_has_exited): Delete.
7879 * target-delegates.c: Regenerate.
7881 2018-04-11 Pedro Alves <palves@redhat.com>
7883 * target.c (fileio_fh_t::t): Add comment.
7884 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7885 (target_fileio_close): Handle a NULL target.
7886 (invalidate_fileio_fh): New.
7887 (target_close): Call it.
7888 * remote.c (remote_hostio_send_command): No longer check whether
7889 remote_desc is open.
7891 2018-04-11 Pedro Alves <palves@redhat.com>
7893 * target.c (fileio_fh_t): Make it a named struct instead of a
7895 (fileio_fh_t::is_closed): New method.
7896 (DEF_VEC_O (fileio_fh_t)): Remove.
7897 (fileio_fhandles): Now a std::vector.
7898 (is_closed_fileio_fh): Delete.
7899 (acquire_fileio_fd): Adjust. Rename parameters.
7900 (release_fileio_fd): Adjust.
7901 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7902 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7903 (target_fileio_close): Adjust.
7905 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7907 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7910 2018-04-10 Pedro Alves <palves@redhat.com>
7912 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7913 (scoped_finish_thread_state): New class.
7914 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7916 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7917 (fetch_inferior_event, normal_stop): Likewise.
7918 * thread.c (finish_thread_state_cleanup): Delete.
7920 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7921 Pedro Alves <palves@redhat.com>
7923 * value.c: Include "selftest.h" and "common/array-view.h".
7924 (struct range) <operator ==>: New.
7925 (test_ranges_contain): New.
7926 (check_ranges_vector): New.
7927 (test_insert_into_bit_range_vector): New.
7928 (_initialize_values): Register selftests.
7929 * common/array-view.h (operator==, operator!=): New.
7931 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7933 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7935 * inline-frame.c: Include <algorithm>.
7936 (struct inline_state): Add constructor.
7937 (inline_state_s): Remove.
7938 (DEF_VEC_O(inline_state_s)): Remove.
7939 (inline_states): Change type to std::vector.
7940 (find_inline_frame_state): Adjust to std::vector.
7941 (allocate_inline_frame_state): Remove.
7942 (clear_inline_frame_state): Adjust to std::vector.
7943 (skip_inline_frames): Adjust to std::vector.
7945 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7947 * tracepoint.h (struct trace_state_variable): Add constructor.
7948 <name>: Change type to std::string.
7949 * tracepoint.c (tsv_s): Remove.
7950 (DEF_VEC_O(tsv_s)): Remove.
7951 (tvariables): Change to std::vector.
7952 (create_trace_state_variable): Adjust to std::vector.
7953 (find_trace_state_variable): Likewise.
7954 (find_trace_state_variable_by_number): Likewise.
7955 (delete_trace_state_variable): Likewise.
7956 (trace_variable_command): Adjust to std::string.
7957 (delete_trace_variable_command): Likewise.
7958 (tvariables_info_1): Adjust to std::vector.
7959 (save_trace_state_variables): Likewise.
7960 (start_tracing): Likewise.
7961 (merge_uploaded_trace_state_variables): Adjust to std::vector
7963 * target.h (struct target_ops)
7964 <to_download_trace_state_variable>: Pass reference to
7965 trace_state_variable.
7966 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7967 * target-delegates.c: Re-generate.
7968 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7969 (mi_tsv_deleted): Likewise.
7970 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7971 * remote.c (remote_download_trace_state_variable): Change
7972 pointer to reference and adjust.
7973 * make-target-delegates (parse_argtypes): Handle references.
7974 (write_function_header): Likewise.
7975 (munge_type): Likewise.
7977 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7979 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7980 string_view-selftests.c.
7981 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7983 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7984 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7985 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7986 * unittests/basic_string_view/element_access/char/1.cc:
7988 * unittests/basic_string_view/element_access/char/empty.cc:
7990 * unittests/basic_string_view/element_access/char/front_back.cc:
7992 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7993 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7995 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7997 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7999 * unittests/basic_string_view/operations/compare/char/1.cc:
8001 * unittests/basic_string_view/operations/compare/char/13650.cc:
8003 * unittests/basic_string_view/operations/copy/char/1.cc:
8005 * unittests/basic_string_view/operations/data/char/1.cc:
8007 * unittests/basic_string_view/operations/find/char/1.cc:
8009 * unittests/basic_string_view/operations/find/char/2.cc:
8011 * unittests/basic_string_view/operations/find/char/3.cc:
8013 * unittests/basic_string_view/operations/find/char/4.cc:
8015 * unittests/basic_string_view/operations/rfind/char/1.cc:
8017 * unittests/basic_string_view/operations/rfind/char/2.cc:
8019 * unittests/basic_string_view/operations/rfind/char/3.cc:
8021 * unittests/basic_string_view/operations/substr/char/1.cc:
8023 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8024 * unittests/string_view-selftests.c: New file.
8026 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8028 * unittests/basic_string_view/capacity/1.cc: New file.
8029 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8030 * unittests/basic_string_view/cons/char/1.cc: New file.
8031 * unittests/basic_string_view/cons/char/2.cc: New file.
8032 * unittests/basic_string_view/cons/char/3.cc: New file.
8033 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8034 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8035 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8036 * unittests/basic_string_view/element_access/char/1.cc: New file.
8037 * unittests/basic_string_view/element_access/char/2.cc: New file.
8038 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8039 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8040 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8041 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8042 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8043 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8044 * unittests/basic_string_view/include.cc: New file.
8045 * unittests/basic_string_view/inserters/char/1.cc: New file.
8046 * unittests/basic_string_view/inserters/char/2.cc: New file.
8047 * unittests/basic_string_view/inserters/char/3.cc: New file.
8048 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8049 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8050 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8051 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8052 * unittests/basic_string_view/literals/types.cc: New file.
8053 * unittests/basic_string_view/literals/values.cc: New file.
8054 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8055 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8056 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8057 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8058 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8059 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8060 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8061 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8062 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8063 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8064 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8065 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8066 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8067 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8068 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8069 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8070 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8071 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8072 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8073 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8074 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8075 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8076 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8077 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8078 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8079 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8080 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8081 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8082 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8083 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8084 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8085 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8086 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8087 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8088 * unittests/basic_string_view/operators/char/2.cc: New file.
8089 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8090 * unittests/basic_string_view/range_access/char/1.cc: New file.
8091 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8092 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8093 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8094 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8095 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8096 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8097 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8098 * unittests/basic_string_view/typedefs.cc: New file.
8099 * unittests/basic_string_view/types/1.cc: New file.
8101 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8103 * common/gdb_string_view.h: Remove libstdc++ implementation
8104 details, adjust to gdb reality.
8105 * common/gdb_string_view.tcc: Likewise.
8106 * cli/cli-script.c (struct string_view): Remove.
8107 (user_args) <m_args>: Change element type to gdb::string_view.
8108 (user_args::insert_args): Adjust.
8110 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8112 * common/gdb_string_view.h: New file.
8113 * common/gdb_string_view.tcc: New file.
8115 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8117 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8118 * configure: Re-generate.
8120 2018-04-09 Pedro Alves <palves@redhat.com>
8122 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8123 (set_target_gdbarch): Call
8124 gdb::observers::architecture_changed.notify instead of
8125 observer_notify_architecture_changed.
8127 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8129 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8130 (do_restore_current_traceframe_cleanup): Remove.
8131 (restore_current_traceframe_cleanup_dtor): Remove.
8132 (make_cleanup_restore_current_traceframe): Remove.
8133 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8135 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8136 * infrun.c (fetch_inferior_event): Use
8137 scoped_restore_current_traceframe.
8139 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8141 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8143 <n_allocated_type_units>: Remove.
8144 <all_type_units>: Change to std::vector.
8145 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8146 to std::vector change.
8147 (dwarf2_per_objfile::get_cutu): Likewise.
8148 (dwarf2_per_objfile::get_tu): Likewise.
8149 (create_signatured_type_table_from_index): Likewise.
8150 (create_signatured_type_table_from_debug_names): Likewise.
8151 (dw2_symtab_iter_next): Likewise.
8152 (dw2_print_stats): Likewise.
8153 (dw2_expand_all_symtabs): Likewise.
8154 (dw2_expand_marked_cus): Likewise.
8155 (dw2_debug_names_iterator::next): Likewise.
8156 (dwarf2_initialize_objfile): Likewise.
8157 (add_signatured_type_cu_to_table): Likewise.
8158 (create_all_type_units): Likewise.
8159 (add_type_unit): Likewise.
8160 (struct tu_abbrev_offset): Add constructor.
8161 (build_type_psymtabs_1): Adjust to std::vector change.
8162 (print_tu_stats): Likewise.
8163 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8164 (write_debug_names): Likewise.
8166 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8168 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8169 Make an std::vector.
8170 <n_comp_units>: Remove.
8171 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8172 to std::vector change.
8173 (dwarf2_per_objfile::get_cutu): Likewise.
8174 (dwarf2_per_objfile::get_cu): Likewise.
8175 (create_cus_from_index): Likewise.
8176 (create_addrmap_from_index): Likewise.
8177 (create_addrmap_from_aranges): Likewise.
8178 (dwarf2_read_index): Likewise.
8179 (dw2_find_last_source_symtab): Likewise.
8180 (dw2_map_symtabs_matching_filename): Likewise.
8181 (dw2_symtab_iter_next): Likewise.
8182 (dw2_print_stats): Likewise.
8183 (dw2_expand_all_symtabs): Likewise.
8184 (dw2_expand_symtabs_with_fullname): Likewise.
8185 (dw2_expand_marked_cus): Likewise.
8186 (dw2_map_symbol_filenames): Likewise.
8187 (create_cus_from_debug_names): Likewise.
8188 (dwarf2_read_debug_names): Likewise.
8189 (dw2_debug_names_iterator::next): Likewise.
8190 (dwarf2_initialize_objfile): Likewise.
8191 (set_partial_user): Likewise.
8192 (dwarf2_build_psymtabs_hard): Likewise.
8193 (read_comp_units_from_section): Remove arguments, adjust to
8195 (create_all_comp_units): Adjust to std::vector and
8196 read_comp_units_from_section changes.
8197 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8199 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8200 (psyms_seen_size): Likewise.
8201 (write_gdbindex): Likewise.
8202 (write_debug_names): Likewise.
8204 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8206 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8207 with dwarf2_per_objfile.
8208 (create_cus_from_index): Likewise.
8209 (create_signatured_type_table_from_index): Likewise.
8210 (dwarf2_read_index): Likewise.
8211 (dwarf2_initialize_objfile): Likewise.
8212 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8213 per_cu rather than get_dwarf2_per_objfile.
8215 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8217 * dwarf2read.h (struct signatured_type): Forward declare.
8218 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8220 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8221 (dw2_get_cutu): ...this.
8222 (dwarf2_per_objfile::get_cu): Rename from...
8223 (dw2_get_cu): ...this.
8224 (dwarf2_per_objfile::get_tu): New.
8225 (create_addrmap_from_index): Adjust.
8226 (create_addrmap_from_aranges): Adjust.
8227 (dw2_find_last_source_symtab): Adjust.
8228 (dw2_map_symtabs_matching_filename): Adjust.
8229 (dw2_symtab_iter_next): Adjust.
8230 (dw2_print_stats): Adjust.
8231 (dw2_expand_all_symtabs): Adjust.
8232 (dw2_expand_symtabs_with_fullname): Adjust.
8233 (dw2_expand_marked_cus): Adjust.
8234 (dw_expand_symtabs_matching_file_matcher): Adjust.
8235 (dw2_map_symbol_filenames): Adjust.
8236 (dw2_debug_names_iterator::next): Adjust.
8237 (dwarf2_initialize_objfile): Adjust.
8238 (set_partial_user): Adjust.
8239 (dwarf2_build_psymtabs_hard): Adjust.
8241 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8243 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8244 Remove unused variables.
8245 (dw2_map_symtabs_matching_filename): Likewise.
8246 (dwarf2_record_block_ranges): Likewise.
8247 (dwarf2_read_addr_index): Likewise.
8248 (follow_die_offset): Likewise.
8250 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8252 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8253 to symbol_file_add_main.
8255 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8258 * mi/mi-console.c (do_fputc_async_safe): New.
8259 (mi_console_file::write_async_safe): New.
8260 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8261 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8263 * ui-file.c (ui_file::putstrn): Adjust call to
8264 fputstrn_unfiltered.
8265 * utils.c (printchar): Replace do_fputs and do_fprintf
8266 parameters by do_fputc.
8267 (fputstr_filtered): Adjust call to printchar.
8268 (fputstr_unfiltered): Likewise.
8269 (fputstrn_filtered): Likewise.
8270 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8272 * utils.h (do_fputc_ftype): New typedef.
8273 (fputstrn_unfiltered): Add do_fputc parameter.
8275 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8277 * regformats/i386/i386-avx.dat: Remove.
8279 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8282 * amd64-tdep.c (amd64_none_init_abi): New function.
8283 (amd64_x32_none_init_abi): New function.
8284 (_initialize_amd64_tdep): Register handlers for x86-64 and
8285 x64_32 with GDB_OSABI_NONE.
8286 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8287 GDB_OSABI_NONE osabi.
8289 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8292 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8294 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8295 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8297 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8299 * common/byte-vector.h (char_vector): New type.
8300 * target.h (target_read_alloc): Return
8301 gdb::optional<byte_vector>.
8302 (target_read_stralloc): Return gdb::optional<char_vector>.
8303 (target_get_osdata): Return gdb::optional<char_vector>.
8304 * target.c (target_read_alloc_1): Templatize. Replacement
8305 manual memory management with vector.
8306 (target_read_alloc): Change return type, adjust.
8307 (target_read_stralloc): Change return type, adjust.
8308 (target_get_osdata): Change return type, adjust.
8309 * auxv.c (struct auxv_info) <length>: Remove.
8310 <data>: Change type to gdb::optional<byte_vector>.
8311 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8312 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8313 (target_auxv_search): Adjust.
8314 (fprint_target_auxv): Adjust.
8315 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8316 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8317 (linux_make_corefile_notes): Adjust.
8318 * osdata.c (get_osdata): Adjust.
8319 * remote.c (remote_get_threads_with_qxfer): Adjust.
8320 (remote_memory_map): Adjust.
8321 (remote_traceframe_info): Adjust.
8322 (btrace_read_config): Adjust.
8323 (remote_read_btrace): Adjust.
8324 (remote_pid_to_exec_file): Adjust.
8325 * solib-aix.c (solib_aix_get_library_list): Adjust.
8326 * solib-dsbt.c (decode_loadmap): Don't free buf.
8327 (dsbt_get_initial_loadmaps): Adjust.
8328 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8329 * solib-target.c (solib_target_current_sos): Adjust.
8330 * tracepoint.c (sdata_make_value): Adjust.
8331 * xml-support.c (xinclude_start_include): Adjust.
8332 (xml_fetch_content_from_file): Adjust.
8333 * xml-support.h (xml_fetch_another): Change return type.
8334 (xml_fetch_content_from_file): Change return type.
8335 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8336 * xml-tdesc.c (file_read_description_xml): Adjust.
8337 (fetch_available_features_from_target): Change return type.
8338 (target_fetch_description_xml): Adjust.
8339 (target_read_description_xml): Adjust.
8341 2018-04-06 Tom Tromey <tom@tromey.com>
8343 * value.c (~value): Update.
8344 (struct value) <contents>: Now unique_xmalloc_ptr.
8345 (value_contents_bits_eq, allocate_value_contents)
8346 (value_contents_raw, value_contents_all_raw)
8347 (value_contents_for_printing, value_contents_for_printing_const)
8348 (set_value_enclosing_type): Update.
8350 2018-04-06 Tom Tromey <tom@tromey.com>
8352 * value.c (range_s): Remove typedef, VEC.
8353 (struct range): Add operator<.
8354 (range_lessthan): Remove.
8355 (ranges_contain): Change type.
8357 (struct value) <unavailable, optimized_out>: Now std::vector.
8358 (value_entirely_available)
8359 (value_entirely_covered_by_range_vector)
8360 (value_entirely_unavailable, value_entirely_optimized_out):
8362 (insert_into_bit_range_vector): Change argument type.
8363 (find_first_range_overlap): Likewise.
8364 (struct ranges_and_idx, value_contents_bits_eq)
8365 (require_not_optimized_out, require_available): Update.
8366 (ranges_copy_adjusted): Change argument types.
8367 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8369 2018-04-06 Tom Tromey <tom@tromey.com>
8371 * value.c (~value): Update.
8372 (struct value) <parent>: Now a value_ref_ptr.
8373 (value_parent, set_value_parent, value_address, value_copy):
8376 2018-04-06 Tom Tromey <tom@tromey.com>
8378 * value.c (struct value): Add constructor, destructor, and member
8380 (allocate_value_lazy, value_decref): Update.
8382 2018-04-06 Tom Tromey <tom@tromey.com>
8384 * value.c (struct value) <released, next>: Remove.
8385 (all_values): Now a std::vector.
8386 (allocate_value_lazy): Update.
8387 (value_next): Remove.
8388 (value_mark, value_free_to_mark, release_value)
8389 (value_release_to_mark): Update.
8391 2018-04-06 Tom Tromey <tom@tromey.com>
8393 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8394 (free_value_chain): Remove.
8395 * value.c (free_value_chain): Remove.
8396 (value_release_to_mark): Return a std::vector.
8397 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8399 (check_condition): Update.
8400 * eval.c (fetch_subexp_value): Change "val_chain" to a
8402 * breakpoint.c (update_watchpoint): Update.
8403 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8405 2018-04-06 Tom Tromey <tom@tromey.com>
8407 * value.h (free_all_values): Remove.
8408 * value.c (free_all_values): Remove.
8410 2018-04-06 Tom Tromey <tom@tromey.com>
8412 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8413 (value_history_chain, value_history_count): Remove.
8414 (value_history): New global.
8415 (record_latest_value, access_value_history, show_values)
8416 (preserve_values): Update.
8418 2018-04-06 Tom Tromey <tom@tromey.com>
8420 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8421 * varobj.c (varobj_set_display_format, varobj_set_value)
8422 (install_default_visualizer, construct_visualizer)
8423 (install_new_value, ~varobj, varobj_get_value_type)
8424 (my_value_of_variable, varobj_editable_p): Update.
8425 * c-varobj.c (c_describe_child, c_value_of_variable)
8426 (cplus_number_of_children, cplus_describe_child): Update.
8427 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8428 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8429 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8431 2018-04-06 Tom Tromey <tom@tromey.com>
8433 * printcmd.c (last_examine_address): Change type to
8435 (do_examine, x_command): Update.
8437 2018-04-06 Tom Tromey <tom@tromey.com>
8439 * value.c (release_value): Update.
8440 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8441 (struct bpstats) <val>: Now a value_ref_ptr.
8442 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8443 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8444 (~watchpoint, print_it_watchpoint, watch_command_1)
8445 (invalidate_bp_value_on_memory_change): Update.
8447 2018-04-06 Tom Tromey <tom@tromey.com>
8449 * varobj.c (varobj_clear_saved_item)
8450 (update_dynamic_varobj_children, install_new_value, ~varobj):
8452 * value.h (value_incref): Move declaration earlier.
8453 (value_decref): Rename from value_free.
8454 (struct value_ref_policy): New.
8455 (value_ref_ptr): New typedef.
8456 (struct value_deleter): Remove.
8457 (gdb_value_up): Remove typedef.
8458 (release_value): Change return type.
8459 (release_value_or_incref): Remove.
8460 * value.c (set_value_parent): Update.
8461 (value_incref): Change return type.
8462 (value_decref): Rename from value_free.
8463 (value_free_to_mark, free_all_values, free_value_chain): Update.
8464 (release_value): Return value_ref_ptr.
8465 (release_value_or_incref): Remove.
8466 (record_latest_value, set_internalvar, clear_internalvar):
8468 * stack.c (info_frame_command): Don't call value_free.
8469 * python/py-value.c (valpy_dealloc, valpy_new)
8470 (value_to_value_object): Update.
8471 * printcmd.c (do_examine): Update.
8472 * opencl-lang.c (lval_func_free_closure): Update.
8473 * mi/mi-main.c (register_changed_p): Don't call value_free.
8474 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8475 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8476 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8478 * guile/scm-value.c (vlscm_free_value_smob)
8479 (vlscm_scm_from_value): Update.
8480 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8481 (frame_unwind_register_unsigned, get_frame_register_bytes)
8482 (put_frame_register_bytes): Don't call value_free.
8483 * findvar.c (address_from_register): Don't call value_free.
8484 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8485 * dwarf2loc.c (entry_data_value_free_closure)
8486 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8487 (dwarf2_evaluate_loc_desc_full): Update.
8488 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8489 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8490 (~watchpoint, watch_command_1)
8491 (invalidate_bp_value_on_memory_change): Update.
8492 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8494 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8497 * warning.m4: Add -Wno-error=deprecated-register.
8498 * configure: Re-generate.
8500 2018-04-05 Tom Tromey <tom@tromey.com>
8502 * linespec.h: Remove include of "vec.h".
8504 2018-04-05 Tom Tromey <tom@tromey.com>
8506 * linespec.c (typep): Remove typedef.
8507 (find_methods, find_superclass_methods): Take a std::vector.
8508 (find_method): Use std::vector.
8510 2018-04-05 Tom Tromey <tom@tromey.com>
8512 * utils.c (compare_strings): Remove.
8513 * utils.h (compare_strings): Remove.
8514 * objc-lang.h (find_imps): Update.
8515 * objc-lang.c (find_methods): Take a std::vector.
8516 (uniquify_strings, find_imps): Likewise.
8517 * linespec.c (find_methods): Take a std::vector.
8518 (decode_objc): Use std::vector.
8519 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8521 (find_method, find_function_symbols): Use std::vector.
8523 2018-04-05 Tom Tromey <tom@tromey.com>
8525 * completer.c (completion_tracker::completion_tracker): Remove
8527 (completion_tracker::discard_completions): Likewise.
8528 * breakpoint.c (ambiguous_names_p): Remove cast.
8529 * ada-lang.c (_initialize_ada_language): Remove cast.
8530 * utils.h (streq): Update.
8531 (streq_hash): Add new declaration.
8532 * utils.c (streq): Return bool.
8533 (streq_hash): New function.
8535 2018-04-05 Tom Tromey <tom@tromey.com>
8537 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8538 Remove a string copy.
8540 2018-04-05 Tom Tromey <tom@tromey.com>
8542 * linespec.c (filter_results): Use std::vector.
8543 (decode_line_2, decode_line_full): Update.
8545 2018-04-05 Tom Tromey <tom@tromey.com>
8547 * linespec.c (canonical_to_fullform): Return std::string.
8548 (filter_results): Update.
8549 (struct decode_line_2_item): Add constructor.
8550 <fullform, displayform>: Now std::string.
8551 (decode_line_2_compare_items): Now a std::sort comparator.
8552 (decode_line_2): Update.
8554 2018-04-05 Tom Tromey <tom@tromey.com>
8556 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8557 (unexpected_linespec_error): Update.
8558 (linespec_parse_basic, parse_linespec): Update.
8560 2018-04-05 Tom Tromey <tom@tromey.com>
8562 * linespec.c (linespec_parse_basic): Reindent.
8564 2018-04-05 Tom Tromey <tom@tromey.com>
8566 * minsyms.h (iterate_over_minimal_symbols): Update.
8567 * minsyms.c (iterate_over_minimal_symbols): Take a
8569 * linespec.c (struct collect_minsyms): Remove.
8570 (compare_msyms): Now a std::sort comparator.
8571 (add_minsym): Add parameters.
8572 (search_minsyms_for_name): Update. Use std::vector.
8574 2018-04-03 Tom Tromey <tom@tromey.com>
8576 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8579 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8581 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8583 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8586 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8587 printing static type.
8589 2018-04-01 Tom Tromey <tom@tromey.com>
8591 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8592 (rs6000_xfer_shared_libraries): Update.
8594 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8596 * common/gdb_vecs.h (char_ptr): Remove.
8597 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8599 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8601 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8603 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8605 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8607 * tracepoint.h (struct uploaded_tp): Initialize fields.
8608 <actions, step_actions, cmd_strings>: Change type to
8609 std::vector<char *>.
8610 * tracepoint.c (get_uploaded_tp): Allocate with new.
8611 (free_uploaded_tps): Free with delete.
8612 (parse_tracepoint_definition): Adjust to std::vector change.
8613 * breakpoint.c (read_uploaded_action): Likewise.
8614 (create_tracepoint_from_upload): Likewise.
8615 * ctf.c (ctf_write_uploaded_tp): Likewise.
8616 (SET_ARRAY_FIELD): Likewise.
8617 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8619 2018-03-30 Tom Tromey <tom@tromey.com>
8621 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8623 (svr4_keep_data_in_core): Update.
8624 (svr4_read_so_list): Update.
8626 2018-03-30 Tom Tromey <tom@tromey.com>
8628 * windows-nat.c (handle_output_debug_string, handle_exception):
8630 * target.h (target_read_string): Update.
8631 * target.c (target_read_string): Change "string" to
8633 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8635 * solib-frv.c (frv_current_sos): Update.
8636 * solib-dsbt.c (dsbt_current_sos): Update.
8637 * solib-darwin.c (darwin_current_sos): Update.
8638 * linux-thread-db.c (inferior_has_bug): Update.
8639 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8640 Update. Remove alloca.
8641 * ada-lang.c (ada_main_name): Update.
8643 2018-03-30 Tom Tromey <tom@tromey.com>
8645 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8646 (struct dwo_file_deleter): New.
8647 (dwo_file_up): New typedef.
8648 (open_and_init_dwo_file): Use dwo_file_up.
8649 (free_dwo_file_cleanup): Remove.
8651 2018-03-30 Tom Tromey <tom@tromey.com>
8653 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8654 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8656 2018-03-30 Tom Tromey <tom@tromey.com>
8658 * dwarf2read.c (class free_cached_comp_units): New class.
8659 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8660 (free_cached_comp_units): Remove function.
8662 2018-03-30 Tom Tromey <tom@tromey.com>
8664 * utils.h (make_cleanup_unpush_target): Remove.
8665 * inf-ptrace.c (struct target_unpusher): New.
8666 (target_unpush_up) New typedef.
8667 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8669 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8671 2018-03-27 Tom Tromey <tom@tromey.com>
8673 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8675 2018-03-27 Pedro Alves <palves@redhat.com>
8676 Tom Tromey <tom@tromey.com>
8678 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8679 destructor. Now a class.
8680 (gdb_readline_wrapper_cleanup): Remove function.
8681 (gdb_readline_wrapper): Remove cleanups.
8683 2018-03-27 Tom Tromey <tom@tromey.com>
8685 * typeprint.h (struct type_print_options) <local_typedefs,
8686 global_typedefs>: Remove "struct" keyword.
8687 (class typedef_hash_table): New class.
8688 (recursively_update_typedef_hash, add_template_parameters)
8689 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8690 (find_typedef_in_hash): Don't declare.
8691 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8692 (typedef_hash_table::recursively_update): Rename from
8693 recursively_update_typedef_hash. Now a member.
8694 (typedef_hash_table::add_template_parameters): Rename from
8695 add_template_parameters. Now a member.
8696 (typedef_hash_table::typedef_hash_table): Now a constructor;
8697 rename from create_typedef_hash.
8698 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8699 rename from free_typedef_hash.
8700 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8701 (do_free_global_table): Remove.
8702 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8703 from copy_type_recursive.
8704 (create_global_typedef_table): Remove.
8705 (typedef_hash_table::find_global_typedef): Now a member of
8707 (typedef_hash_table::find_typedef): Rename from
8708 find_typedef_in_hash; now a member.
8709 (whatis_exp): Update.
8710 * extension.h (struct ext_lang_type_printers): Add constructor and
8712 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8714 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8715 Now a constructor; rename from start_ext_lang_type_printers.
8716 (ext_lang_type_printers): Now a destructor; rename from
8717 free_ext_lang_type_printers.
8718 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8720 (c_type_print_base_struct_union): Update. Remove cleanups.
8722 2018-03-27 Tom Tromey <tom@tromey.com>
8724 * dwarf-index-write.c: Include <cmath>.
8726 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8728 * NEWS: Add entry describing new "set|show varsize-limit" command.
8729 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8731 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8734 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8736 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8738 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8739 * dwarf-index-common.c: New file.
8740 * dwarf-index-common.h: New file.
8741 * dwarf-index-write.c: New file.
8742 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8743 (struct dwarf2_section_info): Move from here.
8744 (dwarf2_section_info_def): Likewise.
8745 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8746 (offset_type): Likewise.
8747 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8748 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8749 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8750 (byte_swap): Likewise.
8751 (MAYBE_SWAP): Likewise.
8752 (dwarf2_per_cu_ptr): Likewise.
8753 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8754 (struct tu_stats): Likewise.
8755 (struct dwarf2_per_objfile): Likewise.
8756 (struct dwarf2_per_cu_data): Likewise.
8757 (struct signatured_type): Likewise.
8758 (sig_type_ptr): Likewise.
8759 (DEF_VEC_P (sig_type_ptr)): Likewise.
8760 (INDEX4_SUFFIX): Likewise.
8761 (INDEX5_SUFFIX): Likewise.
8762 (DEBUG_STR_SUFFIX): Likewise.
8763 (dwarf2_read_section): Make non-static.
8764 (mapped_index_string_hash): Move from here.
8765 (dwarf5_djb_hash): Likewise.
8766 (file_write): Likewise.
8767 (class data_buf): Likewise.
8768 (struct symtab_index_entry): Likewise.
8769 (struct mapped_symtab): Likewise.
8770 (find_slot): Likewise.
8771 (hash_expand): Likewise.
8772 (add_index_entry): Likewise.
8773 (uniquify_cu_indices): Likewise.
8774 (class c_str_view): Likewise.
8775 (class c_str_view_hasher): Likewise.
8776 (class vector_hasher): Likewise.
8777 (write_hash_table): Likewise.
8778 (psym_index_map): Likewise.
8779 (struct addrmap_index_data): Likewise.
8780 (add_address_entry): Likewise.
8781 (add_address_entry_worker): Likewise.
8782 (write_address_map): Likewise.
8783 (symbol_kind): Likewise.
8784 (write_psymbols): Likewise.
8785 (struct signatured_type_index_data): Likewise.
8786 (write_one_signatured_type): Likewise.
8787 (recursively_count_psymbols): Likewise.
8788 (recursively_write_psymbols): Likewise.
8789 (class debug_names): Likewise.
8790 (check_dwarf64_offsets): Likewise.
8791 (psyms_seen_size): Likewise.
8792 (write_gdbindex): Likewise.
8793 (write_debug_names): Likewise.
8794 (assert_file_size): Likewise.
8795 (write_psymtabs_to_index): Likewise.
8796 (save_gdb_index_command): Likewise.
8797 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8799 * dwarf2read.h: New file.
8801 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8804 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8805 symbol name if the CU's language stores symbol names in linkage
8807 * language.h (struct language_defn)
8808 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8809 all instances of this struct.
8811 2018-03-26 Tom Tromey <tom@tromey.com>
8813 * stack.c (backtrace_command_1): Remove verbose code.
8815 2018-03-26 Tom Tromey <tom@tromey.com>
8817 * python/py-framefilter.c (py_print_type): Don't catch
8818 exceptions. Return void.
8819 (py_print_value): Likewise.
8820 (py_print_single_arg): Likewise.
8821 (enumerate_args): Don't catch exceptions.
8822 (py_print_args): Likewise.
8823 (py_print_frame): Likewise.
8824 (gdbpy_apply_frame_filter): Catch exceptions here.
8826 2018-03-26 Tom Tromey <tom@tromey.com>
8828 * stack.c (_initialize_stack): Remove trailing newlines from help
8829 text. Add "Usage" line to "backtrace" help.
8831 2018-03-26 Tom Tromey <tom@tromey.com>
8834 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8836 2018-03-26 Tom Tromey <tom@tromey.com>
8838 * python/py-framefilter.c (py_print_single_arg): Return
8839 EXT_LANG_BT_ERROR from catch.
8841 2018-03-26 Tom Tromey <tom@tromey.com>
8844 * stack.c (backtrace_command_1): Move some code into no-filters
8847 2018-03-26 Tom Tromey <tom@tromey.com>
8849 * python/py-framefilter.c (throw_quit_or_print_exception): New
8851 (gdbpy_apply_frame_filter): Use it.
8853 2018-03-26 Tom Tromey <tom@tromey.com>
8856 * python/py-framefilter.c (py_print_type, py_print_value)
8857 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8860 2018-03-26 Tom Tromey <tom@tromey.com>
8862 * python/py-framefilter.c (enumerate_args): Use
8863 gdb::unique_xmalloc_ptr.
8865 2018-03-26 Tom Tromey <tom@tromey.com>
8867 * python/py-framefilter.c (py_print_frame): Return
8869 (gdbpy_apply_frame_filter): Update comment.
8870 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8872 <EXT_LANG_BT_NO_FILTERS>: Change value.
8874 2018-03-26 Tom Tromey <tom@tromey.com>
8877 * stack.c (backtrace_command): Parse "hide" argument.
8878 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8879 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8882 2018-03-26 Tom Tromey <tom@tromey.com>
8884 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8886 (backtrace_command): Remove "fulltrace", add "flags".
8888 2018-03-26 Tom Tromey <tom@tromey.com>
8890 * stack.c (backtrace_command): Rewrite command line parsing.
8892 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8894 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8896 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8898 * filename-seen-cache.h: Add include guard.
8900 2018-03-26 Keith Seitz <keiths@redhat.com>
8902 * symfile.c (place_section): Remove "struct" from section_addr_info
8904 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8905 "struct" keyword from section_addr_info.
8907 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8909 * regformats/regdef.h (reg): Add constructors.
8911 2018-03-25 Pedro Alves <palves@redhat.com>
8913 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8914 if then/else bodies in var_func_name extraction.
8916 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8918 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8919 lookup_minimal_symbol() to find symbol entry.
8920 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8922 2018-03-23 Keith Seitz <keiths@redhat.com>
8925 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8926 nested type definitions for C++, too.
8928 2018-03-23 Tom Tromey <tom@tromey.com>
8930 * machoread.c (struct oso_el): Add a constructor. Don't define as
8932 (macho_register_oso): Remove.
8933 (macho_symtab_read): Take a std::vector.
8934 (oso_el_compare_name): Now a std::sort comparator.
8935 (macho_symfile_read_all_oso): Take a std::vector.
8936 (macho_symfile_read): Use std::vector. Remove cleanups.
8938 2018-03-22 Tom Tromey <tom@tromey.com>
8940 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8941 (record_full_goto_bookmark): Use std::string.
8943 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8946 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8949 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8951 * rs6000-tdep.c (store_insn_p): New function.
8952 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8953 and cr_reg to their unshifted values. Use store_insn_p to
8954 match LR saves using either R1 or fdata->alloca_reg. Use
8955 store_insn_p to match CR saves. Set alloca_reg_offset
8956 when alloca_reg and framep are set. Remove lr_reg shift
8957 when assigning to fdata->lr_register.
8959 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8961 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8962 command line args instead of emitting a warning.
8964 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8966 * tracepoint.h (struct static_tracepoint_marker): Initialize
8967 fields, define default constructor, move constructor and move
8968 assignment, disable the rest.
8969 <str_id, extra>: Make std::string.
8970 (release_static_tracepoint_marker): Remove.
8971 (free_current_marker): Remove.
8972 * tracepoint.c (free_current_marker): Remove.
8973 (parse_static_tracepoint_marker_definition): Adjust to
8974 std::string, use new hex2str overload.
8975 (release_static_tracepoint_marker): Remove.
8976 (print_one_static_tracepoint_marker): Get marker by reference
8977 and adjust to std::string.
8978 (info_static_tracepoint_markers_command): Adjust to std::vector
8980 * target.h (static_tracepoint_marker_p): Remove typedef.
8981 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8982 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8984 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8986 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8987 (target_debug_print_std_vector_static_tracepoint_marker): New.
8988 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8990 (target_debug_print_static_tracepoint_marker_p): ... this.
8991 * target-delegates.c: Re-generate.
8992 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8994 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8995 (decode_static_tracepoint_spec): Adjust to std::vector.
8996 (tracepoint_print_one_detail): Adjust to std::string.
8997 (strace_marker_decode_location): Adjust to std::string.
8998 (update_static_tracepoint): Adjust to std::string, remove call
8999 to release_static_tracepoint_marker.
9000 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9001 Adjust to std::vector.
9002 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9003 (remote_static_tracepoint_markers_by_strid): Adjust to
9005 * common/rsp-low.h (hex2str): New overload with explicit count
9007 * common/rsp-low.c (hex2str): New overload with explicit count
9009 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9010 (_initialize_rsp_low_selftests): Add test_hex2str test.
9011 * unittests/tracepoint-selftests.c
9012 (test_parse_static_tracepoint_marker_definition): Adjust to
9015 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9017 * tracepoint.c (parse_static_tracepoint_marker_definition):
9018 Consider case where the definition is followed by more
9020 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9021 tracepoint-selftests.c.
9022 * unittests/tracepoint-selftests.c: New.
9024 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9026 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9029 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9031 * symtab.c (find_pc_sect_line): fixed indentation.
9033 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9035 * symtab.c (find_pc_sect_line): now uses binary search.
9037 2018-03-19 Tom Tromey <tom@tromey.com>
9039 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9042 2018-03-19 Pedro Alves <palves@redhat.com>
9043 Tom Tromey <tom@tromey.com>
9045 * unittests/observable-selftests.c: New file.
9046 * common/observable.h: New file.
9047 * observable.h: New file.
9048 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9049 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9050 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9051 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9052 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9053 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9054 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9055 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9056 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9057 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9058 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9059 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9060 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9061 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9062 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9063 tui/tui-interp.c, valops.c: Update all users.
9064 * tui/tui-hooks.c (tui_bp_created_observer)
9065 (tui_bp_deleted_observer, tui_bp_modified_observer)
9066 (tui_inferior_exit_observer, tui_before_prompt_observer)
9067 (tui_normal_stop_observer, tui_register_changed_observer):
9069 (tui_observers_token): New global.
9070 (attach_or_detach, tui_attach_detach_observers): New functions.
9071 (tui_install_hooks, tui_remove_hooks): Use
9072 tui_attach_detach_observers.
9073 * record-btrace.c (record_btrace_thread_observer): Remove.
9074 (record_btrace_thread_observer_token): New global.
9075 * observer.sh: Remove.
9076 * observer.c: Rename to observable.c.
9077 * observable.c (namespace gdb_observers): Define new objects.
9078 (observer_debug): Move into gdb_observers namespace.
9079 (struct observer, struct observer_list, xalloc_observer_list_node)
9080 (xfree_observer_list_node, generic_observer_attach)
9081 (generic_observer_detach, generic_observer_notify): Remove.
9082 (_initialize_observer): Update.
9083 Don't include observer.inc.
9084 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9085 (clean mostlyclean): Likewise.
9086 (observer.h, observer.inc): Remove targets.
9087 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9088 (COMMON_SFILES): Use observable.c, not observer.c.
9089 * .gitignore: Remove observer.h.
9091 2018-03-18 Tom Tromey <tom@tromey.com>
9093 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9095 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9097 2018-03-17 Tom Tromey <tom@tromey.com>
9099 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9101 2018-03-17 Tom Tromey <tom@tromey.com>
9103 * target.c (class scoped_target_fd): New.
9104 (target_fileio_close_cleanup): Remove.
9105 (target_fileio_read_alloc_1): Use scoped_target_fd.
9107 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9109 * silent-rules.mk: New.
9110 * Makefile.in: Include silent-rules.mk
9111 (srcdir, VPATH, top_srcdir): Move up.
9112 (COMPILE): Add ECHO_CXX.
9113 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9114 (init.c): Add ECHO_INIT_C.
9115 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9116 (version.c): Add ECHO_GEN.
9117 (printcmd.o): Add ECHO_CXX.
9118 (target-float.o): Add ECHO_CXX.
9119 (ada-exp.o): Add ECHO_CXX.
9120 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9121 (insight$(EXEEXT)): Add ECHO_CXXLD.
9122 * gnulib/configure.ac: Add AM_SILENT_RULES.
9123 * gnulib/aclocal.m4: Re-generate.
9124 * gnulib/configure: Re-generate.
9125 * gnulib/import/Makefile.in: Re-generate.
9127 2018-03-16 Tom Tromey <tom@tromey.com>
9129 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9130 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9131 * utils.c (do_free_section_addr_info)
9132 (make_cleanup_free_section_addr_info): Remove.
9133 * symfile.h (struct other_sections): Add constructor.
9134 (struct section_addr_info): Remove.
9135 (section_addr_info): New typedef.
9136 (struct sym_fns) <sym_offsets>: Change type of parameter.
9137 (build_section_addr_info_from_objfile)
9138 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9139 (default_symfile_offsets, symbol_file_add)
9140 (symbol_file_add_from_bfd)
9141 (build_section_addr_info_from_section_table): Update.
9142 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9143 * symfile.c (alloc_section_addr_info): Remove.
9144 (build_section_addr_info_from_section_table): Change return type.
9146 (build_section_addr_info_from_bfd)
9147 (build_section_addr_info_from_objfile): Likewise.
9148 (free_section_addr_info): Remove.
9149 (relative_addr_info_to_section_offsets): Change type of "addrs".
9150 (addrs_section_compar): Now a std::sort comparator.
9151 (addrs_section_sort): Change return type.
9152 (addr_info_make_relative): Change type of "addrs". Update.
9153 (default_symfile_offsets, syms_from_objfile_1)
9154 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9155 (symbol_file_add_separate): Update.
9156 (symbol_file_add): Change type of "addrs". Update.
9157 (add_symbol_file_command): Update. Remove cleanups.
9158 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9160 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9161 * solib.c (solib_read_symbols): Update.
9162 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9163 * machoread.c (macho_symfile_offsets): Update.
9164 * jit.c (jit_bfd_try_read_symtab): Update.
9166 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9168 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9169 unittests/utils-selftests.c.
9170 * unittests/utils-selftests.c: New file.
9172 2018-03-14 Tom Tromey <tom@tromey.com>
9175 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9178 2018-03-14 Tom Tromey <tom@tromey.com>
9181 * printcmd.c (printf_pointer): Allow "-" in format.
9183 2018-03-14 Tom Tromey <tom@tromey.com>
9185 * printcmd.c (_initialize_printcmd): Add usage to printf.
9187 2018-03-14 Yao Qi <qiyao@sourceware.org>
9189 * MAINTAINERS: Update my email address.
9191 2018-03-13 Tom Tromey <tom@tromey.com>
9193 * machoread.c (macho_check_dsym): Change filenamep to a
9195 (macho_symfile_read): Update.
9196 * symfile.c (load_command): Use std::string.
9198 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9200 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9201 to error message string.
9202 (riscv_register_name): Use xsnprintf instead of sprintf.
9203 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9205 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9207 (riscv_push_dummy_call): Likewise.
9209 2018-03-12 Tom Tromey <tom@tromey.com>
9211 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9212 Use gdb::byte_vector.
9213 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9215 2018-03-12 Yao Qi <yao.qi@linaro.org>
9217 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9218 parameter type to readable_regcache.
9219 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9222 2018-03-11 Tom Tromey <tom@tromey.com>
9224 * dwarf2read.c (struct nextfield): Add initializers.
9225 (struct nextfnfield): Remove.
9226 (struct fnfieldlist): Add initializers. Remove "length" and
9227 "head", use std::vector.
9228 (struct decl_field_list): Remove.
9229 (struct field_info): Add initializers.
9230 <fields, baseclasses>: Now std::vector.
9231 <nbaseclasses, nfnfields, typedef_field_list_count,
9232 nested_types_list_count>: Remove.
9233 (dwarf2_add_field, dwarf2_add_type_defn)
9234 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9235 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9236 (process_structure_scope): Update.
9238 2018-03-11 Tom Tromey <tom@tromey.com>
9240 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9241 for use by std::sort.
9242 (build_type_psymtabs_1): Use std::vector.
9244 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9246 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9247 and LIBMPFR in the printed configuration.
9249 2018-03-08 Tom Tromey <tom@tromey.com>
9251 * source.c (get_filename_and_charpos): Use scoped_fd.
9252 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9253 (procfs_pidlist): Likewise.
9254 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9255 (iterate_over_mappings): Likewise.
9257 2018-03-08 Tom Tromey <tom@tromey.com>
9259 * infcall.c (struct call_return_meta_info)
9260 <stack_temporaries_enabled>: Remove.
9261 (get_call_return_value, call_function_by_hand_dummy): Update.
9262 * thread.c (disable_thread_stack_temporaries): Remove.
9263 (enable_thread_stack_temporaries): Remove.
9264 (thread_stack_temporaries_enabled_p): Return bool.
9265 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9266 (get_last_thread_stack_temporary): Update.
9267 * eval.c (evaluate_subexp): Update.
9268 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9269 class, not a function.
9270 (value_ptr, value_vec): Remove typedefs.
9271 (class thread_info) <stack_temporaries_enabled>: Now bool.
9272 <stack_temporaries>: Now a std::vector.
9273 (thread_stack_temporaries_enabled_p)
9274 (value_in_thread_stack_temporaries): Return bool.
9276 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9278 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9279 (getpkt_or_notif_sane_1): Likewise.
9281 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9283 * build-id.c (build_id_to_debug_bfd): Use std::string.
9285 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9287 * build-id.c (find_separate_debug_file_by_buildid): Return
9289 * build-id.h (find_separate_debug_file_by_buildid): Return
9291 * coffread.c (coff_symfile_read): Adjust to std::string.
9292 * elfread.c (elf_symfile_read): Adjust to std::string.
9293 * symfile.c (separate_debug_file_exists): Change parameter to
9295 (find_separate_debug_file): Return std::string.
9296 (find_separate_debug_file_by_debuglink): Return std::string.
9297 * symfile.h (find_separate_debug_file_by_debuglink): Return
9300 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9302 * common/xml-utils.c (xml_escape_text): Move code to...
9303 (xml_escape_text_append): ... this new function.
9304 * common/xml-utils.h (xml_escape_text_append): New declaration.
9305 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9307 (_initialize_xml_utils): register test_xml_escape_text_append as
9310 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9312 * defs.h: Remove MAX_REGISTER_SIZE.
9313 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9315 * python/py-unwind.c (pyuw_sniffer): Likewise.
9317 2018-03-07 Tom Tromey <tom@tromey.com>
9319 * linux-tdep.c (linux_info_proc): Update.
9320 * target.h (struct target_ops) <to_fileio_readlink>: Return
9322 (target_fileio_readlink): Return optional<string>.
9323 * remote.c (remote_hostio_readlink): Return optional<string>.
9324 * inf-child.c (inf_child_fileio_readlink): Return
9326 * target.c (target_fileio_readlink): Return optional<string>.
9328 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9330 * regcache.c (cooked_read_test): Add riscv to the list of
9331 architectures that have a save_reggroup.
9333 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9335 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9336 value is not a dynamic class object.
9338 2018-03-06 Tom Tromey <tom@tromey.com>
9340 * rust-exp.y: Formatting fixes.
9342 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9344 * riscv-tdep.c (riscv_register_name): Remove target description
9346 (riscv_gdbarch_init): Remove target description check.
9348 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9350 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9352 * riscv-tdep.h: Likewise.
9354 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9356 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9357 (riscv_pseudo_register_write): Delete.
9358 (riscv_gdbarch_init): Remove all use of pseudo registers.
9360 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9362 * record-btrace.c (btrace_print_lines): Replace cleanup
9363 parameter with RAII equivalents.
9364 (btrace_insn_history): Replace cleanup with RAII equivalents.
9365 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9366 make_cleanup_ui_out_tuple_begin_end): Remove.
9367 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9368 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9369 make_cleanup_ui_out_list_begin_end): Remove.
9371 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9373 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9374 parameter types to std::vector. Use bool.
9375 (record_btrace_wait): Replace VEC(tp_t) with
9376 std::vector<thread_info *>.
9377 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9379 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9381 * record-btrace.c (record_btrace_disable_callback): Remove.
9382 (struct scoped_btrace_disable): New.
9383 (record_btrace_open): Use scoped_btrace_disable.
9385 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9387 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9388 reading values from registers.
9390 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9392 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9395 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9397 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9398 change parameter type. Use GDB's print functions, and use
9399 core_addr_to_string where appropriate.
9400 (riscv_push_dummy_call): Use core_addr_to_string where
9401 appropriate, update call to riscv_print_arg_location, and reindent
9403 (riscv_return_value): Update call to riscv_print_arg_location.
9405 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9406 Tim Newsome <tim@sifive.com>
9407 Albert Ou <a0u@eecs.berkeley.edu>
9408 Darius Rad <darius@bluespec.com>
9410 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9411 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9412 (ALLDEPFILES): Add riscv-tdep.c
9413 * configure.tgt: Add riscv support.
9414 * riscv-tdep.c: New file.
9415 * riscv-tdep.h: New file.
9416 * NEWS: Mention new target.
9417 * MAINTAINERS: Add entry for riscv.
9419 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9421 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9422 fields within aggregates.
9424 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9426 * record-btrace.c (btrace_print_lines): Change type of flags to
9427 gdb_disassembly_flags.
9429 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9431 * fbsd-nat.c: Include "inf-ptrace.h".
9432 (USE_SIGTRAP_SIGINFO): Conditionally define.
9433 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9434 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9435 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9437 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9439 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9441 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9442 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9443 "supports_stopped_by_hw_breakpoint" target methods.
9445 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9447 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9448 * fbsd-nat.c (debug_fbsd_nat): New variable.
9449 (show_fbsd_nat_debug): New function.
9450 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9451 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9453 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9455 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9456 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9458 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9459 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9462 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9464 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9465 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9467 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9469 * charset.c (struct charset_vector): New.
9470 (charsets): Change type to charset_vector.
9471 (find_charset_names): Adjust.
9473 (_initialize_charset): Adjust.
9475 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9477 * progspace.h (struct program_space) <deleted_solibs>: Change
9478 type to std::vector<std::string>.
9479 * progspace.c (clear_program_space_solib_cache): Adjust.
9480 * breakpoint.c (print_solib_event): Adjust.
9481 (check_status_catch_solib): Adjust.
9482 * solib.c (update_solib_list): Adjust.
9483 * ui-out.h (class ui_out) <field_string>: New overload.
9484 * ui-out.c (ui_out::field_string): New overload.
9486 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9488 * progspace.h (struct program_space): Add constructor and
9489 destructor, initialize fields.
9490 (add_program_space): Remove.
9491 * progspace.c (add_program_space): Rename to...
9492 (program_space::program_space): ... this.
9493 (release_program_space): Rename to...
9494 (program_space::~program_space): ... this.
9495 (delete_program_space): Use delete to delete program_space.
9496 (initialize_progspace): Use new to allocate program_space.
9497 * inferior.c (add_inferior_with_spaces): Likewise.
9498 (clone_inferior_command): Likewise.
9499 * infrun.c (follow_fork_inferior): Likewise.
9500 (handle_vfork_child_exec_or_exit): Likewise.
9502 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9504 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9505 (delim_string_to_char_ptr_vec): Return std::vector of
9506 gdb::unique_xmalloc_ptr.
9507 (dirnames_to_char_ptr_vec_append): Take std::vector of
9508 gdb::unique_xmalloc_ptr.
9509 (dirnames_to_char_ptr_vec): Return std::vector of
9510 gdb::unique_xmalloc_ptr.
9511 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9512 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9513 (delim_string_to_char_ptr_vec): Return an std::vector of
9514 gdb::unique_xmalloc_ptr, adjust the code.
9515 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9516 gdb::unique_xmalloc_ptr, adjust the code.
9517 (dirnames_to_char_ptr_vec): Return an std::vector of
9518 gdb::unique_xmalloc_ptr, adjust the code.
9519 * auto-load.c (auto_load_safe_path_vec): Change type to
9520 std::vector of gdb::unique_xmalloc_ptr.
9521 (auto_load_expand_dir_vars): Return an std::vector of
9522 gdb::unique_xmalloc_ptr, adjust the code.
9523 (auto_load_safe_path_vec_update): Adjust.
9524 (filename_is_in_auto_load_safe_path_vec): Adjust.
9525 (auto_load_objfile_script_1): Adjust.
9526 * build-id.c (build_id_to_debug_bfd): Adjust.
9527 * linux-thread-db.c (thread_db_load_search): Adjust.
9528 * source.c (add_path): Adjust.
9530 * symfile.c (find_separate_debug_file): Adjust.
9531 * utils.c (do_free_char_ptr_vec): Remove.
9532 (make_cleanup_free_char_ptr_vec): Remove.
9534 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9537 * common/pathstuff.c: Conditionally include "<windows.h>".
9539 2018-03-01 Georg Sauthoff <mail@georg.so>
9542 * gcore.in: Quote variables and switch interpreter to bash.
9544 2018-03-01 Tom Tromey <tom@tromey.com>
9546 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9547 assertion. Add assertion for discriminant_index.
9548 (quirk_rust_enum): Use correct base type name in univariant case.
9550 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9552 * record.c (get_call_history_modifiers): Return a
9554 (cmd_record_call_history): Adjust.
9555 * record-btrace.c (record_btrace_call_history): Adjust.
9556 (record_btrace_call_history_range): Adjust.
9557 (record_btrace_call_history_from): Adjust.
9558 * target-debug.h (target_debug_print_record_print_flags): New.
9559 * target-delegates.c: Re-generate.
9560 * target.c (target_call_history): Change flags type.
9561 (target_call_history_from): Likewise.
9562 (target_call_history_range): Likewise.
9563 * target.h (struct target_ops) <target_call_history>: Likewise.
9564 (target_call_history_from): Likewise.
9565 (target_call_history_range): Likewise.
9567 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9568 Simon Marchi <simon.marchi@polymtl.ca>
9570 * common/common-utils.c: Include "sys/stat.h".
9571 (is_regular_file): Move here from "source.c"; change return
9573 * common/common-utils.h (is_regular_file): New prototype.
9574 * common/pathstuff.c (contains_dir_separator): New function.
9575 * common/pathstuff.h (contains_dir_separator): New prototype.
9576 * source.c: Don't include "sys/stat.h".
9577 (is_regular_file): Move to "common/common-utils.c".
9579 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9581 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9582 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9583 * auto-load.c: Include "common/pathstuff.h".
9584 * common/common-def.h (current_directory): Move here.
9585 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9587 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9589 * common/pathstuff.c: New file.
9590 * common/pathstuff.h: New file.
9591 * compile/compile.c: Include "common/pathstuff.h".
9592 * defs.h (current_directory): Move to "common/common-defs.h".
9593 * dwarf2read.c: Include "common/pathstuff.h".
9595 * guile/scm-safe-call.c: Likewise.
9596 * linux-thread-db.c: Likewise.
9598 * nto-tdep.c: Likewise.
9599 * objfiles.c: Likewise.
9600 * source.c: Likewise.
9601 * symtab.c: Likewise.
9602 * utils.c: Include "common/pathstuff.h".
9603 (gdb_realpath): Move to "common/pathstuff.c".
9604 (gdb_realpath_keepfile): Likewise.
9605 (gdb_abspath): Likewise.
9606 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9607 (gdb_realpath_keepfile): Likewise.
9608 (gdb_abspath): Likewise.
9610 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9612 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9613 wildcard process pid for super_resume for kernels with a
9616 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9618 * compile/compile.c (get_args): Add additional comments
9619 explaining function.
9621 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9622 Tom Tromey <tom@tromey.com>
9624 * target.h (memory_write_request_s): Remove typedef. Don't define
9626 (target_write_memory_blocks): Change argument to std::vector.
9627 (struct memory_write_request): Add constructor.
9628 * target-memory.c (compare_block_starting_address): Return bool.
9629 Change argument types.
9630 (claim_memory): Change arguments to use std::vector.
9631 (split_regular_and_flash_blocks, blocks_to_erase)
9632 (compute_garbled_blocks): Likewise.
9633 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9634 (target_write_memory_blocks): Change argument to std::vector.
9635 * symfile.c (struct load_section_data): Add constructor and
9636 destructor. Use std::vector for "requests".
9637 (struct load_progress_data): Add initializers.
9638 (load_section_callback): Update. Use "new".
9639 (clear_memory_write_data): Remove.
9640 (generic_load): Update.
9642 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9644 * arch/aarch64.h: Use common/tdesc.h.
9646 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9648 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9649 architecture with a 64-bit ABI.
9651 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9653 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9654 ahead of target description loading.
9656 2018-02-26 Tom Tromey <tom@tromey.com>
9658 * stack.c (backtrace_command_1): Update.
9659 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9661 * python/py-framefilter.c (py_print_frame)
9662 (gdbpy_apply_frame_filter): Change type of "flags".
9663 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9665 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9666 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9667 * extension.h (enum frame_filter_flag): Rename from
9669 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9670 (apply_ext_lang_frame_filter): Change type of "flags".
9671 * extension.c (apply_ext_lang_frame_filter): Change type of
9673 * extension-priv.h (struct extension_language_ops)
9674 <apply_frame_filter>: Change type of "flags".
9676 2018-02-26 Tom Tromey <tom@tromey.com>
9679 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9680 off-by-one in py_end computation.
9681 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9683 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9686 2018-02-26 Tom Tromey <tom@tromey.com>
9688 * dwarf2read.c (struct variant_field): New.
9689 (struct nextfield) <variant>: New field.
9690 (dwarf2_add_field): Handle DW_TAG_variant_part.
9691 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9692 discriminated union.
9693 (read_structure_type): Handle DW_TAG_variant_part.
9694 (handle_struct_member_die): New function, extracted from
9695 process_structure_scope. Handle DW_TAG_variant.
9696 (process_structure_scope): Handle discriminated unions. Call
9697 handle_struct_member_die.
9699 2018-02-26 Tom Tromey <tom@tromey.com>
9701 * rust-lang.h (rust_last_path_segment): Declare.
9702 * rust-lang.c (rust_last_path_segment): Now public. Change
9704 (struct disr_info): Remove.
9705 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9706 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9707 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9708 (rust_enum_p, rust_enum_variant): New function.
9709 (rust_underscore_fields): Remove "offset" parameter.
9710 (rust_print_enum): New function.
9711 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9712 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9713 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9715 (rust_internal_print_type): New function, from rust_print_type.
9717 (rust_print_type): Call rust_internal_print_type.
9718 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9719 Update enum handling.
9720 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9721 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9722 (rust_union_quirks): New functions.
9723 (process_full_comp_unit, process_full_type_unit): Call
9725 (process_structure_scope): Update rust_unions if necessary.
9727 2018-02-26 Tom Tromey <tom@tromey.com>
9729 * value.h (value_union_variant): Declare.
9730 * valops.c (value_union_variant): New function.
9731 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9732 (struct discriminant_info): New.
9733 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9735 (struct main_type) <flag_discriminated_union>: New field.
9737 2018-02-26 Tom Tromey <tom@tromey.com>
9739 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9740 unittests/unpack-selftests.c.
9741 * unittests/unpack-selftests.c: New file.
9742 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9744 2018-02-26 Yao Qi <yao.qi@linaro.org>
9746 * dwarf2read.c (struct partial_die_info) <read>: New method.
9747 (read_partial_die): Remove the declaration.
9748 (load_partial_dies): Update.
9749 (partial_die_info::partial_die_info):
9750 (read_partial_die): Change it to partial_die_info::read.
9752 2018-02-26 Yao Qi <yao.qi@linaro.org>
9754 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9755 (fixup_partial_die): Remove declaration.
9756 (scan_partial_symbols): Update.
9757 (partial_die_parent_scope): Likewise.
9758 (partial_die_full_name): Likewise.
9759 (fixup_partial_die): Change it to partial_die_info::fixup.
9761 2018-02-26 Yao Qi <yao.qi@linaro.org>
9763 * dwarf2read.c (read_partial_die): Update the declaration.
9764 (load_partial_dies): Caller update.
9765 (read_partial_die): Remove one argument abbrev_len.
9767 2018-02-26 Yao Qi <yao.qi@linaro.org>
9769 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9770 assignment operator.
9771 (load_partial_dies): Use ctor and copy ctor.
9772 (read_partial_die): Update.
9773 (dwarf2_cu::find_partial_die): Use ctor.
9775 2018-02-26 Yao Qi <yao.qi@linaro.org>
9777 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9778 (find_partial_die_in_comp_unit): Change it to
9779 dwarf2_cu::find_partial_die.
9780 (find_partial_die): Update.
9782 2018-02-26 Yao Qi <yao.qi@linaro.org>
9784 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9787 2018-02-26 Yao Qi <yao.qi@linaro.org>
9789 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9791 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9793 * arch/amd64.h: Use common/tdesc.h.
9794 * arch/i386.c: Likewise.
9795 * arch/i386.h: Likewise.
9796 * arch/tic6x.c: Likewise.
9797 * arch/tdesc.h: Move file from here...
9798 * common/tdesc.h: ...to here.
9799 * features/aarch64-core.c: Regenerate.
9800 * features/aarch64-fpu.c: Regenerate.
9801 * features/i386/32bit-avx.c: Regenerate.
9802 * features/i386/32bit-avx512.c: Regenerate.
9803 * features/i386/32bit-core.c: Regenerate.
9804 * features/i386/32bit-linux.c: Regenerate.
9805 * features/i386/32bit-mpx.c: Regenerate.
9806 * features/i386/32bit-pkeys.c: Regenerate.
9807 * features/i386/32bit-sse.c: Regenerate.
9808 * features/i386/64bit-avx.c: Regenerate.
9809 * features/i386/64bit-avx512.c: Regenerate.
9810 * features/i386/64bit-core.c: Regenerate.
9811 * features/i386/64bit-linux.c: Regenerate.
9812 * features/i386/64bit-mpx.c: Regenerate.
9813 * features/i386/64bit-pkeys.c: Regenerate.
9814 * features/i386/64bit-segments.c: Regenerate.
9815 * features/i386/64bit-sse.c: Regenerate.
9816 * features/i386/x32-core.c: Regenerate.
9817 * features/tic6x-c6xp.c: Regenerate.
9818 * features/tic6x-core.c: Regenerate.
9819 * features/tic6x-gp.c: Regenerate.
9820 * target-descriptions.c: Use common/tdesc.h.
9821 * target-descriptions.h: Likewise.
9823 2018-02-24 Tom Tromey <tom@tromey.com>
9825 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9826 (try_thread_db_load_from_dir, thread_db_load_search): Use
9828 (info_auto_load_libthread_db_compare): Return bool. Change
9830 (info_auto_load_libthread_db): Use std::vector, std::string.
9833 2018-02-24 Tom Tromey <tom@tromey.com>
9835 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9837 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9839 * gdbarch.c: Rebuild.
9840 * gdbarch.h: Rebuild.
9841 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9842 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9843 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9846 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9848 * gdbtypes.h (sect_offset): Change type to uint64_t.
9849 (sect_offset_str): New function.
9850 * dwarf2read.c (create_addrmap_from_aranges): Use
9852 (error_check_comp_unit_head): Likewise.
9853 (create_debug_type_hash_table): Likewise.
9854 (read_cutu_die_from_dwo): Likewise.
9855 (init_cutu_and_read_dies): Likewise.
9856 (init_cutu_and_read_dies_no_follow): Likewise.
9857 (process_psymtab_comp_unit_reader): Likewise.
9858 (partial_die_parent_scope): Likewise.
9859 (peek_die_abbrev): Likewise.
9860 (process_queue): Likewise.
9861 (dwarf2_physname): Likewise.
9862 (read_namespace_alias): Likewise.
9863 (read_import_statement): Likewise.
9864 (create_dwo_cu_reader): Likewise.
9865 (create_cus_hash_table): Likewise.
9866 (lookup_dwo_cutu): Likewise.
9867 (inherit_abstract_dies): Likewise.
9868 (read_func_scope): Likewise.
9869 (read_call_site_scope): Likewise.
9870 (dwarf2_add_member_fn): Likewise.
9871 (read_common_block): Likewise.
9872 (read_module_type): Likewise.
9873 (read_typedef): Likewise.
9874 (read_subrange_type): Likewise.
9875 (load_partial_dies): Likewise.
9876 (read_partial_die): Likewise.
9877 (find_partial_die): Likewise.
9878 (read_str_index): Likewise.
9879 (dwarf2_string_attr): Likewise.
9880 (build_error_marker_type): Likewise.
9881 (lookup_die_type): Likewise.
9882 (dump_die_shallow): Likewise.
9883 (follow_die_ref): Likewise.
9884 (dwarf2_fetch_die_loc_sect_off): Likewise.
9885 (dwarf2_fetch_constant_bytes): Likewise.
9886 (follow_die_sig): Likewise.
9887 (get_signatured_type): Likewise.
9888 (get_DW_AT_signature_type): Likewise.
9889 (dwarf2_find_containing_comp_unit): Likewise.
9890 (set_die_type): Likewise.
9892 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9894 * arch/aarch64.c: Include "common-defs.h".
9895 * arch/amd64.c: Likewise.
9896 * arch/i386.c: Likewise.
9898 2018-02-21 Tom Tromey <tom@tromey.com>
9900 * value.h: (extract_field_op): Update.
9901 * eval.c (extract_field_op): Return a const char *.
9902 * expression.h (parse_expression_for_completion): Update.
9903 * completer.c (complete_expression): Update.
9904 (add_struct_fields): Make fieldname const.
9905 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9906 (mark_completion_tag, parse_exp_in_context_1): Update.
9907 (parse_expression_for_completion): Change "name" to
9908 unique_xmalloc_ptr*.
9910 2018-02-21 Tom Tromey <tom@tromey.com>
9912 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9914 2018-02-21 Yao Qi <yao.qi@linaro.org>
9916 * avr-tdep.c (avr_read_pc): Change parameter type to
9918 * gdbarch.sh (read_pc): Likewise.
9919 * gdbarch.c: Re-generated.
9920 * gdbarch.h: Re-generated.
9921 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9923 * ia64-tdep.c (ia64_read_pc): Likewise.
9924 * mips-tdep.c (mips_read_pc): Likewise.
9925 * spu-tdep.c (spu_read_pc): Likewise.
9927 2018-02-21 Yao Qi <yao.qi@linaro.org>
9929 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9930 * regcache-dump.c: New file.
9931 * regcache.c: Move register_dump to regcache-dump.c.
9932 (maintenance_print_registers): Likewise.
9933 (maintenance_print_raw_registers): Likewise.
9934 (maintenance_print_cooked_registers): Likewise.
9935 (maintenance_print_register_groups): Likewise.
9936 (maintenance_print_remote_registers): Likewise.
9937 (_initialize_regcache): Likewise.
9938 * regcache.h (register_dump): Moved from regcache.c.
9940 2018-02-21 Yao Qi <yao.qi@linaro.org>
9942 * regcache.c (regcache::regcache): Update.
9943 (regcache::invalidate): Move it to detached_regcache::invalidate.
9944 (get_thread_arch_aspace_regcache): Update.
9945 (regcache::raw_update): Update.
9946 (regcache::cooked_read): Remove some code.
9947 (regcache::cooked_read_value): Likewise.
9948 (regcache::raw_write): Remove assert on m_readonly_p.
9949 (regcache::raw_supply_integer): Move it to
9950 detached_regcache::raw_supply_integer.
9951 (regcache::raw_supply_zeroed): Likewise.
9952 * regcache.h (detached_regcache) <raw_supply_integer>: New
9954 <raw_supply_zeroed, invalidate>: Likewise.
9955 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9956 <invalidate>: Likewise.
9957 <m_readonly_p>: Removed.
9959 2018-02-21 Yao Qi <yao.qi@linaro.org>
9961 * infcmd.c (get_return_value): Let stop_regs point to
9962 get_current_regcache.
9963 * regcache.c (regcache::regcache): Remove.
9964 (register_dump_reg_buffer): New class.
9965 (regcache_print): Adjust.
9966 * regcache.h (regcache): Remove constructors.
9968 2018-02-21 Yao Qi <yao.qi@linaro.org>
9970 * regcache.c (class register_dump): New class.
9971 (register_dump_regcache, register_dump_none): New class.
9972 (register_dump_remote, register_dump_groups): New class.
9973 (regcache_print): Update.
9974 * regcache.h (regcache_dump_what): Move it to regcache.c.
9975 (regcache) <dump>: Remove.
9977 2018-02-21 Yao Qi <yao.qi@linaro.org>
9979 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9981 (jit_unwind_reg_set_impl): Call raw_supply.
9982 (jit_frame_sniffer): Use reg_buffer_rw.
9983 * record-full.c (record_full_core_regbuf): Change its type.
9984 (record_full_core_open_1): Use reg_buffer_rw.
9985 (record_full_close): Likewise.
9986 (record_full_core_fetch_registers): Use regcache->raw_supply.
9987 (record_full_core_store_registers): Likewise.
9988 * regcache.c (regcache::get_register_status): Move it to
9990 (regcache_raw_set_cached_value): Remove.
9991 (regcache::raw_set_cached_value): Remove.
9992 (regcache::raw_write): Call raw_supply.
9993 (regcache::raw_supply): Move it to reg_buffer_rw.
9994 * regcache.h (regcache_raw_set_cached_value): Remove.
9995 (reg_buffer_rw): New class.
9997 2018-02-21 Yao Qi <yao.qi@linaro.org>
9999 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10000 readonly_detached_regcache.
10001 (dummy_frame_prev_register): Use regcache->cooked_read.
10002 * frame.c (frame_save_as_regcache): Change return type.
10003 (frame_pop): Update.
10004 * frame.h (frame_save_as_regcache): Update declaration.
10005 * inferior.h (get_infcall_suspend_state_regcache): Update
10007 * infrun.c (infcall_suspend_state) <registers>: use
10008 readonly_detached_regcache.
10009 (save_infcall_suspend_state): Don't use regcache_dup.
10010 (get_infcall_suspend_state_regcache): Change return type.
10011 * linux-fork.c (struct fork_info) <savedregs>: Change to
10012 readonly_detached_regcache.
10014 (fork_save_infrun_state): Don't use regcache_dup.
10015 (info_checkpoints_command): Adjust.
10016 * mi/mi-main.c (register_changed_p): Update declaration.
10017 (mi_cmd_data_list_changed_registers): Use
10018 readonly_detached_regcache.
10019 (register_changed_p): Change parameter type to
10020 readonly_detached_regcache.
10021 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10022 readonly_detached_regcache.
10023 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10024 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10026 (regcache::save): Move it to reg_buffer.
10027 (regcache::restore): Change parameter type.
10028 (regcache_dup): Remove.
10029 * regcache.h (reg_buffer) <save>: New method.
10030 (readonly_detached_regcache): New class.
10031 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10032 readonly_detached_regcache.
10033 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10035 2018-02-21 Yao Qi <yao.qi@linaro.org>
10037 * frame.c (frame_save_as_regcache): Use regcache method save.
10038 (frame_pop): Use regcache method restore.
10039 * infrun.c (restore_infcall_suspend_state): Likewise.
10040 * linux-fork.c (fork_load_infrun_state): Likewise.
10041 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10043 * regcache.c (regcache_save): Remove.
10044 (regcache::restore): More asserts.
10045 (regcache_cpy): Remove.
10046 * regcache.h (regcache_save): Remove the declaration.
10047 (regcache::restore): Move from private to public.
10048 Remove the friend declaration of regcache_cpy.
10049 (regcache_cpy): Remove declaration.
10051 2018-02-21 Yao Qi <yao.qi@linaro.org>
10053 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10054 parameter type to 'readable_regcache *'.
10055 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10056 * arm-tdep.c (arm_neon_quad_read): Likewise.
10057 (arm_pseudo_read): Likewise.
10058 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10059 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10060 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10061 * gdbarch.c: Re-generated.
10062 * gdbarch.h: Re-generated.
10063 * gdbarch.sh (pseudo_register_read): Change parameter type to
10064 'readable_regcache *'.
10065 (pseudo_register_read_value): Likewise.
10066 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10067 (h8300_pseudo_register_read): Likewise.
10068 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10069 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10070 (i386_pseudo_register_read_into_value): Likewise.
10071 (i386_pseudo_register_read_value): Likewise.
10072 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10074 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10075 * m32c-tdep.c (m32c_raw_read): Likewise.
10076 (m32c_read_flg): Likewise.
10077 (m32c_banked_register): Likewise.
10078 (m32c_banked_read): Likewise.
10079 (m32c_sb_read): Likewise.
10080 (m32c_part_read): Likewise.
10081 (m32c_cat_read): Likewise.
10082 (m32c_r3r2r1r0_read): Likewise.
10083 (m32c_pseudo_register_read): Likewise.
10084 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10085 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10086 (mep_pseudo_cr64_read): Likewise.
10087 (mep_pseudo_register_read): Likewise.
10088 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10089 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10090 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10091 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10092 (regcache::cooked_read): Likewise.
10093 (regcache::cooked_read_value): Likewise.
10094 (regcache_cooked_read_signed):
10095 (regcache::cooked_read): Likewise.
10096 * regcache.h (readable_regcache): New class.
10097 (regcache): Inherit readable_regcache. Move some methods to
10099 * rl78-tdep.c (rl78_pseudo_register_read): Change
10100 parameter type to 'readable_regcache *'.
10101 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10102 (e500_pseudo_register_read): Change parameter type to
10103 'readable_regcache *'.
10104 (dfp_pseudo_register_read): Likewise.
10105 (vsx_pseudo_register_read): Likewise.
10106 (efpr_pseudo_register_read): Likewise.
10107 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10108 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10109 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10110 (sh64_pseudo_register_read): Likewise.
10111 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10112 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10113 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10114 (spu_pseudo_register_read): Likewise.
10115 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10116 (xtensa_pseudo_register_read): Likewise.
10118 2018-02-21 Yao Qi <yao.qi@linaro.org>
10120 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10121 (regcache::arch): Move it to reg_buffer::arch.
10122 (regcache::register_buffer): Likewise.
10123 (regcache::assert_regnum): Likewise.
10124 (regcache::num_raw_registers): Likewise.
10125 * regcache.h (reg_buffer): New class.
10126 (regcache): Inherit reg_buffer.
10128 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10130 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10131 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10133 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10135 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10137 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10139 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10140 (SFILES): Remove common/*.c files.
10141 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10142 * common/common.host: Add common reference.
10143 * configure.ac: Likewise.
10144 * configure: Regenerate.
10146 2018-02-16 Yao Qi <yao.qi@linaro.org>
10148 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10149 (block_initialize_namespace): Use new.
10150 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10151 (dwarf2_free_objfile): Use delete.
10152 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10153 (copy_type_recursive): Use new.
10154 * gdb_obstack.h (allocate_on_obstack): New.
10156 2018-02-15 Yao Qi <yao.qi@linaro.org>
10159 * inferior.c (exit_inferior_1): Reset inf->control.
10161 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10163 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10166 2018-02-14 Pedro Alves <palves@redhat.com>
10168 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10169 frame_cleanup_after_sniffer on exception.
10171 2018-02-14 Tom Tromey <tom@tromey.com>
10173 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10175 (solib_bfd_open): Make pathname const.
10176 * solib.c (solib_bfd_open): Make pathname const.
10177 * solib-spu.c (spu_bfd_fopen): Make name const.
10178 (spu_bfd_open): Make pathname const.
10179 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10180 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10182 2018-02-14 Tom Tromey <tom@tromey.com>
10184 * symfile.c (symfile_bfd_open): Update.
10185 * source.h (openp, source_full_path_of, find_and_open_source):
10186 Change argument type to unique_xmalloc_ptr.
10187 * source.c (openp): Take a unique_xmalloc_ptr.
10188 (source_full_path_of, find_and_open_source): Likewise.
10189 (open_source_file, symtab_to_fullname): Update.
10190 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10191 unique_xmalloc_ptr.
10192 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10193 (exec_file_find): Update.
10194 * psymtab.c (psymtab_to_fullname): Update.
10195 * nto-tdep.h (nto_find_and_open_solib): Update.
10196 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10197 unique_xmalloc_ptr.
10198 * exec.c (exec_file_attach): Update.
10199 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10200 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10202 2018-02-14 Tom Tromey <tom@tromey.com>
10204 * solib.c: Include source.h.
10205 * nto-tdep.c: Include source.h.
10206 * mi/mi-cmd-env.c: Include source.h.
10207 * infcmd.c: Include source.h.
10208 * exec.c: Include source.h.
10209 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10210 (add_path, directory_switch, source_path, init_source_path): Move
10212 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10213 (add_path, directory_switch, source_path, init_source_path):
10216 2018-02-14 Tom Tromey <tom@tromey.com>
10218 * solist.h (exec_file_find, solib_find): Return
10219 unique_xmalloc_ptr.
10220 (solib_bfd_fopen): Take a const char *.
10221 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10222 (exec_file_find, solib_find): Likewise.
10223 (solib_bfd_fopen): Do not take ownership of "pathname".
10224 (solib_bfd_open): Use unique_xmalloc_ptr.
10225 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10226 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10227 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10228 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10230 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10232 * ada-lang.c (name_match_type_from_name): Remove reference to
10233 ada_name_for_lookup in function's documentation.
10234 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10236 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10238 * defs.h (enum openp_flags): New enum.
10239 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10240 Move to enum openp_flags.
10241 (openp_flags): New enum flags.
10242 (openp): Change parameter type to openp_flags.
10243 * source.c (openp): Change parameter type to openp_flags.
10244 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10245 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10247 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10249 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10252 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10254 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10256 (class dwarf2_queue_guard): ...the destructor of this new class.
10257 (dw2_do_instantiate_symtab): Create instance of the new class
10258 dwarf2_queue_guard, remove cleanup.
10260 2018-02-09 Tom Tromey <tom@tromey.com>
10262 * source.c (find_source_lines): Don't reference past the end of
10265 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10267 * remote.c (remote_btrace_maybe_reopen): Change error message.
10268 * btrace.c (btrace_enable): Likewise.
10269 (parse_xml_btrace): Likewise.
10270 (parse_xml_btrace_conf): Likewise.
10272 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10274 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10275 (linux_enable_pt, linux_enable_bts): Call
10276 diagnose_perf_event_open_fail.
10278 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10280 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10281 Remove parameter and change return type. Update callers. Move it.
10282 (linux_enable_bts, linux_enable_pt): Improve error message.
10283 (linux_enable_pt): Remove zero buffer size check.
10284 (linux_enable_btrace): Improve error messages. Remove NULL return
10287 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10289 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10290 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10291 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10292 (linux_supports_pt, linux_supports_btrace): Remove.
10293 (linux_enable_bts): Call cpu_supports_bts.
10294 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10295 * remote.c (remote_supports_btrace): Remove.
10296 (init_remote_ops): Remove remote_supports_btrace.
10297 * target-delegates.c: Regenerated.
10298 * target.c (target_supports_btrace): Remove.
10299 * target.h (target_ops) <to_supports_btrace>: Remove
10300 (target_supports_btrace): Remove.
10301 * x86-linux-nat.c (x86_linux_create_target): Remove
10302 linux_supports_btrace.
10304 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10306 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10308 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10309 exception and use message in own exception.
10311 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10313 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10314 (perf_event_pt_event_type): Use gdb_file_up.
10315 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10316 scoped_fd, and scoped_mmap.
10318 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10320 * common/scoped_mmap.h: New.
10321 * unittests/scoped_mmap-selftest.c: New.
10322 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10323 unittests/scoped_mmap-selftest.c.
10325 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10327 * common/scoped_fd.h: New.
10328 * unittests/scoped_fd-selftest.c: New.
10329 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10330 unittests/scoped_fd-selftest.c.
10332 2018-02-09 Tom Tromey <tom@tromey.com>
10334 * auto-load.c (auto_load_section_scripts): Use
10335 gdb::unique_xmalloc_ptr.
10337 2018-02-09 Tom Tromey <tom@tromey.com>
10339 * auto-load.c (execute_script_contents): Use std::string.
10341 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10343 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10344 Python function, rather than a new command.
10346 2018-02-08 Tom Tromey <tom@tromey.com>
10348 * solib.c (solib_find_1): Use std::string.
10349 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10351 2018-02-08 Tom Tromey <tom@tromey.com>
10353 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10355 2018-02-08 Tom Tromey <tom@tromey.com>
10357 * source.c (find_source_lines): Use gdb::def_vector.
10359 2018-02-08 Tom Tromey <tom@tromey.com>
10361 * macrocmd.c (struct temporary_macro_definition): New.
10362 (macro_define_command): Use temporary_macro_definition. Remove
10364 (free_macro_definition_ptr): Remove.
10366 2018-02-08 Tom Tromey <tom@tromey.com>
10368 * macroexp.c (maybe_expand): Use std::string.
10370 2018-02-08 Tom Tromey <tom@tromey.com>
10372 * macroexp.c (struct macro_buffer): Add initializers for some
10374 (init_buffer, init_shared_buffer, free_buffer)
10375 (free_buffer_return_text): Remove.
10376 (macro_buffer): New constructors.
10377 (~macro_buffer): New destructor.
10378 (macro_buffer::set_shared): New method.
10379 (macro_buffer::resize_buffer, macro_buffer::appendc)
10380 (macro_buffer::appendmem): Now methods, not free functions.
10381 (set_token, append_tokens_without_splicing, stringify)
10382 (macro_stringify): Update.
10383 (gather_arguments): Change return type. Remove argc_p argument,
10384 add args_ptr argument. Use std::vector.
10385 (substitute_args): Remove argc argument. Accept std::vector.
10386 (expand): Update. Use std::vector.
10387 (scan, macro_expand, macro_expand_next): Update.
10389 2018-02-08 Tom Tromey <tom@tromey.com>
10391 * symtab.c (default_collect_symbol_completion_matches_break_on):
10392 Use unique_xmalloc_ptr.
10393 * macroscope.h: (sal_macro_scope, user_macro_scope)
10394 (default_macro_scope): Return unique_xmalloc_ptr.
10395 * macroscope.c (sal_macro_scope, user_macro_scope)
10396 (default_macro_scope): Return unique_xmalloc_ptr.
10397 * macroexp.h (macro_expand, macro_expand_once): Return
10398 unique_xmalloc_ptr.
10399 * macroexp.c (macro_expand, macro_expand_once): Return
10400 unique_xmalloc_ptr.
10401 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10402 (info_macro_command, info_macros_command): Use
10403 unique_xmalloc_ptr.
10404 * compile/compile-c-support.c (write_macro_definitions): Use
10405 unique_xmalloc_ptr.
10406 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10408 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10410 * value.c (value_static_field): Assign field type instead of
10411 containing type when returning an optimized out value.
10413 2018-02-06 Yao Qi <yao.qi@linaro.org>
10415 * ft32-tdep.c (ft32_read_pc): Remove.
10416 (ft32_write_pc): Remove.
10417 (ft32_gdbarch_init): Update.
10418 * m32r-tdep.c (m32r_read_pc): Remove.
10419 (m32r_gdbarch_init): Update.
10420 * mep-tdep.c (mep_read_pc): Remove.
10421 (mep_gdbarch_init): Update.
10422 * microblaze-tdep.c (microblaze_write_pc): Remove.
10423 (microblaze_gdbarch_init): Update.
10424 * mn10300-tdep.c (mn10300_read_pc): Remove.
10425 (mn10300_write_pc): Remove.
10426 (mn10300_gdbarch_init): Update.
10427 * moxie-tdep.c (moxie_read_pc): Remove.
10428 (moxie_write_pc): Remove.
10429 (moxie_gdbarch_init): Update.
10431 2018-02-06 Yao Qi <yao.qi@linaro.org>
10433 * expprint.c (print_subexp_standard): Handle
10434 OP_F77_UNDETERMINED_ARGLIST.
10435 (dump_subexp_body_standard): Likewise.
10437 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10439 * target-descriptions.c (tdesc_element_visitor) Add empty
10441 (tdesc_type): Move make_gdb_type from here.
10442 (tdesc_type_builtin): Likewise.
10443 (tdesc_type_vector): Likewise.
10444 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10445 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10446 (make_gdb_type_union): Likewise.
10447 (make_gdb_type_flags): Likewise.
10448 (make_gdb_type_enum): Likewise.
10449 (make_gdb_type): New function.
10450 (tdesc_register_type): Use static make_gdb_type.
10452 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10454 * infcmd.c (default_print_one_register_info): Align natural-format
10455 column values consistently one under another.
10456 (pad_to_column): New function.
10458 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10460 * dwarf2read.c (dwarf2_physname): Move commment.
10462 2018-02-01 Leszek Swirski <leszeks@google.com>
10464 * varobj.c (varobj_formatted_print_options): Allow recursive
10465 pretty printing if pretty printing is enabled.
10467 2018-02-01 Leszek Swirski <leszeks@google.com>
10469 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10470 names after a structop as a filename.
10472 2018-02-01 Yao Qi <yao.qi@linaro.org>
10474 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10475 (arm_record_coproc_data_proc): Likewise.
10477 2018-02-01 Yao Qi <yao.qi@linaro.org>
10479 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10481 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10483 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10484 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10486 2018-01-31 Pedro Alves <palves@redhat.com>
10488 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10489 * inflow.c (child_terminal_save_inferior): Wrap reference to
10490 tcgetpgrp in HAVE_TERMIOS_H.
10491 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10493 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10494 always iterate over all inferiors.
10495 (gdbsim_cntrl_c): Adjust.
10496 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10498 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10500 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10501 index type is objfile-owned if the element type is as well.
10503 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10507 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10509 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10510 "features/s390x-linux64.c".
10511 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10512 s390_linux32 and s390x_linux64.
10513 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10515 * s390-tdep.c: Include "features/s390-linux32.c" and
10516 "features/s390x-linux64.c".
10517 (s390_tdesc_valid): Add check for tdesc_has_registers.
10518 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10519 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10520 tdesc_s390x_linux64.
10521 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10522 tdesc_s390x_linux64 to...
10523 * s390-tdep.h: ...here.
10525 2018-01-30 Pedro Alves <palves@redhat.com>
10528 * config.in, configure: Regenerate.
10529 * configure.ac: Check for getpgid.
10530 * go32-nat.c (go32_pass_ctrlc): New.
10531 (go32_target): Install it.
10532 * inf-child.c (inf_child_target): Install
10533 child_terminal_save_inferior, child_pass_ctrlc and
10535 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10536 (inf_ptrace_target): No longer install it.
10537 * infcmd.c (interrupt_target_1): Adjust.
10538 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10539 (child_interrupt): Declare.
10540 (inferior::terminal_state): New.
10541 * inflow.c (struct terminal_info): Update comments.
10542 (inferior_process_group): Delete.
10543 (terminal_is_ours): Delete.
10544 (gdb_tty_state): New.
10545 (child_terminal_init): Adjust.
10546 (is_gdb_terminal, sharing_input_terminal_1)
10547 (sharing_input_terminal): New functions.
10548 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10549 Set the process's actual process group in the foreground if
10550 possible. Handle is_ours_for_output/is_ours distinction. Don't
10551 mark terminal as the inferior's if not sharing GDB's terminal.
10552 Don't check attach_flag.
10553 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10554 pass down a target_terminal_state.
10555 (child_terminal_save_inferior): New, factored out from ...
10556 (child_terminal_ours_1): ... this. Handle
10557 target_terminal_state::is_ours_for_output.
10558 (child_interrupt, child_pass_ctrlc): New.
10559 (inflow_inferior_exit): Clear the inferior's terminal_state.
10560 (copy_terminal_info): Copy the inferior's terminal state.
10561 (_initialize_inflow): Remove reference to terminal_is_ours.
10562 * inflow.h (inferior_process_group): Delete.
10563 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10564 * procfs.c (procfs_target): Don't install procfs_interrupt.
10565 (procfs_interrupt): Delete.
10566 * remote.c (remote_serial_quit_handler): Adjust.
10567 (remote_interrupt): Remove ptid parameter. Adjust.
10568 * target-delegates.c: Regenerate.
10569 * target.c: Include "terminal.h".
10570 (target_terminal::terminal_state): Rename to ...
10571 (target_terminal::m_terminal_state): ... this.
10572 (target_terminal::init): Adjust.
10573 (target_terminal::inferior): Adjust to per-inferior
10575 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10576 (target_terminal::ours, target_terminal::ours_for_output): Use
10577 target_terminal_is_ours_kind.
10578 (target_interrupt): Remove ptid parameter. Adjust.
10579 (default_target_pass_ctrlc): Adjust.
10580 * target.h (target_ops::to_terminal_save_inferior): New field.
10581 (target_ops::to_interrupt): Remove ptid_t parameter.
10582 (target_interrupt): Remove ptid_t parameter. Update comment.
10583 (target_pass_ctrlc): Update comment.
10584 * target/target.h (target_terminal_state): New scoped enum,
10585 factored out of ...
10586 (target_terminal::terminal_state): ... here.
10587 (target_terminal::inferior): Update comments.
10588 (target_terminal::restore_inferior): New.
10589 (target_terminal::is_inferior, target_terminal::is_ours)
10590 (target_terminal::is_ours_for_output): Adjust.
10591 (target_terminal::scoped_restore_terminal_state): Adjust to
10592 rename, and call restore_inferior() instead of inferior().
10593 (target_terminal::scoped_restore_terminal_state::m_state): Change
10595 (target_terminal::terminal_state): Rename to ...
10596 (target_terminal::m_terminal_state): ... this and change type.
10598 2018-01-30 Pedro Alves <palves@redhat.com>
10600 * linux-nat.c (wait_for_signal): New function.
10601 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10603 (async_terminal_is_ours)
10604 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10605 (linux_nat_add_target): Don't override
10606 to_terminal_inferior/to_terminal_ours.
10608 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10610 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10612 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10614 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10615 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10616 dwarf2_per_objfile_free here.
10617 (dwarf2_per_objfile_free): Remove.
10618 (_initialize_dwarf2_read): Don't register
10619 dwarf2_per_objfile_free as a registry cleanup.
10621 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10623 Avoid compilation errors in MinGW native builds
10625 The error is triggered by including python-internal.h, and the
10628 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10629 from build-gnulib/import/math.h:27,
10630 from d:/usr/Python26/include/pyport.h:235,
10631 from d:/usr/Python26/include/Python.h:58,
10632 from python/python-internal.h:94,
10633 from python/py-arch.c:24:
10634 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10638 This happens because Python headers define 'hypot' to expand t
10639 '_hypot' in the Windows builds.
10640 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10641 'hypoth'. This avoids a compilation error.
10643 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10645 * MAINTAINERS (Write After Approval): Fix ordering.
10647 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10649 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10651 2018-01-26 Alan Modra <amodra@gmail.com>
10653 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10654 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10655 Remove nop. Make const. Comment.
10656 (powerpc32_plt_stub_so_2): New.
10657 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10658 Correct count. Update uses.
10659 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10660 Move common code reading PLT entry word. Correct
10661 powerpc32_plt_stub PLT address calculation.
10662 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10663 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10664 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10665 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10666 (ppc64_standard_linkage8): Likewise.
10667 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10668 Correct insns description.
10669 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10671 2018-01-24 Pedro Alves <palves@redhat.com>
10673 GCC PR libstdc++/83906
10674 * gdbtypes.c (operator==(const dynamic_prop &,
10675 const dynamic_prop &)): New.
10676 (operator==(const range_bounds &, const range_bounds &)): New.
10677 (check_types_equal): Use them instead of memcmp.
10678 * gdbtypes.h (operator==(const dynamic_prop &,
10679 const dynamic_prop &)): Declare.
10680 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10681 (operator==(const range_bounds &, const range_bounds &)): Declare.
10682 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10684 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10686 * s390-linux-tdep.c (s390_record_address_mask)
10687 (s390_record_calc_disp_common, s390_record_calc_disp)
10688 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10689 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10690 (s390_process_record): Move to s390-tdep.c.
10691 (s390_linux_init_abi_any): Adjust.
10692 * s390-tdep.c (s390_record_address_mask)
10693 (s390_record_calc_disp_common, s390_record_calc_disp)
10694 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10695 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10696 (s390_process_record): Moved from s390-linux-tdep.c
10697 (s390_gdbarch_init): Adjust.
10699 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10701 * s390-linux-nat.c (s390-tdep.h): New include.
10702 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10703 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10704 (ALLDEPFILES): Add s390-tdep.c.
10705 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10706 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10707 * s390-tdep.h: ...this. New file.
10708 * s390-linux-tdep.c (s390-tdep.h): New include.
10709 (_initialize_s390_tdep): Rename to...
10710 (_initialize_s390_linux_tdep): ...this and adjust.
10711 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10712 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10714 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10715 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10716 (s390_is_partial_instruction, s390_software_single_step)
10717 (is_non_branch_ril, s390_displaced_step_copy_insn)
10718 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10719 (s390_prologue_data, s390_addr, s390_store, s390_load)
10720 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10721 (s390_register_call_saved, s390_guess_tracepoint_registers)
10722 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10723 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10724 (s390_pseudo_register_name, s390_pseudo_register_type)
10725 (s390_pseudo_register_read, s390_pseudo_register_write)
10726 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10727 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10728 (s390_addr_bits_remove, s390_address_class_type_flags)
10729 (s390_address_class_type_flags_to_name)
10730 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10731 (s390_function_arg_float, s390_function_arg_vector)
10732 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10733 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10734 (s390_frame_align, s390_register_return_value, s390_return_value)
10735 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10736 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10737 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10738 (s390_trad_frame_prev_register, s390_unwind_cache)
10739 (s390_prologue_frame_unwind_cache)
10740 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10741 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10742 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10743 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10744 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10745 (s390_frame_base_address, s390_local_base_address)
10746 (s390_frame_base, s390_gcc_target_options)
10747 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10748 (s390_validate_reg_range, s390_tdesc_valid)
10749 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10750 * s390-tdep.c: ...this. New file.
10752 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10754 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10755 (s390_process_record, s390_gdbarch_tdep_alloc)
10756 (s390_linux_init_abi_any): Use/set new hook.
10758 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10760 * s390-linux-tdep.c (osabi.h): New include.
10761 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10762 (s390_linux_init_abi_any): New functions.
10763 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10765 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10767 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10768 tdesc_has_registers check
10770 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10772 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10773 (s390_validate_reg_range): New macro.
10774 (s390_gdbarch_init): Adjust.
10776 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10778 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10779 (s390_gdbarch_tdep_alloc): Adjust.
10780 (s390_gdbarch_init): Adjust.
10782 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10784 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10785 <have_tdb>: Change type to bool.
10786 (s390_gdbarch_tdep_alloc): Adjust.
10787 (s390_gdbarch_init): Adjust.
10789 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10791 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10792 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10793 (s390_gdbarch_tdep_alloc): New function.
10794 (s390_gdbarch_init): Allocate tdep at start and use its fields
10795 instead of separate variables.
10797 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10799 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10800 when looking for cached gdbarch and add comment for remaining.
10802 2018-01-22 Pedro Alves <palves@redhat.com>
10803 Sergio Durigan Junior <sergiodj@redhat.com>
10805 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10808 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10810 * MAINTAINERS: Update my company e-mail address.
10812 2018-01-22 Yao Qi <yao.qi@linaro.org>
10814 * regcache.c (cooked_write_test): New function.
10815 (_initialize_regcache): Register the test.
10817 2018-01-22 Yao Qi <yao.qi@linaro.org>
10819 * ia64-tdep.c (ia64_pseudo_register_read): Call
10820 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10821 * m32c-tdep.c (m32c_cat_read): Likewise.
10822 (m32c_r3r2r1r0_read): Likewise.
10823 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10824 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10826 2018-01-22 Yao Qi <yao.qi@linaro.org>
10828 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10829 method raw_read instead of regcache_raw_read.
10830 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10831 * arm-tdep.c (arm_neon_quad_read): Likewise.
10832 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10833 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10834 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10835 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10836 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10837 (i386_pseudo_register_read_into_value): Likewise.
10838 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10839 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10840 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10841 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10842 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10843 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10844 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10845 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10846 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10848 2018-01-22 Yao Qi <yao.qi@linaro.org>
10850 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10851 * configure.tgt: Remove target mt.
10852 * mt-tdep.c: Remove.
10853 * regcache.c (cooked_read_test): Remove the check for mt.
10855 2018-01-22 Yao Qi <yao.qi@linaro.org>
10857 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10858 instead of gdbarch_pseudo_register_read_value.
10860 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10862 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10865 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10867 * linespec.c (create_sals_line_offset): Remove code that preserved
10868 the symtab_and_line's line number.
10870 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10872 * varobj.c (varobj_create): Don't set valid_block when creating a
10875 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10877 * varobj.c (varobj_create): Remove out of date comment.
10879 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10882 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10883 updating innermost block.
10884 * parse.c (innermost_block_tracker::update): Take extra type
10885 parameter, and check types match before updating innermost block.
10886 (write_dollar_variable): Update innermost block for registers.
10887 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10888 (innermost_block_tracker::innermost_block_tracker): Initialise
10890 (innermost_block_tracker::reset): Take type parameter.
10891 (innermost_block_tracker::update): Take type parameter, and pass
10892 type through as needed.
10893 (innermost_block_tracker::m_types): New member.
10894 * varobj.c (varobj_create): Pass type when reseting innermost
10897 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10899 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10900 * ada-lang.c (resolve_subexp): Likewise.
10901 * breakpoint.c (set_breakpoint_condition) Likewise.
10902 (watch_command_1) Likewise.
10903 * c-exp.y (variable): Likewise.
10904 * d-exp.y (PrimaryExpression): Likewise.
10905 * f-exp.y (variable): Likewise.
10906 * go-exp.y (variable): Likewise.
10907 * m2-exp.y (variable): Likewise.
10908 * objfiles.c (objfile::~objfile): Likewise.
10909 * p-exp.y (variable): Likewise.
10910 * parse.c (innermost_block): Change type.
10911 * parser-defs.h (class innermost_block_tracker): New.
10912 (innermost_block): Change to innermost_block_tracker.
10913 * printcmd.c (display_command): Switch to innermost_block API.
10914 (do_one_display): Likewise.
10915 * rust-exp.y (do_one_display): Likewise.
10916 * symfile.c (clear_symtab_users): Likewise.
10917 * varobj.c (varobj_create): Switch to innermost_block API, replace
10918 use of innermost_block with block stored on varobj object.
10920 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10922 * expression.h (innermost_block): Remove declaration.
10923 * varobj.c: Add 'parser-defs.h' include.
10925 2018-01-19 Tom Tromey <tom@tromey.com>
10927 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10928 symbols in the static and global blocks.
10930 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10932 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10933 gdb_ptrace.h, and move including gdb_wait.h ...
10934 * nat/linux-ptrace.h: ... to here.
10936 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10938 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10939 inf_ptrace_detach_success.
10940 (inf_ptrace_detach_success): Add inferior parameter, use it
10941 instead of inferior_ptid, pass it to detach_inferior.
10942 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10944 * inferior.c (detach_inferior): Add overload that takes an
10946 * inferior.h (detach_inferior): Likewise.
10947 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10948 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10949 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10951 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10953 * target.h (struct target_ops) <to_detach>: Add inferior
10955 (target_detach): Likewise.
10956 * target.c (dispose_inferior): Pass inferior down.
10957 (target_detach): Pass inferior down. Assert that it is equal to
10958 the current inferior.
10959 * aix-thread.c (aix_thread_detach): Pass inferior down.
10960 * corefile.c (core_file_command): Pass current_inferior() down.
10961 * corelow.c (core_detach): Add inferior parameter.
10962 * darwin-nat.c (darwin_detach): Likewise.
10963 * gnu-nat.c (gnu_detach): Likewise.
10964 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10965 * infcmd.c (detach_command): Pass current_inferior() down to
10967 * infrun.c (follow_fork_inferior): Pass parent_inf to
10969 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10971 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10972 * linux-thread-db.c (thread_db_detach): Likewise.
10973 * nto-procfs.c (procfs_detach): Likewise.
10974 * procfs.c (procfs_detach): Likewise.
10975 * record.c (record_detach): Likewise.
10976 * record.h (struct inferior): Forward-declare.
10977 (record_detach): Add inferior parameter.
10978 * remote-sim.c (gdbsim_detach): Likewise.
10979 * remote.c (remote_detach_1): Likewise.
10980 (remote_detach): Likewise.
10981 (extended_remote_detach): Likewise.
10982 * sol-thread.c (sol_thread_detach): Likewise.
10983 * target-debug.h (target_debug_print_inferior_p): New macro.
10984 * target-delegates.c: Re-generate.
10985 * top.c (kill_or_detach): Pass inferior down to target_detach.
10986 * windows-nat.c (windows_detach): Add inferior parameter.
10988 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10990 * target.h (struct target_ops) <to_detach>: Remove args
10992 (target_detach): Likewise.
10993 * target.c (dispose_inferior): Adjust.
10994 (target_detach): Remove args parameter, adjust.
10995 * aix-thread.c (aix_thread_detach): Adjust.
10996 * corefile.c (core_file_command): Adjust.
10997 * corelow.c (core_detach): Adjust.
10998 * darwin-nat.c (darwin_detach): Adjust.
10999 * gnu-nat.c (gnu_detach): Adjust.
11000 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11001 * infcmd.c (detach_command): Adjust
11002 * infrun.c (follow_fork_inferior): Adjust.
11003 (handle_vfork_child_exec_or_exit): Adjust.
11004 * linux-fork.c (linux_fork_detach): Remove args parameter.
11005 * linux-fork.h (linux_fork_detach): Likewise.
11006 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11007 * linux-thread-db.c (thread_db_detach): Likewise.
11008 * nto-procfs.c (procfs_detach): Likewise.
11009 * procfs.c (procfs_detach): Likewise.
11010 (do_detach): Remove signo parameter.
11011 * record.c (record_detach): Remove args parameter.
11012 * record.h (record_detach): Likewise.
11013 * remote-sim.c (gdbsim_detach): Likewise.
11014 * remote.c (remote_detach_1): Likewise.
11015 (remote_detach): Likewise.
11016 (extended_remote_detach): Likewise.
11017 * sol-thread.c (sol_thread_detach): Likewise.
11018 * target-delegates.c: Re-generate.
11019 * top.c (struct qt_args) <args>: Remove field.
11020 (kill_or_detach): Don't pass args.
11021 (quit_force): Don't set args.
11022 * windows-nat.c (windows_detach): Remove args parameter.
11024 2018-01-19 Yao Qi <yao.qi@linaro.org>
11026 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11027 (arm_linux_init_abi): Install it.
11029 2018-01-19 Yao Qi <yao.qi@linaro.org>
11031 * osabi.c (gdb_osabi_names): Extend the regexp for
11032 arm-linux-gnueabihf.
11034 2018-01-18 Yao Qi <yao.qi@linaro.org>
11036 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11038 (abbrev_table::add_abbrev): Update.
11039 (abbrev_table::lookup_abbrev): Update.
11041 2018-01-18 Yao Qi <yao.qi@linaro.org>
11043 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11045 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11047 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11050 2018-01-17 Tom Tromey <tom@tromey.com>
11052 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11054 2018-01-17 Tom Tromey <tom@tromey.com>
11056 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11057 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11058 (create_array_type_with_stride): Update.
11059 * dwarf2read.c (set_die_type): Update.
11061 2018-01-17 Tom Tromey <tom@tromey.com>
11063 * dwarf2read.c (delayed_method_info): Remove typedef.
11064 (dwarf2_cu::method_info): Now a std::vector.
11065 (add_to_method_list): Update.
11066 (free_delayed_list): Remove.
11067 (compute_delayed_physnames): Update.
11068 (process_full_comp_unit, process_full_type_unit): Clear the method
11069 list. Remove cleanups.
11070 (psymtab_include_file_name): Add name_holder parameter. Use
11071 unique_xmalloc_ptr.
11072 (dwarf_decode_lines): Update.
11074 2018-01-17 Tom Tromey <tom@tromey.com>
11075 Simon Marchi <simon.marchi@ericsson.com>
11077 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11078 (dwarf2_per_objfile::free_cached_comp_units)
11079 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11080 (init_cutu_and_read_dies_no_follow): Update.
11081 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11082 (dwarf2_cu::~dwarf2_cu): New.
11083 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11084 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11086 2018-01-17 Tom Tromey <tom@tromey.com>
11087 Simon Marchi <simon.marchi@ericsson.com>
11089 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11090 (struct die_reader_specs) <abbrev_table>: New member.
11091 (struct abbrev_table): Add constructor.
11092 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11093 <abbrev_obstack>: Now an auto_obstack.
11094 (abbrev_table_up): New typedef.
11095 (init_cu_die_reader): Add abbrev_table parameter.
11096 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11097 Add result_dwo_abbrev_table.
11098 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11099 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11101 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11103 (skip_children): Update.
11104 (abbrev_table::alloc_abbrev): Rename from
11105 abbrev_table_alloc_abbrev.
11106 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11107 (abbrev_table::lookup_abbrev): Rename from
11108 abbrev_table_lookup_abbrev.
11109 (abbrev_table_read_table): Return abbrev_table_up.
11110 (abbrev_table_free, abbrev_table_free_cleanup)
11111 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11112 (load_partial_dies): Update.
11114 2018-01-17 Tom Tromey <tom@tromey.com>
11116 * dwarf2read.c (dwarf2_compute_name): Update comment.
11117 (read_func_scope, read_variable): Update.
11118 (new_symbol): Remove.
11119 (new_symbol_full): Rename to new_symbol.
11121 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11124 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11125 a warning instead of throwing an error, set section size to 0 and return
11127 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11129 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11131 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11133 (linux_ptrace_attach_fail_reason_string): Likewise.
11134 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11136 (linux_ptrace_attach_fail_reason_string): Likewise.
11137 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11139 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11141 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11143 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11146 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11147 checking for fs_base/gs_base fields in struct user_regs_struct.
11148 * configure: Regenerate.
11150 2018-01-17 Yao Qi <yao.qi@linaro.org>
11152 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11154 (aarch64_linux_init_abi): Install it to gdbarch hook
11155 gcc_target_options.
11157 2018-01-15 Pedro Alves <palves@redhat.com>
11159 * common/signals-state-save-restore.c
11160 (save_original_signals_state): Fix typos.
11162 2017-01-12 Tom Tromey <tom@tromey.com>
11163 Sergio Durigan Junior <sergiodj@redhat.com>
11165 * Makefile.in (install-only): Install gdb-add-index.
11167 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11169 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11171 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11173 * infrun.c (keep_going_pass_signal): Clear step-over info when
11174 insert_breakpoints fails.
11176 2018-01-11 Pedro Alves <palves@redhat.com>
11179 * infrun.c (resume): Rename to ...
11180 (resume_1): ... this.
11181 (resume): Reimplement as wrapper around resume_1.
11183 2018-01-11 Pedro Alves <palves@redhat.com>
11186 * remote.c (remote_parse_stop_reply): Default to the last-set
11187 general thread instead of to 'magic_null_ptid'.
11189 2018-01-10 Pedro Alves <palves@redhat.com>
11191 * language.h (language_get_symbol_name_matcher): Rename ...
11192 (get_symbol_name_matcher): ... this.
11193 * language.c (language_get_symbol_name_matcher): Ditto.
11194 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11197 2018-01-10 Pedro Alves <palves@redhat.com>
11201 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11202 Adjust to use language_get_symbol_name_matcher instead of
11203 language_defn::la_get_symbol_name_matcher.
11204 * language.c (language_get_symbol_name_matcher): If in Ada mode
11205 and the lookup name is a verbatim match, return Ada's matcher.
11206 * language.h (language_get_symbol_name_matcher): Adjust comment.
11207 (ada_lookup_name_info::verbatim_p):: New method.
11209 2018-01-10 Pedro Alves <palves@redhat.com>
11212 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11213 minsym's language is language_auto or language_cplus, pass down
11214 language_ada instead.
11215 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11217 2018-01-10 Pedro Alves <palves@redhat.com>
11220 * minsyms.c (linkage_name_str): New function.
11221 (iterate_over_minimal_symbols): Use it.
11223 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11225 * NEWS: Document that 'info proc' now works on FreeBSD.
11227 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11229 * configure.ac: Check for kinfo_getfile in libutil.
11230 * configure: Regenerate.
11231 * config.in: Regenerate.
11232 * fbsd-nat.c: Include "fbsd-tdep.h".
11233 (fbsd_fetch_cmdline): New.
11234 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11235 rather than calling error.
11236 (fbsd_info_proc): New.
11237 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11238 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11239 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11241 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11243 * fbsd-nat.c (struct free_deleter): Remove.
11244 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11246 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11248 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11249 NULL for an empty pathname.
11251 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11253 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11254 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11255 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11256 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11257 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11258 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11259 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11260 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11261 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11262 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11263 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11264 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11265 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11266 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11267 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11269 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11271 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11272 (gnu_xfer_auxv): New function.
11273 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11274 TARGET_OBJECT_AUXV.
11276 2018-01-08 Yao Qi <yao.qi@linaro.org>
11277 Simon Marchi <simon.marchi@ericsson.com>
11279 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11281 (COMMON_OBS): Remove selftest.o.
11282 * configure.ac: Append selftest-arch.c and common/selftest.c to
11283 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11284 * configure: Re-generated.
11285 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11287 (maintenance_info_selftests): Likewise.
11289 2018-01-08 Xavier Roirand <roirand@adacore.com>
11291 * ada-valprint.c (val_print_packed_array_elements): Use
11292 proper number of elements when printing an array indexed
11293 by an enumeration type.
11295 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11297 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11298 (dw2_get_file_names_reader): Adjust.
11299 (lookup_dwo_signatured_type): Adjust.
11300 (lookup_dwp_signatured_type): Adjust.
11301 (lookup_signatured_type): Adjust.
11302 (create_type_unit_group): Adjust.
11303 (get_type_unit_group): Adjust.
11304 (process_psymtab_comp_unit_reader): Adjust.
11305 (build_type_psymtabs_reader): Adjust.
11306 (scan_partial_symbols): Adjust.
11307 (add_partial_symbol): Adjust.
11308 (add_partial_subprogram): Adjust.
11309 (peek_die_abbrev): Adjust.
11310 (fixup_go_packaging): Adjust.
11311 (process_imported_unit_die): Adjust.
11312 (dwarf2_compute_name): Adjust.
11313 (dwarf2_physname): Adjust.
11314 (read_import_statement): Adjust.
11315 (handle_DW_AT_stmt_list): Adjust.
11316 (read_file_scope): Adjust.
11317 (read_func_scope): Adjust.
11318 (read_lexical_block_scope): Adjust.
11319 (read_call_site_scope): Adjust.
11320 (read_variable): Adjust.
11321 (dwarf2_rnglists_process): Adjust.
11322 (dwarf2_ranges_process): Adjust.
11323 (dwarf2_ranges_read): Adjust.
11324 (dwarf2_get_pc_bounds): Adjust.
11325 (dwarf2_record_block_ranges): Adjust.
11326 (dwarf2_add_field): Adjust.
11327 (dwarf2_add_member_fn): Adjust.
11328 (read_structure_type): Adjust.
11329 (process_structure_scope): Adjust.
11330 (read_enumeration_type): Adjust.
11331 (read_array_type): Adjust.
11332 (mark_common_block_symbol_computed): Adjust.
11333 (read_common_block): Adjust.
11334 (read_namespace_type): Adjust.
11335 (read_namespace): Adjust.
11336 (read_module_type): Adjust.
11337 (read_tag_pointer_type): Adjust.
11338 (read_tag_ptr_to_member_type): Adjust.
11339 (read_tag_string_type): Adjust.
11340 (read_subroutine_type): Adjust.
11341 (read_typedef): Adjust.
11342 (read_base_type): Adjust.
11343 (attr_to_dynamic_prop): Adjust.
11344 (read_subrange_type): Adjust.
11345 (read_unspecified_type): Adjust.
11346 (dwarf2_read_abbrevs): Adjust.
11347 (load_partial_dies): Adjust.
11348 (read_partial_die): Adjust.
11349 (find_partial_die): Adjust.
11350 (guess_partial_die_structure_name): Adjust.
11351 (fixup_partial_die): Adjust.
11352 (read_attribute_value): Adjust.
11353 (read_addr_index): Adjust.
11354 (read_addr_index_from_leb128): Adjust.
11355 (read_str_index): Adjust.
11356 (dwarf2_string_attr): Adjust.
11357 (get_debug_line_section): Adjust.
11358 (dwarf_decode_line_header): Adjust.
11359 (lnp_state_machine::check_line_address): Adjust.
11360 (dwarf_decode_lines_1): Adjust.
11361 (dwarf_decode_lines): Adjust.
11362 (dwarf2_start_symtab): Adjust.
11363 (var_decode_location): Adjust.
11364 (new_symbol_full): Adjust.
11365 (dwarf2_const_value_data): Adjust.
11366 (dwarf2_const_value_attr): Adjust.
11367 (dwarf2_const_value): Adjust.
11368 (die_type): Adjust.
11369 (die_containing_type): Adjust.
11370 (build_error_marker_type): Adjust.
11371 (lookup_die_type): Adjust.
11372 (guess_full_die_structure_name): Adjust.
11373 (anonymous_struct_prefix): Adjust.
11374 (determine_prefix): Adjust.
11375 (dwarf2_name): Adjust.
11376 (follow_die_ref_or_sig): Adjust.
11377 (follow_die_offset): Adjust.
11378 (follow_die_ref): Adjust.
11379 (follow_die_sig_1): Adjust.
11380 (follow_die_sig): Adjust.
11381 (get_signatured_type): Adjust.
11382 (get_DW_AT_signature_type): Adjust.
11383 (decode_locdesc): Adjust.
11384 (dwarf_decode_macros): Adjust.
11385 (cu_debug_loc_section): Adjust.
11386 (fill_in_loclist_baton): Adjust.
11387 (dwarf2_symbol_mark_computed): Adjust.
11388 (init_one_comp_unit): Don't assign
11389 dwarf2_cu::dwarf2_per_objfile.
11390 (set_die_type): Adjust.
11392 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11394 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11395 <dwarf2_per_objfile>: New field.
11396 (dwarf2_per_objfile): Remove global.
11397 (get_dwarf2_per_objfile): New function.
11398 (set_dwarf2_per_objfile): New function.
11399 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11400 dwarf2_per_objfile.
11401 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11402 (read_abbrev_offset): Likewise.
11403 (read_indirect_string): Likewise.
11404 (read_indirect_line_string): Likewise.
11405 (read_indirect_string_at_offset): Likewise.
11406 (read_indirect_string_from_dwz): Likewise.
11407 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11408 dwarf2_per_objfile.
11409 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11410 (create_all_comp_units): Change objfile parameter to
11411 dwarf2_per_objfile.
11412 (create_all_type_units): Likewise.
11413 (process_queue): Add dwarf2_per_objfile parameter.
11414 (read_and_check_comp_unit_head): Likewise.
11415 (lookup_dwo_unit_in_dwp): Likewise.
11416 (get_dwp_file): Likewise.
11417 (process_cu_includes): Likewise.
11418 (struct free_dwo_file_cleanup_data): New struct.
11419 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11420 set_dwarf2_per_objfile.
11421 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11422 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11423 context, adjust calls.
11424 (dw2_instantiate_symtab): Likewise.
11425 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11426 (dw2_get_cu): Likewise.
11427 (create_cu_from_index_list): Change objfile parameter to
11428 dwarf2_per_objfile.
11429 (create_cus_from_index_list): Get dwarf2_per_objfile from
11430 context, adjust calls.
11431 (create_cus_from_index): Likewise.
11432 (create_signatured_type_table_from_index): Change objfile
11433 parameter to dwarf2_per_objfile.
11434 (create_signatured_type_table_from_debug_names): Change objfile
11435 parameter to dwarf2_per_objfile.
11436 (create_addrmap_from_index): Likewise.
11437 (create_addrmap_from_aranges): Likewise.
11438 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11439 (dw2_setup): Remove.
11440 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11442 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11443 get_dwarf2_per_objfile.
11444 (dw2_forget_cached_source_info): Likewise.
11445 (dw2_map_symtabs_matching_filename): Likewise.
11446 (struct dw2_symtab_iterator) <index>: Remove.
11447 <dwarf2_per_objfile>: New field.
11448 (dw2_symtab_iter_init): Replace index parameter with
11449 dwarf2_per_objfile.
11450 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11451 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11452 (dw2_print_stats): Likewise.
11453 (dw2_dump): Likewise.
11454 (dw2_expand_symtabs_for_function): Likewise.
11455 (dw2_expand_all_symtabs): Likewise.
11456 (dw2_expand_symtabs_with_fullname): Likewise.
11457 (dw2_expand_marked_cus): Replace index and objfile parameters
11458 with dwarf2_per_objfile.
11459 (dw_expand_symtabs_matching_file_matcher): Add
11460 dwarf2_per_objfile parameter and adjust calls.
11461 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11463 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11464 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11466 (create_cus_from_debug_names_list): Replace objfile parameter
11467 with dwarf2_per_objfile and adjust calls.
11468 (create_cus_from_debug_names): Likewise.
11469 (dwarf2_read_debug_names): Likewise.
11470 (mapped_debug_names::namei_to_name): Adjust call.
11471 (dw2_debug_names_iterator::next): Likewise.
11472 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11473 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11474 (dw2_debug_names_dump): Likewise.
11475 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11476 (dw2_debug_names_expand_symtabs_matching): Likewise.
11477 (dwarf2_initialize_objfile): Likewise.
11478 (dwarf2_build_psymtabs): Likewise.
11479 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11481 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11482 (read_and_check_comp_unit_head): Likewise.
11483 (read_abbrev_offset): Likewise.
11484 (create_debug_type_hash_table): Likewise.
11485 (create_debug_types_hash_table): Likewise.
11486 (create_all_type_units): Replace objfile parameter with
11487 dwarf2_per_objfile.
11488 (add_type_unit): Add dwarf2_per_objfile parameter.
11489 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11490 with dwarf2_per_objfile.
11491 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11492 (lookup_dwp_signatured_type): Likewise.
11493 (lookup_signatured_type): Likewise.
11494 (read_cutu_die_from_dwo): Likewise.
11495 (init_tu_and_read_dwo_dies): Likewise.
11496 (init_cutu_and_read_dies): Likewise.
11497 (init_cutu_and_read_dies_no_follow): Likewise.
11498 (allocate_type_unit_groups_table): Add objfile parameter.
11499 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11500 (get_type_unit_group): Likewise.
11501 (process_psymtab_comp_unit): Update call.
11502 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11503 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11504 (print_tu_stats): Likewise.
11505 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11506 in void* parameter.
11507 (build_type_psymtabs): Change objfile parameter to
11508 dwarf2_per_objfile.
11509 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11510 passed in void* parameter.
11511 (process_skeletonless_type_units): Change objfile parameter to
11512 dwarf2_per_objfile.
11513 (set_partial_user): Likewise.
11514 (dwarf2_build_psymtabs_hard): Likewise.
11515 (read_comp_units_from_section): Likewise.
11516 (create_all_comp_units): Likewise.
11517 (scan_partial_symbols): Update calls.
11518 (add_partial_symbol): Likewise.
11519 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11520 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11521 (process_queue): Add dwarf2_per_objfile parameter.
11522 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11523 (compute_compunit_symtab_includes): Likewise.
11524 (process_cu_includes): Add dwarf2_per_objfile parameter.
11525 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11526 (process_full_type_unit): Likewise.
11527 (process_imported_unit_die): Update call.
11528 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11529 (read_file_scope): Likewise.
11530 (allocate_dwo_file_hash_table): Add objfile parameter.
11531 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11532 (create_cus_hash_table): Likewise.
11533 (create_dwp_hash_table): Likewise.
11534 (create_dwo_unit_in_dwp_v1): Likewise.
11535 (create_dwp_v2_section): Likewise.
11536 (create_dwo_unit_in_dwp_v2): Likewise.
11537 (lookup_dwo_unit_in_dwp): Likewise.
11538 (try_open_dwop_file): Likewise.
11539 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11540 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11541 cleanup to include a reference to dwarf2_per_objfile.
11542 (open_dwp_file): Add dwarf2_per_objfile parameter.
11543 (open_and_init_dwp_file): Likewise.
11544 (get_dwp_file): Likewise.
11545 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11546 (queue_and_load_all_dwo_tus): Update call.
11547 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11549 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11550 (dwarf2_ranges_process): Likewise.
11551 (dwarf2_get_pc_bounds): Likewise.
11552 (mark_common_block_symbol_computed): Likewise.
11553 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11554 (dwarf2_read_abbrevs): Update call.
11555 (read_partial_die): Use dwarf2_per_objfile from cu.
11556 (find_partial_die): Likewise.
11557 (fixup_partial_die): Likewise.
11558 (read_attribute_value): Likewise.
11559 (read_indirect_string_at_offset_from): Add objfile parameter.
11560 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11562 (read_indirect_string_from_dwz): Add objfile parameter.
11563 (read_indirect_string): Add objfile parameter.
11564 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11565 (read_addr_index): Use dwarf2_per_objfile from cu.
11566 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11568 (read_str_index): Use dwarf2_per_objfile from cu.
11569 (get_debug_line_section): Likewise.
11570 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11571 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11572 (new_symbol_full): Use dwarf2_per_objfile from cu.
11573 (build_error_marker_type): Likewise.
11574 (lookup_die_type): Likewise.
11575 (determine_prefix): Likewise.
11576 (follow_die_offset): Likewise.
11577 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11578 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11579 (dwarf2_fetch_die_type_sect_off): Likewise.
11580 (dwarf2_get_die_type): Likewise.
11581 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11582 (get_signatured_type): Likewise.
11583 (get_DW_AT_signature_type): Likewise.
11584 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11585 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11586 (cu_debug_loc_section): Likewise.
11587 (fill_in_loclist_baton): Likewise.
11588 (dwarf2_symbol_mark_computed): Likewise.
11589 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11590 dwarf2_per_objfile.
11591 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11593 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11594 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11595 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11596 (set_die_type): Use dwarf2_free_objfile from cu.
11597 (get_die_type_at_offset): Likewise.
11598 (dwarf2_per_objfile_free): Don't assign global variable.
11599 (debug_names) <constructor>: Add dwarf2_per_objfile
11600 parameter, update m_debugstrlookup construction.
11601 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11603 <m_dwarf2_per_objfile>: New field.
11604 <lookup>: Use m_dwarf2_per_objfile.
11605 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11606 (psyms_seen_size): Likewise.
11607 (write_gdbindex): Replace objfile parameter with
11608 dwarf2_per_objfile.
11609 (write_debug_names): Likewise.
11610 (write_psymtabs_to_index): Likewise.
11611 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11614 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11616 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11617 <dwarf2_per_objfile>: New field.
11618 (struct dwarf2_per_cu_data) <objfile>: Remove.
11619 <dwarf2_per_objfile>: New field.
11620 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11622 (create_signatured_type_table_from_index): Likewise.
11623 (create_debug_type_hash_table): Likewise.
11624 (fill_in_sig_entry_from_dwo_entry): Likewise.
11625 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11626 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11628 (create_partial_symtab): Access objfile through
11629 dwarf2_per_objfile.
11630 (process_psymtab_comp_unit_reader): Likewise.
11631 (read_comp_units_from_section): Likewise.
11632 (scan_partial_symbols): Likewise.
11633 (add_partial_symbol): Likewise.
11634 (add_partial_subprogram): Likewise.
11635 (peek_die_abbrev): Likewise.
11636 (fixup_go_packaging): Likewise.
11637 (process_full_comp_unit): Likewise.
11638 (process_full_type_unit): Likewise.
11639 (process_imported_unit_die): Likewise.
11640 (dwarf2_compute_name): Likewise.
11641 (dwarf2_physname): Likewise.
11642 (read_import_statement): Likewise.
11643 (create_cus_hash_table): Assign dwarf2_physname instead of
11645 (read_func_scope): Access objfile through dwarf2_per_objfile.
11646 (read_lexical_block_scope): Likewise.
11647 (read_call_site_scope): Likewise.
11648 (read_variable): Likewise.
11649 (dwarf2_rnglists_process): Likewise.
11650 (dwarf2_ranges_process): Likewise.
11651 (dwarf2_ranges_read): Likewise.
11652 (dwarf2_record_block_ranges): Likewise.
11653 (dwarf2_add_field): Likewise.
11654 (dwarf2_add_member_fn): Likewise.
11655 (read_structure_type): Likewise.
11656 (process_structure_scope): Likewise.
11657 (read_enumeration_type): Likewise.
11658 (read_array_type): Likewise.
11659 (read_common_block): Likewise.
11660 (read_namespace_type): Likewise.
11661 (read_namespace): Likewise.
11662 (read_module_type): Likewise.
11663 (read_tag_pointer_type): Likewise.
11664 (read_tag_ptr_to_member_type): Likewise.
11665 (read_tag_string_type): Likewise.
11666 (read_subroutine_type): Likewise.
11667 (read_typedef): Likewise.
11668 (read_base_type): Likewise.
11669 (attr_to_dynamic_prop): Likewise.
11670 (read_subrange_type): Likewise.
11671 (read_unspecified_type): Likewise.
11672 (load_partial_dies): Likewise.
11673 (read_partial_die): Likewise.
11674 (find_partial_die): Likewise.
11675 (guess_partial_die_structure_name): Likewise.
11676 (fixup_partial_die): Likewise.
11677 (read_attribute_value): Likewise.
11678 (read_addr_index_from_leb128): Likewise.
11679 (dwarf2_read_addr_index): Likewise.
11680 (dwarf2_string_attr): Likewise.
11681 (lnp_state_machine::check_line_address): Likewise.
11682 (dwarf_decode_lines_1): Likewise.
11683 (dwarf_decode_lines): Likewise.
11684 (dwarf2_start_symtab): Likewise.
11685 (var_decode_location): Likewise.
11686 (new_symbol_full): Likewise.
11687 (dwarf2_const_value_data): Likewise.
11688 (dwarf2_const_value_attr): Likewise.
11689 (dwarf2_const_value): Likewise.
11690 (die_type): Likewise.
11691 (die_containing_type): Likewise.
11692 (lookup_die_type): Likewise.
11693 (guess_full_die_structure_name): Likewise.
11694 (anonymous_struct_prefix): Likewise.
11695 (dwarf2_name): Likewise.
11696 (follow_die_ref_or_sig): Likewise.
11697 (follow_die_offset): Likewise.
11698 (follow_die_ref): Likewise.
11699 (dwarf2_fetch_die_loc_sect_off): Likewise.
11700 (dwarf2_fetch_constant_bytes): Likewise.
11701 (dwarf2_fetch_die_type_sect_off): Likewise.
11702 (dwarf2_get_die_type): Likewise.
11703 (follow_die_sig): Likewise.
11704 (decode_locdesc): Likewise.
11705 (dwarf2_per_cu_objfile): Likewise.
11706 (dwarf2_per_cu_text_offset): Likewise.
11707 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11709 (set_die_type): Access objfile through
11710 dwarf2_per_objfile.
11712 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11714 * valprint.c (converted_character_d): Remove typedef.
11715 (DEF_VEC_O (converted_character_d)): Remove.
11716 (count_next_character): Use std::vector.
11717 (print_converted_chars_to_obstack): Likewise.
11718 (generic_printstr): Likewise.
11720 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11722 * xml-support.h (struct gdb_xml_value): Add constructor.
11723 <value>: Change type to unique_xmalloc_ptr.
11724 (gdb_xml_value_s): Remove typedef.
11725 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11726 (gdb_xml_element_start_handler): Change parameter type to
11728 (xml_find_attribute): Likewise.
11729 * xml-support.c (xml_find_attribute): Change parameter type to
11730 std::vector and adjust.
11731 (gdb_xml_values_cleanup): Remove.
11732 (gdb_xml_parser::start_element): Adjust to std::vector.
11733 (xinclude_start_include): Change paraeter type to std::vector
11735 * btrace.c (check_xml_btrace_version): Likewise.
11736 (parse_xml_btrace_block): Likewise.
11737 (parse_xml_btrace_pt_config_cpu): Likewise.
11738 (parse_xml_btrace_pt): Likewise.
11739 (parse_xml_btrace_conf_bts): Likewise.
11740 (parse_xml_btrace_conf_pt): Likewise.
11741 * memory-map.c (memory_map_start_memory): Likewise.
11742 (memory_map_start_property): Likewise.
11743 * osdata.c (osdata_start_osdata): Likewise.
11744 (osdata_start_item): Likewise.
11745 (osdata_start_column): Likewise.
11746 * remote.c (start_thread): Likewise.
11747 * solib-aix.c (library_list_start_library): Likewise.
11748 (library_list_start_list): Likewise.
11749 * solib-svr4.c (library_list_start_library): Likewise.
11750 (svr4_library_list_start_list): Likewise.
11751 * solib-target.c (library_list_start_segment): Likewise.
11752 (library_list_start_section): Likewise.
11753 (library_list_start_library): Likewise.
11754 (library_list_start_list): Likewise.
11755 * tracepoint.c (traceframe_info_start_memory): Likewise.
11756 (traceframe_info_start_tvar): Likewise.
11757 * xml-syscall.c (syscall_start_syscall): Likewise.
11758 * xml-tdesc.c (tdesc_start_target): Likewise.
11759 (tdesc_start_feature): Likewise.
11760 (tdesc_start_reg): Likewise.
11761 (tdesc_start_union): Likewise.
11762 (tdesc_start_struct): Likewise.
11763 (tdesc_start_flags): Likewise.
11764 (tdesc_start_enum): Likewise.
11765 (tdesc_start_field): Likewise.
11766 (tdesc_start_enum_value): Likewise.
11767 (tdesc_start_vector): Likewise.
11769 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11771 * extension.h (struct xmethod_worker) <clone>: Remove.
11772 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11774 (python_xmethod_worker::clone): Remove.
11775 * valops.c (find_overload_match): Use std::move instead of
11778 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11780 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11781 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11782 <free_xmethod_worker_data>: Remove.
11783 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11784 <get_xmethod_arg_types>: Remove.
11785 <get_xmethod_result_type>: Remove.
11786 <invoke_xmethod>: Remove.
11787 * extension.c (new_xmethod_worker): Remove.
11788 (clone_xmethod_worker): Remove.
11789 (get_matching_xmethod_workers): Return void, pass std::vector by
11791 (get_xmethod_arg_types): Rename to...
11792 (xmethod_worker::get_arg_types): ... this, and adjust.
11793 (get_xmethod_result_type): Rename to...
11794 (xmethod_worker::get_result_type): ... this, and adjust.
11795 (invoke_xmethod): Remove.
11796 (free_xmethod_worker): Remove.
11797 (free_xmethod_worker_vec): Remove.
11798 * extension.h (enum ext_lang_rc): Move here from
11800 (struct xmethod_worker): Add constructor and destructor.
11803 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11804 virtual pure methods.
11805 <get_arg_types, get_result_type>: New methods.
11806 (xmethod_worker_ptr): Remove typedef.
11807 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11808 (xmethod_worker_vec): Remove typedef.
11809 (xmethod_worker_up): New typedef.
11810 (invoke_xmethod): Remove.
11811 (clone_xmethod_worker): Remove.
11812 (free_xmethod_worker): Remove.
11813 (free_xmethod_worker_vec): Remove.
11814 (get_xmethod_arg_types): Remove.
11815 (get_xmethod_result_type): Remove.
11816 * valops.c (find_method_list): Use std::vector, don't use
11817 intermediate vector.
11818 (value_find_oload_method_list): Use std::vector.
11819 (find_overload_match): Use std::vector.
11820 (find_oload_champ): Use std::vector.
11821 * value.c (value_free): Use operator delete.
11822 (value_of_xmethod): Rename to...
11823 (value_from_xmethod): ... this. Don't assign
11824 xmethod_worker::value, take rvalue-reference.
11825 (result_type_of_xmethod): Adjust.
11826 (call_xmethod): Adjust.
11827 * value.h: Include extension.h.
11828 (struct xmethod_worker): Don't forward-declare.
11829 (value_of_xmethod): Rename to...
11830 (value_from_xmethod): ... this, take rvalue-reference.
11831 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11832 (struct python_xmethod_worker): ... this, add constructor and
11834 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11835 (gdbpy_free_xmethod_worker_data): Rename to...
11836 (python_xmethod_worker::~python_xmethod_worker): ... this and
11838 (gdbpy_clone_xmethod_worker_data): Rename to...
11839 (python_xmethod_worker::clone): ... this and adjust.
11840 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11842 (gdbpy_get_xmethod_arg_types): Rename to...
11843 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11844 (gdbpy_get_xmethod_result_type): Rename to...
11845 (python_xmethod_worker::do_get_result_type): ... this and
11847 (gdbpy_invoke_xmethod): Rename to...
11848 (python_xmethod_worker::invoke): ... this and adjust.
11849 (new_python_xmethod_worker): Rename to...
11850 (python_xmethod_worker::python_xmethod_worker): ... this and
11852 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11854 (gdbpy_free_xmethod_worker_data): Remove.
11855 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11856 (gdbpy_get_xmethod_arg_types): Remove.
11857 (gdbpy_get_xmethod_result_type): Remove.
11858 (gdbpy_invoke_xmethod): Remove.
11859 * python/python.c (python_extension_ops): Remove obsolete
11862 2018-01-05 Pedro Alves <palves@redhat.com>
11865 * common/signals-state-save-restore.c
11866 (save_original_signals_state): New parameter 'quiet'. Warn if we
11867 find a custom handler preinstalled, instead of internal erroring.
11868 But only warn if !quiet.
11869 * common/signals-state-save-restore.h
11870 (save_original_signals_state): New parameter 'quiet'.
11871 * main.c (captured_main_1): Move save_original_signals_state call
11872 after option handling, and pass QUIET.
11874 2018-01-05 Pedro Alves <palves@redhat.com>
11876 * spu-tdep.c (spu_catch_start): Pass
11877 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11879 2018-01-05 Pedro Alves <palves@redhat.com>
11882 * ada-lang.c (literal_symbol_name_matcher): New function.
11883 (ada_get_symbol_name_matcher): Use it for
11884 symbol_name_match_type::SEARCH_NAME.
11885 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11886 it down instead of assuming symbol_name_match_type::FULL.
11887 * block.h (block_lookup_symbol): New parameter 'match_type'.
11888 * c-valprint.c (print_unpacked_pointer): Use
11889 lookup_symbol_search_name instead of lookup_symbol.
11890 * compile/compile-object-load.c (get_out_value_type): Pass down
11891 symbol_name_match_type::SEARCH_NAME.
11892 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11893 symbol_name_match_type::FULL.
11894 * cp-support.c (cp_get_symbol_name_matcher): Handle
11895 symbol_name_match_type::SEARCH_NAME.
11896 * infrun.c (insert_exception_resume_breakpoint): Use
11897 lookup_symbol_search_name.
11898 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11899 * psymtab.c (maintenance_check_psymtabs): Use
11900 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11901 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11902 SYMBOL_SEARCH_NAME.
11903 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11904 if symbol_name_match_type::SEARCH_NAME.
11905 (lookup_symbol_in_language): Pass down
11906 symbol_name_match_type::FULL.
11907 (lookup_symbol_search_name): New.
11908 (lookup_language_this): Pass down
11909 symbol_name_match_type::SEARCH_NAME.
11910 (lookup_symbol_aux, lookup_local_symbol): New parameter
11911 'match_type'. Pass it down.
11912 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11913 (lookup_symbol_search_name): New declaration.
11914 (lookup_symbol_in_block): New 'match_type' parameter.
11916 2018-01-05 Pedro Alves <palves@redhat.com>
11919 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11921 (ada_lookup_symbol): Reimplement in terms of
11922 ada_lookup_symbol_list, bits factored out from
11923 ada_lookup_encoded_symbol.
11925 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11927 * ada-exp.y (write_object_renaming): When subscripting an array
11928 using a symbol as the index, pass the block in call to
11929 ada_lookup_encoded_symbol when looking that symbol up.
11931 2018-01-05 Jerome Guitton <guitton@adacore.com>
11933 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11936 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11938 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11939 the case where VALUE_LVAL (val0) is not lval_memory.
11941 2018-01-05 Xavier Roirand <roirand@adacore.com>
11943 * ada-valprint.c (print_optional_low_bound): Handle
11944 character-indexed array printing like boolean-indexed array
11947 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11949 * NEWS: Create a new section for the next release branch.
11950 Rename the section of the current branch, now that it has
11953 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11955 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11956 * version.in: Bump version to 8.1.50.DATE-git.
11958 2018-01-03 Xavier Roirand <roirand@adacore.com>
11960 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11962 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11964 (default_exception_support_info) <catch_handlers_sym>: Add field.
11965 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11966 (ada_exception_name_addr_1): Add "catch handlers" handling.
11967 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11968 Update all callers.
11969 (create_excep_cond_exprs) <ex>: Add parameter.
11970 (re_set_exception): Update create_excep_cond_exprs call.
11971 (print_it_exception, print_one_exception, print_mention_exception)
11972 (print_recreate_exception): Add "catch handler" handling.
11973 (allocate_location_catch_handlers, re_set_catch_handlers)
11974 (check_status_catch_handlers, print_it_catch_handlers)
11975 (print_one_catch_handlers, print_mention_catch_handlers)
11976 (print_recreate_catch_handlers): New function.
11977 (catch_handlers_breakpoint_ops): New variable.
11978 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11979 Add parameter. Add "catch handler" handling.
11980 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11981 Add "catch handler" handling.
11982 (ada_exception_catchpoint_cond_string): Add "catch handler"
11984 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11986 (catch_ada_handlers_command): New function.
11987 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11988 operations structure.
11989 (_initialize_ada_language): Add "catch handlers" command entry.
11990 * NEWS: Document "catch handlers" feature.
11992 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11994 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11995 account when creating the array type of the slice.
11996 (ada_value_slice): Likewise.
11998 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12000 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12002 (create_array_type_with_stride): Add byte_stride_prop parameter.
12003 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12004 New parameter. Update all callers in this file.
12005 (array_type_has_dynamic_stride): New function.
12006 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12007 of arrays with dynamic byte strides.
12008 * dwarf2read.c (read_array_type): Add support for dynamic
12009 DW_AT_byte_stride attributes.
12011 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12013 * dwarf2read.c (read_unspecified_type): Treat
12014 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12016 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12018 Update copyright year range in all GDB files.
12020 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12022 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12023 and gdb/testsuite/gdb.base/step-line.c.
12025 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12027 * copyright.py (main): Dump the contents of
12028 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12029 even if BY_HAND is empty.
12031 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12033 * top.c (print_gdb_version): Update Copyright year in version
12036 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12038 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12040 For older changes see ChangeLog-2017.
12046 version-control: never