1 2018-08-27 Tom Tromey <tom@tromey.com>
3 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
5 (ppc64_standard_linkage1, ppc64_standard_linkage2)
6 (ppc64_standard_linkage3, ppc64_standard_linkage4)
7 (ppc64_standard_linkage5, ppc64_standard_linkage6)
8 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
11 2018-08-27 Tom Tromey <tom@tromey.com>
13 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
14 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
16 2018-08-27 Tom Tromey <tom@tromey.com>
18 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
19 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
21 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
23 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
25 * sparc-linux-tdep.c (sparc32_linux_sigframe)
26 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
27 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
29 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
30 (ppc64_linux_sigaction_tramp_frame)
31 (ppc32_linux_sighandler_tramp_frame)
32 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
33 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
34 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
35 * mn10300-linux-tdep.c (am33_linux_sigframe)
36 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
37 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
38 * mips-linux-tdep.c (mips_linux_o32_sigframe)
39 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
40 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
41 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
42 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
43 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
44 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
45 * microblaze-linux-tdep.c
46 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
47 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
48 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
49 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
50 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
51 * common/common-types.h (ULONGEST_MAX): New define.
52 (CORE_ADDR_MAX): Fix formatting.
53 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
54 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
55 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
56 (arm_linux_rt_sigreturn_tramp_frame)
57 (arm_eabi_linux_sigreturn_tramp_frame)
58 (arm_eabi_linux_rt_sigreturn_tramp_frame)
59 (thumb2_eabi_linux_sigreturn_tramp_frame)
60 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
61 (arm_linux_restart_syscall_tramp_frame)
62 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
63 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
64 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
66 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
68 2018-08-27 Tom Tromey <tom@tromey.com>
70 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
72 * mips-tdep.c (mips_deal_with_atomic_sequence)
73 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
74 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
75 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
76 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
78 * aarch64-tdep.c (aarch64_software_single_step): Use
81 2018-08-27 Tom Tromey <tom@tromey.com>
83 * linespec.c (complete_linespec_component): Add cast to "char".
84 * completer.c (completion_tracker::build_completion_result): Add
87 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
89 * solist.h (struct solist, struct target_so_ops): Fix
92 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
94 * ada-tasks.c (ada_task_info_s): Remove typedef.
95 (DEF_VEC_O(ada_task_info_s)): Remove.
96 (struct ada_tasks_inferior_data): Initialize fields.
97 <task_list>: Make an std::vector.
98 (get_ada_tasks_inferior_data): Allocate with new.
99 (ada_get_task_number): Adjust.
100 (get_task_number_from_id): Likewise.
101 (valid_task_id): Likewise.
102 (ada_get_task_info_from_ptid): Likewise.
103 (iterate_over_live_ada_tasks): Likewise.
104 (add_ada_task): Likewise.
105 (read_known_tasks): Likewise.
106 (ada_build_task_list): Likewise.
107 (print_ada_task_info): Likewise.
108 (info_task): Likewise.
109 (task_command_1): Likewise.
111 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
113 * ada-lang.c (add_angle_brackets): Return std::string.
115 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
117 * python/py-threadevent.c (py_get_event_thread): Initialize
120 2018-08-24 Pedro Alves <palves@redhat.com>
122 * python/py-bpevent.c (create_breakpoint_event_object): Use
124 * python/py-continueevent.c (emit_continue_event): Use
126 * python/py-exitedevent.c (create_exited_event_object): Return a
128 (emit_exited_event): Use copy-initialization.
129 * python/py-inferior.c (python_new_inferior)
130 (python_inferior_deleted, add_thread_object): Use
132 * python/py-infevents.c (create_inferior_call_event_object)
133 (create_register_changed_event_object)
134 (create_memory_changed_event_object): Return a gdbpy_ref<>.
135 (emit_inferior_call_event, emit_memory_changed_event)
136 (emit_register_changed_event): Use copy-initialization.
137 * python/py-newobjfileevent.c (create_new_objfile_event_object):
138 Return a gdbpy_ref<>.
139 (emit_new_objfile_event): Use copy-initialization.
140 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
141 (emit_clear_objfiles_event): Use copy-initialization.
142 * python/py-signalevent.c (create_signal_event_object): Use
144 * python/py-threadevent.c (create_thread_event_object): Use
147 2018-08-24 Pedro Alves <palves@redhat.com>
148 Simon Marchi <simon.marchi@ericsson.com>
151 * python/py-continueevent.c: Include "gdbthread.h".
152 (create_continue_event_object): Add intro comment. Add 'ptid'
153 parameter. Use it to find thread to pass to
154 create_thread_event_object.
155 (emit_continue_event): Pass PTID down to
156 create_continue_event_object.
157 * python/py-event.h (py_get_event_thread): Declare.
158 (create_thread_event_object): Remove default from 'thread'
160 * python/py-stopevent.c (create_stop_event_object): Use
162 * python/py-threadevent.c (get_event_thread): Rename to ...
163 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
164 and use it to find the thread.
165 (create_thread_event_object): Assert that THREAD isn't null.
166 Don't find the event thread here.
168 2018-08-23 Kevin Buettner <kevinb@redhat.com>
170 * block.h (blockrange, blockranges): New struct declarations.
171 (struct block): Add new field named `ranges'.
172 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
173 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
174 macros for accessing ranges in struct block.
175 (make_blockranges): New declaration.
176 block.c (make_blockranges): New function.
177 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
179 * symtab.h (find_pc_partial_function): Add new parameter `block'.
180 * blockframe.c (cache_pc_function_block): New static global.
181 (clear_pc_function_cache): Clear cache_pc_function_block.
182 (find_pc_partial_function): Move comment to symtab.h. Add
183 support for non-contiguous blocks.
184 * cli/cli-cmds.c (block.h): Include.
185 (print_disassembly): Handle printing of non-contiguous blocks.
186 (disassemble_current_function): Likewise.
187 (disassemble_command): Likewise.
189 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
191 * blockframe.c (get_pc_function_start): Likewise.
192 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
193 (gcc_symbol_address): Likewise.
194 * compile/compile-object-run.c (compile_object_run): Likewise.
195 * compile/compile.c (get_expr_block_and_pc): Likewise.
196 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
197 (func_addr_to_tail_call_list): Likewise.
198 * findvar.c (default_read_var_value): Likewise.
199 * inline-frame.c (inline_frame_this_id): Likewise.
200 (skip-inline_frames): Likewise.
201 * infcmd.c (until_next_command): Likewise.
202 * linespec.c (convert_linespec_to_sals): Likewise.
203 * parse.c (parse_exp_in_context_1): Likewise.
204 * printcmd.c (build_address_symbolic): likewise.
205 (info_address_command): Likewise.
206 symtab.c (find_function_start_sal): Likewise.
207 (skip_prologue_sal): Likewise.
208 (find_function_alias_target): Likewise.
209 (find_gnu_ifunc): Likewise.
210 * stack.c (find_frame_funname): Likewise.
211 * symtab.c (fixup_symbol_section): Likewise.
212 (find_function_start_sal): Likewise.
213 (skip_prologue_sal): Likewsie.
214 (find_function_alias_target): Likewise.
215 (find_gnu_ifunc): Likewise.
216 * tracepoint.c (info_scope_command): Likewise.
217 * value.c (value_fn_field): Likewise.
219 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
220 in place of find_pc_partial_function.
221 * blockframe.c (find_function_entry_range_from_pc): New function.
222 * symtab.h (find_function_entry_range_from_pc): Declare and document.
223 * objfiles.c (objfile_relocate1): Relocate start and end addresses
224 for each range in a block.
227 2018-08-23 Xavier Roirand <roirand@adacore.com>
229 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
232 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
234 * solib-svr4.c (read_program_headers_from_bfd): Return
235 gdb::optional<gdb::byte_vector>.
236 (svr4_exec_displacement): Adjust.
238 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
240 * solib-svr4.c (read_program_header): Return
241 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
242 (find_program_interpreter): Return
243 gdb::optional<gdb::byte_vector>.
244 (scan_dyntag_auxv): Adjust.
245 (enable_break): Adjust.
246 (svr4_exec_displacement): Adjust.
248 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
250 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
251 * inf-child.c (inf_child_target::terminal_save_inferior): New.
253 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
255 * guile/scm-string.c (gdbscm_scm_from_printf): Use
257 * guile/scm-utils.c (gdbscm_printf): Likewise.
258 * serial.c (serial_printf): Likewise.
259 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
261 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
263 * stack.c (print_frame): Print frame architecture when printing on
265 * NEWS: Mention new "arch" attribute in frame output.
267 2018-08-21 Alan Hayward <alan.hayward@arm.com>
269 * arch/aarch64.h (aarch64_regnum): Update comment.
271 2018-08-21 Alan Hayward <alan.hayward@arm.com>
273 * NEWS: Add SVE to 8.2 section.
275 2018-08-21 Pedro Alves <palves@redhat.com>
277 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
278 out from gdbscm_parse_function_args.
279 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
280 gdbscm_parse_function_args_1.
282 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
285 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
288 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
290 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
292 2018-08-19 Michael Spang <spang@google.com>
295 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
298 2018-08-18 Kevin Buettner <kevinb@redhat.com>
300 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
301 dwarf_variable_value.
302 * dwarf2-frame.c (class dwarf_expr_executor):
303 Add override for dwarf_variable_value.
304 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
305 (class symbol_needs_eval_context): Likewise.
306 (indirect_synthetic_pointer): Add forward declaration.
307 (sect_variable_value): New function.
308 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
309 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
310 for DW_OP_GNU_variable_value.
312 2018-08-16 Tom Tromey <tom@tromey.com>
314 * top.c (read_command_file): Update.
315 (command_line_input): Remove "repeat" argument.
316 * ada-lang.c (get_selections): Update.
317 * linespec.c (decode_line_2): Update.
318 * defs.h (command_line_input): Remove argument.
319 * cli/cli-script.c (read_next_line): Update.
320 * python/py-gdb-readline.c: Update.
322 2018-08-17 Tom Tromey <tom@tromey.com>
324 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
327 2018-08-15 Tom Tromey <tom@tromey.com>
329 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
331 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
333 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
334 If used, use find_pc_partial_function to find address range
336 * mi/mi-main.c (mi_cmd_list_features): Report
337 "data-disassemble-a-option" feature.
338 * NEWS: Mention new -data-disassemble option -a.
340 2018-08-13 Tom Tromey <tom@tromey.com>
342 * common/common-defs.h (_FORTIFY_SOURCE): Define.
344 2018-08-13 Alan Hayward <alan.hayward@arm.com>
346 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
347 (aarch64_linux_collect_sve_regset): Likewise.
348 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
349 * regcache.h (regcache_map_entry_size): New function.
351 2018-08-13 Alan Hayward <alan.hayward@arm.com>
353 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
354 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
355 (SVE_HEADER_VL_LENGTH): Likewise.
356 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
357 (SVE_HEADER_FLAGS_LENGTH): Likewise.
358 (SVE_HEADER_RESERVED_LENGTH): Likewise.
359 (SVE_HEADER_SIZE_OFFSET): Likewise.
360 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
361 (SVE_HEADER_VL_OFFSET): Likewise.
362 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
363 (SVE_HEADER_FLAGS_OFFSET): Likewise.
364 (SVE_HEADER_RESERVED_OFFSET): Likewise.
365 (SVE_HEADER_SIZE): Likewise.
366 (aarch64_linux_core_read_vq): Add function.
367 (aarch64_linux_core_read_description): Check for SVE section.
369 2018-08-13 Alan Hayward <alan.hayward@arm.com>
371 * aarch64-fbsd-tdep.c
372 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
374 * aarch64-linux-tdep.c
375 (aarch64_linux_iterate_over_regset_sections): Likewise.
377 (alpha_linux_iterate_over_regset_sections):
379 (alphanbsd_iterate_over_regset_sections): Likewise.
381 (amd64fbsd_iterate_over_regset_sections): Likewise.
383 (amd64_linux_iterate_over_regset_sections): Likewise.
385 (armbsd_iterate_over_regset_sections): Likewise.
387 (arm_fbsd_iterate_over_regset_sections): Likewise.
389 (arm_linux_iterate_over_regset_sections): Likewise.
390 * corelow.c (get_core_registers_cb): Likewise.
391 (core_target::fetch_registers): Likewise.
392 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
393 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
394 * gdbarch.h (void): Regenerate.
395 * gdbarch.sh: Add supply_size and collect_size.
396 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
397 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
398 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
399 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
400 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
401 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
402 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
403 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
404 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
405 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
406 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
407 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
408 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
409 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
410 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
411 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
412 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
413 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
414 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
415 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
416 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
417 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
418 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
419 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
420 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
421 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
422 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
423 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
424 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
425 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
427 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
429 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
432 2018-08-10 Keith Seitz <keiths@redhat.com>
434 * compile/compile-c-support.c (add_code_header, add_code_footer):
435 Move into policy class.
436 (c_push_user_expression, pop_user_expression_nop)
437 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
438 (compile_program): New host class.
439 (c_compile_program): New typedef.
440 (c_compute_porgram): Use c_compile_program.
442 2018-08-10 Keith Seitz <keiths@redhat.com>
444 * compile/compile-internal.h (compile_instance::~compile_instance):
445 Remove calls to htab_delete.
446 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
447 * compile.c (compile_instance::compile_instance): Initialize
448 htab unique pointers.
449 (compile_instance::get_cached_type, compile_instance::insert_type)
450 (compile_instance::error_symbol_once): Update for unique_ptr.
452 2018-08-10 Keith Seitz <keiths@redhat.com>
454 * compile/compile-c-symbols.c (struct symbol_error)
455 (hash_symbol_error, eq_symbol_error, del_symbol_error)
456 (compile_instance::insert_symbol_error)
457 (compile_instance::error_symbol_once): Move to ...
458 * compile/compile.c: ... here.
460 2018-08-10 Keith Seitz <keiths@redhat.com>
462 * compile/compile-c-support.c (c_get_compile_context): Use `new'
463 instead of `new_compile_instance'.
464 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
466 If the symbol error map is not initialized, create it.
467 (generate_c_for_for_one_symbol): Do not check/initialize
468 the symbol error map.
469 * compile/compile-c-types.c (compile_c_instance): Make a class.
471 (compile_instance::compile_instance): Initialize the type cache.
472 (get_cached_type): New function.
473 (insert_type): Update description.
474 (compile_c_instance::m_default_cflags): Define.
475 (convert_type): Update description. Use get_cached_type.
476 (delete_instance): Moved to destructor.
477 (new_compile_instance): Moved to constructor.
478 * compile/compile-c.h (compile_c_instance): Make class inheriting
479 from compile_instance.
480 <base>: Remove field.
481 <type_map, symbol_err_map>: Move to base class.
482 <c_plugin>: Rename to `m_plugin' and remove pointer type.
483 * compile/compile-internal.h (compile_instance): Make class.
484 <type_map_t, symbol_err_map_t>: Define.
485 <fe>: Rename to `m_gcc_fe'.
486 <scope, block, gcc_target_options>: Add `m_' prefix.
487 <m_type_map, m_symbol_err_map>: New fields, moved from
490 (convert_type, new_compile_instance): Remove.
491 * compile/compile.c (cleanup_compile_instance): Remove.
492 (compile_to_object): Use unique_ptr to eliminate cleanups.
493 (compile_instance::set_print_callback, compile_instance::version)
494 (compile_instance::set_verbose)
495 (compile_instance::set_driver_filename)
496 (compile_instance::set_triplet_regexp)
497 (compile_instance::set_arguments)
498 (compile_instance::set_source_file)
499 (compile_instance::compile): Define.
501 2018-08-10 Keith Seitz <keiths@redhat.com>
503 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
504 * compile/compile-c-types.c: Define GCC_METHODN macros and include
505 gcc-c-fe.def to define C plugin.
506 (delete_instance): Delete `c_plugin'.
507 (new_compile_instance): Initialize `c_plugin'.
508 * compile/compile-c.h: Include gcc_c_plugin.h.
509 (struct compile_c_instance) <c_plugin>: New member.
510 * gcc-c-plugin.h: New file.
511 Update all callers with API change.
513 2018-08-10 Keith Seitz <keiths@redhat.com>
515 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
516 (HFILES_NO_SRCDIR): ... to here.
517 Add compile-internal.h and compile-c.h.
518 * compile/compile-c-support.c: Include compile-c.h.
519 * compile/compile-c-symbols.c: Include compile-c.h.
520 (generate_c_for_variable_locations): Update comment.
521 * compile/compile-c-types.c: Include compile-c.h.
522 * compile/compile-c.h: New file -- moved C language declarations
523 from other files here.
524 * compile/compile-internal.h: Do not include hashtab.h or
526 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
527 (gcc_convert_symbol, gcc_symbol_address)
528 (generate_c_for_variable_locations, c_get_mode_for_size)
529 (c_get_range_decl_name): Definitions moved to compile-c.h.
530 * compile/compile-loc2c.c: Include compile-c.h.
532 2018-08-10 Keith Seitz <keiths@redhat.com>
534 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
535 (c_symbol_substitution_name): ... this.
538 2018-08-10 Keith Seitz <keiths@redhat.com>
540 * compile/compile-c-support.c (c_compute_program): Use
541 unique_xmalloc_ptr to eliminate cleanup.
542 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
543 Return a unique_xmalloc_ptr and eliminate cleanup.
544 * compile/compile-internal.h (generate_c_for_variable_locations):
545 Return unique_xmalloc_ptr and update description.
547 2018-08-10 Alan Hayward <alan.hayward@arm.com>
549 * corelow.c (core_target::get_core_register_section): Rename
550 min_size to section_min_size.
552 2018-08-09 Jim Wilson <jimw@sifive.com>
554 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
555 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
556 * NEWS: Mention new GNU/Linux RISC-V target.
557 * configure.host: Add riscv*-*-linux*.
558 * configure.nat: Add riscv*.
559 * configure.tgt: Add riscv*-*-linux*.
560 * riscv-linux-nat.c: New file.
561 * riscv-linux-tdep.c: New file.
563 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
565 * infrun.c (resume): Make static, add forward declaration.
566 (proceed): Update header comment.
567 * infrun.h (resume): Delete declaration.
569 2018-08-09 Tom Tromey <tom@tromey.com>
571 * riscv-tdep.h: Minor formatting fixes.
573 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
575 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
576 * dwarf-index-cache.c (create_dir_and_check): Likewise.
577 (test_mkdir_recursive): Likewise.
578 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
580 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
582 * valarith.c (value_subscripted_rvalue): If an array is not in
583 memory, and we don't know the upper bound, then we can't know that
584 the requested element exists or not.
586 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
588 * target.c (str_comma_list_concat_elem): Fix typo in comment.
589 (target_options_to_string): Add comment.
591 2018-08-08 Tom Tromey <tom@tromey.com>
593 * unittests/scoped_mmap-selftests.c: Check result of "write".
595 2018-08-08 Jim Wilson <jimw@sifive.com>
597 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
598 (decode_register_index_short): New.
599 (decode_j_type_insn, decode_cj_type_insn): New.
600 (decode_b_type_insn, decode_cb_type_insn): New.
601 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
602 local xlen. Check xlen when decoding ambiguous compressed insns. In
603 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
604 is_c_sw_insn instead of is_sw_insn.
605 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
606 (riscv_software_single_step): New.
607 * riscv-tdep.h (riscv_software_single_step): Declare.
609 * riscv-tdep.c (riscv_isa_xlen): Drop static.
610 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
612 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
615 * target.c (dispose_inferior): Don't dispose of inferiors that are
618 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
620 * remote.c (remote_target::download_tracepoint): Change char* to
623 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
625 * target.h (target_options_to_string): Return an std::string.
626 * target.c (str_comma_list_concat_elem): Return void, use
628 (do_option): Likewise.
629 (target_options_to_string): Return an std::string.
630 * linux-nat.c (linux_nat_target::wait): Adjust.
631 * target-debug.h (target_debug_print_options): Adjust.
633 2018-08-07 Tom Tromey <tom@tromey.com>
635 * Makefile.in (CPPFLAGS): New variable.
636 (INTERNAL_CPPFLAGS): Use it.
638 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
640 * NEWS: Mention the index cache.
642 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
644 * common/pathstuff.h (get_standard_cache_dir): New.
645 * common/pathstuff.c (get_standard_cache_dir): New.
646 * build-id.h (build_id_to_string): New.
647 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
648 DEBUG_STR_SUFFIX): Move to here.
649 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
650 DEBUG_STR_SUFFIX): Move from there.
651 (write_psymtabs_to_index): Make non-static, add basename
652 parameter. Write to temporary files, rename when done.
653 (save_gdb_index_command): Adjust call to
654 write_psymtabs_to_index.
655 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
657 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
658 (get_gdb_index_contents_from_cache): New.
659 (get_gdb_index_contents_from_cache_dwz): New.
660 (dwarf2_initialize_objfile): Read index from cache.
661 (dwarf2_build_psymtabs): Save to index.
662 * dwarf-index-cache.h: New file.
663 * dwarf-index-cache.c: New file.
664 * dwarf-index-write.h: New file.
666 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
668 * gnulib/aclocal.m4: Re-generate.
669 * gnulib/config.in: Re-generate.
670 * gnulib/configure: Re-generate.
671 * gnulib/import/Makefile.am: Re-generate.
672 * gnulib/import/Makefile.in: Re-generate.
673 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
674 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
675 * gnulib/import/m4/mkdir.m4: New file.
676 * gnulib/import/mkdir.c: New file.
677 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
680 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
682 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
683 * common/scoped_mmap.c: New file.
684 * common/scoped_mmap.h (destroy): New method.
685 (~scoped_mmap, reset): Use destroy.
686 (scoped_mmap): New move constructor.
687 (mmap_file): New declaration.
688 * unittests/scoped_mmap-selftests.c (test_normal,
689 test_invalid_filename, run_tests): New functions.
690 (_initialize_scoped_mmap_selftests): Register selftest.
692 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
694 * dwarf2read.c (read_gdb_index_from_section): Rename to...
695 (read_gdb_index_from_buffer): ... this. Remove section
696 parameter, add buffer parameter.
697 (get_gdb_index_contents_ftype,
698 get_gdb_index_contents_dwz_ftype): New typedefs.
699 (dwarf2_read_gdb_index): Add callback parameters to get the
701 (get_gdb_index_contents_from_section): New.
702 (dwarf2_initialize_objfile): Update call to
703 dwarf2_read_gdb_index.
705 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
707 * common/filestuff.h (gdb_fopen_cloexec): New overload.
708 (gdb_open_cloexec): Likewise.
709 * nat/linux-osdata.c (command_from_pid): Use string_printf.
710 (commandline_from_pid): Likewise.
711 (linux_xfer_osdata_threads): Likewise.
712 (linux_xfer_osdata_fds): Likewise.
713 * ada-lang.c (is_package_name): Likewise.
714 * auxv.c (procfs_xfer_auxv): Likewise.
715 * breakpoint.c (print_one_breakpoint_location): Use
717 (print_one_catch_solib): Use string_printf.
718 * coff-pe-read.c (add_pe_exported_sym): Likewise.
719 (add_pe_forwarded_sym): Likewise.
720 * dwarf2read.c (create_type_unit_group): Likewise.
721 (build_error_marker_type): Likewise.
722 * infcall.c (get_function_name): Likewise.
723 * valprint.c (print_converted_chars_to_obstack): Likewise.
724 * xtensa-tdep.c (xtensa_register_type): Likewise.
726 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
728 * remote.c (remote_target::download_tracepoint): Fix format
731 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
733 * tracefile.c: Include common/byte-vector.h.
734 (trace_save): Change type of buf to gdb::byte_vector. Initialize
735 with trace_regblock_size if needed. Update uses of buf.
737 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
739 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
740 std::vector<unsigned char>.
741 * tracepoint.c (collection_list::collection_list): Remove
742 m_regs_mask initializer from initializer list. Resize
743 m_regs_mask using the largest remote register number.
744 (collection_list::add_remote_register): Remove size check on
745 m_regs_mask. Use at to access element.
746 (collection_list::stringify): Change type of temp_buf to
747 gdb::char_vector. Update uses of temp_buf. Resize if needed to
748 stringify the register mask. Use pack_hex_byte for the register
751 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
753 * tracepoint.h (class collection_list) <add_register>: Remove.
754 <add_remote_register, add_ax_registers, add_local_register>:
756 <add_memrange>: Add scope parameter.
757 * tracepoint.c (encode_actions_1): Likewise.
758 (collection_list::add_register): Rename to ...
759 (collection_list::add_remote_register): ... this. Update
761 (collection_list::add_ax_registers, add_local_register): New
763 (collection_list::add_memrange): Add scope parameter. Call
764 add_local_register instead of add_register.
765 (finalize_tracepoint_aexpr): New function.
766 (collection_list::collect_symbol): Update calls to add_memrange.
767 Call add_local_register instead of add_register. Call
768 add_ax_registers. Call finalize_tracepoint_aexpr.
769 (encode_actions_1): Get remote regnos for $reg action. Call
770 add_remote_register, add_ax_registers, and add_local_register.
771 Update call to add_memrange. Call finalize_tracepoint_aexpr.
772 (validate_actionline): Call finalize_tracepoint_aexpr.
774 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
776 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
777 Replace array buf with gdb::char_vector buf, of size
778 get_remote_packet_size (). Replace references to buf and
779 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
780 and xsnprintf with snprintf. Raise errors if the buffer is too
783 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
785 * remote.c (remote_target::download_tracepoint): Fix the has_more
786 predicate in the QTDP action list iteration.
788 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
790 * remote.c (remote_target::download_tracepoint): Fix indentation
793 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
795 * proc-api.c (_initialize_proc_api): Remove c, unused.
796 * procfs.c (procfs_init_inferior): Remove signals, unused.
797 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
800 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
801 Andrew Burgess <andrew.burgess@embecosm.com>
803 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
804 'W_STOPCODE (0)' as this could be ambiguous.
806 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
808 * ser-tcp.c (net_open): Fix thinko when deciding whether to
809 disable TCP's Nagle algorithm (use "ai_protocol" instead of
812 2018-08-02 Tom Tromey <tom@tromey.com>
815 * dwarf2read.c (read_func_scope): Set symtab on template parameter
817 (process_structure_scope): Likewise.
819 2018-08-02 Xavier Roirand <roirand@adacore.com>
822 * darwin-nat.c (darwin_kill_inferior): Fix handling of
825 2018-08-02 Tom Tromey <tom@tromey.com>
827 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
828 (darwin_suspend_inferior, darwin_resume_inferior)
829 (darwin_decode_notify_message, darwin_resume_inferior_threads)
830 (darwin_check_new_threads): Check result of get_darwin_inferior.
832 2018-07-31 Joel Brobecker <brobecker@adacore.com>
836 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
838 * varobj.c (varobj_get_path_expr_parent): Report an error if
839 parent is a dynamic varobj.
841 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
843 * gnulib/aclocal.m4: Re-generate.
844 * gnulib/config.in: Re-generate.
845 * gnulib/configure: Re-generate.
846 * gnulib/import/Makefile.in: Re-generate.
847 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
848 * gnulib/import/m4/onceonly.m4: Re-generate.
850 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
852 * target-descriptions.c (struct xml_test_tdesc): New.
853 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
854 (record_xml_tdesc): Update.
855 (maintenance_check_xml_descriptions): Update.
856 * target-descriptions.h (record_xml_tdesc): Update comment.
858 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
860 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
861 checking array bounds are defined.
863 2018-07-30 Tom Tromey <tom@tromey.com>
865 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
866 irreflexivity violation.
868 2018-07-30 Tom Tromey <tom@tromey.com>
870 * cli/cli-decode.c (lookup_cmd): Remove lint code.
871 * value.c (unpack_long): Remove lint code.
872 * valops.c (value_ind): Remove lint code.
873 * valarith.c (value_x_binop, value_x_unop, value_equal)
874 (value_pos): Remove lint code.
876 2018-07-28 Tom de Vries <tdevries@suse.de>
878 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
879 with undefined upper bound as <optimized out>.
881 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
883 * gcore.in: Rename variable "name" to "prefix". Expand
886 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
888 * windows-nat.c (windows_nat_target::create_inferior): Update to
889 call close() in global namespace.
891 2018-07-26 Tom Tromey <tom@tromey.com>
893 * dwarf-index-write.c (add_address_entry): Don't add objfile
895 * dbxread.c (find_stab_function): Rename from
896 find_stab_function_addr. Return a bound_minimal_symbol.
897 (read_dbx_symtab): Use raw_text_low, raw_text_high.
898 Don't add objfile offsets.
899 (end_psymtab): Use raw_text_low, raw_text_high,
900 MSYMBOL_VALUE_RAW_ADDRESS.
901 (read_ofile_symtab): Update.
902 (process_one_symbol): Update.
903 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
905 (dw2_relocate): Remove.
906 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
908 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
910 (process_psymtab_comp_unit_reader, add_partial_symbol)
911 (add_partial_subprogram, dwarf2_ranges_read): Update.
912 (load_partial_dies): Update.
913 (add_address_entry): Don't add objfile offsets.
914 (dwarf2_build_include_psymtabs): Update.
915 (create_addrmap_from_aranges): Don't add objfile offsets.
916 (dw2_find_pc_sect_compunit_symtab): Update.
917 * mdebugread.c (parse_symbol): Don't add objfile offsets.
918 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
920 (parse_partial_symbols): Don't add objfile offsets. Use
921 raw_text_low, raw_text_high. Update.
922 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
923 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
924 or call 'relocate' quick function. Clear psymbol_map.
925 * psympriv.h (struct partial_symbol) <address>: Add section
927 <set_unrelocated_address>: Rename from set_address.
928 <raw_text_low, raw_text_high>: New methods.
929 <text_low, text_high>: Add objfile parameter.
930 (add_psymbol_to_bcache): Add 'section' parameter. Call
931 set_unrelocated_address.
932 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
933 (find_pc_psymbol): Update.
934 (fixup_psymbol_section, relocate_psymtabs): Remove.
935 (dump_psymtab, psym_functions): Update.
936 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
938 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
939 (start_psymtab_common): Update.
940 * symfile-debug.c (debug_qf_relocate): Remove.
941 (debug_sym_quick_functions): Update.
942 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
943 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
946 2018-07-26 Tom Tromey <tromey@redhat.com>
948 * dbxread.c (end_psymtab): Use text_high_valid and
950 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
951 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
952 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
954 <text_low_valid, text_high_valid>: New fields.
955 <set_text_low, set_text_high>: Update.
956 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
958 2018-07-26 Tom Tromey <tom@tromey.com>
960 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
962 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
963 textlow and texthigh fields.
964 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
966 * mdebugread.c (parse_lines, parse_partial_symbols)
967 (psymtab_to_symtab_1): Update.
968 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
969 Rename fields. Update comment. Now private.
970 <text_low, text_high, set_text_low, set_text_high>: New methods.
971 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
972 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
973 (start_psymtab_common, maintenance_info_psymtabs)
974 (maintenance_check_psymtabs): Update.
975 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
977 (scan_xcoff_symtab): Update.
979 2018-07-26 Tom Tromey <tromey@redhat.com>
981 * psympriv.h (struct partial_symbol) <unrelocated_address,
982 address, set_address>: New methods.
983 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
984 (fixup_psymbol_section, relocate_psymtabs): Update.
985 (print_partial_symbols): Add 'objfile' parameter. Update.
986 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
989 2018-07-26 Tom Tromey <tom@tromey.com>
991 * dwarf-index-write.c (write_psymbols, debug_names::insert)
992 (debug_names::write_psymbols): Update.
993 * psympriv.h (struct partial_symbol): Derive from
995 <obj_section>: New method.
996 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
997 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
998 (find_pc_sect_psymbol, fixup_psymbol_section)
999 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1000 (print_partial_symbols, recursively_search_psymtabs)
1001 (compare_psymbols, psymbol_hash, psymbol_compare)
1002 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1003 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1005 2018-07-26 Tom Tromey <tromey@redhat.com>
1007 * dbxread.c (end_psymtab): Remove dead code.
1009 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1011 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1012 DWARF unwinders are disabled.
1013 * dwarf2-frame.c: Add dwarf2read.h include.
1014 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1016 (dwarf2_frame_unwinders_enabled_p): Define.
1017 (show_dwarf_unwinders_enabled_p): New function.
1018 (_initialize_dwarf2_frame): Register switch to control DWARF
1020 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1021 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1022 (show_dwarf_cmdlist): Remove static keyword.
1023 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1024 (show_dwarf_cmdlist): Declare.
1025 * NEWS: Document new feature.
1027 2018-07-26 Tom de Vries <tdevries@suse.de>
1029 PR breakpoints/23366
1030 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1032 2018-07-26 Tom de Vries <tdevries@suse.de>
1034 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1035 DW_AT_count can't be translated to a dynamic prop.
1037 2018-07-25 Tom de Vries <tdevries@suse.de>
1039 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1042 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1044 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1046 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1048 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1050 2018-07-24 Keith Seitz <keiths@redhat.comt
1053 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1054 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1055 instead of add_symbol_to_list.
1056 (read_file_scope): Call prepare_one_comp_unit before reading
1059 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1061 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1063 2018-07-24 Tom Tromey <tom@tromey.com>
1065 * utils.c (malloc, realloc, free): Don't declare.
1066 * configure, config.in: Rebuild.
1067 * configure.ac: Don't check for declarations of free, malloc, or
1070 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1072 * aarch64-linux-nat.c
1073 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1075 * arm-linux-nat.c (fetch_regs): Likewise.
1076 (store_regs): Likewise.
1077 (fetch_vfp_regs): Likewise.
1078 (store_vfp_regs): Likewise.
1079 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1080 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1081 (arm_linux_nat_target::insert_watchpoint): Likewise.
1082 (arm_linux_nat_target::remove_watchpoint): Likewise.
1083 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1085 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1087 * ppc-linux-nat.c (fetch_register): Likewise.
1088 (fetch_all_gp_regs): Likewise.
1089 (fetch_ppc_registers): Likewise.
1090 (store_all_gp_regs): Likewise.
1091 (store_ppc_registers): Likewise.
1092 (hwdebug_insert_point): Likewise.
1093 (can_use_watchpoint_cond_accel): Likewise.
1094 * remote-sim.c (gdb_os_write_stdout): Likewise.
1096 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1097 Tom Tromey <tom@tromey.com>
1099 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1101 * configure: Rebuild.
1103 2018-07-22 Tom Tromey <tom@tromey.com>
1105 * regformats/regdat.sh: Define xmltarget_${name} inside
1106 #ifndef IN_PROCESS_AGENT.
1108 2018-07-22 Tom Tromey <tom@tromey.com>
1110 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1112 2018-07-22 Tom Tromey <tom@tromey.com>
1114 * symfile.c (reread_symbols): Notify iter, not objfile.
1116 2018-07-22 Tom Tromey <tom@tromey.com>
1118 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1120 (ravenscar_thread_target::prepare_to_store): Likewise.
1122 2018-07-22 Tom Tromey <tom@tromey.com>
1124 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1125 unused variable. Call value_fetch_lazy when needed.
1126 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1127 Remove unused variable. Call value_fetch_lazy when needed.
1129 2018-07-22 Tom Tromey <tom@tromey.com>
1131 * m32c-tdep.c (mark_dma): Return void.
1132 (make_regs): Remove unused declarations.
1134 2018-07-22 Tom Tromey <tom@tromey.com>
1136 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1137 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1138 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1139 bkscm_get_valid_block_smob_arg_unsafe for effect.
1141 2018-07-22 Tom Tromey <tom@tromey.com>
1143 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1146 2018-07-22 Tom Tromey <tom@tromey.com>
1148 * windows-nat.c (saved_context): Conditionally define.
1149 * remote.c (remote_target::remote_btrace_maybe_reopen):
1150 Conditionally declare "warned".
1151 * inflow.c (sigquit_ours): Conditionally define.
1152 (new_tty): Move "tty" declaration inside #if.
1153 * guile/guile.c (guile_datadir): Conditionally define.
1154 * charset.c (set_be_le_names): Move some declarations inside #if.
1155 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1157 (parse_xml_btrace_conf): Likewise.
1159 2018-07-22 Tom Tromey <tom@tromey.com>
1161 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1163 2018-07-22 Tom Tromey <tom@tromey.com>
1165 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1166 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1167 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1168 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1169 * stack.c (frame_apply_level_command): Remove unused variable.
1170 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1171 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1172 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1174 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1175 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1176 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1178 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1179 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1181 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1182 Remove unused variable.
1183 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1185 * common/tdesc.c (print_xml_feature::visit): Remove unused
1187 * compile/compile-object-load.c (store_regs): Remove unused
1189 * complaints.c (clear_complaints): Remove unused variable.
1190 * corelow.c (core_target_open): Remove unused variable.
1191 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1193 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1195 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1197 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1199 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1201 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1203 * ia64-tdep.c (examine_prologue): Remove unused variable.
1204 * infcall.c (run_inferior_call): Remove unused variable.
1205 * inferior.c (exit_inferior): Remove unused variable.
1206 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1207 * linespec.c (decode_line_2): Remove unused variable.
1208 * linux-nat.c (super_close): Remove.
1209 * linux-tdep.c (linux_info_proc): Remove unused variable.
1210 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1211 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1212 Remove unused variable.
1213 * parse.c (find_minsym_type_and_address): Remove unused variable.
1214 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1216 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1218 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1220 * record-btrace.c (record_btrace_target::store_registers): Remove
1222 (cmd_show_record_btrace_cpu): Remove unused variable.
1223 * riscv-tdep.c (riscv_register_reggroup_p)
1224 (riscv_push_dummy_call, riscv_return_value): Remove unused
1226 * rust-exp.y (literal): Remove unused variable.
1227 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1229 <STRUCTOP_ANONYMOUS>: Likewise.
1230 * s390-linux-tdep.c (s390_linux_init_abi_31)
1231 (s390_linux_init_abi_64): Remove unused variable.
1232 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1233 (file_select_thread, net_windows_open, _initialize_ser_windows):
1234 Remove unused variables.
1235 * symtab.c (find_pc_sect_line): Remove unused variable.
1236 * target-memory.c (compute_garbled_blocks): Remove unused
1238 (target_write_memory_blocks): Remove unused variable.
1239 * target.c (target_stack::unpush): Remove unused variables.
1240 * tracepoint.c (start_tracing, all_tracepoint_actions)
1241 (merge_uploaded_trace_state_variables)
1242 (print_one_static_tracepoint_marker): Remove unused variable.
1243 * unittests/basic_string_view/element_access/char/1.cc (test01):
1244 Remove unused variable.
1245 * windows-nat.c (windows_continue, windows_add_all_dlls)
1246 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1247 Remove unused variables.
1249 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1251 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1252 attr_profile in HAVE_ELF.
1253 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1256 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1258 * frame.c (frame_register_unwind): Change parameter name.
1259 (frame_unwind_register): Likewise.
1260 (frame_unwind_register_value): Likewise.
1261 (frame_unwind_register_signed): Likewise.
1262 (frame_unwind_register_unsigned): Likewise.
1263 * frame.h (frame_register_unwind): Likewise.
1264 (frame_unwind_register): Likewise.
1265 (frame_unwind_register_value): Likewise.
1266 (frame_unwind_register_signed): Likewise.
1267 (frame_unwind_register_unsigned): Likewise.
1268 (frame_unwind_arch): Likewise.
1270 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1272 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1275 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1277 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1278 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1281 2018-07-20 Keith Seitz <keiths@redhat.com>
1283 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1284 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1285 m_compunit_symtab, m_language>: Add "m_" prefix.
1287 * buildsym.c: Update all uses.
1289 2018-07-20 Tom Tromey <tom@tromey.com>
1291 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1292 * buildsym.h (record_line_ftype): Remove typedef.
1294 2018-07-20 Tom Tromey <tom@tromey.com>
1296 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1297 (end_expandable_symtab): Likewise.
1298 (end_symtab_get_static_block): Likewise.
1299 (end_symtab_from_static_block): Likewise.
1300 * buildsym-legacy.c (augment_type_symtab): Remove.
1301 (end_expandable_symtab): Remove.
1302 (end_symtab_get_static_block): Remove.
1303 (end_symtab_from_static_block): Remove.
1305 2018-07-20 Tom Tromey <tom@tromey.com>
1307 * dwarf2read.c: Include buildsym.h.
1308 (struct dwarf2_cu) <builder>: New method.
1309 (fixup_go_packaging): Update.
1310 (process_full_comp_unit, process_full_type_unit): Update. Don't
1311 use scoped_free_pendings.
1312 (using_directives): Add "cu" parameter, remove "language".
1313 (read_import_statement, setup_type_unit_groups, )
1314 (read_func_scope, read_lexical_block_scope)
1315 (dwarf2_record_block_ranges, read_namespace): Update.
1316 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1317 (lnp_state_machine::handle_end_sequence): Update.
1318 (class lnp_state_machine) <m_cu>: New member.
1319 <m_record_line_callback>: Remove.
1320 <m_currently_recording_lines>: New member.
1321 (lnp_state_machine::handle_set_file): Update.
1322 (noop_record_line): Remove.
1323 (dwarf_record_line_p): Add cu parameter.
1324 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1325 (lnp_state_machine::record_line)
1326 (lnp_state_machine::lnp_state_machine)
1327 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1328 (dwarf_decode_lines): Update.
1329 (dwarf2_start_subfile): Add cu parameter.
1330 (dwarf2_start_symtab, new_symbol): Update.
1331 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1332 Remove dwarf2_per_objfile parameter.
1333 (dwarf_decode_macros): Update.
1335 2018-07-20 Tom Tromey <tom@tromey.com>
1337 * stabsread.c (define_symbol): Update.
1338 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1339 * dwarf2read.c (new_symbol): Update.
1340 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1341 * cp-namespace.c: Include buildsym.h.
1342 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1343 * buildsym-legacy.c (get_buildsym_compunit): New function.
1345 2018-07-20 Tom Tromey <tom@tromey.com>
1347 * xcoffread.c: Include buildsym-legacy.h.
1348 * windows-nat.c: Include buildsym-legacy.h.
1349 * stabsread.c: Include buildsym-legacy.h.
1350 * mdebugread.c: Include buildsym-legacy.h.
1351 * buildsym-legacy.h: New file.
1352 * buildsym-legacy.c: New file, from buildsym.c.
1353 * go32-nat.c: Include buildsym-legacy.h.
1354 * dwarf2read.c: Include buildsym-legacy.h.
1355 * dbxread.c: Include buildsym-legacy.h.
1356 * cp-namespace.c: Include buildsym-legacy.h.
1357 * coffread.c: Include buildsym-legacy.h.
1358 * buildsym.h: Move some contents to buildsym-legacy.h.
1359 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1361 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1363 2018-07-20 Tom Tromey <tom@tromey.com>
1365 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1366 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1367 (buildsym_compunit::buildsym_compunit)
1368 (buildsym_compunit::~buildsym_compunit)
1369 (buildsym_compunit::get_macro_table): Define.
1371 2018-07-20 Tom Tromey <tom@tromey.com>
1373 * buildsym.c (reset_symtab_globals): Remove.
1374 (buildsym_compunit::end_symtab_from_static_block): Update.
1375 (buildsym_compunit::augment_type_symtab): Update.
1376 (end_symtab_from_static_block): Call free_buildsym_compunit.
1377 (augment_type_symtab, end_symtab, end_expandable_symtab):
1380 2018-07-20 Tom Tromey <tom@tromey.com>
1382 * arch-utils.c: Do not include buildsym.h.
1383 * mipsread.c: Do not include buildsym.h.
1384 * machoread.c: Do not include buildsym.h.
1385 * elfread.c: Do not include buildsym.h.
1387 2018-07-20 Tom Tromey <tom@tromey.com>
1389 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1391 (buildsym_compunit): Add new constructor.
1392 (struct buildsym_compunit) <get_last_source_file, finish_block,
1393 record_block_range, start_subfile, patch_subfile_names,
1394 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1395 set_last_source_start_addr, get_last_source_start_addr,
1396 get_local_using_directives, set_local_using_directives,
1397 get_global_using_directives, outermost_context_p,
1398 get_current_context_stack, get_context_stack_depth,
1399 get_current_subfile, get_local_symbols, get_file_symbols,
1400 get_global_symbols, record_debugformat, record_producer,
1401 push_context, pop_context, end_symtab_get_static_block,
1402 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1404 <record_pending_block, finish_block_internal, make_blockvector,
1405 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1409 2018-05-22 Tom Tromey <tom@tromey.com>
1411 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1413 (finish_block_internal): Update.
1415 2018-07-20 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.h (EXTERN): Don't define or undef.
1424 * buildsym.c (EXTERN): Don't define.
1426 2018-07-20 Tom Tromey <tom@tromey.com>
1428 * buildsym.c: Remove TODO comment.
1430 2018-07-20 Tom Tromey <tom@tromey.com>
1432 * coffread.c (coff_symtab_read): Update.
1433 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1434 (xcoff_new_init): Update.
1435 * mipsread.c (mipscoff_new_init): Update.
1436 * mdebugread.c (mdebug_build_psymtabs): Update.
1437 * elfread.c (elf_new_init): Update.
1438 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1440 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1441 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1442 (stabsect_build_psymtabs): Update.
1443 * buildsym.h (buildsym_init): Don't declare.
1444 * buildsym.c: Update comment.
1445 (prepare_for_building): Remove.
1446 (start_symtab, restart_symtab): Update.
1447 (reset_symtab_globals): Update comment.
1448 (buildsym_init): Remove.
1450 2018-07-20 Tom Tromey <tom@tromey.com>
1452 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1453 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1454 (read_enum_type, common_block_start, common_block_end)
1455 (cleanup_undefined_types_1, finish_global_stabs): Update.
1456 * mdebugread.c (psymtab_to_symtab_1): Update.
1457 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1458 (read_lexical_block_scope, new_symbol): Update.
1459 * dbxread.c (process_one_symbol): Update.
1460 * coffread.c (coff_symtab_read, process_coff_symbol)
1461 (coff_read_enum_type): Update.
1462 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1464 (get_local_symbols, get_file_symbols, get_global_symbols): New
1466 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1468 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1469 (~scoped_free_pendings): Update.
1470 (finish_block, prepare_for_building, reset_symtab_globals)
1471 (end_symtab_get_static_block, end_symtab_with_blockvector)
1472 (augment_type_symtab, push_context): Update.
1473 (get_local_symbols, get_file_symbols, get_global_symbols): New
1475 (buildsym_init): Update.
1477 2018-07-20 Tom Tromey <tom@tromey.com>
1479 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1480 (process_full_type_unit): Likewise.
1481 (dwarf2_start_symtab): Set list_in_scope.
1483 2018-07-20 Tom Tromey <tom@tromey.com>
1485 * dwarf2read.c (process_psymtab_comp_unit_reader)
1486 (build_type_psymtabs_reader): Do not set list_in_scope.
1488 2018-07-20 Tom Tromey <tom@tromey.com>
1490 * buildsym.c (free_pendings): Remove.
1491 (add_symbol_to_list, scoped_free_pendings)
1492 (finish_block_internal, buildsym_init): Update.
1494 2018-07-20 Tom Tromey <tom@tromey.com>
1496 * xcoffread.c (read_xcoff_symtab): Update.
1497 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1499 * dbxread.c (process_one_symbol): Update.
1500 * coffread.c (coff_symtab_read): Update.
1501 * buildsym.h (finish_block): Update.
1502 * buildsym.c (finish_block): Remove "listhead" argument.
1503 (end_symtab_get_static_block): Update.
1505 2018-07-20 Tom Tromey <tom@tromey.com>
1507 * buildsym.h (class scoped_free_pendings): Remove constructor.
1508 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1510 <m_pending_block_obstack, m_pending_blocks>: New members.
1511 (pending_block_obstack, pending_blocks): Remove.
1512 (scoped_free_pendings::scoped_free_pendings): Default.
1513 (~scoped_free_pendings): Update.
1514 (free_pending_blocks): Remove.
1515 (finish_block_internal, record_pending_block, make_blockvector)
1516 (end_symtab_get_static_block, augment_type_symtab, push_context)
1517 (buildsym_init): Update.
1519 2018-07-20 Tom Tromey <tom@tromey.com>
1521 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1522 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1524 (pending_addrmap, pending_addrmap_obstack)
1525 (pending_addrmap_interesting): Remove.
1526 (scoped_free_pendings, record_block_range, make_blockvector)
1527 (prepare_for_building, reset_symtab_globals, buildsym_init):
1530 2018-07-20 Tom Tromey <tom@tromey.com>
1532 * xcoffread.c (process_linenos): Update.
1533 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1534 * mdebugread.c (psymtab_to_symtab_1): Update.
1535 * dwarf2read.c (setup_type_unit_groups)
1536 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1537 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1538 * dbxread.c (process_one_symbol): Update.
1539 * coffread.c (coff_symtab_read, enter_linenos)
1540 (process_coff_symbol): Update.
1541 * buildsym.h (current_subfile): Don't declare.
1542 (get_current_subfile): Declare.
1543 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1545 (start_subfile, free_buildsym_compunit, push_subfile)
1546 (prepare_for_building, start_symtab): Update.
1547 (get_current_subfile): New function.
1549 2018-07-20 Tom Tromey <tom@tromey.com>
1551 * coffread.c (coff_symtab_read): Update.
1552 * xcoffread.c (read_xcoff_symtab): Update.
1553 * dwarf2read.c (new_symbol): Update.
1554 (read_func_scope, read_lexical_block_scope): Update.
1555 * dbxread.c (process_one_symbol): Update.
1556 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1557 (outermost_context_p): Remove macro.
1558 (outermost_context_p, get_current_context_stack)
1559 (get_context_stack_depth): Declare.
1560 (pop_context): Return struct context_stack.
1561 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1563 (context_stack_size): Remove.
1564 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1565 (prepare_for_building, end_symtab_get_static_block)
1566 (augment_type_symtab, push_context): Update.
1567 (pop_context): Return struct context_stack.
1568 (outermost_context_p, get_current_context_stack)
1569 (get_context_stack_depth): New functions.
1570 (buildsym_init): Update.
1572 2018-07-20 Tom Tromey <tom@tromey.com>
1574 * rust-exp.y: Now a pure parser. Update all rules.
1575 (%union): Move earlier.
1576 (current_parser, work_obstack): Remove globals.
1577 (rust_parser, ~rust_parser): Update.
1578 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1579 lex_character, lex_number, lex_string, lex_identifier,
1580 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1581 convert_name, convert_params_to_expression,
1582 convert_ast_to_expression, ast_basic_type, ast_operation,
1583 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1584 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1585 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1586 ast_array_type, ast_slice_type, ast_reference_type,
1587 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1588 (rust_parse): Update.
1589 (rustyyerror, rustyylex): Add parser parameter.
1590 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1591 (rust_lex_stringish_test, rust_lex_test_sequence)
1592 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1593 (rust_lex_test_push_back, rust_lex_tests): Update.
1595 2018-07-19 Pedro Alves <palves@redhat.com>
1597 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1598 gdb::unique_xmalloc_ptr.
1599 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1600 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1601 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1602 copy-initialization.
1603 * guile/scm-pretty-print.c (ppscm_print_children): Use
1604 gdb::unique_xmalloc_ptr instead of cleanups.
1605 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1606 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1607 gdb::unique_xmalloc_ptr.
1608 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1609 Adjust to use gdb::unique_xmalloc_ptr.
1610 * guile/scm-utils.c (extract_arg): Adjust.
1611 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1612 gdb::unique_xmalloc_ptr instead of a cleanup.
1614 2018-07-19 Tom Tromey <tom@tromey.com>
1616 * utils.c (do_value_free_to_mark)
1617 (make_cleanup_value_free_to_mark): Remove.
1618 * utils.h (make_cleanup_value_free_to_mark): Remove.
1620 2018-07-19 Pedro Alves <palves@redhat.com>
1622 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1623 forwarding reference.
1625 2018-07-18 Pedro Alves <palves@redhat.com>
1627 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1628 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1631 2018-07-18 Pedro Alves <palves@redhat.com>
1633 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1635 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1637 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1638 directly instead of a cleanup.
1639 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1640 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1641 (vlscm_binop_gdbthrow): New, factored out from ...
1642 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1643 (vlscm_rich_compare): Use gdbscm_wrap.
1644 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1645 instead of a cleanup.
1646 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1648 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1649 Use xfree directly instead of a cleanup.
1650 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1651 Adjust to use gdbscm_wrap and scoped_value_mark.
1652 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1653 (gdbscm_value_address, gdbscm_value_dereference)
1654 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1656 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1657 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1659 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1660 gdbscm_wrap and scoped_value_mark.
1661 (gdbscm_value_to_string): Use xfree directly instead of a
1662 cleanup. Move 'buffer' unique_ptr to TRY scope.
1663 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1664 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1666 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1667 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1669 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1672 2018-07-18 Tom de Vries <tdevries@suse.de>
1674 * findvar.c (default_read_var_value): Also resolve dynamic type for
1675 LOC_OPTIMIZED_OUT vars.
1677 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1679 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1682 2018-07-17 Tom Tromey <tom@tromey.com>
1684 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1685 (compute_enum_list, pascm_set_param_value_x)
1686 (gdbscm_parameter_value): Update.
1687 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1688 (gdbscm_scm_to_host_string): Update.
1689 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1691 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1692 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1693 * guile/scm-string.c (gdbscm_scm_to_string): Return
1695 (gdbscm_scm_to_host_string): Likewise.
1697 2018-07-17 Tom Tromey <tom@tromey.com>
1699 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1700 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1701 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1702 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1705 2018-07-17 Tom Tromey <tom@tromey.com>
1707 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1708 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1710 * guile/scm-cmd.c (cmdscm_function): Update.
1711 * guile/scm-pretty-print.c
1712 (ppscm_print_exception_unless_memory_error): Update.
1713 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1714 Return unique_xmalloc_ptr.
1716 2018-07-17 Tom Tromey <tom@tromey.com>
1718 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1721 2018-07-17 Jim Wilson <jimw@sifive.com>
1723 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1724 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1725 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1726 unecessary braces after EF_RISCV_RVC test. Delete call to
1727 set_gdbarch_decr_pc_after_break.
1729 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1730 RISCV_LAST_FP_REGNUM + 1.
1731 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1733 2018-07-17 Tom Tromey <tom@tromey.com>
1735 * configure.ac: Remove --disable-gdbcli.
1736 * configure: Rebuild.
1737 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1738 (SUBDIR_CLI_CFLAGS): Remove.
1739 (SFILES): Use SUBDIR_CLI_SRCS.
1740 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1742 2018-07-17 Tom Tromey <tom@tromey.com>
1745 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1747 2018-07-16 Jim Wilson <jimw@sifive.com>
1749 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1751 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1753 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1755 (libunwind_frame_sniffer): Likewise.
1756 (libunwind_frame_prev_register): Likewise.
1757 (libunwind_sigtramp_frame_sniffer): Likewise.
1758 * ia64-tdep.c (ia64_access_reg): Likewise.
1759 (ia64_access_rse_reg): Likewise.
1760 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1761 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1763 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1765 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1767 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1769 * remote-sim.c (gdbsim_target::close,
1770 gdbsim_target::mourn_inferior): Remove unused variables.
1772 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1774 * ia64-tdep.c (ktab_buf): New global.
1775 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1776 (get_kernel_table): Adjust.
1778 2018-07-16 Tom Tromey <tom@tromey.com>
1780 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1781 * dwarf2read.c (using_directives, new_symbol): Use
1782 outermost_context_p.
1783 * dbxread.c (process_one_symbol): Use outermost_context_p.
1784 * coffread.c (coff_symtab_read): Use outermost_context_p.
1786 2018-07-16 Tom Tromey <tom@tromey.com>
1788 * dwarf2read.c (using_directives, read_func_scope)
1789 (read_lexical_block_scope): Update.
1790 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1791 * buildsym.h (local_using_directives, global_using_directives):
1793 (get_local_using_directives, set_local_using_directives)
1794 (get_global_using_directives): Declare.
1795 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1796 m_global_using_directives>: New members.
1797 (finish_block_internal, prepare_for_building)
1798 (reset_symtab_globals, end_symtab_get_static_block)
1799 (push_context): Update.
1800 (get_local_using_directives, set_local_using_directives)
1801 (get_global_using_directives): New functions.
1802 (buildsym_init): Update.
1804 2018-07-16 Tom Tromey <tom@tromey.com>
1806 * xcoffread.c (xcoff_initial_scan): Don't call
1807 free_pending_blocks.
1808 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1809 * buildsym.h (class scoped_free_pendings): Add constructor.
1810 (free_pending_blocks): Don't declare.
1811 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1812 (free_pending_blocks): Now static.
1814 2018-07-16 Tom Tromey <tom@tromey.com>
1816 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1817 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1819 (struct subfile_stack): Remove.
1820 (subfile_stack): Remove.
1821 (push_subfile, pop_subfile, buildsym_init): Update.
1823 2018-07-16 Tom Tromey <tom@tromey.com>
1825 * buildsym.c (push_subfile): Use gdb_assert.
1826 (pop_subfile): Use gdb_assert.
1828 2018-07-16 Tom Tromey <tom@tromey.com>
1830 * buildsym.h (merge_symbol_lists): Remove.
1831 * buildsym.c (merge_symbol_lists): Remove.
1833 2018-07-16 Tom Tromey <tom@tromey.com>
1835 * stabsread.c (scan_file_globals): Update comment.
1836 * stabsread.h (scan_file_globals): Move from buildsym.h.
1837 * buildsym.h (scan_file_globals): Move to stabsread.h.
1839 2018-07-16 Tom Tromey <tom@tromey.com>
1841 * xcoffread.c (xcoff_new_init): Update.
1842 * mipsread.c (mipscoff_new_init): Update.
1843 * mdebugread.c (mdebug_build_psymtabs): Update.
1844 * elfread.c (elf_new_init): Update.
1845 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1846 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1847 * buildsym.h (buildsym_new_init): Don't declare.
1848 * buildsym.c (buildsym_new_init): Remove.
1850 2018-07-16 Tom Tromey <tom@tromey.com>
1852 * stabsread.h (within_function): Move from buildsym.h.
1853 * stabsread.c (start_stabs): Clear within_function.
1854 * coffread.c (coff_start_symtab): Clear within_function.
1855 * buildsym.h (within_function): Move to stabsread.h.
1856 * buildsym.c (prepare_for_building): Update.
1858 2018-07-16 Tom Tromey <tom@tromey.com>
1860 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1861 * dwarf2read.c (dwarf2_start_symtab): Don't set
1862 processing_gcc_compilation.
1863 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1865 2018-07-16 Tom Tromey <tom@tromey.com>
1867 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1868 (next_symbol_text_func): Move from buildsym.h.
1869 * stabsread.c (hashname): Move from buildsym.c.
1870 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1871 (next_symbol_text_func, hashname): Move to stabsread.h.
1872 * buildsym.c: Don't include bcache.h
1873 (hashname): Move to stasbread.c.
1875 2018-07-16 Tom Tromey <tom@tromey.com>
1877 * buildsym.h (context_stack_size): Don't declare.
1878 * buildsym.c (context_stack_size): New global.
1880 2018-07-16 Tom Tromey <tom@tromey.com>
1882 * dbxread.c (processing_acc_compilation): New global.
1883 * buildsym.h (processing_acc_compilation): Don't declare.
1885 2018-07-16 Tom Tromey <tom@tromey.com>
1887 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1888 * dbxread.c (read_ofile_symtab): Update.
1889 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1890 * buildsym.h (last_source_start_addr): Remove.
1891 (set_last_source_start_addr, get_last_source_start_addr):
1893 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1895 (struct buildsym_compunit) <m_last_source_start_addr>: New
1897 (prepare_for_building): Remove start_addr parameter.
1898 (start_symtab, restart_symtab, end_symtab_get_static_block)
1899 (end_symtab_with_blockvector): Update.
1900 (set_last_source_start_addr, get_last_source_start_addr): New
1903 2018-07-16 Tom Tromey <tom@tromey.com>
1905 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1907 (have_line_numbers): Remove.
1908 (record_line, prepare_for_building, end_symtab_get_static_block)
1909 (augment_type_symtab): Update.
1911 2018-07-16 Tom Tromey <tom@tromey.com>
1913 * buildsym.c (~buildsym_compunit): Free the macro table.
1914 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1916 <m_pending_macros>: New member.
1917 (pending_macros): Remove.
1918 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1919 (reset_symtab_globals, end_symtab_get_static_block)
1920 (end_symtab_with_blockvector, augment_type_symtab)
1921 (buildsym_init): Update.
1923 2018-07-16 Tom Tromey <tom@tromey.com>
1925 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1927 (buildsym_compunit::set_last_source_file): New method.
1928 <m_last_source_file>: New member.
1929 (prepare_for_building): Remove "name" parameter.
1930 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1931 (last_source_file): Remove.
1932 (set_last_source_file, get_last_source_file): Update.
1934 2018-07-16 Tom Tromey <tom@tromey.com>
1936 * buildsym.c (prepare_for_building): Add assert.
1938 2018-07-16 Tom Tromey <tom@tromey.com>
1940 * buildsym.c (~buildsym_compunit): Update.
1941 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1942 (start_subfile, patch_subfile_names)
1943 (end_symtab_with_blockvector): Update.
1945 2018-07-16 Tom Tromey <tom@tromey.com>
1947 * buildsym.c (struct buildsym_compunit): Add constructor,
1948 destructor, initializers.
1949 (start_buildsym_compunit): Remove.
1950 (free_buildsym_compunit): Use "delete".
1951 (start_symtab, restart_symtab): Use "new".
1953 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1955 * symfile.c (set_objfile_default_section_offset): Remove struct
1958 2018-07-14 Stafford Horne <shorne@gmail.com>
1960 * (Responsible Maintainers): Add myself as or1k maintainer.
1962 2018-07-13 Tom Tromey <tom@tromey.com>
1964 * symfile.c (set_objfile_default_section_offset): Use extra braces
1967 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1969 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1972 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1974 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1975 unittests/cli-utils-selftests.c
1976 * unittests/cli-utils-selftests.c: New file.
1978 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1980 * NEWS: Mention new commands. Mention change to 'thread apply'.
1982 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1984 * thread.c (thr_try_catch_cmd): New function.
1985 (thread_apply_all_command): Handle qcs flags.
1986 (thread_apply_command): Handle qcs flags.
1987 (taas_command): New function.
1988 (tfaas_command): New function.
1989 (_initialize_thread): Update to setup the new commands 'taas
1990 and 'tfaas'. Change doc string for 'thread apply'.
1992 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1994 * stack.c: (trailing_outermost_frame): New function, mostly
1995 extracted from backtrace_command_1.
1996 (leading_innermost_frame): New function.
1997 (backtrace_command_1): Update to call trailing_outermost_frame.
1998 (frame_apply_command_count): New function.
1999 (frame_apply_level_command): New function.
2000 (frame_apply_all_command): New function.
2001 (frame_apply_command): New function.
2002 (faas_command): New function.
2003 (frame_cmd_list): New variable.
2004 (_initialize_stack): Update to setup the new commands 'frame apply'
2007 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2009 * cli-utils.c (number_or_range_parser::get_number): Only handle
2010 numbers or convenience var as numbers.
2011 (parse_flags): New function.
2012 (parse_flags_qcs): New function.
2013 (number_or_range_parser::finished): Ensure parsing end is detected
2014 before end of string.
2015 * cli-utils.h (parse_flags): New function.
2016 (parse_flags_qcs): New function.
2017 (number_or_range_parser): Remove m_finished bool.
2018 (number_or_range_parser::skip_range): Set m_in_range to false.
2020 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2022 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2025 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2026 Jan Kratochvil <jan.kratochvil@redhat.com>
2027 Paul Fertser <fercerpav@gmail.com>
2028 Tsutomu Seki <sekiriki@gmail.com>
2029 Pedro Alves <palves@redhat.com>
2031 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2032 'unittests/parse-connection-spec-selftests.c'.
2033 (COMMON_SFILES): Add 'common/netstuff.c'.
2034 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2035 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2036 * common/netstuff.c: New file.
2037 * common/netstuff.h: New file.
2038 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2039 (wait_for_connect): Update comment. New parameter
2040 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2041 Use 'sock' directly instead of 'scb->fd'.
2042 (try_connect): New function, with code from 'net_open'.
2043 (net_open): Rewrite main loop to deal with multiple
2044 sockets/addresses. Handle IPv6-style hostnames; implement
2045 support for IPv6 connections.
2046 * unittests/parse-connection-spec-selftests.c: New file.
2048 2018-07-11 Pedro Alves <palves@redhat.com>
2051 * remote.c (remote_target::remote_detach_pid): Call
2052 set_current_process.
2054 2018-07-11 Pedro Alves <palves@redhat.com>
2056 * h8300-tdep.c (h8300_gdbarch_init): Remove
2057 set_gdbarch_ecoff_reg_to_regnum calls.
2059 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2062 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2063 offsets/sizes for static members of a class/struct.
2065 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2067 * target-descriptions.c (tdesc_register_bitsize): Rename.
2068 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2069 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2070 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2072 2018-07-10 Tom Tromey <tom@tromey.com>
2074 * breakpoint.c (moribund_locations): Now static and a
2076 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2077 (build_bpstat_chain, update_global_location_list)
2078 (breakpoint_retire_moribund): Update.
2079 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2082 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2084 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2085 (riscv_register_reggroup_p): Use new function, remove unneeded
2087 (riscv_push_dummy_call): Extend assert to compare against xlen or
2088 flen based on register type.
2090 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2092 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2094 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2096 * remote.c (show_hardware_watchpoint_limit): New function.
2097 (show_hardware_watchpoint_length_limit): New function.
2098 (show_hardware_breakpoint_limit): New function.
2099 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2100 where appropriate, update help text.
2102 2018-07-09 Tom Tromey <tom@tromey.com>
2104 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2105 (CLIBS): Don't mention NAT_CLIBS.
2107 2018-07-09 Tom Tromey <tom@tromey.com>
2109 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2110 (LIBGDB_OBS, clean mostlyclean): Update.
2111 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2113 2018-07-09 Tom Tromey <tom@tromey.com>
2115 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2116 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2117 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2119 2018-07-09 Tom Tromey <tom@tromey.com>
2121 * Makefile.in (ALLDEPFILES): Remove exec.c.
2122 (COMMON_OBS): Remove exec.o.
2123 (COMMON_SFILES): Add exec.c.
2125 2018-07-09 Tom Tromey <tom@tromey.com>
2127 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2129 2018-07-09 Tom Tromey <tom@tromey.com>
2131 * Makefile.in (clean mostlyclean): Remove stamp-version.
2132 (version.c): Depend on stamp-version.
2133 (stamp-version): New rule, from version.c rule.
2135 2018-07-09 Tom Tromey <tom@tromey.com>
2137 * Makefile.in (init.c): Depend on stamp-init.
2138 (stamp-init): New rule, from init.c rule.
2139 (clean mostlyclean): Remove stamp-init.
2141 2018-07-09 Tom Tromey <tom@tromey.com>
2143 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2144 SUBDIR_GCC_COMPILE_SRCS.
2146 2018-07-09 Tom Tromey <tom@tromey.com>
2148 * Makefile.in (init.c): Remove some unused sed rules.
2150 2018-07-09 Tom Tromey <tom@tromey.com>
2152 * Makefile.in (TSOBS): Remove.
2153 (INIT_FILES): Update.
2154 (LIBGDB_OBS): Update.
2155 (COMMON_SFILES): Add inflow.c.
2156 (SFILES): Remove inflow.c.
2158 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2160 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2162 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2164 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2165 get_saveloc_name, is_signal_frame_name, step_name,
2166 init_remote_name, create_addr_space_name,
2167 destroy_addr_space_name, search_unwind_table_name,
2168 find_dyn_list_name): Constify.
2170 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2172 * darwin-nat.c (darwin_pthread_kill): New function.
2173 (darwin_resume_thread): Use darwin_pthread_kill.
2175 2018-07-05 Tom de Vries <tdevries@suse.de>
2177 * macroexp.c (macro_buffer) <operator=>: New member function.
2179 2018-07-04 Tom Tromey <tom@tromey.com>
2181 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2183 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2185 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2186 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2187 * maint.c: Likewise.
2190 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2192 * NEWS: Create a new section for the next release branch.
2193 Rename the section of the current branch, now that it has
2196 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2198 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2199 * version.in: Bump version to 8.2.50.DATE-git.
2201 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2202 Pedro Alves <palves@redhat.com>
2204 * linux-nat.c (linux_init_ptrace): Rename to ...
2205 (linux_init_ptrace_procfs): ... this. Call
2206 linux_proc_init_warnings.
2207 (linux_nat_target::post_attach)
2208 (linux_nat_target::post_startup_inferior): Adjust.
2209 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2210 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2212 2018-07-04 Tom de Vries <tdevries@suse.de>
2214 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2216 (read_comp_unit_head): ... here.
2218 2018-07-03 Tom Tromey <tom@tromey.com>
2220 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2221 (stop_tracing, tstatus_command)
2222 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2223 (print_one_static_tracepoint_marker): Update.
2224 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2226 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2228 (all_tracepoints, static_tracepoints_here): Return std::vector.
2230 2018-07-03 Tom Tromey <tom@tromey.com>
2232 * common/ptid.c (ptid_equal): Remove.
2233 * common/ptid.h (ptid_equal): Don't declare.
2234 * ada-tasks.c: Update.
2235 * breakpoint.c: Update.
2236 * common/agent.c: Update.
2237 * corelow.c: Update.
2238 * darwin-nat-info.c: Update.
2239 * darwin-nat.c: Update.
2241 * dtrace-probe.c: Update.
2242 * dummy-frame.c: Update.
2243 * fbsd-nat.c: Update.
2245 * gdbthread.h: Update.
2246 * gnu-nat.c: Update.
2247 * go32-nat.c: Update.
2248 * inf-loop.c: Update.
2249 * inf-ptrace.c: Update.
2250 * infcall.c: Update.
2254 * linux-fork.c: Update.
2255 * linux-nat.c: Update.
2256 * linux-thread-db.c: Update.
2257 * mi/mi-cmd-var.c: Update.
2258 * mi/mi-interp.c: Update.
2259 * mi/mi-main.c: Update.
2260 * nto-procfs.c: Update.
2261 * ppc-linux-tdep.c: Update.
2263 * python/py-inferior.c: Update.
2264 * python/py-record-btrace.c: Update.
2265 * python/py-record.c: Update.
2266 * ravenscar-thread.c: Update.
2267 * regcache.c: Update.
2268 * remote-sim.c: Update.
2270 * sol-thread.c: Update.
2273 * tui/tui-stack.c: Update.
2275 * windows-nat.c: Update.
2276 * windows-tdep.c: Update.
2278 2018-07-03 Tom Tromey <tom@tromey.com>
2280 * common/ptid.c (ptid_match): Remove.
2281 * common/ptid.h (ptid_match): Don't declare.
2282 * fbsd-nat.c: Update.
2285 * linux-nat.c: Update.
2286 * record-btrace.c: Update.
2287 * regcache.c: Update.
2290 2018-07-03 Tom Tromey <tom@tromey.com>
2292 * common/ptid.c (ptid_tid_p): Remove.
2293 * common/ptid.h (ptid_tid_p): Don't declare.
2294 * sol-thread.c: Update.
2296 2018-07-03 Tom Tromey <tom@tromey.com>
2298 * common/ptid.c (ptid_lwp_p): Remove.
2299 * common/ptid.h (ptid_lwp_p): Don't declare.
2300 * fbsd-nat.c: Update.
2301 * linux-nat.c: Update.
2302 * nat/linux-procfs.c: Update.
2303 * nat/x86-linux-dregs.c: Update.
2304 * sol-thread.c: Update.
2306 2018-07-03 Tom Tromey <tom@tromey.com>
2308 * common/ptid.c (ptid_is_pid): Remove.
2309 * common/ptid.h (ptid_is_pid): Don't declare.
2311 * linux-nat.c: Update.
2312 * mi/mi-interp.c: Update.
2316 2018-07-03 Tom Tromey <tom@tromey.com>
2318 * common/ptid.c (ptid_get_tid): Remove.
2319 * common/ptid.h (ptid_get_tid): Don't declare.
2320 * ada-tasks.c: Update.
2321 * aix-thread.c: Update.
2322 * bsd-uthread.c: Update.
2323 * darwin-nat.c: Update.
2324 * fbsd-nat.c: Update.
2325 * i386-darwin-nat.c: Update.
2327 * linux-tdep.c: Update.
2328 * nto-procfs.c: Update.
2329 * ppc-ravenscar-thread.c: Update.
2330 * python/py-infthread.c: Update.
2331 * ravenscar-thread.c: Update.
2332 * sol-thread.c: Update.
2333 * sparc-ravenscar-thread.c: Update.
2334 * windows-nat.c: Update.
2336 2018-07-03 Tom Tromey <tom@tromey.com>
2338 * common/ptid.c (ptid_get_lwp): Remove.
2339 * common/ptid.h (ptid_get_lwp): Don't declare.
2340 * aarch64-linux-nat.c: Update.
2341 * ada-tasks.c: Update.
2342 * aix-thread.c: Update.
2343 * amd64-linux-nat.c: Update.
2344 * arm-linux-nat.c: Update.
2345 * corelow.c: Update.
2346 * fbsd-nat.c: Update.
2347 * fbsd-tdep.c: Update.
2348 * gnu-nat.c: Update.
2349 * i386-cygwin-tdep.c: Update.
2350 * i386-gnu-nat.c: Update.
2351 * i386-linux-nat.c: Update.
2352 * ia64-linux-nat.c: Update.
2353 * inf-ptrace.c: Update.
2355 * linux-fork.c: Update.
2356 * linux-nat.c: Update.
2357 * linux-tdep.c: Update.
2358 * linux-thread-db.c: Update.
2359 * mips-linux-nat.c: Update.
2360 * nat/aarch64-linux-hw-point.c: Update.
2361 * nat/aarch64-linux.c: Update.
2362 * nat/linux-btrace.c: Update.
2363 * nat/linux-osdata.c: Update.
2364 * nat/linux-procfs.c: Update.
2365 * nat/x86-linux-dregs.c: Update.
2366 * obsd-nat.c: Update.
2367 * ppc-fbsd-nat.c: Update.
2368 * ppc-linux-nat.c: Update.
2370 * python/py-infthread.c: Update.
2371 * ravenscar-thread.c: Update.
2373 * s390-linux-nat.c: Update.
2374 * sol-thread.c: Update.
2375 * sol2-tdep.c: Update.
2376 * spu-linux-nat.c: Update.
2377 * x86-linux-nat.c: Update.
2378 * xtensa-linux-nat.c: Update.
2380 2018-07-03 Tom Tromey <tom@tromey.com>
2382 * common/ptid.c (ptid_get_pid): Remove.
2383 * common/ptid.h (ptid_get_pid): Don't declare.
2384 * aarch64-linux-nat.c: Update.
2385 * ada-lang.c: Update.
2386 * aix-thread.c: Update.
2387 * alpha-bsd-nat.c: Update.
2388 * amd64-fbsd-nat.c: Update.
2389 * amd64-linux-nat.c: Update.
2390 * arm-linux-nat.c: Update.
2391 * arm-nbsd-nat.c: Update.
2393 * break-catch-syscall.c: Update.
2394 * breakpoint.c: Update.
2395 * bsd-uthread.c: Update.
2396 * corelow.c: Update.
2398 * darwin-nat.c: Update.
2399 * fbsd-nat.c: Update.
2400 * fbsd-tdep.c: Update.
2402 * gnu-nat.c: Update.
2403 * hppa-nbsd-nat.c: Update.
2404 * hppa-obsd-nat.c: Update.
2405 * i386-fbsd-nat.c: Update.
2406 * ia64-linux-nat.c: Update.
2407 * inf-ptrace.c: Update.
2409 * inferior.c: Update.
2410 * inferior.h: Update.
2413 * linux-fork.c: Update.
2414 * linux-nat.c: Update.
2415 * linux-tdep.c: Update.
2416 * linux-thread-db.c: Update.
2417 * m68k-bsd-nat.c: Update.
2418 * mi/mi-interp.c: Update.
2419 * mi/mi-main.c: Update.
2420 * mips-linux-nat.c: Update.
2421 * mips-nbsd-nat.c: Update.
2422 * mips64-obsd-nat.c: Update.
2423 * nat/aarch64-linux-hw-point.c: Update.
2424 * nat/aarch64-linux.c: Update.
2425 * nat/linux-btrace.c: Update.
2426 * nat/linux-osdata.c: Update.
2427 * nat/linux-procfs.c: Update.
2428 * nat/x86-linux-dregs.c: Update.
2429 * nto-procfs.c: Update.
2430 * obsd-nat.c: Update.
2431 * ppc-linux-nat.c: Update.
2432 * ppc-nbsd-nat.c: Update.
2433 * ppc-obsd-nat.c: Update.
2434 * proc-service.c: Update.
2436 * python/py-inferior.c: Update.
2437 * python/py-infthread.c: Update.
2438 * ravenscar-thread.c: Update.
2440 * remote-sim.c: Update.
2442 * rs6000-nat.c: Update.
2443 * s390-linux-nat.c: Update.
2444 * sh-nbsd-nat.c: Update.
2445 * sol-thread.c: Update.
2446 * sparc-nat.c: Update.
2447 * sparc64-tdep.c: Update.
2448 * spu-linux-nat.c: Update.
2449 * spu-tdep.c: Update.
2450 * target-debug.h: Update.
2453 * tid-parse.c: Update.
2454 * tracefile-tfile.c: Update.
2455 * vax-bsd-nat.c: Update.
2456 * windows-nat.c: Update.
2457 * x86-linux-nat.c: Update.
2458 * x86-nat.c: Update.
2460 2018-07-03 Tom Tromey <tom@tromey.com>
2462 * common/ptid.c (pid_to_ptid): Remove.
2463 * common/ptid.h (pid_to_ptid): Don't declare.
2464 * aix-thread.c: Update.
2465 * arm-linux-nat.c: Update.
2466 * common/ptid.c: Update.
2467 * common/ptid.h: Update.
2468 * corelow.c: Update.
2470 * darwin-nat.c: Update.
2471 * fbsd-nat.c: Update.
2472 * fork-child.c: Update.
2473 * gnu-nat.c: Update.
2474 * go32-nat.c: Update.
2475 * inf-ptrace.c: Update.
2477 * inferior.c: Update.
2479 * linux-fork.c: Update.
2480 * linux-nat.c: Update.
2481 * nat/aarch64-linux-hw-point.c: Update.
2482 * nat/fork-inferior.c: Update.
2483 * nat/x86-linux-dregs.c: Update.
2484 * nto-procfs.c: Update.
2485 * obsd-nat.c: Update.
2487 * progspace.c: Update.
2489 * rs6000-nat.c: Update.
2490 * s390-linux-nat.c: Update.
2491 * sol-thread.c: Update.
2492 * spu-linux-nat.c: Update.
2495 * tracefile-tfile.c: Update.
2496 * windows-nat.c: Update.
2498 2018-07-03 Tom Tromey <tom@tromey.com>
2500 * common/ptid.h (ptid_build): Don't declare.
2501 * common/ptid.c (ptid_build): Remove.
2502 * aix-thread.c: Update.
2503 * bsd-kvm.c: Update.
2504 * bsd-uthread.c: Update.
2505 * common/agent.c: Update.
2506 * common/ptid.c: Update.
2507 * common/ptid.h: Update.
2508 * corelow.c: Update.
2509 * darwin-nat.c: Update.
2510 * fbsd-nat.c: Update.
2511 * gnu-nat.c: Update.
2512 * linux-fork.c: Update.
2513 * linux-nat.c: Update.
2514 * linux-thread-db.c: Update.
2515 * nat/linux-osdata.c: Update.
2516 * nat/linux-procfs.c: Update.
2517 * nto-procfs.c: Update.
2518 * obsd-nat.c: Update.
2519 * proc-service.c: Update.
2521 * ravenscar-thread.c: Update.
2522 * remote-sim.c: Update.
2524 * sol-thread.c: Update.
2526 * windows-nat.c: Update.
2528 2018-07-03 Tom Tromey <tom@tromey.com>
2530 * infrun.c (follow_exec): Use exit_inferior_silent.
2531 * inferior.c (exit_inferior_num_silent): Remove.
2532 * inferior.h (exit_inferior_num_silent): Don't declare.
2534 2018-07-03 Tom Tromey <tom@tromey.com>
2537 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2538 inferior_ptid on error.
2540 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2541 Simon Marchi <simon.marchi@polymtl.ca>
2544 * disasm.h (gdb_disassembler): Add
2545 `m_disassembler_options_holder'. member
2546 * disasm.c (get_all_disassembler_options): New function.
2547 (gdb_disassembler::gdb_disassembler): Use it.
2548 (gdb_buffered_insn_length_init_dis): Likewise.
2549 (gdb_buffered_insn_length): Adjust accordingly.
2550 (set_disassembler_options): Handle options with arguments.
2551 (show_disassembler_options_sfunc): Likewise. Add a leading new
2552 line if showing options with descriptions.
2553 (disassembler_options_completer): Adapt to using the
2554 `disasm_options_and_args_t' structure.
2555 * mips-tdep.c (mips_disassembler_options): New variable.
2556 (mips_disassembler_options_o32): Likewise.
2557 (mips_disassembler_options_n32): Likewise.
2558 (mips_disassembler_options_n64): Likewise.
2559 (gdb_print_insn_mips): Don't set `disassembler_options'.
2560 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2562 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2563 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2564 `gdbarch_disassembler_options_implicit' and
2565 `gdbarch_valid_disassembler_options'.
2566 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2567 `disasm_options_and_args_t' structure.
2568 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2570 (valid_disassembler_options): Switch from `disasm_options_t' to
2571 the `disasm_options_and_args_t' structure.
2572 * NEWS: Document `set disassembler-options' support for the MIPS
2574 * gdbarch.h: Regenerate.
2575 * gdbarch.c: Regenerate.
2577 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2579 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2581 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2583 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2584 parameter in call to amd64_target_description.
2585 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2586 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2587 (amd64fbsd_init_abi): Likewise.
2588 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2589 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2590 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2591 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2593 2018-06-29 Pedro Alves <palves@redhat.com>
2595 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2596 "segments" parameter.
2597 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2598 (_initialize_amd64_tdep): Update call to
2599 amd64_create_target_description.
2600 (amd64_target_description): Add "segments" parameter. Adjust
2601 the implementation to use it.
2602 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2603 call to amd64_create_target_description.
2604 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2605 * gdb/arch/amd64.h (amd64_create_target_description): Add
2606 "segments" register.
2607 * gdb/arch/amd64.c (amd64_create_target_description): Add
2608 "segments" parameter. Call create_feature_i386_64bit_segments
2609 only if SEGMENTS is true.
2610 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2611 call to amd64_create_target_description.
2613 2018-06-29 Pedro Alves <palves@redhat.com>
2615 * thread.c (thread_target_id_str): New, factored out from ...
2616 (print_thread_info_1): ... here. Use it to compute the max
2617 "Target Id" column width.
2619 2018-06-29 Pedro Alves <palves@redhat.com>
2621 * remote.c (remote_target::extra_thread_info): Delete
2622 'display_buf' and 'n' locals. from the cache, regardless of
2623 packet mechanims is in use. Use cache for qThreadExtra and qP
2626 2018-06-29 Pedro Alves <palves@redhat.com>
2628 * blockframe.c (find_pc_sect_containing_function): New function.
2629 * breakpoint.c (print_breakpoint_location): Don't call
2630 find_pc_sect_function.
2631 * linespec.c (create_sals_line_offset): Record the location's
2633 * linespec.c (convert_address_location_to_sals): Fill in sal's
2634 symbol with find_pc_sect_containing_function.
2635 * symtab.c (find_function_start_sal): Rename to ...
2636 (find_function_start_sal_1): ... this.
2637 (find_function_start_sal): Reimplement as wrapper around
2638 find_function_start_sal_1, and use
2639 find_pc_sect_containing_function to fill in the sal's symbol.
2640 (find_function_start_sal(symbol*, bool)): Adjust.
2641 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2643 (find_pc_sect_containing_function): Declare.
2645 2018-06-29 Pedro Alves <palves@redhat.com>
2647 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2648 true if the the location has no symbol.
2650 2018-06-28 Tom Tromey <tom@tromey.com>
2652 * NEWS: Mention --enable-codesign.
2653 * silent-rules.mk (ECHO_SIGN): New variable.
2654 * configure.ac: Add --enable-codesign.
2655 * configure: Rebuild.
2656 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2657 (gdb$(EXEEXT)): Optionally invoke codesign.
2659 2018-06-28 Pedro Alves <palves@redhat.com>
2661 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2663 (switch_to_thread_no_regs): Adjust comment.
2664 * infcmd.c (stop_pc): Delete.
2665 (post_create_inferior, info_program_command): Replace references
2666 to stop_pc with references to thread_info->suspend.stop_pc.
2667 * inferior.h (stop_pc): Delete declaration.
2668 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2669 (handle_inferior_event_1, handle_signal_stop)
2670 (process_event_stop_test, keep_going_stepped_thread)
2671 (handle_step_into_function, handle_step_into_function_backward)
2672 (print_stop_location): Replace references to stop_pc with
2673 references to thread_info->suspend.stop_pc.
2674 (struct infcall_suspend_state) <stop_pc>: Delete field.
2675 (save_infcall_suspend_state, restore_infcall_suspend_state):
2676 Remove references to inf_stat->stop_pc.
2677 * linux-fork.c (fork_load_infrun_state): Likewise.
2678 * record-btrace.c (record_btrace_set_replay): Likewise.
2679 * record-full.c (record_full_goto_entry): Likewise.
2680 * remote.c (print_one_stopped_thread): Likewise.
2681 * target.c (target_resume): Extend comment.
2682 * thread.c (set_executing_thread): New.
2683 (set_executing): Use it.
2684 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2685 Remove references to stop_pc.
2687 2018-06-28 Pedro Alves <palves@redhat.com>
2689 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2690 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2692 2018-06-28 Tom Tromey <tom@tromey.com>
2694 * coffread.c (coff_symfile_finish): Update.
2695 * xcoffread.c (xcoff_symfile_finish): Update.
2696 * elfread.c (elf_symfile_finish): Update.
2697 * symfile.h (dwarf2_free_objfile): Don't declare.
2698 * dwarf2read.c (_initialize_dwarf2_read): Use
2699 register_objfile_data_with_cleanup.
2700 (dwarf2_free_objfile): Now static. Change signature.
2702 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2704 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2705 option "-o" to add-symbol-file-load to add an offset to each
2706 section's load address.
2707 * symfile.c (set_objfile_default_section_offset): New function.
2709 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2711 * symfile.c (add_symbol_file_command): Make sure that sections
2712 with the same name are sorted in the same order.
2714 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2716 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2717 require the second argument. If omitted, load sections at the
2718 addresses specified in the file.
2720 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2722 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2723 (_initialize_symfile): Add option "-o" to symbol-file to add an
2724 offset to each section of the symbol file.
2726 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2728 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2730 2018-06-27 Tom Tromey <tom@tromey.com>
2732 * stack.c (_initialize_stack): Update "func" help text.
2734 2018-06-27 Tom Tromey <tom@tromey.com>
2736 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2738 (unwind_infopy_str, pyuw_create_unwind_info)
2739 (unwind_infopy_add_saved_register, pyuw_sniffer)
2740 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2742 (struct saved_reg): Add constructor.
2743 <value>: Now a gdbpy_ref<>.
2745 2018-06-27 Tom Tromey <tom@tromey.com>
2747 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2749 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2751 * gdb-gdb.py.in: Format using autopep8.
2753 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2755 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2756 (type_lookup_function): Recognize CORE_ADDR values.
2758 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2760 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2763 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2765 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2768 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2770 * gdb-gdb.py: Move to...
2771 * gdb-gdb.py.in: ... here.
2772 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2773 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2775 (distclean): Remove gdb-gdb.py when cleaning.
2776 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2777 * configure: Re-generate.
2779 2018-06-27 Pedro Alves <palves@redhat.com>
2781 * proc-service.c (get_ps_regcache): New.
2782 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2783 (ps_lsetfpregs): Use it.
2785 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2788 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2789 (dwarf_decode_lines_1): Adjust.
2791 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2793 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2795 <info_proc>: Likewise.
2797 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2799 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2800 to windows_fetch_one_register, and only handle the case of
2801 fetching one register. Move the code that reloads the context
2802 and iterates over all registers if R is negative to...
2803 (windows_nat_target::fetch_registers): ... here.
2804 (do_windows_store_inferior_registers): Rename to
2805 windows_store_one_register, and only handle the case of storing
2806 one register. Move the code that handles the case where r is
2808 (windows_nat_target::store_registers) ... here.
2810 2018-06-26 Tom Tromey <tom@tromey.com>
2813 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2814 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2816 (rust_internal_print_type): Add podata parameter.
2817 (rust_print_type): Update.
2819 2018-06-26 Tom Tromey <tom@tromey.com>
2821 * typeprint.h (struct print_offset_data) <update, finish,
2822 maybe_print_hole>: New methods.
2823 <indentation>: New constant.
2824 * typeprint.c (print_offset_data::indentation): Define.
2825 (print_offset_data::maybe_print_hole, print_offset_data::update)
2826 (print_offset_data::finish): Move from c-typeprint.c and rename.
2827 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2828 (print_spaces_filtered_with_print_options): Update.
2829 (c_print_type_union_field_offset, maybe_print_hole)
2830 (c_print_type_struct_field_offset): Move to typeprint.c and
2832 (c_type_print_base_struct_union): Update.
2834 2018-06-25 Pedro Alves <palves@redhat.com>
2836 * gdbthread.h (thread_info_ref, delete_thread)
2837 (delete_thread_silent, first_thread_of_inferior)
2838 (any_thread_of_inferior, switch_to_thread)
2839 (enable_thread_stack_temporaries)
2840 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2841 (get_last_thread_stack_temporary)
2842 (value_in_thread_stack_temporaries, can_access_registers_thread):
2843 Spell out "struct thread_info" instead of just "thread_info".
2844 * inferior.h (notice_new_inferior): Likewise.
2846 2018-06-25 Pedro Alves <palves@redhat.com>
2848 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2849 pass thread_info pointer to delete_thread.
2850 (windows_nat_target::detach): Pass inferior pointer to
2852 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2854 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2855 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2856 and pass a thread_info pointer to delete_thread.
2857 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2858 pass thread_info pointer to delete_thread.
2859 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2860 delete_thread_silent call.
2861 * procfs.c (procfs_target::detach): Pass inferior pointer to
2863 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2864 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2865 delete_thread_silent call.
2866 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2867 pass thread_info pointer to delete_thread.
2868 (windows_nat_target::detach): Pass inferior pointer to
2871 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2873 * regcache.c (readable_regcache::read_part): Fix asserts.
2874 (reg_buffer::raw_collect_part): New function.
2875 (regcache::write_part): Fix asserts.
2876 (reg_buffer::raw_supply_part): New function.
2877 (regcache::transfer_regset_register): New helper function.
2878 (regcache::transfer_regset): Call new functions.
2879 (regcache_supply_regset): Use gdb_byte*.
2880 (regcache::supply_regset): Likewise.
2881 (regcache_collect_regset): Likewise.
2882 (regcache::collect_regset): Likewise.
2883 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2884 (reg_buffer::raw_supply_part): Likewise.
2885 (regcache::transfer_regset_register): Likewise.
2886 (regcache::transfer_regset): Use gdb_byte*.
2888 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2890 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2892 2018-06-21 Pedro Alves <palves@redhat.com>
2894 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2895 instead of a ptid_t. All callers adjusted.
2896 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2898 (print_ada_task_info, display_current_task_id, task_command_1):
2900 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2902 (breakpoint_kind): Adjust.
2903 (remove_breakpoints_pid): Rename to ...
2904 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2905 pointer. All callers adjusted.
2906 (bpstat_clear_actions): Use inferior_thread.
2907 (get_bpstat_thread): New.
2908 (bpstat_do_actions): Use it.
2909 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2910 to take a thread_info pointer. All callers adjusted.
2911 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2912 (breakpoint_re_set_thread): Use inferior_thread.
2913 * breakpoint.h (struct inferior): Forward declare.
2914 (bpstat_stop_status): Update.
2915 (remove_breakpoints_pid): Delete.
2916 (remove_breakpoints_inf): New.
2917 * bsd-uthread.c (bsd_uthread_target::wait)
2918 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2919 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2920 (maint_btrace_packet_history_cmd)
2921 (maint_btrace_clear_packet_history_cmd): Adjust.
2922 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2924 * cli/cli-interp.c: Include "inferior.h".
2925 * common/refcounted-object.h (struct
2926 refcounted_object_ref_policy): New.
2927 * compile/compile-object-load.c: Include gdbthread.h.
2928 (store_regs): Use inferior_thread.
2929 * corelow.c (core_target::close): Use current_inferior.
2930 (core_target_open): Adjust to use first_thread_of_inferior and use
2931 the current inferior.
2932 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2933 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2934 <thread>: ... this new field. All references adjusted.
2935 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2936 Take a thread_info pointer instead of a ptid_t.
2937 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2938 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2939 thread_info pointer instead of a ptid_t.
2940 * elfread.c: Include "inferior.h".
2941 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2942 Use inferior_thread.
2943 * eval.c (evaluate_subexp): Likewise.
2944 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2946 * gdb_proc_service.h (struct thread_info): Forward declare.
2947 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2948 <thread>: ... this new field. All references adjusted.
2949 * gdbarch.h, gdbarch.c: Regenerate.
2950 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2951 'thread' parameter. All implementations and callers adjusted.
2952 * gdbthread.h (thread_info) <set_running>: New method.
2953 (delete_thread, delete_thread_silent): Take a thread_info pointer
2955 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2956 (first_thread_of_process): Delete, replaced by ...
2957 (first_thread_of_inferior): ... this new function. All callers
2959 (any_live_thread_of_process): Delete, replaced by ...
2960 (any_live_thread_of_inferior): ... this new function. All callers
2962 (switch_to_thread, switch_to_no_thread): Declare.
2963 (is_executing): Delete.
2964 (enable_thread_stack_temporaries): Update comment.
2965 <enable_thread_stack_temporaries>: Take a thread_info pointer
2966 instead of a ptid_t. Incref the thread.
2967 <~enable_thread_stack_temporaries>: Decref the thread.
2970 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2971 (get_last_thread_stack_temporary)
2972 (value_in_thread_stack_temporaries, can_access_registers_thread):
2973 Take a thread_info pointer instead of a ptid_t. All callers
2975 * infcall.c (get_call_return_value): Use inferior_thread.
2976 (run_inferior_call): Work with thread pointers instead of ptid_t.
2977 (call_function_by_hand_dummy): Work with thread pointers instead
2978 of ptid_t. Use thread_info_ref.
2979 * infcmd.c (proceed_thread_callback): Access thread's state
2981 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2982 access thread's state directly.
2983 (continue_command): Use inferior_thread.
2984 (info_program_command): Use find_thread_ptid and access thread
2986 (proceed_after_attach_callback): Use thread state directly.
2987 (notice_new_inferior): Take a thread_info pointer instead of a
2988 ptid_t. All callers adjusted.
2989 (exit_inferior): Take an inferior pointer instead of a pid. All
2991 (exit_inferior_silent): New.
2992 (detach_inferior): Delete.
2993 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2994 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2995 (detach_inferior_command, kill_inferior_command): Use
2996 find_inferior_id instead of valid_gdb_inferior_id and
2997 gdb_inferior_id_to_pid.
2998 (inferior_command): Use inferior and thread pointers.
2999 * inferior.h (struct thread_info): Forward declare.
3000 (notice_new_inferior): Take a thread_info pointer instead of a
3001 ptid_t. All callers adjusted.
3002 (detach_inferior): Delete declaration.
3003 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3004 instead of a pid. All callers adjusted.
3005 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3006 (valid_gdb_inferior_id): Delete.
3007 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3008 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3009 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3011 <inf>: ... this new field.
3012 <step_ptid>: Delete, replaced by ...
3013 <step_thread>: ... this new field.
3014 (get_displaced_stepping_state): Take an inferior pointer instead
3015 of a pid. All callers adjusted.
3016 (displaced_step_in_progress_any_inferior): Adjust.
3017 (displaced_step_in_progress_thread): Take a thread pointer instead
3018 of a ptid_t. All callers adjusted.
3019 (displaced_step_in_progress, add_displaced_stepping_state): Take
3020 an inferior pointer instead of a pid. All callers adjusted.
3021 (get_displaced_step_closure_by_addr): Adjust.
3022 (remove_displaced_stepping_state): Take an inferior pointer
3023 instead of a pid. All callers adjusted.
3024 (displaced_step_prepare_throw, displaced_step_prepare)
3025 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3026 All callers adjusted.
3027 (start_step_over): Adjust.
3028 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3029 displaced step queue.
3030 (do_target_resume): Adjust.
3031 (fetch_inferior_event): Use inferior_thread.
3032 (context_switch, get_inferior_stop_soon): Take an
3033 execution_control_state pointer instead of a ptid_t. All callers
3035 (switch_to_thread_cleanup): Delete.
3036 (stop_all_threads): Use scoped_restore_current_thread.
3037 * inline-frame.c: Include "gdbthread.h".
3038 (inline_state) <inline_state>: Take a thread pointer instead of a
3039 ptid_t. All callers adjusted.
3040 <ptid>: Delete, replaced by ...
3041 <thread>: ... this new field.
3042 (find_inline_frame_state): Take a thread pointer instead of a
3043 ptid_t. All callers adjusted.
3044 (skip_inline_frames, step_into_inline_frame)
3045 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3046 pointer instead of a ptid_t. All callers adjusted.
3047 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3048 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3049 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3051 * linux-nat.c (get_detach_signal): Likewise.
3052 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3053 (thread_db_notice_clone): Adjust.
3054 (thread_db_find_new_threads_silently)
3055 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3056 a thread pointer instead of a ptid_t. All callers adjusted.
3057 * mi/mi-cmd-var.c: Include "inferior.h".
3058 (mi_cmd_var_update_iter): Update to use thread pointers.
3059 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3061 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3063 (mi_output_running): ... this new function.
3064 (mi_on_resume_1): Adjust to use it.
3065 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3066 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3068 (interrupt_thread_callback): : Adjust to use thread and inferior
3070 * proc-service.c: Include "gdbthread.h".
3071 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3072 * progspace-and-thread.c: Include "inferior.h".
3073 * progspace.c: Include "inferior.h".
3074 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3075 hold a reference to an inferior_object.
3076 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3078 * python/py-inferior.c (struct inferior_object): Give the type a
3079 tag name instead of a typedef.
3080 (python_on_normal_stop): No need to check if the current thread is
3082 (inferior_to_inferior_object): Change return type to
3083 inferior_object. All callers adjusted.
3084 (find_thread_object): Delete, bits factored out to ...
3085 (thread_to_thread_object): ... this new function.
3086 * python/py-infthread.c (create_thread_object): Use
3087 inferior_to_inferior_object.
3088 (thpy_is_stopped): Use thread pointer directly.
3089 (gdbpy_selected_thread): Use inferior_thread.
3090 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3091 field, replaced with ...
3092 <thread>: ... this new field. All users adjusted.
3093 (btpy_insn_or_gap_new): Drop const.
3094 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3096 * python/py-record.c: Include "gdbthread.h".
3097 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3098 a ptid_t. All callers adjusted.
3099 (gdbpy_current_recording): Use inferior_thread.
3100 * python/py-record.h (recpy_record_object) <ptid>: Delete
3101 field, replaced with ...
3102 <thread>: ... this new field. All users adjusted.
3103 (recpy_element_object) <ptid>: Delete
3104 field, replaced with ...
3105 <thread>: ... this new field. All users adjusted.
3106 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3107 a ptid_t. All callers adjusted.
3108 * python/py-threadevent.c: Include "gdbthread.h".
3109 (get_event_thread): Use thread_to_thread_object.
3110 * python/python-internal.h (struct inferior_object): Forward
3112 (find_thread_object, find_inferior_object): Delete declarations.
3113 (thread_to_thread_object, inferior_to_inferior_object): New
3115 * record-btrace.c: Include "inferior.h".
3116 (require_btrace_thread): Use inferior_thread.
3117 (record_btrace_frame_sniffer)
3118 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3119 (get_thread_current_frame): Use scoped_restore_current_thread and
3121 (get_thread_current_frame): Use thread pointer directly.
3122 (record_btrace_replay_at_breakpoint): Use thread's inferior
3124 * record-full.c: Include "inferior.h".
3125 * regcache.c: Include "gdbthread.h".
3126 (get_thread_arch_regcache): Use the inferior's address space
3128 (get_thread_regcache, registers_changed_thread): New.
3129 * regcache.h (get_thread_regcache(thread_info *thread)): New
3131 (registers_changed_thread): New.
3132 (remote_target) <remote_detach_1>: Swap order of parameters.
3133 (remote_add_thread): <remote_add_thread>: Return the new thread.
3134 (get_remote_thread_info(ptid_t)): New overload.
3135 (remote_target::remote_notice_new_inferior): Use thread pointers
3137 (remote_target::process_initial_stop_replies): Use
3138 thread_info::set_running.
3139 (remote_target::remote_detach_1, remote_target::detach)
3140 (extended_remote_target::detach): Adjust.
3141 * stack.c (frame_show_address): Use inferior_thread.
3142 * target-debug.h (target_debug_print_thread_info_pp): New.
3143 * target-delegates.c: Regenerate.
3144 * target.c (default_thread_address_space): Delete.
3145 (memory_xfer_partial_1): Use current_inferior.
3146 (target_detach): Use current_inferior.
3147 (target_thread_address_space): Delete.
3148 (generic_mourn_inferior): Use current_inferior.
3149 * target.h (struct target_ops) <thread_address_space>: Delete.
3150 (target_thread_address_space): Delete.
3151 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3153 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3154 thread pointer instead of a ptid_t. Adjust all callers.
3155 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3156 (first_thread_of_process): Delete, replaced by ...
3157 (first_thread_of_inferior): ... this new function. All callers
3159 (any_thread_of_process): Rename to ...
3160 (any_thread_of_inferior): ... this, and take an inferior pointer.
3161 (any_live_thread_of_process): Rename to ...
3162 (any_live_thread_of_inferior): ... this, and take an inferior
3164 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3165 (value_in_thread_stack_temporaries)
3166 (get_last_thread_stack_temporary): Take a thread pointer instead
3167 of a ptid_t. Adjust all callers.
3168 (thread_info::set_running): New.
3169 (validate_registers_access): Use inferior_thread.
3170 (can_access_registers_ptid): Rename to ...
3171 (can_access_registers_thread): ... this, and take a thread
3173 (print_thread_info_1): Adjust to compare thread pointers instead
3175 (switch_to_no_thread, switch_to_thread): Make extern.
3176 (scoped_restore_current_thread::~scoped_restore_current_thread):
3177 Use m_thread pointer directly.
3178 (scoped_restore_current_thread::scoped_restore_current_thread):
3179 Use inferior_thread.
3180 (thread_command): Use thread pointer directly.
3181 (thread_num_make_value_helper): Use inferior_thread.
3182 * top.c (execute_command): Use inferior_thread.
3183 * tui/tui-interp.c: Include "inferior.h".
3184 * varobj.c (varobj_create): Use inferior_thread.
3185 (value_of_root_1): Use find_thread_global_id instead of
3186 global_thread_id_to_ptid.
3188 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3190 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3192 (regcache::write_part): Likewise.
3193 (readable_regcache::cooked_read_part): Update comment.
3194 (readable_regcache::cooked_write_part): Likewise.
3195 * regcache.h: (readable_regcache::read_part): Likewise.
3196 (regcache::write_part): Likewise.
3198 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3199 Dirk Schubert <dirk.schubert@arm.com>
3201 * aarch64-linux-nat.c (post_attach): New.
3202 (aarch64_linux_nat_target::post_attach): Override post_attach to
3203 record the number of hardware debug registers.
3205 2018-06-20 Tom Tromey <tom@tromey.com>
3207 * python/py-param.c (add_setshow_generic): Make parameters const.
3208 (parmpy_init): Update.
3210 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3212 * regcache.h (regcache_cooked_read_ftype): Rename to...
3213 (register_read_ftype): ...this, change type to function_view.
3214 (class reg_buffer) <save>: Remove src parameter.
3215 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3216 parameter non-const in first overload. Remove src parameter in
3218 * regcache.c (do_cooked_read): Remove.
3219 (readonly_detached_regcache::readonly_detached_regcache): Make
3220 parameter non-const, adjust call to other constructor.
3221 (reg_buffer::save): Remove src parameter.
3222 * frame.c (do_frame_register_read): Remove.
3223 (frame_save_as_regcache): Use lambda function.
3224 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3225 parameter to ppu2spu_data *.
3226 (ppu2spu_sniffer): Use lambda function.
3228 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3230 * record-full.c (record_full_target::insert_breakpoint): Remove
3231 "struct" keyword, add const.
3233 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3235 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3236 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3237 * configure.ac: Remove AC_PREREQ, add missing quoting.
3238 * gnulib/configure.ac: Modernize usage of
3239 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3240 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3241 (AUTOMAKE_VERSION): Bump to 1.15.1.
3242 * configure: Re-generate.
3243 * config.in: Re-generate.
3244 * aclocal.m4: Re-generate.
3245 * gnulib/aclocal.m4: Re-generate.
3246 * gnulib/config.in: Re-generate.
3247 * gnulib/configure: Re-generate.
3248 * gnulib/import/Makefile.in: Re-generate.
3250 2018-06-19 Pedro Alves <palves@redhat.com>
3252 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3253 (lookup_minimal_symbol_by_pc_section): ... here with
3254 gdb_assert_not_reached added.
3256 2018-06-19 Pedro Alves <palves@redhat.com>
3258 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3259 parameter with a block parameter. Compare location's block symbol
3260 with the frame's block instead of addresses.
3261 (skip_inline_frames): Pass the current block instead of the
3262 frame's address. Break out as soon as we determine the frame
3263 should not be skipped.
3265 2018-06-18 Tom Tromey <tom@tromey.com>
3267 * solib-aix.c (solib_aix_get_section_offsets): Return
3269 (solib_aix_solib_create_inferior_hook): Update.
3271 2018-06-18 Tom Tromey <tom@tromey.com>
3273 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3275 2018-06-18 Tom Tromey <tom@tromey.com>
3277 * solib-frv.c (frv_relocate_main_executable): Use
3279 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3282 2018-06-18 Tom Tromey <tom@tromey.com>
3284 * objfiles.h (inhibit_section_map_updates): Update.
3285 (resume_section_map_updates, resume_section_map_updates_cleanup):
3287 * solib-svr4.c (svr4_handle_solib_event): Update.
3288 * objfiles.c (inhibit_section_map_updates): Return
3289 scoped_restore_tmpl<int>.
3290 (resume_section_map_updates, resume_section_map_updates_cleanup):
3293 2018-06-18 Tom Tromey <tom@tromey.com>
3295 * valprint.h (read_string): Update.
3296 * valprint.c (read_string): Change type of "buffer".
3297 (val_print_string): Update.
3298 * python/py-value.c (valpy_string): Update.
3299 * language.h (struct language_defn) <la_get_string>: Change
3301 (default_get_string, c_get_string): Update.
3302 * language.c (default_get_string): Change type of "buffer".
3303 * guile/scm-value.c (gdbscm_value_to_string): Update.
3304 * c-lang.c (c_get_string): Change type of "buffer".
3306 2018-06-18 Tom Tromey <tom@tromey.com>
3308 * ser-mingw.c (struct pipe_state_destroyer): New.
3309 (pipe_state_up): New typedef.
3310 (cleanup_pipe_state): Remove.
3311 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3313 2018-06-18 Tom Tromey <tom@tromey.com>
3315 * rust-lang.h (rust_yyerror): Don't declare.
3316 * rust-lang.c (rust_language_defn): Update.
3317 * rust-exp.y (yyerror): Now static.
3318 * parse.c (parse_exp_in_context_1): Update.
3319 * p-lang.h (p_yyerror): Don't declare.
3320 * p-lang.c (p_language_defn): Update.
3321 * p-exp.y (yyerror): Now static.
3322 * opencl-lang.c (opencl_language_defn): Update.
3323 * objc-lang.c (objc_language_defn): Update.
3324 * m2-lang.h (m2_yyerror): Don't declare.
3325 * m2-lang.c (m2_language_defn): Update.
3326 * m2-exp.y (yyerror): Now static.
3327 * language.h (struct language_defn) <la_error>: Remove.
3328 * language.c (unk_lang_error): Remove.
3329 (unknown_language_defn, auto_language_defn): Remove.
3330 * go-lang.h (go_yyerror): Don't declare.
3331 * go-lang.c (go_language_defn): Update.
3332 * go-exp.y (yyerror): Now static.
3333 * f-lang.h (f_yyerror): Don't declare.
3334 * f-lang.c (f_language_defn): Update.
3335 * f-exp.y (yyerror): Now static.
3336 * d-lang.h (d_yyerror): Don't declare.
3337 * d-lang.c (d_language_defn): Update.
3338 * d-exp.y (yyerror): Now static.
3339 * c-lang.h (c_yyerror): Don't declare.
3340 * c-lang.c (c_language_defn, cplus_language_defn)
3341 (asm_language_defn, minimal_language_defn): Update.
3342 * c-exp.y (yyerror): Now static.
3343 * ada-lang.h (ada_yyerror): Don't declare.
3344 * ada-lang.c (ada_language_defn): Update.
3345 * ada-exp.y (yyerror): Now static.
3347 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3349 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3350 (store_sveregs_to_thread): Likewise.
3351 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3352 (aarch64_linux_store_inferior_registers): Likewise.
3353 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3355 (aarch64_sve_regs_copy_to_regcache): Likewise.
3356 (aarch64_sve_regs_copy_from_regcache): Likewise.
3357 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3359 (aarch64_sve_regs_copy_to_regcache): Likewise.
3360 (aarch64_sve_regs_copy_from_regcache): Likewise.
3361 (sve_context): Structure from Linux headers.
3362 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3363 (SVE_SIG_ZREG_SIZE): Likewise.
3364 (SVE_SIG_PREG_SIZE): Likewise.
3365 (SVE_SIG_FFR_SIZE): Likewise.
3366 (SVE_SIG_REGS_OFFSET): Likewise.
3367 (SVE_SIG_ZREGS_OFFSET): Likewise.
3368 (SVE_SIG_ZREG_OFFSET): Likewise.
3369 (SVE_SIG_ZREGS_SIZE): Likewise.
3370 (SVE_SIG_PREGS_OFFSET): Likewise.
3371 (SVE_SIG_PREG_OFFSET): Likewise.
3372 (SVE_SIG_PREGS_SIZE): Likewise.
3373 (SVE_SIG_FFR_OFFSET): Likewise.
3374 (SVE_SIG_REGS_SIZE): Likewise.
3375 (SVE_SIG_CONTEXT_SIZE): Likewise.
3376 (SVE_PT_REGS_MASK): Likewise.
3377 (SVE_PT_REGS_FPSIMD): Likewise.
3378 (SVE_PT_REGS_SVE): Likewise.
3379 (SVE_PT_VL_INHERIT): Likewise.
3380 (SVE_PT_VL_ONEXEC): Likewise.
3381 (SVE_PT_REGS_OFFSET): Likewise.
3382 (SVE_PT_FPSIMD_OFFSET): Likewise.
3383 (SVE_PT_FPSIMD_SIZE): Likewise.
3384 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3385 (SVE_PT_SVE_PREG_SIZE): Likewise.
3386 (SVE_PT_SVE_FFR_SIZE): Likewise.
3387 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3388 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3389 (__SVE_SIG_TO_PT): Likewise.
3390 (SVE_PT_SVE_OFFSET): Likewise.
3391 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3392 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3393 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3394 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3395 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3396 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3397 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3398 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3399 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3400 (SVE_PT_SVE_SIZE): Likewise.
3401 (SVE_PT_SIZE): Likewise.
3402 (HAS_SVE_STATE): New define.
3404 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3406 * nat/aarch64-sve-linux-sigcontext.h: New file.
3407 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3409 (SVE_VQ_MIN): Likewise.
3410 (SVE_VQ_MAX): Likewise.
3411 (SVE_VL_MIN): Likewise.
3412 (SVE_VL_MAX): Likewise.
3413 (SVE_NUM_ZREGS): Likewise.
3414 (SVE_NUM_PREGS): Likewise.
3415 (sve_vl_valid): Likewise.
3416 (struct user_sve_header): Likewise.
3418 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3419 Richard Bunt <Richard.Bunt@arm.com>
3421 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3422 was requested by GDB.
3424 2018-06-15 Tom de Vries <tdevries@suse.de>
3426 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3428 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3430 * gnulib/update-gnulib.sh: Print expected versions of
3433 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3435 * arch-utils.c (default_type_align): Use type_length_units.
3436 * gdbtypes.c (type_align): Use type_length_units.
3438 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3440 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3441 of 'define' command.
3443 2018-06-14 Tom de Vries <tdevries@suse.de>
3446 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3447 get_no_prettyformat_print_options.
3449 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3451 * sparc-nat.h: Include target.h.
3452 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3453 <fetch_registers>: Remove this argument in function call.
3454 <store_registers>: Remove this argument in function call, remove
3456 <low_forget_process>: Call sparc64_forget_process instead of
3457 sparc_forget_process.
3459 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3461 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3462 (procfs_target::make_corefile_notes): Adjust to new
3463 target_read_alloc return type.
3465 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3466 Stephen Roberts <stephen.roberts@arm.com>
3469 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3470 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3471 Move should_notify_stop local into more inner scope.
3473 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3474 Stephen Roberts <stephen.roberts@arm.com>
3477 * infrun.c (resume_1): Add call to mark_async_event_handler.
3479 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3481 * infrun.c (do_target_wait): Change old version of $pc printed.
3483 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3485 * dwarf2read.c (read_index_from_section): Rename to...
3486 (read_gdb_index_from_section): ... this, update all callers.
3487 (dwarf2_read_index): Rename to...
3488 (dwarf2_read_gdb_index): ... this, update all callers.
3490 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3492 * gdb/hppa-linux-nat.c
3493 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3494 hppa_linux_nat_target::fetch_registers.
3496 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3498 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3499 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3500 (AARCH64_DWARF_SVE_FFR): Likewise.
3501 (AARCH64_DWARF_SVE_P0): Likewise.
3502 (AARCH64_DWARF_SVE_Z0): Likewise.
3504 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3506 * common/common-regcache.h (raw_compare): New function.
3507 * regcache.c (regcache::raw_compare): Likewise.
3508 * regcache.h (regcache::raw_compare): New declaration.
3510 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3512 * common/common-regcache.h (reg_buffer_common): New structure.
3513 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3514 (reg_buffer::raw_supply): Likewise.
3515 (reg_buffer::raw_supply_integer): Likewise.
3516 (reg_buffer::raw_supply_zeroed): Likewise.
3517 (reg_buffer::raw_collect): Likewise.
3518 (reg_buffer::raw_collect_integer): Likewise.
3519 * regcache.h (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.
3526 2018-06-10 Tom Tromey <tom@tromey.com>
3528 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3529 (class remote_state) <stop_reply_queue>: Now std::vector.
3530 (remote_state::~remote_state)
3531 (remote_target::stop_reply_queue_length): Update.
3532 (struct queue_iter_param, remove_child_of_pending_fork)
3533 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3534 (check_pending_event_prevents_wildcard_vcont_callback)
3535 (remove_stop_reply_for_inferior)
3536 (remove_stop_reply_of_remote_state)
3537 (remote_notif_remove_once_on_match)
3538 (stop_reply_match_ptid_and_ws)
3539 (remote_kill_child_of_pending_fork): Remove.
3540 (remote_target::remove_new_fork_children)
3541 (remote_target::check_pending_events_prevent_wildcard_vcont)
3542 (remote_target::discard_pending_stop_replies)
3543 (remote_target::discard_pending_stop_replies_in_queue)
3544 (remote_target::remote_notif_remove_queued_reply)
3545 (remote_target::queued_stop_reply)
3546 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3547 (remote_target::wait, remote_target::kill_new_fork_children)
3548 (remote_target::async): Update.
3550 2018-06-10 Tom Tromey <tom@tromey.com>
3552 * record-full.c (record_full_arch_list_cleanups): Remove.
3553 (record_full_message): Use try/catch.
3554 (record_full_wait_cleanups): Remove.
3555 (record_full_wait_1): Use try/catch.
3556 (record_full_restore): Likewise.
3558 2018-06-10 Tom Tromey <tom@tromey.com>
3560 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3561 declare VEC. Add constructor.
3562 <in_target_beneath>: Now bool.
3563 (record_full_breakpoints): Now a std::vector, static.
3564 (record_full_sync_record_breakpoints)
3565 (record_full_init_record_breakpoints)
3566 (record_full_target::insert_breakpoint)
3567 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3569 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3571 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3572 * serial.c (serial_interface_lookup): Remove struct keyword.
3574 2018-06-10 Tom Tromey <tom@tromey.com>
3576 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3578 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3580 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3582 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3583 "beneath" as a method.
3584 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3585 Use "beneath" as a method.
3587 2018-06-10 Tom Tromey <tom@tromey.com>
3589 * tracefile.c (struct trace_file_writer_deleter): New.
3590 <operator()>: Rename from trace_file_writer_xfree.
3591 (trace_file_writer_up): New typedef.
3592 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3594 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3596 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3597 <m_registers, m_register_status>: Change type to
3599 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3602 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3604 * common/common-regcache.h (enum register_status): Add
3605 underlying type "signed char".
3606 * regcache.h (reg_buffer) <m_register_status>: Change type to
3608 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3609 register_status instead of signed char.
3610 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3611 (reg_buffer::get_register_status): Remove cast.
3612 (readable_regcache::raw_read): Remove cast.
3613 (readable_regcache::cooked_read): Remove cast.
3615 2018-06-09 Tom Tromey <tom@tromey.com>
3617 * source.c (reverse_search_command, forward_search_command): Use
3620 2018-06-09 Tom Tromey <tom@tromey.com>
3622 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3623 (serial_ops_list): Now static, std::vector.
3624 (serial_interface_lookup, serial_add_interface): Update.
3626 2018-06-09 Tom Tromey <tom@tromey.com>
3628 * dwarf2read.c (process_cu_includes): Update.
3629 (process_full_comp_unit): Update.
3630 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3633 2018-06-08 Paul Koning <paul_koning@dell.com>
3637 * python/python.c (do_start_initialization):
3638 Avoid call to internal Python API.
3639 (init__gdb_module): New function.
3641 2018-06-08 Gary Benson <gbenson@redhat.com>
3643 * linux-thread-db.c (valprint.h): New include.
3644 (struct check_thread_db_info): New structure.
3645 (check_thread_db_on_load, tdb_testinfo): New static globals.
3646 (check_thread_db, check_thread_db_callback): New functions.
3647 (try_thread_db_load_1): Run integrity checks if requested.
3648 (maintenance_check_libthread_db): New function.
3649 (_initialize_thread_db): Register "maint check libthread-db"
3650 and "maint set/show check-libthread-db".
3651 * NEWS: Mention the above new commands.
3653 2018-06-08 Tom Tromey <tom@tromey.com>
3655 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3658 2018-06-08 Tom Tromey <tom@tromey.com>
3660 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3662 2018-06-08 Tom Tromey <tom@tromey.com>
3664 * common/btrace-common.h (struct btrace_data): Add constructor,
3665 destructor, move assignment operator.
3666 <empty, clear, fini>: New methods.
3667 <format>: Initialize.
3668 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3669 (btrace_data_empty): Don't declare.
3670 * common/btrace-common.c (btrace_data_init): Remove.
3671 (btrace_data::fini): Rename from btrace_data_fini.
3672 (btrace_data::empty): Rename from btrace_data_empty.
3673 (btrace_data::clear): Rename from btrace_data_clear. Return
3675 * btrace.h (make_cleanup_btrace_data): Don't declare.
3676 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3677 (parse_xml_btrace): Update.
3678 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3679 (maint_btrace_clear_packet_history_cmd): Update.
3681 2018-06-07 Pedro Alves <palves@redhat.com>
3683 * target.h (target_ops) <beneath>: Now a method. All references
3685 (class target_stack): New.
3686 * target.c (g_target_stack): New.
3687 (g_current_top_target): Delete.
3688 (current_top_target): Get the top target out of g_target_stack.
3689 (target_stack::push, target_stack::unpush): New.
3690 (push_target, unpush_target): Reimplement.
3691 (target_is_pushed): Reimplement in terms of g_target_stack.
3692 (target_ops::beneath, target_stack::find_beneath): New.
3694 2018-06-07 Pedro Alves <palves@redhat.com>
3696 * target.h (find_target_beneath): Delete declaration.
3697 * target.c (find_target_beneath): Delete definition.
3698 * aix-thread.c: All callers of find_target_beneath adjusted to
3699 call target_ops::beneath instead.
3700 * bsd-uthread.c: Likewise.
3701 * linux-thread-db.c: Likewise.
3702 * ravenscar-thread.c: Likewise.
3703 * sol-thread.c: Likewise.
3704 * spu-multiarch.c: Likewise.
3706 2018-06-07 Pedro Alves <palves@redhat.com>
3708 * target.h (target_ops) <beneath>: Now a method. All references
3710 (target_ops) <m_beneath>: New.
3711 * target.c (target_ops::beneath): New.
3712 * corelow.c: Adjust all references to target_ops::beneath.
3713 * linux-thread-db.c: Likewise.
3714 * make-target-delegates: Likewise.
3715 * record-btrace.c: Likewise.
3716 * record-full.c: Likewise.
3717 * remote.c: Likewise.
3718 * target.c: Likewise.
3719 * target-delegates.c: Regenerate.
3721 2018-06-07 Pedro Alves <palves@redhat.com>
3723 * target.h (target_stack): Delete.
3724 (current_top_target): Declare function.
3725 * target.c (target_stack): Delete.
3726 (g_current_top_target): New.
3727 (current_top_target): New function.
3728 * auxv.c: Use current_top_target instead of target_stack
3730 * avr-tdep.c: Likewise.
3731 * breakpoint.c: Likewise.
3732 * corefile.c: Likewise.
3733 * elfread.c: Likewise.
3735 * exceptions.c: Likewise.
3736 * frame.c: Likewise.
3737 * gdbarch-selftests.c: Likewise.
3738 * gnu-v3-abi.c: Likewise.
3739 * ia64-tdep.c: Likewise.
3740 * ia64-vms-tdep.c: Likewise.
3741 * infcall.c: Likewise.
3742 * infcmd.c: Likewise.
3743 * infrun.c: Likewise.
3744 * linespec.c: Likewise.
3745 * linux-tdep.c: Likewise.
3746 * minsyms.c: Likewise.
3747 * ppc-linux-nat.c: Likewise.
3748 * ppc-linux-tdep.c: Likewise.
3749 * procfs.c: Likewise.
3750 * regcache.c: Likewise.
3751 * remote.c: Likewise.
3752 * rs6000-tdep.c: Likewise.
3753 * s390-linux-nat.c: Likewise.
3754 * s390-tdep.c: Likewise.
3755 * solib-aix.c: Likewise.
3756 * solib-darwin.c: Likewise.
3757 * solib-dsbt.c: Likewise.
3758 * solib-spu.c: Likewise.
3759 * solib-svr4.c: Likewise.
3760 * solib-target.c: Likewise.
3761 * sparc-tdep.c: Likewise.
3762 * sparc64-tdep.c: Likewise.
3763 * spu-tdep.c: Likewise.
3764 * symfile.c: Likewise.
3765 * symtab.c: Likewise.
3766 * target-descriptions.c: Likewise.
3767 * target-memory.c: Likewise.
3768 * target.c: Likewise.
3769 * target.h: Likewise.
3770 * tracefile-tfile.c: Likewise.
3771 * tracepoint.c: Likewise.
3772 * valops.c: Likewise.
3773 * valprint.c: Likewise.
3774 * value.c: Likewise.
3775 * windows-tdep.c: Likewise.
3776 * mi/mi-main.c: Likewise.
3778 2018-06-07 Tom Tromey <tom@tromey.com>
3780 * valprint.h (build_address_symbolic): Declare.
3781 * printcmd.c (print_address_symbolic): Update.
3782 (build_address_symbolic): Change "name" and "filename" to
3784 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3786 * defs.h (build_address_symbolic): Remove declaration.
3788 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3790 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3791 (aarch64_vnv_type): Add function.
3792 (aarch64_pseudo_register_name): Add V regs for SVE.
3793 (aarch64_pseudo_register_type): Likewise.
3794 (aarch64_pseudo_register_reggroup_p): Likewise.
3795 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3796 (aarch64_pseudo_read_value): Add V regs for SVE.
3797 (aarch64_pseudo_write_2): Use V0 offset for SVE
3798 (aarch64_pseudo_write): Add V regs for SVE.
3799 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3801 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3803 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3804 (sve_vl_from_vq): Likewise.
3806 2018-06-05 Tom Tromey <tom@tromey.com>
3808 * cli/cli-cmds.c (show_version): Update.
3809 * top.c (print_gdb_version): Add "interactive" parameter.
3811 * main.c (captured_main_1): Update.
3812 * top.h (print_gdb_version): Add "interactive" parameter and a
3815 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3817 * common/enum-flags.h: Add trailing semicolon to example in
3820 2018-06-05 Tom Tromey <tom@tromey.com>
3823 * NEWS: Add entry about pager.
3824 * utils.c (pagination_disabled_for_command): New global.
3825 (prompt_for_continue): Allow "c" response to prompt.
3826 (reinitialize_more_filter): Clear
3827 pagination_disabled_for_command.
3828 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3830 2018-06-04 Tom Tromey <tom@tromey.com>
3832 * ada-lang.h (ada_lookup_symbol_list): Update.
3833 * ada-lang.c (resolve_subexp): Update.
3834 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3836 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3837 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3838 results parameter to std::vector.
3839 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3841 * ada-exp.y (block_lookup): Update.
3842 (select_possible_type_sym): Change type of syms. Remove nsyms
3844 (write_var_or_type, write_name_assoc): Update.
3846 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3848 * windows-nat.c (windows_nat_target::xfer_partial): Return
3849 TARGET_XFER_E_IO if we need to delegate to the target beneath
3850 but BENEATH is NULL.
3852 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3854 * Makefile.in (config.status): Add configure.nat as a
3857 2018-06-04 Tom Tromey <tom@tromey.com>
3859 * cp-name-parser.y (cpname_state): Add method declarations.
3860 (HANDLE_QUAL): Update.
3861 (cpname_state::d_grab, cpname_state::fill_comp)
3862 (cpname_state::make_operator, cpname_state::make_dtor)
3863 (cpname_state::make_builtin_type, cpname_state::make_name)
3864 (cpname_state::d_qualify, cpname_state::d_int_type)
3865 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3866 (%union): Move earlier.
3868 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3870 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3872 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3874 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3875 (aarch64_pseudo_write_1): Likewise.
3876 (aarch64_pseudo_read_value): Use helper.
3877 (aarch64_pseudo_write): Likewise.
3879 2018-06-04 Pedro Alves <palves@redhat.com>
3881 * darwin-nat.c (darwin_ops): Delete.
3882 (darwin_attach_pid): Use get_native_target.
3884 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3886 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3887 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3889 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3891 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3892 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3893 (aarch64_gdbarch_init): Check for SVE.
3894 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3896 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3898 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3899 * aarch64-tdep.h (aarch64_read_description): Likewise.
3900 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3901 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3902 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3903 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3904 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3906 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3908 * value.c (value_fetch_lazy_bitfield): New.
3909 (value_fetch_lazy_memory): New.
3910 (value_fetch_lazy_register): New.
3911 (value_fetch_lazy): Factor out to smaller functions.
3913 2018-06-01 Tom Tromey <tom@tromey.com>
3915 * cp-name-parser.y (backslashable, represented): Now const.
3917 2018-06-01 Tom Tromey <tom@tromey.com>
3919 * cp-name-parser.y: Include parser-defs.h.
3920 (parser_fprintf): Remove declaration.
3922 2018-06-01 Tom Tromey <tom@tromey.com>
3924 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3926 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3927 (global_result): Remove globals.
3928 (struct cpname_state): New.
3929 (yyparse): Don't declare.
3930 (yylex, yyerror): Move declarations after %union.
3931 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3932 (make_name): Add state parameter.
3934 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3936 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3938 (yylex): Add lvalp, state parameters.
3939 (yyerror): Add state parameter.
3940 (cp_demangled_name_to_comp): Update.
3942 2018-06-01 Tom Tromey <tom@tromey.com>
3944 * cp-name-parser.y (parser_fprintf): Declare.
3945 (GDB_YY_REMAP_PREFIX): Define.
3946 Include yy-remap.h. Don't redefine yy* identifiers.
3948 2018-06-01 Tom Tromey <tom@tromey.com>
3950 * python/py-type.c (typy_legacy_template_argument): Update.
3951 * cp-support.h (cp_demangled_name_to_comp): Update.
3952 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3953 parameter to be a "std::string *".
3956 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3958 * ada-lex.l: Include "diagnostics.h" instead of
3959 "common/diagnostics.h".
3960 * unittests/environ-selftests.c: Likewise.
3961 * common/diagnostics.h: Moved to ../include.
3963 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3965 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3966 to language_mode_manual while calling breakpoint_re_set_one.
3968 2018-06-01 Tom Tromey <tom@tromey.com>
3970 * valops.c (value_cast_structs, destructor_name_p): Update.
3971 * symtab.c (gdb_mangle_name): Update.
3972 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3974 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3975 (pascal_object_print_value_fields, pascal_object_print_value):
3977 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3978 * linespec.c (find_methods): Update.
3979 * gdbtypes.h (type_name_no_tag): Remove.
3980 (type_name_or_error): Rename from type_name_no_tag_or_error.
3981 * gdbtypes.c (type_name_no_tag): Remove.
3982 (type_name_or_error): Rename from type_name_no_tag_or_error.
3983 (lookup_struct_elt_type, check_typedef): Update.
3984 * expprint.c (print_subexp_standard): Update.
3985 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3986 * d-namespace.c (d_lookup_nested_symbol): Update.
3987 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3988 (cp_print_class_member): Update.
3989 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3990 * completer.c (add_struct_fields): Update.
3991 * c-typeprint.c (cp_type_print_derivation_info)
3992 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3994 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3995 (ada_prefer_type, ada_is_exception_sym): Update.
3997 2018-06-01 Tom Tromey <tom@tromey.com>
3999 * valops.c (enum_constant_from_type, value_namespace_elt)
4000 (value_maybe_namespace_elt): Update.
4001 * valarith.c (find_size_for_pointer_math): Update.
4002 * target-descriptions.c (make_gdb_type): Update.
4003 * symmisc.c (print_symbol): Update.
4004 * stabsread.c (define_symbol, read_type)
4005 (complain_about_struct_wipeout, add_undefined_type)
4006 (cleanup_undefined_types_1): Update.
4007 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4008 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4009 (rust_internal_print_type, rust_composite_type)
4010 (rust_evaluate_funcall, rust_evaluate_subexp)
4011 (rust_inclusive_range_type_p): Update.
4012 * python/py-type.c (typy_get_tag): Update.
4013 * p-typeprint.c (pascal_type_print_base): Update.
4014 * mdebugread.c (parse_symbol, parse_type): Update.
4015 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4017 * guile/scm-type.c (gdbscm_type_tag): Update.
4018 * go-lang.c (sixg_string_p): Update.
4019 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4021 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4022 (TYPE_TAG_NAME): Remove.
4023 * gdbtypes.c (type_name_no_tag): Simplify.
4024 (check_typedef, check_types_equal, recursive_dump_type)
4025 (copy_type_recursive, arch_composite_type): Update.
4026 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4027 in summary mode when needed.
4028 * eval.c (evaluate_funcall): Update.
4029 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4030 (process_structure_scope, read_enumeration_type)
4031 (read_namespace_type, read_module_type, determine_prefix): Update.
4032 * cp-support.c (inspect_type): Update.
4033 * coffread.c (process_coff_symbol, decode_base_type): Update.
4034 * c-varobj.c (c_is_path_expr_parent): Update.
4035 * c-typeprint.c (c_type_print_base_struct_union): Update.
4036 (c_type_print_base_1): Update. Print struct/class/union/enum in
4037 summary when using C language.
4038 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4039 (gen_maybe_namespace_elt): Update.
4040 * ada-lang.c (ada_type_name): Simplify.
4041 (empty_record, ada_template_to_fixed_record_type_1)
4042 (template_to_static_fixed_type)
4043 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4045 2018-06-01 Tom Tromey <tom@tromey.com>
4047 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4049 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4050 (c_print_type): Update.
4051 (c_print_type): New overload.
4052 (c_type_print_varspec_prefix, c_type_print_args)
4053 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4054 (c_type_print_base_struct_union, c_type_print_base_1)
4055 (cp_type_print_method_args): Add "language" parameter.
4056 (c_type_print_base): Update.
4057 * c-lang.h (c_print_type): Add new overload.
4059 2018-06-01 Tom Tromey <tom@tromey.com>
4061 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4062 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4064 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4066 * aarch64-tdep.c (aarch64_sve_register_names): New const
4068 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4069 (AARCH64_SVE_Z_REGS_NUM): New define.
4070 (AARCH64_SVE_P_REGS_NUM): Likewise.
4071 (AARCH64_SVE_NUM_REGS): Likewise.
4073 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4075 * nat/linux-ptrace.h [__alpha__]
4076 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4079 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4081 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4082 the endianness selected.
4083 * NEWS: Document `set endian auto' mode operation update.
4085 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4087 * Makefile.in: Add new header.
4088 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4089 (sve_vl_from_vg): Likewise.
4090 (sve_vq_from_vl): Likewise.
4091 (sve_vl_from_vq): Likewise.
4092 (sve_vq_from_vg): Likewise.
4093 (sve_vg_from_vq): Likewise.
4094 * configure.nat: Add new c file.
4095 * nat/aarch64-sve-linux-ptrace.c: New file.
4096 * nat/aarch64-sve-linux-ptrace.h: New file.
4098 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4100 * aarch64-linux-nat.c (aarch64_linux_read_description):
4102 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4104 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4105 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4106 (aarch64_gdbarch_init): Add parmeter zero.
4107 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4108 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4109 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4111 * doc/gdb.texinfo: Describe SVE feature
4112 * features/aarch64-sve.c: New file.
4114 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4117 * gdbarch.sh (significant_addr_bit): Default to zero when
4118 not set by target architecture.
4119 * gdbarch.c: Re-generated.
4120 * utils.c (address_significant): Update.
4122 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4124 * stack.c (func_command): Remove trailing newline in call to error.
4126 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4128 * regcache.h (regcache_raw_collect): Remove, update callers to
4129 use regcache::raw_collect.
4130 * regcache.c (regcache_raw_collect): Remove.
4132 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4134 * regcache.h (regcache_raw_supply): Remove, update callers to
4135 use detached_regcache::raw_supply.
4136 * regcache.c (regcache_raw_supply): Remove.
4138 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4140 * regcache.h (regcache_cooked_write_part): Remove, update
4141 callers to use regcache::cooked_write_part.
4142 * regcache.c (regcache_cooked_write_part): Remove.
4144 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4146 * regcache.h (regcache_cooked_read_part): Remove, update callers
4147 to use readable_regcache::cooked_read_part.
4148 * regcache.c (regcache_cooked_read_part): Remove.
4150 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4152 * regcache.h (regcache_cooked_read_value): Remove, update
4153 callers to use readable_regcache::cooked_read_value.
4154 * regcache.c (regcache_cooked_read_value): Remove.
4156 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4158 * regcache.h (regcache_cooked_write): Remove, update callers to
4159 use regcache::cooked_write.
4160 * regcache.c (regcache_cooked_write): Remove.
4162 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4164 * regcache.h (regcache_invalidate): Remove, update callers to
4165 use detached_regcache::invalidate instead.
4166 * regcache.c (regcache_invalidate): Remove.
4168 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4170 * regcache.h (regcache_raw_write_part): Remove, update callers
4171 to use regcache::raw_write_part instead.
4172 * regcache.c (regcache_raw_write_part): Remove.
4174 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4176 * regcache.h (regcache_raw_read_part): Remove, update callers to
4177 use readable_regcache::raw_read_part instead.
4178 * regcache.c (regcache_raw_read_part): Remove.
4180 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4182 * regcache.h (regcache_cooked_read): Remove, update callers to
4183 use readable_regcache::cooked_read instead.
4184 * regcache.c (regcache_cooked_read): Remove.
4186 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4188 * regcache.h (regcache_raw_write): Remove, update callers to use
4189 regcache::raw_write instead.
4190 * regcache.c (regcache_raw_write): Remove.
4192 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4194 * regcache.h (regcache_raw_read): Remove, update callers to use
4195 readable_regcache::raw_read instead.
4196 * regcache.c (regcache_raw_read): Remove.
4198 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4200 * regcache.h (regcache_raw_update): Remove, update callers to
4201 use readable_regcache::raw_update instead.
4202 * regcache.c (regcache_raw_update): Remove.
4204 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4206 * regcache.h (regcache_register_status): Remove, update callers
4207 to use reg_buffer::get_register_status directly instead.
4208 * regcache.c (regcache_register_status): Remove.
4210 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4212 * regcache.h (regcache_get_ptid): Remove, update all callers to
4213 call regcache::ptid instead.
4214 * regcache.c (regcache_get_ptid): Remove.
4216 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4218 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4220 2018-05-30 Pedro Alves <palves@redhat.com>
4222 * common/common-exceptions.h (exception_rethrow): Use
4225 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4227 * breakpoint.c (print_solib_event, check_status_catch_solib):
4228 Remove struct keyword in range-based for loops.
4229 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4230 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4232 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4234 * symfile.c (addr_info_make_relative): Likewise.
4235 * thread.c (value_in_thread_stack_temporaries): Likewise.
4237 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4240 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4241 aggregate type to get its real type before accessing it.
4243 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4245 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4246 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4247 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4248 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4249 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4250 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4251 * printcmd.c (info_address_command): Likewise.
4253 2018-05-29 Tom Tromey <tom@tromey.com>
4255 * windows-nat.c (handle_exception): Update fall-through comment.
4257 2018-05-29 Tom Tromey <tom@tromey.com>
4259 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4260 (struct program_space) <added_solibs>: Now a std::vector.
4261 * breakpoint.c (print_solib_event): Update.
4262 (check_status_catch_solib): Update.
4263 * progspace.c (clear_program_space_solib_cache): Update.
4264 * solib.c (update_solib_list): Update.
4266 2018-05-29 Tom Tromey <tom@tromey.com>
4268 * python/py-type.c (typy_richcompare): Update.
4269 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4270 * gdbtypes.h (types_deeply_equal): Return bool.
4271 (types_equal): Likewise.
4272 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4274 (check_types_equal): Change worklist to std::vector. Return
4276 (struct type_equality_entry): Add constructor.
4277 (compare_maybe_null_strings): Return bool.
4278 (check_types_worklist): Return bool. Change worklist to
4280 (types_deeply_equal): Use std::vector.
4281 (types_equal): Return bool.
4282 (compare_maybe_null_strings): Simplify.
4284 2018-05-29 Tom Tromey <tom@tromey.com>
4286 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4288 2018-05-29 Tom Tromey <tom@tromey.com>
4290 * objc-lang.h: Don't include cp-support.h.
4291 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4294 2018-05-27 Tom Tromey <tom@tromey.com>
4296 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4298 2018-05-25 Tom Tromey <tom@tromey.com>
4300 * value.c (value::location): Initialize.
4302 2018-05-25 Tom Tromey <tom@tromey.com>
4304 * dbxread.c (init_bincl_list): Remove.
4305 (bincl_list): Now a std::vector.
4306 (bincls_allocated, next_bincl): Remove.
4307 (free_bincl_list, do_free_bincl_list_cleanup)
4308 (make_cleanup_free_bincl_list): Remove.
4309 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4311 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4312 (struct header_file_location): Add constructor.
4313 (add_bincl_to_list): Remove.
4315 2018-05-25 Tom Tromey <tom@tromey.com>
4317 * tui/tui.c (tui_enable): Update.
4318 * mi/mi-interp.c (mi_interp::init): Update.
4319 * interps.h (class interp) <name>: New method.
4320 <m_name>: Rename from name.
4321 (~scoped_restore_interp): Update.
4322 * interps.c (interp::interp): Update.
4323 (interp_add, interp_set, interp_lookup_existing)
4324 (current_interp_named_p): Update.
4326 2018-05-25 Tom Tromey <tom@tromey.com>
4328 * interps.c (interp_name): Remove.
4329 * mi/mi-interp.c (mi_interp::init): Update.
4330 * interps.h (interp_name): Remove.
4331 (~scoped_restore_interp): Update.
4332 * tui/tui.c (tui_enable): Update.
4334 2018-05-25 Tom Tromey <tom@tromey.com>
4336 * utils.c (fputs_maybe_filtered): Update.
4337 * linespec.c (decode_line_full): Update.
4338 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4339 (mi_print_breakpoint_for_event, mi_solib_loaded)
4340 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4341 (mi_user_selected_context_changed): Update.
4342 * mi/mi-main.c (mi_execute_command): Update.
4343 * cli/cli-script.c (execute_control_command): Update.
4344 * python/python.c (execute_gdb_command): Update.
4345 * solib.c (info_sharedlibrary_command): Update.
4346 * interps.c (interp_ui_out): Remove.
4347 * interps.h (interp_ui_out): Remove.
4349 2018-05-25 Tom Tromey <tom@tromey.com>
4351 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4352 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4353 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4355 2018-05-25 Tom Tromey <tom@tromey.com>
4357 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4358 * interps.c (interp_exec): Use scoped_restore.
4360 2018-05-25 Tom Tromey <tom@tromey.com>
4362 * remote.c (remote_target::remote_file_get): Use
4364 (remote_target::remote_file_put): Likewise.
4366 2018-05-25 Tom Tromey <tom@tromey.com>
4368 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4370 (get_pe_section_index, add_pe_exported_sym): Update.
4371 (read_pe_exported_syms): Use gdb::def_vector.
4373 2018-05-25 Tom Tromey <tom@tromey.com>
4375 * frame.c (remove_prev_frame): Remove.
4376 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4378 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4380 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4382 * mips-linux-nat.c (supply_fpregset): Always call
4383 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4384 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4385 `mips_fill_fpregset'.
4386 * mips-linux-tdep.c (mips_supply_fpregset)
4387 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4388 (mips_fill_fpregset_wrapper): Remove functions.
4389 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4390 (mips_linux_fpregset): Remove variable.
4391 (mips_linux_iterate_over_regset_sections): Use
4392 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4393 (mips_linux_o32_sigframe_init): Remove comment.
4395 2018-05-25 Pedro Alves <palves@redhat.com>
4397 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4398 (struct readahead_cache, struct packet_reg, struct
4399 remote_arch_state, class remote_state): Move higher up in the
4401 (remote_target::m_remote_state): Now an object instead of a pointer.
4402 (remote_target::get_remote_state): Adjust.
4404 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4406 * stack.c (select_and_print_frame): Delete.
4407 (struct function_bounds): Move struct within function.
4408 (func_command): Most content moved into new function
4409 find_frame_for_function, use new function, print result, add
4411 (find_frame_for_function): New function, now returns a result.
4413 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4415 * stack.c (iterate_over_block_arg_vars): Fix comment.
4416 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4418 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4422 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4424 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4426 * frame.h (class scoped_restore_selected_frame): New class.
4427 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4428 of any exception, use scoped_restore_selected_frame to restore the
4431 2018-05-24 Pedro Alves <palves@redhat.com>
4433 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4436 2018-05-23 Tom Tromey <tom@tromey.com>
4438 * complaints.c (struct complaints): Remove.
4439 (symfile_complaint_book): Remove.
4440 (series): New global.
4441 (complaint_internal): Update.
4442 (clear_complaints): Update.
4444 2018-05-23 Tom Tromey <tom@tromey.com>
4446 * complaints.c (counters): New global.
4447 (struct complain): Remove.
4448 (struct complaints) <root>: Remove.
4449 (complaint_sentinel): Remove.
4450 (symfile_complaint_book): Update.
4451 (find_complaint) Remove.
4452 (complaint_internal, clear_complaints): Update.
4454 2018-05-23 Tom Tromey <tom@tromey.com>
4456 * complaints.c (struct complain) <file, line>: Remove.
4457 (find_complaint): Remove file, line parameters.
4458 (complaint_internal): Update.
4460 2018-05-23 Tom Tromey <tom@tromey.com>
4462 * complaints.c (vcomplaint): Remove.
4463 (complaint_internal) Merge in contents of vcomplaint.
4465 2018-05-23 Tom Tromey <tom@tromey.com>
4467 * complaints.c (struct complaints) <explanation>: Remove.
4468 (symfile_explanations): Remove.
4469 (symfile_complaint_book): Update.
4470 (vcomplaint): Update.
4471 (struct explanation): Remove.
4473 2018-05-23 Tom Tromey <tom@tromey.com>
4475 * complaints.c (symfile_complaints): Remove.
4476 (complaint_internal): Remove "complaints" parameter.
4477 (clear_complaints, vcomplaint): Remove "c" parameter.
4478 (get_complaints): Remove.
4479 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4480 (dwarf2_debug_line_missing_file_complaint)
4481 (dwarf2_debug_line_missing_end_sequence_complaint)
4482 (dwarf2_complex_location_expr_complaint)
4483 (dwarf2_const_value_length_mismatch_complaint)
4484 (dwarf2_section_buffer_overflow_complaint)
4485 (dwarf2_macro_malformed_definition_complaint)
4486 (dwarf2_invalid_attrib_class_complaint)
4487 (create_addrmap_from_index, dw2_symtab_iter_next)
4488 (dw2_expand_marked_cus)
4489 (dw2_debug_names_iterator::find_vec_in_debug_names)
4490 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4491 (create_debug_type_hash_table, init_cutu_and_read_dies)
4492 (partial_die_parent_scope, add_partial_enumeration)
4493 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4494 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4495 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4496 (create_cus_hash_table, create_dwp_hash_table)
4497 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4498 (dwarf2_rnglists_process, dwarf2_ranges_process)
4499 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4500 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4501 (handle_struct_member_die, process_structure_scope)
4502 (read_array_type, read_common_block, read_module_type)
4503 (read_tag_pointer_type, read_typedef, read_base_type)
4504 (read_subrange_type, load_partial_dies, partial_die_info::read)
4505 (partial_die_info::read, partial_die_info::read)
4506 (partial_die_info::read, read_checked_initial_length_and_offset)
4507 (dwarf2_string_attr, read_formatted_entries)
4508 (dwarf_decode_line_header)
4509 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4510 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4511 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4512 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4513 (get_signatured_type, get_DW_AT_signature_type)
4514 (decode_locdesc, file_file_name, consume_improper_spaces)
4515 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4516 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4517 (dwarf2_symbol_mark_computed, set_die_type)
4518 (read_attribute_value): Update.
4519 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4521 * dbxread.c (unknown_symtype_complaint)
4522 (lbrac_mismatch_complaint, repeated_header_complaint)
4523 (set_namestring, function_outside_compilation_unit_complaint)
4524 (read_dbx_symtab, process_one_symbol): Update.
4525 * gdbtypes.c (stub_noname_complaint): Update.
4526 * windows-nat.c (handle_unload_dll): Update.
4527 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4528 (decode_base_type): Update.
4529 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4530 (eb_complaint, record_include_begin, record_include_end)
4531 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4532 (process_xcoff_symbol, read_symbol)
4533 (function_outside_compilation_unit_complaint)
4534 (scan_xcoff_symtab): Update.
4535 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4536 * buildsym.c (finish_block_internal, make_blockvector)
4537 (end_symtab_get_static_block, augment_type_symtab): Update.
4538 * dtrace-probe.c (dtrace_process_dof)
4539 (dtrace_static_probe_ops::get_probes): Update.
4540 * complaints.h (struct complaint): Don't declare.
4541 (symfile_complaints): Remove.
4542 (complaint_internal): Remove "complaints" parameter.
4543 (complaint): Likewise.
4544 (clear_complaints): Likewise.
4545 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4546 (reread_symbols): Update.
4547 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4548 (dwarf2_frame_cache, decode_frame_entry): Update.
4549 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4550 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4551 (info_selectors_command): Update.
4552 * macrotab.c (macro_include, check_for_redefinition)
4553 (macro_undef): Update.
4554 * objfiles.c (filter_overlapping_sections): Update.
4555 * stabsread.c (invalid_cpp_abbrev_complaint)
4556 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4557 (define_symbol, error_type, read_type, rs6000_builtin_type)
4558 (stabs_method_name_from_physname, read_member_functions)
4559 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4560 (attach_fields_to_type, complain_about_struct_wipeout)
4561 (read_range_type, read_args, common_block_start)
4562 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4564 * mdebugread.c (index_complaint, unknown_ext_complaint)
4565 (basic_type_complaint, bad_tag_guess_complaint)
4566 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4567 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4568 (parse_procedure, parse_lines)
4569 (function_outside_compilation_unit_complaint)
4570 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4571 (bad_tag_guess_complaint, reg_value_complaint): Update.
4572 * cp-support.c (demangled_name_complaint): Update.
4573 * macroscope.c (sal_macro_scope): Update.
4574 * dwarf-index-write.c (class debug_names): Update.
4576 2018-05-23 Tom Tromey <tom@tromey.com>
4578 * complaints.c (clear_complaints): Remove "noisy" parameter.
4579 * complaints.h (clear_complaints): Update.
4580 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4581 (reread_symbols): Update.
4583 2018-05-23 Tom Tromey <tom@tromey.com>
4585 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4587 (vcomplaint, clear_complaints): Update.
4588 (symfile_explanations): Remove some messages.
4590 2018-05-23 Tom Tromey <tom@tromey.com>
4592 * complaints.c (internal_complaint): Remove.
4593 * complaints.h (internal_complaint): Remove.
4595 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4597 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4599 2018-05-22 Pedro Alves <palves@redhat.com>
4601 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4602 (remote_fileio_badfd, remote_fileio_return_errno)
4603 (remote_fileio_return_success, remote_fileio_func_open)
4604 (remote_fileio_func_open, remote_fileio_func_close)
4605 (remote_fileio_func_read, remote_fileio_func_write)
4606 (remote_fileio_func_lseek, remote_fileio_func_rename)
4607 (remote_fileio_func_unlink, remote_fileio_func_stat)
4608 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4609 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4610 remote_target parameter.
4611 (remote_fio_func_map) <func>: Add remote_target parameter.
4612 (do_remote_fileio_request, remote_fileio_request):
4613 * remote-fileio.h (remote_fileio_request):
4614 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4615 remote_target parameter.
4616 (remote_notif_process, handle_notification): Adjust to pass down
4618 (remote_notif_state_allocate): Add remote_target parameter. Save
4620 * remote-notif.h (struct remote_target): Forward declare.
4621 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4622 remote_target parameter.
4623 (struct remote_notif_state) <remote>: New field.
4624 (remote_notif_ack, remote_notif_parse): Add remote_target
4626 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4627 remote_target parameter.
4628 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4629 (threads_listing_context, rmt_thread_action, protocol_feature)
4630 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4631 (packet_result, struct threads_listing_context, remote_state):
4632 Move definitions and declarations higher up.
4633 (remote_target) <~remote_target>: Declare.
4634 (remote_download_command_source, remote_file_put, remote_file_get)
4635 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4636 (remote_hostio_pread_vFile, remote_hostio_send_command)
4637 (remote_hostio_set_filesystem, remote_hostio_open)
4638 (remote_hostio_close, remote_hostio_unlink, remote_state)
4639 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4640 (get_memory_write_packet_size, get_memory_read_packet_size)
4641 (append_pending_thread_resumptions, remote_detach_1)
4642 (append_resumption, remote_resume_with_vcont)
4643 (add_current_inferior_and_thread, wait_ns, wait_as)
4644 (process_stop_reply, remote_notice_new_inferior)
4645 (process_initial_stop_replies, remote_add_thread)
4646 (btrace_sync_conf, remote_btrace_maybe_reopen)
4647 (remove_new_fork_children, kill_new_fork_children)
4648 (discard_pending_stop_replies, stop_reply_queue_length)
4649 (check_pending_events_prevent_wildcard_vcont)
4650 (discard_pending_stop_replies_in_queue, stop_reply)
4651 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4652 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4653 (remote_interrupt_as, remote_interrupt_ns)
4654 (remote_get_noisy_reply, remote_query_attached)
4655 (remote_add_inferior, remote_current_thread, get_current_thread)
4656 (set_thread, set_general_thread, set_continue_thread)
4657 (set_general_process, write_ptid)
4658 (remote_unpack_thread_info_response, remote_get_threadinfo)
4659 (parse_threadlist_response, remote_get_threadlist)
4660 (remote_threadlist_iterator, remote_get_threads_with_ql)
4661 (remote_get_threads_with_qxfer)
4662 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4663 (get_offsets, remote_check_symbols, remote_supported_packet)
4664 (remote_query_supported, remote_packet_size)
4665 (remote_serial_quit_handler, remote_detach_pid)
4666 (remote_vcont_probe, remote_resume_with_hc)
4667 (send_interrupt_sequence, interrupt_query)
4668 (remote_notif_get_pending_events, fetch_register_using_p)
4669 (send_g_packet, process_g_packet, fetch_registers_using_g)
4670 (store_register_using_P, store_registers_using_G)
4671 (set_remote_traceframe, check_binary_download)
4672 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4673 (remote_xfer_live_readonly_partial, remote_read_bytes)
4674 (remote_send_printf, remote_flash_write, readchar)
4675 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4676 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4677 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4678 (extended_remote_disable_randomization, extended_remote_run)
4679 (send_environment_packet, extended_remote_environment_support)
4680 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4681 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4682 (packet_command): Now methods of ...
4683 (remote_target): ... this class.
4684 (m_remote_state) <remote_target>: New field.
4685 (struct remote_state) <stop_reply_queue,
4686 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4688 (remote_state::remote_state): Allocate stop_reply_queue.
4689 (remote_state): Delete global.
4690 (get_remote_state_raw): Delete.
4691 (remote_target::get_remote_state): Allocate m_remote_state on
4693 (get_current_remote_target): New.
4694 (remote_ops, extended_remote_ops): Delete.
4695 (wait_forever_enabled_p, remote_async_inferior_event_token):
4696 Delete, moved to struct remote_state.
4697 (remote_target::close): Delete self. Destruction bits split to
4699 (remote_target::~remote_target): ... this.
4700 (show_memory_packet_size): Adjust to use
4701 get_current_remote_target.
4702 (struct protocol_feature) <func>: Add remote_target parameter.
4703 All callers adjusted.
4704 (curr_quit_handler_target): New.
4705 (remote_serial_quit_handler): Reimplement.
4706 (remote_target::open_1): Adjust to use get_current_remote_target.
4707 Heap-allocate remote_target/extended_remote_target instances.
4708 (vcont_builder::vcont_builder): Add remote_target parameter, and
4709 save it in m_remote. All callers adjusted.
4710 (vcont_builder::m_remote): New field.
4711 (vcont_builder::restart, vcont_builder::flush)
4712 (vcont_builder::push_action): Use it.
4713 (remote_target::commit_resume): Use it.
4714 (struct queue_iter_param) <remote>: New field.
4715 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4716 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4717 (check_pending_event_prevents_wildcard_vcont_callback)
4718 (remote_target::check_pending_events_prevent_wildcard_vcont)
4719 (remote_target::discard_pending_stop_replies)
4720 (remote_target::discard_pending_stop_replies_in_queue)
4721 (remote_target::remote_notif_remove_queued_reply): Fill in
4723 (remote_notif_get_pending_events): New.
4724 (remote_target::readchar, remote_target::remote_serial_write):
4725 Save/restore curr_quit_handler_target.
4727 (kill_new_fork_children): Fill in 'remote' field.
4728 (packet_command): Use get_current_remote_target, defer to
4729 remote_target method of same name.
4730 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4731 parameter, and save it in m_remote. All callers adjusted.
4732 (scoped_remote_fd::release): Use m_remote.
4733 (scoped_remote_fd::m_remote): New field.
4734 (remote_file_put, remote_file_get, remote_file_delete): Use
4735 get_current_remote_target, defer to remote_target method of same
4737 (remote_btrace_reset): Add remote_state paremeter. Update all
4739 (remote_async_inferior_event_handler). Pass down 'data'.
4740 (remote_new_objfile): Use get_current_remote_target.
4741 (remote_target::vcont_r_supported): New.
4742 (set_range_stepping): Use get_current_remote_target and
4743 remote_target::vcont_r_supported.
4744 (_initialize_remote): Don't allocate 'remote_state' and
4745 'stop_reply_queue' globals.
4746 * remote.h (struct remote_target): Forward declare.
4747 (getpkt, putpkt, remote_notif_get_pending_events): Add
4748 'remote_target' parameter.
4750 2018-05-22 Pedro Alves <palves@redhat.com>
4752 * remote.c (vcont_builder): Now a class. Make all data members
4754 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4756 (vcont_builder_restart): Rename to ...
4757 (vcont_builder::restart): ... this.
4758 (vcont_builder_flush): Rename to ...
4759 (vcont_builder::flush): ... this.
4760 (vcont_builder_push_action): Rename to ...
4761 (vcont_builder::push_action): ... this.
4762 (remote_target::commit_resume): Adjust.
4764 2018-05-22 Pedro Alves <palves@redhat.com>
4766 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4767 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4768 (get_fixed_memory_packet_size): New.
4769 (get_memory_packet_size): Use it.
4770 (set_memory_packet_size): Don't override the config size with
4771 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4772 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4773 Don't refer to get_memory_packet_size if not connected to a remote
4774 target. Show "(default)" if configured size is 0.
4776 2018-05-22 Pedro Alves <palves@redhat.com>
4778 * remote.c (remote_target::mourn_inferior): Move
4779 discard_pending_stop_replies call here from ...
4780 (_initialize_remote): ... here.
4782 2018-05-22 Pedro Alves <palves@redhat.com>
4784 * remote.c (compare_section_command): Remove set_general_process
4787 2018-05-22 Pedro Alves <palves@redhat.com>
4789 * remote.c (struct packet_reg, struct remote_arch_state):
4790 Move higher up in the file.
4791 (remote_state) <m_arch_states>: Store remote_arch_state values
4792 instead of remote_arch_state pointers.
4793 (remote_state::get_remote_arch_state): Adjust.
4795 2018-05-22 Pedro Alves <palves@redhat.com>
4797 * remote.c: Include <unordered_map>.
4798 (remote_state): Now a class.
4799 (remote_state) <get_remote_arch_state>: Declare method.
4800 <get_remote_arch_state>: New field.
4801 (remote_arch_state) <remote_arch_state>: Declare ctor.
4802 <regs>: Now a unique_ptr.
4803 (remote_gdbarch_data_handle): Delete.
4804 (get_remote_arch_state): Delete.
4805 (remote_state::get_remote_arch_state): New.
4806 (get_remote_state): Adjust to call remote_state's
4807 get_remote_arch_state method.
4808 (init_remote_state): Delete, bits factored out to ...
4809 (remote_arch_state::remote_arch_state): ... this new method.
4810 (get_remote_packet_size, get_memory_packet_size)
4811 (process_g_packet, remote_target::fetch_registers)
4812 (remote_target::prepare_to_store, store_registers_using_G)
4813 (remote_target::store_registers, remote_target::get_trace_status):
4814 Adjust to call remote_state's method.
4815 (_initialize_remote): Remove reference to
4816 remote_gdbarch_data_handle.
4818 2018-05-22 Pedro Alves <palves@redhat.com>
4820 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4821 pread>: New method declarations.
4822 (remote_target::open_1): Adjust.
4823 (readahead_cache_invalidate): Rename to ...
4824 (readahead_cache::invalidate): ... this, and adjust to be a class
4826 (readahead_cache_invalidate_fd): Rename to ...
4827 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4829 (remote_hostio_pwrite): Adjust.
4830 (remote_hostio_pread_from_cache): Rename to ...
4831 (readahead_cache::pread): ... this, and adjust to be a class
4833 (remote_hostio_close): Adjust.
4835 2018-05-22 Pedro Alves <palves@redhat.com>
4837 * remote.c (remote_hostio_close_cleanup): Delete.
4838 (class scoped_remote_fd): New.
4839 (remote_file_put, remote_file_get): Use it.
4841 2018-05-22 Pedro Alves <palves@redhat.com>
4843 (struct vCont_action_support): Use bool and initialize all fields.
4844 (struct readahead_cache): Initialize all fields.
4845 (remote_state): Use bool and initialize all fields.
4846 (remote_state::remote_state, remote_state::~remote_state): New.
4847 (new_remote_state): Delete.
4848 (_initialize_remote): Use new to allocate remote_state.
4850 2018-05-22 Pedro Alves <palves@redhat.com>
4854 * c-exp.y: Include "c-support.h".
4855 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4856 of tolower. Use c_ident_is_alpha to scan names.
4857 * c-lang.c: Include "c-support.h".
4858 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4859 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4860 * c-support.h: New file, with bits factored out from ...
4861 * cp-name-parser.y: ... this file.
4862 Include "c-support.h".
4863 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4864 c-support.h and renamed.
4865 (symbol_end, yylex): Adjust.
4867 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4869 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4870 parameter type to CORE_ADDR.
4871 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4872 parameter type in declaration to CORE_ADDR.
4873 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4874 target_auxv_search to get AT_HWCAP and use the result to get the
4876 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4877 to CORE_ADDR. Remove the cast of the return value to unsigned
4878 long. Fix error predicate of target_auxv_search.
4879 (ppc_linux_nat_target::read_description): Change the type of the
4880 hwcap variable to CORE_ADDR.
4882 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4884 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4885 if the size of fpscr is larger than 32 bits.
4887 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4889 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4890 (ppc32_linux_vsxregmap): New global.
4891 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4892 regcache_supply_regset, and regcache_collect_regset.
4893 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4894 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4895 (fetch_vsx_register, store_vsx_register): Remove.
4896 (fetch_vsx_registers): Add regno parameter. Get regset using
4897 ppc_linux_vsxregset. Use regset to supply registers.
4898 (store_vsx_registers): Add regno parameter. Get regset using
4899 ppc_linux_vsxregset. Use regset to collect registers.
4900 (fetch_register): Call fetch_vsx_registers instead of
4902 (store_register): Call store_vsx_registers instead of
4904 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4905 new regno parameter.
4906 (store_ppc_registers): Call store_vsx_registers with -1 for the
4907 new regno parameter.
4908 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4909 (ppc_collect_vsxregset): Remove.
4911 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4913 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4915 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4916 for vector register offset fields.
4917 (ppc64_fbsd_reg_offsets): Likewise.
4918 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4919 to vector register offset fields.
4920 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4921 to vector register offset fields.
4922 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4923 vector register offset fields.
4924 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4925 initializers for vector register offset fields.
4926 (rs6000_aix64_reg_offsets): Likewise.
4927 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4928 (ppc_supply_vrregset): Remove.
4929 (ppc_collect_vrregset): Remove.
4930 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4931 (ppc_linux_vrregset) : New function.
4932 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4933 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4934 (ppc32_linux_vrregset): Remove.
4935 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4936 and use result instead of ppc32_linux_vrregset.
4937 (ppc32_linux_reg_offsets): Remove initializers for vector register
4939 (ppc64_linux_reg_offsets): Likewise.
4940 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4941 * ppc-linux-nat.c: Include regset.h.
4942 (gdb_vrregset_t): Adjust comment to account for little-endian
4944 (supply_vrregset, fill_vrregset): Remove.
4945 (fetch_altivec_register, store_altivec_register): Remove.
4946 (fetch_altivec_registers): Add regno parameter. Get regset using
4947 ppc_linux_vrregset. Use regset to supply registers.
4948 (store_altivec_registers): Add regno parameter. Get regset using
4949 ppc_linux_vrregset. Use regset to collect registers.
4950 (fetch_register): Call fetch_altivec_registers instead of
4951 fetch_altivec_register.
4952 (store_register): Call store_altivec_registers instead of
4953 store_altivec_register.
4954 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4955 the new regno parameter.
4956 (store_ppc_registers): Call store_altivec_registers with -1 for
4957 the new regno parameter.
4959 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4961 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4962 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4963 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4964 (gdb_vrregset_t): Change array type size to
4965 PPC_LINUX_SIZEOF_VRREGSET.
4966 (gdb_vsxregset_t): Change array type size to
4967 PPC_LINUX_SIZEOF_VSXREGSET.
4968 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4969 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4970 PPC_LINUX_SIZEOF_VSXREGSET.
4972 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4974 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4975 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4977 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4978 ppc_linux_target_wordsize with tid.
4979 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4981 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4982 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4983 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4984 tid parameter. Remove static specifier.
4985 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4986 (ppc_linux_target_wordsize): New declaration.
4988 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4990 * arch/ppc-linux-common.c: New file.
4991 * arch/ppc-linux-common.h: New file.
4992 * arch/ppc-linux-tdesc.h: New file.
4993 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4994 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4995 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4996 arch/ppc-linux-tdesc.h.
4997 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4998 arch/ppc-linux-tdesc.h.
4999 (ppc_linux_nat_target::read_description): Remove target
5000 description matching code. Fill a ppc_linux_features struct and
5001 call ppc_linux_match_description with it. Move comment about ISA
5002 2.05 to ppc-linux-common.c.
5003 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5004 arch/ppc-linux-tdesc.h.
5005 (ppc_linux_core_read_description): Remove target description
5006 matching code. Fill a ppc_linux_features struct and call
5007 ppc_linux_match_description with it.
5008 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5009 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5010 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5011 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5012 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5013 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5014 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5015 (tdesc_powerpc_e500l): Remove.
5017 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5019 * ada-lang.c (catch_assert_command): Pass empty string instead
5020 of NULL for excep_string argument.
5022 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5024 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5025 the width of the requested register exceeds the width of the
5028 2018-05-21 Tom Tromey <tom@tromey.com>
5030 * printcmd.c (output_command): Remove.
5031 (output_command_const): Rename to output_command.
5032 * valprint.h (output_command): Rename from output_command_const.
5033 * tracepoint.c (trace_dump_actions): Call output_command.
5035 2018-05-21 Tom Tromey <tom@tromey.com>
5037 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5038 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5039 * ada-lang.h (create_ada_exception_catchpoint): Update.
5040 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5042 (create_excep_cond_exprs, ~ada_catchpoint)
5043 (should_stop_exception, print_one_exception)
5044 (print_mention_exception, print_recreate_exception): Update.
5045 (ada_get_next_arg): Remove.
5046 (catch_ada_exception_command_split): Use std::string. Change type
5047 of "excep_string", "cond_string".
5048 (catch_ada_exception_command): Update.
5049 (create_ada_exception_catchpoint): Change type of excep_string.
5050 (ada_exception_sal): Remove excep_string parameter.
5051 (~ada_catchpoint): Remove.
5053 2018-05-21 Tom Tromey <tom@tromey.com>
5055 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5058 2018-05-21 Tom Tromey <tom@tromey.com>
5060 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5061 Return unique_xmalloc_ptr.
5062 (print_it_exception): Update.
5064 2018-05-21 Tom Tromey <tom@tromey.com>
5066 * tracepoint.c (trace_dump_actions): Use std::string.
5068 2018-05-21 Tom Tromey <tom@tromey.com>
5070 * symfile.c (reread_symbols): Use std::string for original_name.
5072 2018-05-21 Tom Tromey <tom@tromey.com>
5074 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5075 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5078 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5080 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5082 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5083 * objfiles.c (get_objfile_bfd_data): Allocate
5084 objfile_per_bfd_storage with obstack_new when allocating on
5087 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5089 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5091 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5092 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5093 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5094 (add_pending): Likewise.
5095 (parse_symbol): Likewise.
5096 (parse_partial_symbols): Likewise.
5097 (psymtab_to_symtab_1): Likewise.
5098 (new_psymtab): Likewise.
5099 (elfmdebug_build_psymtabs): Likewise.
5100 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5101 * objfiles.c (get_objfile_bfd_data): Likewise.
5102 (objfile_register_static_link): Likewise.
5103 * psymtab.c (allocate_psymtab): Likewise.
5104 * stabsread.c (read_member_functions): Likewise.
5105 * xcoffread.c (xcoff_end_psymtab): Likewise.
5107 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5109 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5110 compiler supports std::is_trivially_constructible.
5111 * common/poison.h: Include obstack.h.
5112 (IsMallocable): Define to is_trivially_constructible if the
5113 compiler supports it, define to true_type otherwise.
5117 (XOBNEWVEC): Redefine.
5118 * gdb_obstack.h (obstack_zalloc): New.
5119 (OBSTACK_ZALLOC): Redefine.
5120 (obstack_calloc): New.
5121 (OBSTACK_CALLOC): Redefine.
5123 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5124 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5126 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5127 obstack_calloc/obstack_zalloc.
5128 (gdbarch_obstack_zalloc): Remove.
5129 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5131 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5133 * stack.c (backtrace_command_1): Remove useless variable int i.
5135 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5137 * stack.c (print_frame_info): Fix comment.
5139 2018-05-18 Tom Tromey <tom@tromey.com>
5141 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5142 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5143 (~dwarf2_per_objfile): Update
5144 (dwarf2_get_dwz_file): Use new.
5145 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5148 2018-05-18 Tom Tromey <tom@tromey.com>
5150 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5152 * dwarf2read.c (struct dwp_file): Add constructor and
5154 (open_and_init_dwp_file): Return a unique_ptr.
5155 (dwarf2_per_objfile, create_dwp_hash_table)
5156 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5157 (lookup_dwo_unit_in_dwp): Update.
5158 (open_and_init_dwp_file, get_dwp_file): Update.
5160 2018-05-18 Tom Tromey <tom@tromey.com>
5162 * dwarf2read.c (dwarf2_per_objfile): Update.
5163 (struct mapped_index): Add initializers.
5164 (dwarf2_read_index): Use new.
5165 (dw2_symtab_iter_init): Update.
5166 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5169 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5171 * dwarf2read.c (mapped_index) <total_size>: Remove.
5173 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5175 * unittests/format_pieces-selftests.c (test_format_specifier):
5178 2018-05-18 Tom Tromey <tom@tromey.com>
5180 * c-typeprint.c (maybe_print_hole): New function.
5181 (c_print_type_struct_field_offset): Update.
5182 (c_type_print_base_struct_union): Call maybe_print_hole.
5184 2018-05-17 Keith Seitz <keiths@redhat.com>
5186 * breakpoint.c (build_bpstat_chain): New function, moved from
5188 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5189 If no stop chain is passed, call build_bpstat_chain to build it.
5190 * breakpoint.h (build_bpstat_chain): Declare.
5191 (bpstat_stop_status): Move documentation here from breakpoint.c.
5192 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5193 build the stop chain and pass it to skip_inline_frames.
5194 Pass this stop chain to bpstat_stop_status.
5195 * inline-frame.c: Include breakpoint.h.
5196 (stopped_by_user_bp_inline_frame): New function.
5197 (skip_inline_frames): Add parameter `stop_chain'.
5198 Move documention to inline-frame.h.
5199 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5200 whether the frame should be elided.
5201 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5202 Add moved documentation and update for new parameter.
5204 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5207 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5208 unittests/format_pieces-selftests.c.
5209 * common/format.h (format_piece) <operator==>: New.
5210 (format_pieces) <operator[]>: Remove.
5211 * common/format.c (format_pieces::format_pieces): Handle \e.
5212 * unittests/format_pieces-selftests.c: New.
5214 2018-05-17 Tom Tromey <tom@tromey.com>
5217 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5218 (dw2_instantiate_symtab): Add skip_partial parameter.
5219 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5220 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5221 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5222 (dw2_expand_symtabs_matching_one)
5223 (dw2_find_pc_sect_compunit_symtab)
5224 (dw2_debug_names_lookup_symbol)
5225 (dw2_debug_names_expand_symtabs_for_function): Update.
5226 (init_cutu_and_read_dies): Add skip_partial parameter.
5227 (process_psymtab_comp_unit, build_type_psymtabs_1)
5228 (process_skeletonless_type_unit, load_partial_comp_unit)
5229 (psymtab_to_symtab_1): Update.
5230 (load_full_comp_unit): Add skip_partial parameter.
5231 (process_imported_unit_die, dwarf2_read_addr_index)
5232 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5233 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5234 (read_signatured_type): Update.
5236 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5238 * value.c (release_value): Remove unused variable.
5239 (record_latest_value): Likewise.
5240 (access_value_history): Likewise.
5241 (preserve_values): Likewise.
5243 2018-05-17 Tom Tromey <tom@tromey.com>
5245 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5248 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5251 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5252 Also handle registers whose width is not a multiple of
5254 (linux_nat_trad_target::store_register): Likewise.
5256 2018-05-16 Tom Tromey <tom@tromey.com>
5258 * gdbcore.h (core_bfd): Redefine.
5259 * corelow.c (core_target::close): Update.
5260 (core_target_open): Update.
5261 * progspace.h (struct program_space) <cbfd>: Now a
5264 2018-05-16 Tom Tromey <tom@tromey.com>
5267 * symfile-add-flags.h (enum symfile_add_flags)
5268 <SYMFILE_NOT_FILENAME>: New constant.
5269 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5270 objfile name from BFD.
5271 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5272 * minidebug.c (find_separate_debug_file_in_section): Put
5273 ".gnu_debugdata" into BFD's file name.
5275 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5277 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5280 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5283 * aarch64-tdep.c (aarch64_analyze_prologue,
5284 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5285 Indicate not interested in errors.
5287 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5289 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5290 Supply the MIPS_ZERO_REGNUM register.
5292 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5294 * mips-tdep.c (mask_address_var): Make variable static.
5296 2018-05-14 Tom Tromey <tom@tromey.com>
5298 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5300 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5302 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5303 FXSAVE_ADDR for the mxcsr register.
5305 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5307 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5309 2018-05-11 Pedro Alves <palves@redhat.com>
5311 * corelow.c (core_target) <core_target>: No longer inline.
5312 Initialize m_core_gdbarch, m_core_vec and build the section table
5314 <~core_target>: New.
5315 <core_gdbarch, get_core_register_section>: New methods.
5316 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5317 factored out from ...
5318 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5320 (sniff_core_bfd): Add gdbarch parameter.
5321 (core_close): Delete, merged into ...
5322 (core_target::close): ... here. Delete self.
5323 (core_close_cleanup): Delete.
5324 (core_target_open): Allocate a core_target on the heap. Use a
5325 unique_ptr instead of a cleanup. Bits moved into the core_target
5326 ctor. Adjust to use core_target methods instead of globals.
5327 (get_core_register_section): Rename to ...
5328 (core_target::get_core_register_section): ... this and adjust.
5329 (struct get_core_registers_cb_data): New.
5330 (get_core_registers_cb): Use it. Use bool.
5331 (core_target::fetch_registers, core_target::files_info)
5332 (core_target::xfer_partial, core_target::read_description)
5333 (core_target::pid_to, core_target::thread_name): Adjust to
5334 reference class fields instead of globals.
5335 * target.h (struct target_ops_deleter, target_ops_up): New.
5337 2018-05-11 Pedro Alves <palves@redhat.com>
5339 * corefile.c (core_file_command): Move to corelow.c.
5340 * corelow.c (the_core_target): Delete.
5341 (core_file_command): Moved from corefile.c. Check exec_bfd
5342 instead of the_core_target. Use target_detach instead of calling
5343 into the_core_target directly.
5344 (maybe_say_no_core_file_now): New.
5345 (core_target::detach): Use it.
5346 (_initialize_corelow): Remove references to the_core_target.
5347 * gdbcore.h (the_core_target): Delete.
5349 2018-05-11 Tom Tromey <tromey@redhat.com>
5350 Pedro Alves <palves@redhat.com>
5352 * corefile.c (core_bfd): Remove.
5353 * gdbcore.h (core_bfd): Now a macro.
5354 * progspace.h (struct program_space) <cbfd>: New field.
5356 2018-05-11 Tom Tromey <tom@tromey.com>
5358 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5361 2018-05-10 Tom Tromey <tom@tromey.com>
5363 * configure: Rebuild.
5364 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5366 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5369 * regformats/regdat.sh: Adjust script, following the addition
5370 of the new expedite_regs parameter to init_target_desc.
5372 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5375 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5376 set_gdbarch_significant_addr_bit.
5377 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5378 set_gdbarch_significant_addr_bit.
5379 * utils.c (address_significant): Update to sign extend addr.
5381 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5383 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5384 (xtensa_linux_init_abi): Limit tdep->num_regs by
5385 tdep->num_nopriv_regs.
5386 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5387 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5390 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5392 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5394 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5396 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5397 (I387_MXCSR_INIT_VAL): New constant.
5398 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5399 buffer if it was supplied by the inferior.
5400 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5401 (i387_xsave_get_clear_bv): New function.
5402 (i387_supply_xsave): Only read x87 control registers from the
5403 xsave buffer if the feature is enabled, and the state will have
5404 been written, otherwise, provide a suitable default.
5405 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5406 including x87 control registers. Update control registers if they
5407 have changed from the default value, and mark features as enabled
5409 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5411 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5413 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5415 2018-05-07 Tom Tromey <tom@tromey.com>
5417 * configure: Rebuild.
5418 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5420 2018-05-07 Tom Tromey <tom@tromey.com>
5423 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5424 bit. Use correct value for VDIV.
5426 2018-05-04 Tom Tromey <tom@tromey.com>
5428 * configure: Rebuild.
5429 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5431 2018-05-04 Tom Tromey <tom@tromey.com>
5433 * linux-record.c (record_linux_system_call) <case
5434 RECORD_SYS_RECVFROM>: Add "break".
5436 2018-05-04 Tom Tromey <tom@tromey.com>
5438 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5439 Add missing "break".
5440 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5441 Add missing "break".
5443 2018-05-04 Tom Tromey <tom@tromey.com>
5445 * rs6000-tdep.c (ppc_process_record_op4)
5446 (ppc_process_record_op63): Add fall-through comment.
5448 2018-05-04 Tom Tromey <tom@tromey.com>
5450 * i386-tdep.c (i386_process_record): Add fall-through comment.
5452 2018-05-04 Tom Tromey <tom@tromey.com>
5454 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5457 2018-05-04 Tom Tromey <tom@tromey.com>
5459 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5460 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5461 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5463 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5465 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5468 2018-05-04 Tom Tromey <tom@tromey.com>
5470 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5472 2018-05-04 Tom Tromey <tom@tromey.com>
5474 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5475 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5476 * symfile.c (section_is_mapped): Fix fall-through comment.
5477 * stabsread.c (define_symbol, read_member_functions): Fix
5478 fall-through comment.
5479 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5481 * remote.c (remote_wait_as): Fix fall-through comment.
5482 * p-exp.y (yylex): Fix fall-through comment.
5483 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5485 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5486 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5487 * jv-exp.y (yylex): Fix fall-through comment.
5488 * go-exp.y (lex_one_token): Fix fall-through comment.
5489 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5490 fall-through comment.
5491 * f-exp.y (yylex): Fix fall-through comment.
5492 * dwarf2read.c (process_die): Fix fall-through comments.
5493 * dbxread.c (process_one_symbol): Fix fall-through comment.
5494 * d-exp.y (lex_one_token): Fix fall-through comment.
5495 * cp-name-parser.y (yylex): Fix fall-through comment.
5496 * coffread.c (coff_symtab_read): Fix fall-through comment.
5497 * c-exp.y (lex_one_token): Fix fall-through comment.
5498 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5500 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5503 2018-05-04 Tom Tromey <tom@tromey.com>
5506 * NEWS: Mention gdb.execute change.
5507 * gdbcmd.h (execute_control_command): Don't declare.
5508 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5509 execute_control_commands, execute_control_commands_to_string.
5510 * cli/cli-script.h (execute_control_commands)
5511 (execute_control_commands_to_string): Declare.
5512 (execute_control_command): Add from_tty parameter.
5513 * cli/cli-script.c (execute_control_commands)
5514 (execute_control_commands_to_string): New functions.
5515 (execute_user_command): Use execute_control_commands.
5516 (execute_control_command_1): Add "from_tty" parameter. Update.
5517 (execute_control_command): Likewise.
5519 2018-05-04 Tom Tromey <tom@tromey.com>
5522 * NEWS: Mention that breakpoint commands are writable.
5523 * python/py-breakpoint.c (bppy_set_commands): New function.
5524 (breakpoint_object_getset) <"commands">: Use it.
5526 2018-05-04 Tom Tromey <tom@tromey.com>
5528 * tracepoint.c (actions_command): Update.
5529 * mi/mi-cmd-break.c (mi_command_line_array)
5530 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5531 (mi_read_next_line): Remove.
5532 (mi_cmd_break_commands): Update.
5533 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5535 * cli/cli-script.c (get_command_line): Update.
5536 (process_next_line): Use function_view. Constify.
5537 (recurse_read_control_structure, read_command_lines)
5538 (read_command_lines_1): Change argument types to function_view.
5539 (do_define_command, document_command): Update.
5540 * breakpoint.h (check_tracepoint_command): Don't declare.
5541 * breakpoint.c (check_tracepoint_command): Remove.
5542 (commands_command_1, create_tracepoint_from_upload): Update.
5544 2018-05-04 Tom Tromey <tom@tromey.com>
5547 * cli/cli-script.h (enum command_control_type) <define_control>:
5549 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5550 (build_command_line, execute_control_command_1)
5551 (process_next_line): Likewise.
5552 (do_define_command): New function, extracted from define_command.
5553 (define_command): Use it.
5555 2018-05-04 Tom Tromey <tom@tromey.com>
5557 * tracepoint.c (actions_command): Update.
5558 * cli/cli-script.h (read_command_lines): Update.
5559 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5560 (MAX_TMPBUF): Remove define.
5561 (define_command): Use string_printf.
5562 (document_command): Likewise.
5563 * breakpoint.c (commands_command_1): Update.
5565 2018-05-04 Tom Tromey <tom@tromey.com>
5567 * top.c (execute_command): Update.
5568 * cli/cli-script.h (print_command_lines): Now varargs.
5569 * cli/cli-script.c (print_command_lines): Now varargs.
5570 (execute_control_command_1) <case while_control, case if_control>:
5573 2018-05-04 Tom Tromey <tom@tromey.com>
5575 * tracepoint.c (all_tracepoint_actions): Rename from
5576 all_tracepoint_actions_and_cleanup. Change return type.
5577 (actions_command, encode_actions_1, encode_actions)
5578 (trace_dump_actions, tdump_command): Update.
5579 * remote.c (remote_download_command_source): Update.
5580 * python/python.c (gdbpy_eval_from_control_command)
5581 (python_command, python_interactive_command): Update.
5582 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5583 * guile/guile.c (guile_command)
5584 (gdbscm_eval_from_control_command, guile_command): Update.
5585 * compile/compile.c (compile_code_command)
5586 (compile_print_command, compile_to_object): Update.
5587 * cli/cli-script.h (struct command_lines_deleter): New.
5588 (counted_command_line): New typedef.
5589 (struct command_line): Add constructor, destructor.
5590 <body_list>: Remove.
5591 <body_list_0, body_list_1>: New members.
5592 (command_line_up): Remove typedef.
5593 (read_command_lines, read_command_lines_1, get_command_line):
5595 (copy_command_lines): Don't declare.
5596 * cli/cli-script.c (build_command_line): Use "new".
5597 (get_command_line): Return counted_command_line.
5598 (print_command_lines, execute_user_command)
5599 (execute_control_command_1, while_command, if_command): Update.
5600 (realloc_body_list): Remove.
5601 (process_next_line, recurse_read_control_structure): Update.
5602 (read_command_lines, read_command_lines_1): Return counted_command_line.
5603 (free_command_lines): Use "delete".
5604 (copy_command_lines): Remove.
5605 (define_command, document_command, show_user_1): Update.
5606 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5607 a counted_command_line.
5608 * breakpoint.h (counted_command_line): Remove typedef.
5609 (breakpoint_set_commands): Update.
5610 * breakpoint.c (check_no_tracepoint_commands)
5611 (validate_commands_for_breakpoint): Update.
5612 (breakpoint_set_commands): Change commands to be a
5613 counted_command_line.
5614 (commands_command_1, update_dprintf_command_list)
5615 (create_tracepoint_from_upload): Update.
5617 2018-05-04 Tom Tromey <tom@tromey.com>
5619 * cli/cli-decode.h (cmd_list_element): New constructor.
5620 (~cmd_list_element): New destructor.
5621 (struct cmd_list_element): Add initializers.
5622 * cli/cli-decode.c (do_add_cmd): Use "new".
5623 (delete_cmd): Use "delete".
5625 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5626 Pedro Alves <palves@redhat.com>
5628 PR breakpoints/19806 and support for PR external/20207.
5629 * NEWS: Mention Aarch64 watchpoint improvements.
5630 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5631 watchpoints and PR external/20207 watchpoints.
5632 * nat/aarch64-linux-hw-point.c
5633 (kernel_supports_any_contiguous_range): New.
5634 (aarch64_watchpoint_offset): New.
5635 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5636 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5637 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5638 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5639 next_addr_orig_p. Support PR external/20207 watchpoints.
5640 (aarch64_downgrade_regs): New.
5641 (aarch64_dr_state_insert_one_point): New parameters offset and
5643 (aarch64_dr_state_remove_one_point): Likewise.
5644 (aarch64_handle_breakpoint): Update caller.
5645 (aarch64_handle_aligned_watchpoint): Likewise.
5646 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5648 (aarch64_linux_set_debug_regs): Remove const from state. Call
5649 aarch64_downgrade_regs.
5650 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5651 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5652 (DR_CONTROL_MASK): ... this.
5653 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5654 (unsigned int aarch64_watchpoint_offset): New prototype.
5655 (aarch64_linux_set_debug_regs): Remove const from state.
5656 * utils.c (align_up, align_down): Move to ...
5657 * common/common-utils.c (align_up, align_down): ... here.
5658 * utils.h (align_up, align_down): Move to ...
5659 * common/common-utils.h (align_up, align_down): ... here.
5661 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5663 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5664 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5665 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5666 Re-implement to match the ABI as summarized in GCC's
5667 gcc/config/sparc/sparc.c. All callers updated.
5668 (sparc32_store_arguments): Remove assertion.
5670 2018-05-04 Tom Tromey <tom@tromey.com>
5672 * printcmd.c: Don't include tui.h.
5673 (decode_format): Use skip_spaces.
5675 2018-05-04 Tom Tromey <tom@tromey.com>
5678 * printcmd.c (last_count): New global.
5679 (x_command): Use saved count when repeating.
5681 2018-05-04 Tom Tromey <tom@tromey.com>
5683 * nto-procfs.c (do_closedir_cleanup): Remove.
5684 (procfs_pidlist): Use gdb_dir_up.
5685 * procfs.c (do_closedir_cleanup): Remove.
5686 (proc_update_threads): Use gdb_dir_up.
5687 * common/filestuff.h (struct gdb_dir_deleter): New.
5688 (gdb_dir_up): New typedef.
5690 2018-05-04 Tom Tromey <tom@tromey.com>
5692 * ada-lang.c (print_mention_exception): Use std::string.
5694 2018-05-04 Tom Tromey <tom@tromey.com>
5696 * ada-lang.c (create_excep_cond_exprs): Update.
5697 (ada_exception_catchpoint_cond_string): Use std::string.
5699 2018-05-04 Tom Tromey <tom@tromey.com>
5701 * ada-lang.c (xget_renaming_scope): Return std::string.
5702 (old_renaming_is_invisible): Update.
5704 2018-05-04 Tom Tromey <tom@tromey.com>
5706 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5707 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5709 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5711 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5713 2018-05-04 Tom Tromey <tom@tromey.com>
5715 * remote.c (remote_query_supported_append): Change type.
5716 (remote_check_symbols): Update.
5718 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5721 * configure.ac: Prepend libpython.
5722 * python/python-config.py: Likewise.
5723 * configure: Regenerate.
5725 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5727 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5729 2018-05-03 Pedro Alves <palves@redhat.com>
5732 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5733 override. Write 'true' instead of '1'.
5734 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5737 2018-05-02 Pedro Alves <palves@redhat.com>
5739 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5740 add_inf_child_target.
5741 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5742 add_inf_child_target.
5743 * aix-thread.c (aix_thread_target_info): New.
5744 (aix_thread_target) <shortname, longname, doc>: Delete.
5746 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5747 add_inf_child_target.
5748 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5749 add_inf_child_target.
5750 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5751 add_inf_child_target.
5752 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5753 add_inf_child_target.
5754 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5755 add_inf_child_target.
5756 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5757 add_inf_child_target.
5758 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5759 add_inf_child_target.
5760 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5761 add_inf_child_target.
5762 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5763 add_inf_child_target.
5764 * bfd-target.c (target_bfd_target_info): New.
5765 (target_bfd) <shortname, longname, doc>: Delete.
5767 * bsd-kvm.c (bsd_kvm_target_info): New.
5768 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5770 (bsd_kvm_target::open): Rename to ...
5771 (bsd_kvm_target_open): ... this. Adjust.
5772 * bsd-uthread.c (bsd_uthread_target_info): New.
5773 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5775 * corefile.c (core_file_command): Adjust.
5776 * corelow.c (core_target_info): New.
5777 (core_target) <shortname, longname, doc>: Delete.
5779 (core_target::open): Rename to ...
5780 (core_target_open): ... this. Adjust.
5781 * ctf.c (ctf_target_info): New.
5782 (ctf_target) <shortname, longname, doc>: Delete.
5784 (ctf_target::open): Rename to ...
5785 (ctf_target_open): ... this.
5786 (_initialize_ctf): Adjust.
5787 * exec.c (exec_target_info): New.
5788 (exec_target) <shortname, longname, doc>: Delete.
5790 (exec_target::open): Rename to ...
5791 (exec_target_open): ... this.
5792 * gdbcore.h (core_target_open): Declare.
5793 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5794 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5795 add_inf_child_target.
5796 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5797 add_inf_child_target.
5798 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5799 add_inf_child_target.
5800 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5801 add_inf_child_target.
5802 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5803 add_inf_child_target.
5804 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5805 add_inf_child_target.
5806 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5807 add_inf_child_target.
5808 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5809 add_inf_child_target.
5810 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5811 add_inf_child_target.
5812 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5813 add_inf_child_target.
5814 * inf-child.c (inf_child_target_info): New.
5815 (inf_child_target::info): New.
5816 (inf_child_open_target): Remove 'target' parameter. Use
5817 get_native_target instead.
5818 (inf_child_target::open): Delete.
5819 (add_inf_child_target): New.
5820 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5823 (add_inf_child_target): Declare.
5824 (inf_child_open_target): Declare.
5825 * linux-thread-db.c (thread_db_target_info): New.
5826 (thread_db_target) <shortname, longname, doc>: Delete.
5828 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5829 add_inf_child_target.
5830 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5831 add_inf_child_target.
5832 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5833 add_inf_child_target.
5834 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5835 add_inf_child_target.
5836 * make-target-delegates (print_class): Adjust.
5837 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5838 add_inf_child_target.
5839 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5840 add_inf_child_target.
5841 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5842 add_inf_child_target.
5843 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5844 add_inf_child_target.
5845 * nto-procfs.c (nto_native_target_info): New.
5846 (nto_procfs_target_native) <shortname, longname, doc>:
5849 (nto_procfs_target_info): New.
5850 (nto_procfs_target_procfs) <shortname, longname, doc>:
5853 (init_procfs_targets): Adjust.
5854 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5855 add_inf_child_target.
5856 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5857 add_inf_child_target.
5858 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5859 add_inf_child_target.
5860 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5861 add_inf_child_target.
5862 * ravenscar-thread.c (ravenscar_target_info): New.
5863 (ravenscar_thread_target) <shortname, longname, doc>:
5866 * record-btrace.c (record_btrace_target_info):
5867 (record_btrace_target) <shortname, longname, doc>: Delete.
5869 (record_btrace_target::open): Rename to ...
5870 (record_btrace_target_open): ... this. Adjust.
5871 * record-full.c (record_longname, record_doc): New.
5872 (record_full_base_target) <shortname, longname, doc>: Delete.
5874 (record_full_target_info): New.
5875 (record_full_target): <shortname>: Delete.
5877 (record_full_core_open_1, record_full_open_1): Update comments.
5878 (record_full_base_target::open): Rename to ...
5879 (record_full_open): ... this.
5880 (cmd_record_full_restore): Update.
5881 (_initialize_record_full): Update.
5882 * remote-sim.c (remote_sim_target_info): New.
5883 (gdbsim_target) <shortname, longname, doc>: Delete.
5885 (gdbsim_target::open): Rename to ...
5886 (gdbsim_target_open): ... this.
5887 (_initialize_remote_sim): Adjust.
5888 * remote.c (remote_doc): New.
5889 (remote_target_info): New.
5890 (remote_target) <shortname, longname, doc>: Delete.
5892 (extended_remote_target_info): New.
5893 (extended_remote_target) <shortname, longname, doc>: Delete.
5895 (remote_target::open_1): Make static. Adjust.
5896 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5897 * s390-linux-nat.c (_initialize_s390_nat): Use
5898 add_inf_child_target.
5899 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5900 add_inf_child_target.
5901 * sol-thread.c (thread_db_target_info): New.
5902 (sol_thread_target) <shortname, longname, doc>: Delete.
5904 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5905 add_inf_child_target.
5906 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5907 add_inf_child_target.
5908 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5909 add_inf_child_target.
5910 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5911 add_inf_child_target.
5912 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5913 add_inf_child_target.
5914 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5915 add_inf_child_target.
5916 * spu-linux-nat.c (_initialize_spu_nat): Use
5917 add_inf_child_target.
5918 * spu-multiarch.c (spu_multiarch_target_info): New.
5919 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5921 * target-delegates.c: Regenerate.
5922 * target.c: Include <unordered_map>.
5923 (target_ops_p): Delete.
5924 (DEF_VEC_P(target_ops_p)): Delete.
5925 (target_factories): New.
5926 (test_target_info): New.
5927 (test_target_ops::info): New.
5928 (open_target): Adjust to use target_factories.
5929 (add_target_with_completer): Rename to ...
5930 (add_target): ... this. Change prototype. Register target_info
5931 and open callback in target_factories. Register target_info in
5932 command context instead of target_ops.
5933 (add_target): Delete old implementation.
5934 (add_deprecated_target_alias): Change prototype. Adjust.
5935 (the_native_target): New.
5936 (set_native_target, get_native_target): New.
5937 (find_default_run_target): Use the_native_target.
5938 (find_attach_target, find_run_target): Simplify.
5939 (target_ops::open): Delete.
5940 (dummy_target_info): New.
5941 (dummy_target::shortname, dummy_target::longname)
5942 (dummy_target::doc): Delete.
5943 (dummy_target::info): New.
5944 (debug_target::shortname, debug_target::longname)
5945 (debug_target::doc): Delete.
5946 (debug_target::info): New.
5947 * target.h (struct target_info): New.
5948 (target_ops::~target_ops): Add comment.
5949 (target_ops::info): New.
5950 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5951 longer virtual. Implement in terms of target_info.
5952 (set_native_target, get_native_target): Declare.
5953 (target_open_ftype): New.
5954 (add_target, add_target_with_completer)
5955 (add_deprecated_target_alias): Change prototype.
5956 (test_target) <shortname, longname, doc>: Delete.
5958 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5959 add_inf_child_target.
5960 * tracefile-tfile.c (tfile_target_info): New.
5961 (tfile_target) <shortname, longname, doc>: Delete.
5963 (tfile_target::open): Rename to ...
5964 (tfile_target_open): ... this.
5965 (_initialize_tracefile_tfile): Adjust.
5966 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5967 add_inf_child_target.
5968 * windows-nat.c (_initialize_windows_nat): Use
5969 add_inf_child_target.
5970 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5971 add_inf_child_target.
5973 2018-05-02 Pedro Alves <palves@redhat.com>
5975 * linux-nat.h (linux_nat_target) <low_new_thread,
5976 low_delete_thread, low_new_fork, low_forget_process,
5977 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5978 New virtual methods.
5979 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5980 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5981 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5982 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5983 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5985 * linux-fork.c (delete_fork): Adjust to call low method.
5986 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5987 (linux_nat_new_fork, linux_nat_forget_process_hook)
5988 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5989 (linux_nat_status_is_event):
5990 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5991 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5993 (sigtrap_is_event): Rename to ...
5994 (linux_nat_target::low_status_is_event): ... this.
5995 (linux_nat_set_status_is_event): Delete.
5996 (save_stop_reason, linux_nat_wait_1)
5997 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5999 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6000 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6001 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6002 (linux_nat_set_prepare_to_resume): Delete.
6003 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6004 low virtual methods.
6005 * amd64-linux-nat.c: Likewise.
6006 * arm-linux-nat.c: Likewise.
6007 * i386-linux-nat.c: Likewise.
6008 * ia64-linux-nat.c: Likewise.
6009 * mips-linux-nat.c: Likewise.
6010 * ppc-linux-nat.c: Likewise.
6011 * s390-linux-nat.c: Likewise.
6012 * sparc64-linux-nat.c: Likewise.
6013 * x86-linux-nat.c: Likewise.
6014 * x86-linux-nat.h: Include "nat/x86-linux.h".
6015 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6016 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6019 2018-05-02 Pedro Alves <palves@redhat.com>
6021 * target.h (target_ops)
6022 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6023 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6024 stopped_by_watchpoint, have_continuable_watchpoint,
6025 stopped_data_address, watchpoint_addr_within_range,
6026 can_accel_watchpoint_condition, can_run, thread_alive,
6027 has_all_memory, has_memory, has_stack, has_registers,
6028 has_execution, can_async_p, is_async_p, supports_non_stop,
6029 always_non_stop_p, can_execute_reverse, supports_multi_process,
6030 supports_enable_disable_tracepoint,
6031 supports_disable_randomization, supports_string_tracing,
6032 supports_evaluation_of_breakpoint_conditions,
6033 can_run_breakpoint_commands, filesystem_is_local,
6034 can_download_tracepoint, get_trace_state_variable_value,
6035 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6036 record_is_replaying, record_will_replay,
6037 augmented_libraries_svr4_read>: Adjust to return bool.
6038 * aarch64-linux-nat.c: All implementations adjusted.
6039 * aix-thread.c: All implementations adjusted.
6040 * arm-linux-nat.c: All implementations adjusted.
6041 * breakpoint.c: All implementations adjusted.
6042 * bsd-kvm.c: All implementations adjusted.
6043 * bsd-uthread.c: All implementations adjusted.
6044 * corelow.c: All implementations adjusted.
6045 * ctf.c: All implementations adjusted.
6046 * darwin-nat.c: All implementations adjusted.
6047 * darwin-nat.h: All implementations adjusted.
6048 * exec.c: All implementations adjusted.
6049 * fbsd-nat.c: All implementations adjusted.
6050 * fbsd-nat.h: All implementations adjusted.
6051 * gnu-nat.c: All implementations adjusted.
6052 * gnu-nat.h: All implementations adjusted.
6053 * go32-nat.c: All implementations adjusted.
6054 * ia64-linux-nat.c: All implementations adjusted.
6055 * inf-child.c: All implementations adjusted.
6056 * inf-child.h: All implementations adjusted.
6057 * inf-ptrace.c: All implementations adjusted.
6058 * inf-ptrace.h: All implementations adjusted.
6059 * linux-nat.c: All implementations adjusted.
6060 * linux-nat.h: All implementations adjusted.
6061 * mips-linux-nat.c: All implementations adjusted.
6062 * nto-procfs.c: All implementations adjusted.
6063 * ppc-linux-nat.c: All implementations adjusted.
6064 * procfs.c: All implementations adjusted.
6065 * ravenscar-thread.c: All implementations adjusted.
6066 * record-btrace.c: All implementations adjusted.
6067 * record-full.c: All implementations adjusted.
6068 * remote-sim.c: All implementations adjusted.
6069 * remote.c: All implementations adjusted.
6070 * s390-linux-nat.c: All implementations adjusted.
6071 * sol-thread.c: All implementations adjusted.
6072 * spu-multiarch.c: All implementations adjusted.
6073 * target-delegates.c: All implementations adjusted.
6074 * target.c: All implementations adjusted.
6075 * target.h: All implementations adjusted.
6076 * tracefile-tfile.c: All implementations adjusted.
6077 * tracefile.c: All implementations adjusted.
6078 * tracefile.h: All implementations adjusted.
6079 * windows-nat.c: All implementations adjusted.
6080 * x86-linux-nat.h: All implementations adjusted.
6081 * x86-nat.h: All implementations adjusted.
6083 2018-05-02 Pedro Alves <palves@redhat.com>
6085 * make-target-delegates (scan_target_h): Don't trim lines here.
6086 Replace sequences of tabs and/or whitespace with a single
6088 (top level, parsing methods): Trim each line before processing it
6091 2018-05-02 Pedro Alves <palves@redhat.com>
6092 John Baldwin <jhb@freebsd.org>
6094 * target.h (enum strata) <debug_stratum>: New.
6095 (struct target_ops) <all delegation methods>: Replace by C++
6096 virtual methods, and drop "to_" prefix. All references updated
6098 <to_shortname, to_longname, to_doc, to_data,
6099 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6100 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6101 virtual methods. All references updated throughout.
6102 <can_attach, supports_terminal_ours, can_create_inferior,
6103 get_thread_control_capabilities, attach_no_wait>: New
6105 <insert_breakpoint, remove_breakpoint>: Now
6106 TARGET_DEFAULT_NORETURN methods.
6107 <info_proc>: Now returns bool.
6109 (OPS_MAGIC): Delete.
6110 (current_target): Delete. All references replaced by references
6112 (target_stack): ... this. New.
6113 (target_shortname, target_longname): Adjust.
6114 (target_can_run): Now a function declaration.
6115 (default_child_has_all_memory, default_child_has_memory)
6116 (default_child_has_stack, default_child_has_registers)
6117 (default_child_has_execution): Remove target_ops parameter.
6118 (complete_target_initialization): Delete.
6119 (memory_breakpoint_target): New template class.
6120 (test_target_ops): Refactor as a C++ class with virtual methods.
6121 * make-target-delegates (NAME_PART): Tighten.
6122 (POINTER_PART, CP_SYMBOL): New.
6123 (SIMPLE_RETURN_PART): Reimplement.
6124 (VEC_RETURN_PART): Expect less.
6125 (RETURN_PART, VIRTUAL_PART): New.
6126 (METHOD): Adjust to C++ virtual methods.
6127 (scan_target_h): Remove reference to C99.
6128 (dname): Output "target_ops::" prefix.
6129 (write_function_header): Adjust to output a C++ class method.
6130 (write_declaration): New.
6131 (write_delegator): Adjust to output a C++ class method.
6132 (tdname): Output "dummy_target::" prefix.
6133 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6135 (tdefault_names, debug_names): Delete.
6136 (return_types, tdefaults, styles, argtypes_array): New.
6137 (top level): All methods are delegators.
6139 (top level): Print dummy_target and debug_target classes.
6140 * target-delegates.c: Regenerate.
6141 * target-debug.h (target_debug_print_enum_info_proc_what)
6142 (target_debug_print_thread_control_capabilities)
6143 (target_debug_print_thread_info_p): New.
6144 * target.c (dummy_target): Delete.
6145 (the_dummy_target, the_debug_target): New.
6146 (target_stack): Now extern.
6147 (set_targetdebug): Push/unpush debug target.
6148 (default_child_has_all_memory, default_child_has_memory)
6149 (default_child_has_stack, default_child_has_registers)
6150 (default_child_has_execution): Remove target_ops parameter.
6151 (complete_target_initialization): Delete.
6152 (add_target_with_completer): No longer call
6153 complete_target_initialization.
6154 (target_supports_terminal_ours): Use regular delegation.
6155 (update_current_target): Delete.
6156 (push_target): No longer check magic number. Don't call
6157 update_current_target.
6158 (unpush_target): Don't call update_current_target.
6159 (target_is_pushed): No longer check magic number.
6160 (target_require_runnable): Skip for all stratums over
6162 (target_ops::info_proc): New.
6163 (target_info_proc): Use find_target_at and
6164 find_default_run_target.
6165 (target_supports_disable_randomization): Use regular delegation.
6166 (target_get_osdata): Use find_target_at.
6167 (target_ops::open, target_ops::close, target_ops::can_attach)
6168 (target_ops::attach, target_ops::can_create_inferior)
6169 (target_ops::create_inferior, target_ops::can_run)
6170 (target_can_run): New.
6171 (default_fileio_target): Use regular delegation.
6172 (target_ops::fileio_open, target_ops::fileio_pwrite)
6173 (target_ops::fileio_pread, target_ops::fileio_fstat)
6174 (target_ops::fileio_close, target_ops::fileio_unlink)
6175 (target_ops::fileio_readlink): New.
6176 (target_fileio_open_1, target_fileio_unlink)
6177 (target_fileio_readlink): Always call the target method. Handle
6179 (return_zero, return_zero_has_execution): Delete.
6180 (init_dummy_target): Delete.
6181 (dummy_target::dummy_target, dummy_target::shortname)
6182 (dummy_target::longname, dummy_target::doc)
6183 (debug_target::debug_target, debug_target::shortname)
6184 (debug_target::longname, debug_target::doc): New.
6185 (target_supports_delete_record): Use regular delegation.
6186 (setup_target_debug): Delete.
6187 (maintenance_print_target_stack): Skip debug_stratum.
6188 (initialize_targets): Instantiate the_dummy_target and
6190 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6192 (target_auxv_search, fprint_target_auxv): Adjust.
6193 (info_auxv_command): Adjust to use target_stack.
6194 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6195 * exceptions.c (print_flush): Handle a NULL target_stack.
6196 * regcache.c (target_ops_no_register): Refactor as class with
6199 * exec.c (exec_target): New class.
6200 (exec_ops): Now an exec_target.
6201 (exec_open, exec_close_1, exec_get_section_table)
6202 (exec_xfer_partial, exec_files_info, exec_has_memory)
6203 (exec_make_note_section): Refactor as exec_target methods.
6204 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6206 (exec_target::find_memory_regions): New.
6207 (_initialize_exec): Don't call init_exec_ops.
6208 * gdbcore.h (exec_file_clear): Delete.
6210 * corefile.c (core_target): Delete.
6211 (core_file_command): Adjust.
6212 * corelow.c (core_target): New class.
6213 (the_core_target): New.
6214 (core_close): Remove target_ops parameter.
6215 (core_close_cleanup): Adjust.
6216 (core_target::close): New.
6217 (core_open, core_detach, get_core_registers, core_files_info)
6218 (core_xfer_partial, core_thread_alive, core_read_description)
6219 (core_pid_to_str, core_thread_name, core_has_memory)
6220 (core_has_stack, core_has_registers, core_info_proc): Rework as
6221 core_target methods.
6222 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6223 (_initialize_corelow): Initialize the_core_target.
6224 * gdbcore.h (core_target): Delete.
6225 (the_core_target): New.
6227 * ctf.c: (ctf_target): New class.
6228 (ctf_ops): Now a ctf_target.
6229 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6230 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6231 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6233 (init_ctf_ops): Delete.
6234 (_initialize_ctf): Don't call it.
6235 * tracefile-tfile.c (tfile_target): New class.
6236 (tfile_ops): Now a tfile_target.
6237 (tfile_open, tfile_close, tfile_files_info)
6238 (tfile_get_tracepoint_status, tfile_trace_find)
6239 (tfile_fetch_registers, tfile_xfer_partial)
6240 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6241 Refactor as tfile_target methods.
6242 (tfile_xfer_partial_features): Remove target_ops parameter.
6243 (init_tfile_ops): Delete.
6244 (_initialize_tracefile_tfile): Don't call it.
6245 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6246 (tracefile_has_stack, tracefile_has_registers)
6247 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6248 tracefile_target methods.
6249 (init_tracefile_ops): Delete.
6250 (tracefile_target::tracefile_target): New.
6251 * tracefile.h: Include "target.h".
6252 (tracefile_target): New class.
6253 (init_tracefile_ops): Delete.
6255 * spu-multiarch.c (spu_multiarch_target): New class.
6256 (spu_ops): Now a spu_multiarch_target.
6257 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6258 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6259 (spu_search_memory, spu_mourn_inferior): Refactor as
6260 spu_multiarch_target methods.
6261 (init_spu_ops): Delete.
6262 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6263 complete_target_initialization.
6265 * ravenscar-thread.c (ravenscar_thread_target): New class.
6266 (ravenscar_ops): Now a ravenscar_thread_target.
6267 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6268 (ravenscar_thread_alive, ravenscar_pid_to_str)
6269 (ravenscar_fetch_registers, ravenscar_store_registers)
6270 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6271 (ravenscar_stopped_by_hw_breakpoint)
6272 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6273 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6274 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6276 (init_ravenscar_thread_ops): Delete.
6277 (_initialize_ravenscar): Remove references to
6278 init_ravenscar_thread_ops and complete_target_initialization.
6280 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6281 (bsd_uthread_target): New class.
6282 (bsd_uthread_ops): Now a bsd_uthread_target.
6283 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6284 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6285 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6286 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6287 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6288 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6289 (bsd_uthread_target): Delete function.
6290 (_initialize_bsd_uthread): Remove reference to
6291 complete_target_initialization.
6293 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6294 (target_bfd): ... this new class.
6295 (target_bfd_xfer_partial, target_bfd_get_section_table)
6296 (target_bfd_close): Refactor as target_bfd methods.
6297 (target_bfd::~target_bfd): New.
6298 (target_bfd_reopen): Adjust.
6299 (target_bfd::close): New.
6301 * record-btrace.c (record_btrace_target): New class.
6302 (record_btrace_ops): Now a record_btrace_target.
6303 (record_btrace_open, record_btrace_stop_recording)
6304 (record_btrace_disconnect, record_btrace_close)
6305 (record_btrace_async, record_btrace_info)
6306 (record_btrace_insn_history, record_btrace_insn_history_range)
6307 (record_btrace_insn_history_from, record_btrace_call_history)
6308 (record_btrace_call_history_range)
6309 (record_btrace_call_history_from, record_btrace_record_method)
6310 (record_btrace_is_replaying, record_btrace_will_replay)
6311 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6312 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6313 (record_btrace_store_registers, record_btrace_prepare_to_store)
6314 (record_btrace_to_get_unwinder)
6315 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6316 (record_btrace_commit_resume, record_btrace_wait)
6317 (record_btrace_stop, record_btrace_can_execute_reverse)
6318 (record_btrace_stopped_by_sw_breakpoint)
6319 (record_btrace_supports_stopped_by_sw_breakpoint)
6320 (record_btrace_stopped_by_hw_breakpoint)
6321 (record_btrace_supports_stopped_by_hw_breakpoint)
6322 (record_btrace_update_thread_list, record_btrace_thread_alive)
6323 (record_btrace_goto_begin, record_btrace_goto_end)
6324 (record_btrace_goto, record_btrace_stop_replaying_all)
6325 (record_btrace_execution_direction)
6326 (record_btrace_prepare_to_generate_core)
6327 (record_btrace_done_generating_core): Refactor as
6328 record_btrace_target methods.
6329 (init_record_btrace_ops): Delete.
6330 (_initialize_record_btrace): Remove reference to
6331 init_record_btrace_ops.
6332 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6333 the execution_direction global.
6334 (record_full_base_target, record_full_target)
6335 (record_full_core_target): New classes.
6336 (record_full_ops): Now a record_full_target.
6337 (record_full_core_ops): Now a record_full_core_target.
6338 (record_full_target::detach, record_full_target::disconnect)
6339 (record_full_core_target::disconnect)
6340 (record_full_target::mourn_inferior, record_full_target::kill):
6342 (record_full_open, record_full_close, record_full_async): Refactor
6343 as methods of the record_full_base_target class.
6344 (record_full_resume, record_full_commit_resume): Refactor
6345 as methods of the record_full_target class.
6346 (record_full_wait, record_full_stopped_by_watchpoint)
6347 (record_full_stopped_data_address)
6348 (record_full_stopped_by_sw_breakpoint)
6349 (record_full_supports_stopped_by_sw_breakpoint)
6350 (record_full_stopped_by_hw_breakpoint)
6351 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6352 methods of the record_full_base_target class.
6353 (record_full_store_registers, record_full_xfer_partial)
6354 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6355 Refactor as methods of the record_full_target class.
6356 (record_full_can_execute_reverse, record_full_get_bookmark)
6357 (record_full_goto_bookmark, record_full_execution_direction)
6358 (record_full_record_method, record_full_info, record_full_delete)
6359 (record_full_is_replaying, record_full_will_replay)
6360 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6361 (record_full_stop_replaying): Refactor as methods of the
6362 record_full_base_target class.
6363 (record_full_core_resume, record_full_core_kill)
6364 (record_full_core_fetch_registers)
6365 (record_full_core_prepare_to_store)
6366 (record_full_core_store_registers, record_full_core_xfer_partial)
6367 (record_full_core_insert_breakpoint)
6368 (record_full_core_remove_breakpoint)
6369 (record_full_core_has_execution): Refactor
6370 as methods of the record_full_core_target class.
6371 (record_full_base_target::supports_delete_record): New.
6372 (init_record_full_ops): Delete.
6373 (init_record_full_core_ops): Delete.
6374 (record_full_save): Refactor as method of the
6375 record_full_base_target class.
6376 (_initialize_record_full): Remove references to
6377 init_record_full_ops and init_record_full_core_ops.
6379 * remote.c (remote_target, extended_remote_target): New classes.
6380 (remote_ops): Now a remote_target.
6381 (extended_remote_ops): Now an extended_remote_target.
6382 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6383 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6384 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6385 (remote_pass_signals, remote_set_syscall_catchpoint)
6386 (remote_program_signals, )
6387 (remote_thread_always_alive): Remove target_ops parameter.
6388 (remote_thread_alive, remote_thread_name)
6389 (remote_update_thread_list, remote_threads_extra_info)
6390 (remote_static_tracepoint_marker_at)
6391 (remote_static_tracepoint_markers_by_strid)
6392 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6393 (remote_open): Refactor as methods of remote_target.
6394 (extended_remote_open, extended_remote_detach)
6395 (extended_remote_attach, extended_remote_post_attach):
6396 (extended_remote_supports_disable_randomization)
6397 (extended_remote_create_inferior): : Refactor as method of
6398 extended_remote_target.
6399 (remote_set_permissions, remote_open_1, remote_detach)
6400 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6401 (remote_resume, remote_commit_resume, remote_stop)
6402 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6403 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6404 (remote_prepare_to_store, remote_store_registers)
6405 (remote_flash_erase, remote_flash_done, remote_files_info)
6406 (remote_kill, remote_mourn, remote_insert_breakpoint)
6407 (remote_remove_breakpoint, remote_insert_watchpoint)
6408 (remote_watchpoint_addr_within_range)
6409 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6410 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6411 (remote_supports_stopped_by_sw_breakpoint)
6412 (remote_stopped_by_hw_breakpoint)
6413 (remote_supports_stopped_by_hw_breakpoint)
6414 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6415 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6416 (remote_verify_memory): Refactor as methods of remote_target.
6417 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6419 (remote_xfer_partial, remote_get_memory_xfer_limit)
6420 (remote_search_memory, remote_rcmd, remote_memory_map)
6421 (remote_pid_to_str, remote_get_thread_local_address)
6422 (remote_get_tib_address, remote_read_description): Refactor as
6423 methods of remote_target.
6424 (remote_target::fileio_open, remote_target::fileio_pwrite)
6425 (remote_target::fileio_pread, remote_target::fileio_close): New.
6426 (remote_hostio_readlink, remote_hostio_fstat)
6427 (remote_filesystem_is_local, remote_can_execute_reverse)
6428 (remote_supports_non_stop, remote_supports_disable_randomization)
6429 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6430 (remote_supports_enable_disable_tracepoint)
6431 (remote_supports_string_tracing)
6432 (remote_can_run_breakpoint_commands, remote_trace_init)
6433 (remote_download_tracepoint, remote_can_download_tracepoint)
6434 (remote_download_trace_state_variable, remote_enable_tracepoint)
6435 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6436 (remote_trace_start, remote_get_trace_status)
6437 (remote_get_tracepoint_status, remote_trace_stop)
6438 (remote_trace_find, remote_get_trace_state_variable_value)
6439 (remote_save_trace_data, remote_get_raw_trace_data)
6440 (remote_set_disconnected_tracing, remote_core_of_thread)
6441 (remote_set_circular_trace_buffer, remote_traceframe_info)
6442 (remote_get_min_fast_tracepoint_insn_len)
6443 (remote_set_trace_buffer_size, remote_set_trace_notes)
6444 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6445 (remote_disable_btrace, remote_teardown_btrace)
6446 (remote_read_btrace, remote_btrace_conf)
6447 (remote_augmented_libraries_svr4_read, remote_load)
6448 (remote_pid_to_exec_file, remote_can_do_single_step)
6449 (remote_execution_direction, remote_thread_handle_to_thread_info):
6450 Refactor as methods of remote_target.
6451 (init_remote_ops, init_extended_remote_ops): Delete.
6452 (remote_can_async_p, remote_is_async_p, remote_async)
6453 (remote_thread_events, remote_upload_tracepoints)
6454 (remote_upload_trace_state_variables): Refactor as methods of
6456 (_initialize_remote): Remove references to init_remote_ops and
6457 init_extended_remote_ops.
6459 * remote-sim.c (gdbsim_target): New class.
6460 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6461 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6462 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6463 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6464 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6465 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6466 Refactor as methods of gdbsim_target.
6467 (gdbsim_ops): Now a gdbsim_target.
6468 (init_gdbsim_ops): Delete.
6469 (gdbsim_cntrl_c): Adjust.
6470 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6472 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6473 (the_amd64_linux_nat_target): New.
6474 (amd64_linux_fetch_inferior_registers)
6475 (amd64_linux_store_inferior_registers): Refactor as methods of
6476 amd64_linux_nat_target.
6477 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6478 * i386-linux-nat.c: Don't include "linux-nat.h".
6479 (i386_linux_nat_target): New class.
6480 (the_i386_linux_nat_target): New.
6481 (i386_linux_fetch_inferior_registers)
6482 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6483 as methods of i386_linux_nat_target.
6484 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6485 * inf-child.c (inf_child_ops): Delete.
6486 (inf_child_fetch_inferior_registers)
6487 (inf_child_store_inferior_registers): Delete.
6488 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6489 methods of inf_child_target.
6490 (inf_child_target::supports_terminal_ours)
6491 (inf_child_target::terminal_init)
6492 (inf_child_target::terminal_inferior)
6493 (inf_child_target::terminal_ours_for_output)
6494 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6495 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6497 (inf_child_open, inf_child_disconnect, inf_child_close)
6498 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6499 (inf_child_post_startup_inferior, inf_child_can_run)
6500 (inf_child_pid_to_exec_file): Refactor as methods of
6502 (inf_child_follow_fork): Delete.
6503 (inf_child_target::can_create_inferior)
6504 (inf_child_target::can_attach): New.
6505 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6506 (inf_child_target::has_stack, inf_child_target::has_registers)
6507 (inf_child_target::has_execution): New.
6508 (inf_child_fileio_open, inf_child_fileio_pwrite)
6509 (inf_child_fileio_pread, inf_child_fileio_fstat)
6510 (inf_child_fileio_close, inf_child_fileio_unlink)
6511 (inf_child_fileio_readlink, inf_child_use_agent)
6512 (inf_child_can_use_agent): Refactor as methods of
6514 (return_zero, inf_child_target): Delete.
6515 (inf_child_target::inf_child_target): New.
6516 * inf-child.h: Include "target.h".
6517 (inf_child_target): Delete function prototype.
6518 (inf_child_target): New class.
6519 (inf_child_open_target, inf_child_mourn_inferior)
6520 (inf_child_maybe_unpush_target): Delete.
6521 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6522 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6523 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6524 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6525 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6526 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6527 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6528 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6529 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6530 methods of inf_ptrace_target.
6531 (inf_ptrace_target): Delete function.
6532 * inf-ptrace.h: Include "inf-child.h".
6533 (inf_ptrace_target): Delete function declaration.
6534 (inf_ptrace_target): New class.
6535 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6536 * linux-nat.c (linux_target): New.
6537 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6538 (linux_nat_target::~linux_nat_target): New.
6539 (linux_child_post_attach, linux_child_post_startup_inferior)
6540 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6541 (linux_child_remove_fork_catchpoint)
6542 (linux_child_insert_vfork_catchpoint)
6543 (linux_child_remove_vfork_catchpoint)
6544 (linux_child_insert_exec_catchpoint)
6545 (linux_child_remove_exec_catchpoint)
6546 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6547 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6548 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6549 (linux_nat_stopped_data_address)
6550 (linux_nat_stopped_by_sw_breakpoint)
6551 (linux_nat_supports_stopped_by_sw_breakpoint)
6552 (linux_nat_stopped_by_hw_breakpoint)
6553 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6554 (linux_nat_kill, linux_nat_mourn_inferior)
6555 (linux_nat_xfer_partial, linux_nat_thread_alive)
6556 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6557 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6558 (linux_child_static_tracepoint_markers_by_strid)
6559 (linux_nat_is_async_p, linux_nat_can_async_p)
6560 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6561 (linux_nat_supports_multi_process)
6562 (linux_nat_supports_disable_randomization, linux_nat_async)
6563 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6564 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6565 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6566 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6567 methods of linux_nat_target.
6568 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6569 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6571 (check_stopped_by_watchpoint): Adjust.
6572 (linux_xfer_partial): Delete.
6573 (linux_target_install_ops, linux_target, linux_nat_add_target):
6575 (linux_nat_target::linux_nat_target): New.
6576 * linux-nat.h: Include "inf-ptrace.h".
6577 (linux_nat_target): New.
6578 (linux_target, linux_target_install_ops, linux_nat_add_target):
6579 Delete function declarations.
6580 (linux_target): Declare global.
6581 * linux-thread-db.c (thread_db_target): New.
6582 (thread_db_target::thread_db_target): New.
6583 (thread_db_ops): Delete.
6584 (the_thread_db_target): New.
6585 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6586 (thread_db_update_thread_list, thread_db_pid_to_str)
6587 (thread_db_extra_thread_info)
6588 (thread_db_thread_handle_to_thread_info)
6589 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6590 (thread_db_resume): Refactor as methods of thread_db_target.
6591 (init_thread_db_ops): Delete.
6592 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6593 * x86-linux-nat.c: Don't include "linux-nat.h".
6594 (super_post_startup_inferior): Delete.
6595 (x86_linux_nat_target::~x86_linux_nat_target): New.
6596 (x86_linux_child_post_startup_inferior)
6597 (x86_linux_read_description, x86_linux_enable_btrace)
6598 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6599 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6600 methods of x86_linux_nat_target.
6601 (x86_linux_create_target): Delete. Bits folded ...
6602 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6604 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6605 (x86_linux_nat_target): New class.
6606 (x86_linux_create_target): Delete.
6607 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6608 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6609 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6610 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6611 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6612 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6614 (x86_use_watchpoints): Delete.
6615 * x86-nat.h: Include "breakpoint.h" and "target.h".
6616 (x86_use_watchpoints): Delete.
6617 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6618 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6619 (x86_insert_watchpoint, x86_remove_watchpoint)
6620 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6621 (x86_stopped_by_hw_breakpoint): New declarations.
6622 (x86_nat_target): New template class.
6624 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6625 (the_ppc_linux_nat_target): New.
6626 (ppc_linux_fetch_inferior_registers)
6627 (ppc_linux_can_use_hw_breakpoint)
6628 (ppc_linux_region_ok_for_hw_watchpoint)
6629 (ppc_linux_ranged_break_num_registers)
6630 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6631 (ppc_linux_insert_mask_watchpoint)
6632 (ppc_linux_remove_mask_watchpoint)
6633 (ppc_linux_can_accel_watchpoint_condition)
6634 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6635 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6636 (ppc_linux_watchpoint_addr_within_range)
6637 (ppc_linux_masked_watch_num_registers)
6638 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6639 (ppc_linux_read_description): Refactor as methods of
6640 ppc_linux_nat_target.
6641 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6643 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6644 (procfs_target): New class.
6645 (the_procfs_target): New.
6646 (procfs_target): Delete function.
6647 (procfs_auxv_parse, procfs_attach, procfs_detach)
6648 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6649 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6650 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6651 (procfs_create_inferior, procfs_update_thread_list)
6652 (procfs_thread_alive, procfs_pid_to_str)
6653 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6654 (procfs_stopped_data_address, procfs_insert_watchpoint)
6655 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6656 (proc_find_memory_regions, procfs_info_proc)
6657 (procfs_make_note_section): Refactor as methods of procfs_target.
6658 (_initialize_procfs): Adjust.
6659 * sol-thread.c (sol_thread_target): New class.
6660 (sol_thread_ops): Now a sol_thread_target.
6661 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6662 (sol_thread_fetch_registers, sol_thread_store_registers)
6663 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6664 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6665 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6666 (init_sol_thread_ops): Delete.
6667 (_initialize_sol_thread): Adjust. Remove references to
6668 init_sol_thread_ops and complete_target_initialization.
6670 * windows-nat.c (windows_nat_target): New class.
6671 (windows_fetch_inferior_registers)
6672 (windows_store_inferior_registers, windows_resume, windows_wait)
6673 (windows_attach, windows_detach, windows_pid_to_exec_file)
6674 (windows_files_info, windows_create_inferior)
6675 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6676 (windows_close, windows_pid_to_str, windows_xfer_partial)
6677 (windows_get_tib_address, windows_get_ada_task_ptid)
6678 (windows_thread_name, windows_thread_alive): Refactor as
6679 windows_nat_target methods.
6680 (do_initial_windows_stuff): Adjust.
6681 (windows_target): Delete function.
6682 (_initialize_windows_nat): Adjust.
6684 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6685 (darwin_mourn_inferior, darwin_kill_inferior)
6686 (darwin_create_inferior, darwin_attach, darwin_detach)
6687 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6688 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6689 (darwin_supports_multi_process): Refactor as darwin_nat_target
6691 (darwin_resume_to, darwin_files_info): Delete.
6692 (_initialize_darwin_inferior): Rename to ...
6693 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6694 * darwin-nat.h: Include "inf-child.h".
6695 (darwin_nat_target): New class.
6696 (darwin_complete_target): Delete.
6697 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6698 (darwin_target): New.
6699 (i386_darwin_fetch_inferior_registers)
6700 (i386_darwin_store_inferior_registers): Refactor as methods of
6702 (darwin_complete_target): Delete, with ...
6703 (_initialize_i386_darwin_nat): ... bits factored out here.
6705 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6706 (the_alpha_linux_nat_target): New.
6707 (alpha_linux_register_u_offset): Refactor as
6708 alpha_linux_nat_target method.
6709 (_initialize_alpha_linux_nat): Adjust.
6710 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6711 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6712 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6713 methods of linux_nat_trad_target.
6714 (linux_trad_target): Delete.
6715 * linux-nat-trad.h (linux_trad_target): Delete function.
6716 (linux_nat_trad_target): New class.
6717 * mips-linux-nat.c (mips_linux_nat_target): New class.
6718 (super_fetch_registers, super_store_registers, super_close):
6720 (the_mips_linux_nat_target): New.
6721 (mips64_linux_regsets_fetch_registers)
6722 (mips64_linux_regsets_store_registers)
6723 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6724 (mips_linux_register_u_offset, mips_linux_read_description)
6725 (mips_linux_can_use_hw_breakpoint)
6726 (mips_linux_stopped_by_watchpoint)
6727 (mips_linux_stopped_data_address)
6728 (mips_linux_region_ok_for_hw_watchpoint)
6729 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6730 (mips_linux_close): Refactor as methods of mips_linux_nat.
6731 (_initialize_mips_linux_nat): Adjust to C++ification.
6733 * aix-thread.c (aix_thread_target): New class.
6734 (aix_thread_ops): Now an aix_thread_target.
6735 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6736 (aix_thread_fetch_registers, aix_thread_store_registers)
6737 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6738 (aix_thread_thread_alive, aix_thread_pid_to_str)
6739 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6740 Refactor as methods of aix_thread_target.
6741 (init_aix_thread_ops): Delete.
6742 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6743 and complete_target_initialization.
6744 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6745 (rs6000_nat_target): New class.
6746 (the_rs6000_nat_target): New.
6747 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6748 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6749 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6750 (super_create_inferior): Delete.
6751 (_initialize_rs6000_nat): Adjust to C++ification.
6753 * arm-linux-nat.c (arm_linux_nat_target): New class.
6754 (the_arm_linux_nat_target): New.
6755 (arm_linux_fetch_inferior_registers)
6756 (arm_linux_store_inferior_registers, arm_linux_read_description)
6757 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6758 (arm_linux_remove_hw_breakpoint)
6759 (arm_linux_region_ok_for_hw_watchpoint)
6760 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6761 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6762 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6763 arm_linux_nat_target.
6764 (_initialize_arm_linux_nat): Adjust to C++ification.
6766 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6767 (the_aarch64_linux_nat_target): New.
6768 (aarch64_linux_fetch_inferior_registers)
6769 (aarch64_linux_store_inferior_registers)
6770 (aarch64_linux_child_post_startup_inferior)
6771 (aarch64_linux_read_description)
6772 (aarch64_linux_can_use_hw_breakpoint)
6773 (aarch64_linux_insert_hw_breakpoint)
6774 (aarch64_linux_remove_hw_breakpoint)
6775 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6776 (aarch64_linux_region_ok_for_hw_watchpoint)
6777 (aarch64_linux_stopped_data_address)
6778 (aarch64_linux_stopped_by_watchpoint)
6779 (aarch64_linux_watchpoint_addr_within_range)
6780 (aarch64_linux_can_do_single_step): Refactor as methods of
6781 aarch64_linux_nat_target.
6782 (super_post_startup_inferior): Delete.
6783 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6785 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6786 (the_hppa_linux_nat_target): New.
6787 (hppa_linux_fetch_inferior_registers)
6788 (hppa_linux_store_inferior_registers): Refactor as methods of
6789 hppa_linux_nat_target.
6790 (_initialize_hppa_linux_nat): Adjust to C++ification.
6792 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6793 (the_ia64_linux_nat_target): New.
6794 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6795 (ia64_linux_stopped_data_address)
6796 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6797 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6798 ia64_linux_nat_target methods.
6799 (super_xfer_partial): Delete.
6800 (_initialize_ia64_linux_nat): Adjust to C++ification.
6802 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6803 (the_m32r_linux_nat_target): New.
6804 (m32r_linux_fetch_inferior_registers)
6805 (m32r_linux_store_inferior_registers): Refactor as
6806 m32r_linux_nat_target methods.
6807 (_initialize_m32r_linux_nat): Adjust to C++ification.
6809 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6810 (the_m68k_linux_nat_target): New.
6811 (m68k_linux_fetch_inferior_registers)
6812 (m68k_linux_store_inferior_registers): Refactor as
6813 m68k_linux_nat_target methods.
6814 (_initialize_m68k_linux_nat): Adjust to C++ification.
6816 * s390-linux-nat.c (s390_linux_nat_target): New class.
6817 (the_s390_linux_nat_target): New.
6818 (s390_linux_fetch_inferior_registers)
6819 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6820 (s390_insert_watchpoint, s390_remove_watchpoint)
6821 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6822 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6823 (s390_auxv_parse, s390_read_description): Refactor as methods of
6824 s390_linux_nat_target.
6825 (_initialize_s390_nat): Adjust to C++ification.
6827 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6828 (the_sparc_linux_nat_target): New.
6829 (_initialize_sparc_linux_nat): Adjust to C++ification.
6830 * sparc-nat.c (sparc_fetch_inferior_registers)
6831 (sparc_store_inferior_registers): Remove target_ops parameter.
6832 * sparc-nat.h (sparc_fetch_inferior_registers)
6833 (sparc_store_inferior_registers): Remove target_ops parameter.
6834 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6835 (the_sparc64_linux_nat_target): New.
6836 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6838 * spu-linux-nat.c (spu_linux_nat_target): New class.
6839 (the_spu_linux_nat_target): New.
6840 (spu_child_post_startup_inferior, spu_child_post_attach)
6841 (spu_child_wait, spu_fetch_inferior_registers)
6842 (spu_store_inferior_registers, spu_xfer_partial)
6843 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6845 (_initialize_spu_nat): Adjust to C++ification.
6847 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6848 (the_tilegx_linux_nat_target): New.
6849 (fetch_inferior_registers, store_inferior_registers):
6850 Refactor as methods.
6851 (_initialize_tile_linux_nat): Adjust to C++ification.
6853 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6854 (the_xtensa_linux_nat_target): New.
6855 (xtensa_linux_fetch_inferior_registers)
6856 (xtensa_linux_store_inferior_registers): Refactor as
6857 xtensa_linux_nat_target methods.
6858 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6860 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6861 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6862 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6863 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6864 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6865 (fbsd_stopped_by_sw_breakpoint)
6866 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6867 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6868 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6869 (fbsd_post_startup_inferior, fbsd_post_attach)
6870 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6871 (fbsd_set_syscall_catchpoint)
6872 (super_xfer_partial, super_resume, super_wait)
6873 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6874 (fbsd_handle_debug_trap): Remove target_ops parameter.
6875 (fbsd_nat_add_target): Delete.
6876 * fbsd-nat.h: Include "inf-ptrace.h".
6877 (fbsd_nat_add_target): Delete.
6878 (USE_SIGTRAP_SIGINFO): Define.
6879 (fbsd_nat_target): New class.
6881 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6882 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6883 (amd64bsd_target): Delete.
6884 * amd64-bsd-nat.h: New file.
6885 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6887 (amd64_fbsd_nat_target): New class.
6888 (the_amd64_fbsd_nat_target): New.
6889 (amd64fbsd_read_description): Refactor as method of
6890 amd64_fbsd_nat_target.
6891 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6892 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6893 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6894 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6895 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6896 (i386bsd_target): Delete.
6897 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6898 (i386bsd_fetch_inferior_registers)
6899 (i386bsd_store_inferior_registers): Declare.
6900 (i386_bsd_nat_target): New class.
6901 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6902 (the_i386_fbsd_nat_target): New.
6903 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6904 i386_fbsd_nat_target methods.
6905 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6906 (_initialize_i386fbsd_nat): Adjust to C++ification.
6907 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6908 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6909 (_initialize_x86_bsd_nat): Adjust to C++ification.
6910 * x86-bsd-nat.h: Include "x86-nat.h".
6911 (x86bsd_target): Delete declaration.
6912 (x86bsd_nat_target): New class.
6914 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6915 (the_aarch64_fbsd_nat_target): New.
6916 (aarch64_fbsd_fetch_inferior_registers)
6917 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6918 aarch64_fbsd_nat_target.
6919 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6920 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6921 (the_alpha_bsd_nat_target): New.
6922 (alphabsd_fetch_inferior_registers)
6923 (alphabsd_store_inferior_registers): Refactor as
6924 alpha_bsd_nat_target methods.
6925 (_initialize_alphabsd_nat): Refactor as methods of
6926 alpha_bsd_nat_target.
6927 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6928 (the_amd64_nbsd_nat_target): New.
6929 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6930 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6931 (the_amd64_obsd_nat_target): New.
6932 (_initialize_amd64obsd_nat): Adjust to C++ification.
6933 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6934 (the_arm_fbsd_nat_target): New.
6935 (arm_fbsd_fetch_inferior_registers)
6936 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6937 (_initialize_arm_fbsd_nat): Refactor as methods of
6938 arm_fbsd_nat_target.
6939 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6940 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6941 (the_arm_netbsd_nat_target): New.
6942 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6943 arm_netbsd_nat_target.
6944 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6945 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6946 (the_hppa_nbsd_nat_target): New.
6947 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6948 hppa_nbsd_nat_target methods.
6949 (_initialize_hppanbsd_nat): Adjust to C++ification.
6950 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6951 (the_hppa_obsd_nat_target): New.
6952 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6953 methods of hppa_obsd_nat_target.
6954 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6956 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6957 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6959 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6960 (_initialize_i386obsd_nat): Use add_target.
6961 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6962 (the_m68k_bsd_nat_target): New.
6963 (m68kbsd_fetch_inferior_registers)
6964 (m68kbsd_store_inferior_registers): Refactor as methods of
6965 m68k_bsd_nat_target.
6966 (_initialize_m68kbsd_nat): Adjust to C++ification.
6967 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6968 (the_mips_fbsd_nat_target): New.
6969 (mips_fbsd_fetch_inferior_registers)
6970 (mips_fbsd_store_inferior_registers): Refactor as methods of
6971 mips_fbsd_nat_target.
6972 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6974 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6975 (the_mips_nbsd_nat_target): New.
6976 (mipsnbsd_fetch_inferior_registers)
6977 (mipsnbsd_store_inferior_registers): Refactor as methods of
6978 mips_nbsd_nat_target.
6979 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6980 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6981 (the_mips64_obsd_nat_target): New.
6982 (mips64obsd_fetch_inferior_registers)
6983 (mips64obsd_store_inferior_registers): Refactor as methods of
6984 mips64_obsd_nat_target.
6985 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6987 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6989 * nbsd-nat.h: Include "inf-ptrace.h".
6990 (nbsd_nat_target): New class.
6991 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6992 (obsd_wait): Refactor as methods of obsd_nat_target.
6993 (obsd_add_target): Delete.
6994 * obsd-nat.h: Include "inf-ptrace.h".
6995 (obsd_nat_target): New class.
6996 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6997 (the_ppc_fbsd_nat_target): New.
6998 (ppcfbsd_fetch_inferior_registers)
6999 (ppcfbsd_store_inferior_registers): Refactor as methods of
7000 ppc_fbsd_nat_target.
7001 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7003 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7004 (the_ppc_nbsd_nat_target): New.
7005 (ppcnbsd_fetch_inferior_registers)
7006 (ppcnbsd_store_inferior_registers): Refactor as methods of
7007 ppc_nbsd_nat_target.
7008 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7009 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7010 (the_ppc_obsd_nat_target): New.
7011 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7012 methods of ppc_obsd_nat_target.
7013 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7015 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7016 (the_sh_nbsd_nat_target): New.
7017 (shnbsd_fetch_inferior_registers)
7018 (shnbsd_store_inferior_registers): Refactor as methods of
7020 (_initialize_shnbsd_nat): Adjust to C++ification.
7021 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7022 (inf_ptrace_xfer_partial): Delete.
7023 (sparc_xfer_partial, sparc_target): Delete.
7024 * sparc-nat.h (sparc_fetch_inferior_registers)
7025 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7026 (sparc_target): Delete function declaration.
7027 (sparc_target): New template class.
7028 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7029 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7030 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7031 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7033 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7034 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7035 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7036 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7038 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7039 (the_vax_bsd_nat_target): New.
7040 (vaxbsd_fetch_inferior_registers)
7041 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7043 (_initialize_vaxbsd_nat): Adjust to C++ification.
7045 * bsd-kvm.c (bsd_kvm_target): New class.
7046 (bsd_kvm_ops): Now a bsd_kvm_target.
7047 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7048 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7049 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7051 (bsd_kvm_return_one): Delete.
7052 (bsd_kvm_add_target): Adjust to C++ification.
7054 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7055 (nto_procfs_target_procfs): New classes.
7056 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7057 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7058 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7059 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7060 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7061 (procfs_remove_hw_breakpoint, procfs_resume)
7062 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7063 (procfs_kill_inferior, procfs_store_registers)
7064 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7065 as methods of nto_procfs_target.
7066 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7067 (nto_native_ops): Delete.
7068 (procfs_open, procfs_native_open): Delete.
7069 (nto_native_ops): Now an nto_procfs_target_native.
7070 (init_procfs_targets): Adjust to C++ification.
7071 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7072 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7073 Refactor as methods of nto_procfs_target.
7075 * go32-nat.c (go32_nat_target): New class.
7076 (the_go32_nat_target): New.
7077 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7078 (go32_store_registers, go32_xfer_partial, go32_files_info)
7079 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7080 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7081 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7082 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7083 (go32_target): Delete.
7084 (_initialize_go32_nat): Adjust to C++ification.
7086 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7087 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7088 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7089 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7091 (gnu_target): Delete.
7092 * gnu-nat.h (gnu_target): Delete.
7093 (gnu_nat_target): New class.
7094 * i386-gnu-nat.c (gnu_base_target): New.
7095 (i386_gnu_nat_target): New class.
7096 (the_i386_gnu_nat_target): New.
7097 (_initialize_i386gnu_nat): Adjust to C++ification.
7099 2018-05-02 Pedro Alves <palves@redhat.com>
7101 * bfd-target.c (target_bfd_xclose): Rename to ...
7102 (target_bfd_close): ... this.
7103 (target_bfd_reopen): Adjust.
7104 * target.c (target_close): Remove references to to_xclose.
7105 * target.h (target_ops::to_xclose): Delete.
7106 (target_ops::to_close): Update comments.
7108 2018-05-02 Pedro Alves <palves@redhat.com>
7110 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7112 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7113 * inf-ptrace.c (inf_ptrace_register_u_offset)
7114 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7115 (inf_ptrace_store_register, inf_ptrace_store_registers)
7116 (inf_ptrace_trad_target): Move to ...
7117 * linux-nat-trad.c: ... this new file.
7118 * linux-nat-trad.h: New file.
7119 * linux-nat.c (linux_target_install_ops): Make extern.
7120 (linux_trad_target): Delete.
7121 * linux-nat.h (linux_trad_target): Delete declaration.
7122 (linux_target_install_ops): Declare.
7123 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7126 2018-05-02 Pedro Alves <palves@redhat.com>
7128 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7129 procfs_target/add_target here.
7130 * procfs.c (procfs_target): Make static.
7131 (_initialize_procfs): Call add_target here.
7132 * procfs.h (struct target_ops): Remove forward declaration.
7133 (procfs_target): Remove declaration.
7134 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7136 2018-05-02 Pedro Alves <palves@redhat.com>
7138 * procfs.c (procfs_stopped_by_watchpoint)
7139 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7140 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7142 (procfs_use_watchpoints): Delete, move contents...
7143 (procfs_target): ... here.
7144 * procfs.h (procfs_use_watchpoints): Delete declaration.
7145 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7146 procfs_use_watchpoints.
7147 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7148 procfs_use_watchpoints.
7150 2018-05-02 Tom Tromey <tom@tromey.com>
7153 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7154 and var_zuinteger_unlimited.
7155 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7156 and PARAM_ZUINTEGER_UNLIMITED.
7157 (set_parameter_value): Handle var_zuinteger and
7158 var_zuinteger_unlimited.
7159 (add_setshow_generic): Likewise.
7160 (parmpy_init): Likewise.
7162 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7165 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7166 pointer is not null before dereferencing it.
7168 2018-04-30 Tom Tromey <tom@tromey.com>
7170 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7173 2018-04-30 Tom Tromey <tom@tromey.com>
7175 * breakpoint.c (mention): Remove use of is_mi_like_p.
7176 (print_mention_ranged_breakpoint): Likewise.
7177 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7180 2018-04-30 Tom Tromey <tom@tromey.com>
7182 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7184 2018-04-30 Tom Tromey <tom@tromey.com>
7186 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7187 (info_spu_event_command): Remove some uses of is_mi_like_p.
7189 2018-04-30 Tom Tromey <tom@tromey.com>
7191 * python/py-framefilter.c (py_print_single_arg)
7192 (enumerate_locals, py_print_args, py_print_frame): Remove some
7193 uses of is_mi_like_p.
7195 2018-04-30 Tom Tromey <tom@tromey.com>
7198 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7199 * ui-out.h (ui_out::is_mi_like_p): Now const.
7200 (ui_out::do_is_mi_like_p): Now const.
7201 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7203 2018-04-30 Tom Tromey <tom@tromey.com>
7205 * varobj.c (varobj_set_visualizer): Use new_reference.
7206 * python/python.c (gdbpy_decode_line): Use new_reference.
7207 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7210 2018-04-30 Tom Tromey <tom@tromey.com>
7212 * varobj.c (install_new_value): Use new_reference.
7213 * value.h (value_incref): Return void. Swap intro comment with
7215 * value.c (set_value_parent): Use new_reference.
7216 (value_incref): Return void. Update intro comment.
7217 (release_value): Use new_reference.
7218 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7220 2018-04-30 Tom Tromey <tom@tromey.com>
7222 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7223 * gdb_bfd.h (new_bfd_ref): Remove.
7224 (gdb_bfd_open): Update comment.
7225 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7226 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7227 (gdb_bfd_fdopenr): Use new_reference.
7228 * exec.c (exec_file_attach): Use new_reference.
7230 2018-04-30 Tom Tromey <tom@tromey.com>
7232 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7235 2018-04-30 Tom Tromey <tom@tromey.com>
7237 * jit.c (jit_read_code_entry): Use type_align.
7238 * i386-tdep.c (i386_gdbarch_init): Don't call
7239 set_gdbarch_long_long_align_bit.
7240 * gdbarch.sh: Remove long_long_align_bit.
7241 * gdbarch.c, gdbarch.h: Rebuild.
7242 * arc-tdep.c (arc_type_align): New function.
7243 (arc_gdbarch_init): Use arc_type_align. Don't call
7244 set_gdbarch_long_long_align_bit.
7246 2018-04-30 Tom Tromey <tom@tromey.com>
7248 * rust-lang.c (rust_type_alignment): Remove.
7249 (rust_composite_type): Use type_align.
7251 2018-04-30 Tom Tromey <tom@tromey.com>
7253 * NEWS: Mention Type.align.
7254 * python/py-type.c (typy_get_alignof): New function.
7255 (type_object_getset): Add "alignof".
7257 2018-04-30 Tom Tromey <tom@tromey.com>
7261 * std-operator.def (UNOP_ALIGNOF): New operator.
7262 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7264 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7265 * c-lang.c (c_op_print_tab): Add alignof.
7266 * c-exp.y (ALIGNOF): New token.
7267 (exp): Add "ALIGNOF" production.
7268 (ident_tokens): Add _Alignof and alignof.
7270 2018-04-30 Tom Tromey <tom@tromey.com>
7272 * i386-tdep.c (i386_type_align): New function.
7273 (i386_gdbarch_init): Update.
7274 * gdbarch.sh (type_align): New method.
7275 * gdbarch.c, gdbarch.h: Rebuild.
7276 * arch-utils.h (default_type_align): Declare.
7277 * arch-utils.c (default_type_align): New function.
7278 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7279 (struct type) <align_log2>: New field.
7280 <instance_flags>: Now a bitfield.
7281 (TYPE_RAW_ALIGN): New macro.
7282 (type_align, type_raw_align, set_type_align): Declare.
7283 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7285 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7286 (get_alignment, maybe_set_alignment): New functions.
7287 (read_structure_type, read_enumeration_type, read_array_type)
7288 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7289 (read_subrange_type, read_base_type): Set type alignment.
7291 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7293 * dwarf2read.c (read_index_from_section): Use bool.
7295 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7298 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7301 2018-04-29 John Reiser <jreiser@BitWagon.com>
7304 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7305 last step, and do it atomically.
7307 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7309 * compile/compile-c-types.c (convert_int, convert_float):
7312 2018-04-27 Tom Tromey <tom@tromey.com>
7315 * rust-lang.c (rust_inclusive_range_type_p): New function.
7316 (rust_range): Handle inclusive ranges.
7317 (rust_compute_range): Likewise.
7318 * rust-exp.y (struct rust_op) <inclusive>: New field.
7319 (DOTDOTEQ): New constant.
7320 (range_expr): Add "..=" productions.
7321 (operator_tokens): Add "..=" token.
7322 (ast_range): Add "inclusive" parameter.
7323 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7325 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7327 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7328 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7330 * expprint.c (print_subexp_standard): Handle new bounds values.
7331 (dump_subexp_body_standard): Likewise.
7333 2018-04-27 Tom Tromey <tom@tromey.com>
7335 * configure: Rebuild.
7336 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7337 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7339 (class symbol_needs_eval_context): Likewise.
7340 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7341 (mock_mapped_index::symbol_name_at): Use "override". Remove
7343 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7345 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7346 * aarch64-tdep.c (instruction_reader::read): Use "override".
7347 (instruction_reader_test::read): Likewise.
7348 * arm-tdep.c (instruction_reader::read): Use "override".
7349 (instruction_reader_thumb::read): Likewise.
7351 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7354 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7355 instead of remote_send.
7356 (remote_send): Remove.
7358 2018-04-26 Pedro Alves <palves@redhat.com>
7360 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7361 find_function_start_sal instead of find_pc_line.
7363 2018-04-26 Pedro Alves <palves@redhat.com>
7365 * breakpoint.c (set_breakpoint_location_function): Handle
7367 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7368 * elfread.c (elf_symtab_read): Give data symbols with
7369 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7370 (elf_rel_plt_read): Update comment.
7371 * linespec.c (convert_linespec_to_sals): Handle
7373 (minsym_found): Handle mst_data_gnu_ifunc.
7374 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7375 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7376 * parse.c (find_minsym_type_and_address): Handle
7378 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7379 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7380 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7382 <mst_data_gnu_ifunc>: New enumerator.
7384 2018-04-26 Pedro Alves <palves@redhat.com>
7386 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7387 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7388 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7390 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7391 (lookup_minimal_symbol_by_pc): Adjust.
7392 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7393 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7394 * minsyms.h (lookup_msym_prefer): New enum.
7395 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7396 parameter by a lookup_msym_prefer parameter.
7398 2018-04-26 Pedro Alves <palves@redhat.com>
7400 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7401 ends in "@plt" instead of looking at the symbol's section.
7403 2018-04-26 Pedro Alves <palves@redhat.com>
7405 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7407 (find_pc_partial_function_gnu_ifunc): Rename to ...
7408 (find_pc_partial_function): ... this, and remove references to
7410 (find_pc_partial_function): Delete old implementation.
7411 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7413 2018-04-26 Pedro Alves <palves@redhat.com>
7415 * linespec.c (struct bound_minimal_symbol_search_key): New.
7416 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7417 skip first line if we found a GNU ifunc minimal symbol by name.
7418 (compare_msymbols): Change parameters to work with a destructured
7420 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7423 2018-04-26 Pedro Alves <palves@redhat.com>
7425 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7426 ifunc targets here. Instead, if we have an ifunc minsym, use its
7428 (add_location_to_breakpoint): Store the minsym and the objfile in
7429 the breakpoint location.
7430 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7431 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7432 Record the minsym in the sal.
7433 * symtab.h (symtab_and_line) <msymbol>: New field.
7435 2018-04-26 Pedro Alves <palves@redhat.com>
7437 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7438 unless we actually resolved the ifunc.
7440 2018-04-26 Pedro Alves <palves@redhat.com>
7442 * c-exp.y (variable production): Prefer ifunc minsyms over
7443 regular function symbols.
7444 * symtab.c (find_gnu_ifunc): New function.
7445 * minsyms.h (lookup_msym_prefer): New enum.
7446 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7447 parameter by a lookup_msym_prefer parameter.
7448 * symtab.h (find_gnu_ifunc): New declaration.
7450 2018-04-26 Pedro Alves <palves@redhat.com>
7452 * blockframe.c (find_gnu_ifunc_target_type): New function.
7453 (find_function_type): New.
7454 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7455 return a value with a memory address.
7456 (eval_call): For calls to GNU ifunc functions, try to find the
7457 type of the target function from the type that the resolver
7459 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7461 * infcall.c (find_function_return_type): Delete.
7462 (find_function_addr): Add 'function_type' parameter. For calls to
7463 GNU ifunc functions, try to find the type of the target function
7464 from the type that the resolver returns, and return it via
7466 (call_function_by_hand_dummy): Adjust to use the function type
7467 returned by find_function_addr.
7468 (find_function_addr): Add 'function_type' parameter and move
7470 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7473 2018-04-26 Pedro Alves <palves@redhat.com>
7475 * c-exp.y (variable production): Skip finding an alias for ifunc
7478 2018-04-26 Pedro Alves <palves@redhat.com>
7480 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7482 2018-04-25 Pedro Alves <palves@redhat.com>
7484 * infcmd.c (kill_command): Print the pid as string, not the whole
7485 thread's ptid. Add comment. s/has been killed/killed/ in output
7487 * remote.c (remote_detach_1): Print the pid as string, not the
7488 whole thread's ptid.
7490 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7491 Sergio Durigan Junior <sergiodj@redhat.com>
7492 Pedro Alves <palves@redhat.com>
7494 * infcmd.c (kill_command): Print message when inferior has
7496 * inferior.c (print_inferior_events): Remove 'static'. Set as
7498 (add_inferior): Improve message printed when
7499 'print_inferior_events' is on.
7500 (exit_inferior): Remove message printed when
7501 'print_inferior_events' is on.
7502 (detach_inferior): Improve message printed when
7503 'print_inferior_events' is on.
7504 (initialize_inferiors): Use 'add_inferior_silent' to set
7505 'current_inferior_'.
7506 * inferior.h (print_inferior_events): Declare here as
7508 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7509 '[Detaching...]' messages when 'print_inferior_events' is on.
7510 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7511 as prefix/suffix for messages. Remove periods. Fix erroneous
7512 'Detaching after fork from child...', replace it by '... from
7514 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7515 prefix/suffix when printing 'Detaching...' messages. Print
7516 them when 'print_inferior_events' is on.
7517 * remote.c (remote_detach_1): Print message when detaching
7518 from inferior and '!is_fork_parent'.
7520 2018-04-24 Tom Tromey <tom@tromey.com>
7522 * cli-out.h: Reindent.
7524 2018-04-24 Tom Tromey <tom@tromey.com>
7526 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7527 (cli_ui_out::do_field_string): Use fputs_filtered.
7528 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7530 2018-04-23 Tom Tromey <tom@tromey.com>
7532 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7533 gdb::unique_xmalloc_ptr.
7535 2018-04-23 Tom Tromey <tom@tromey.com>
7537 * configure: Rebuild.
7539 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7542 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7543 prepare_for_testing. Set normal_bp to r_debug_state if target
7546 2018-04-21 Pedro Alves <palves@redhat.com>
7547 Rajendra SY <rajendra.sy@gmail.com>
7549 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7550 * remote.c (extended_remote_attach): In all-stop mode, mark the
7551 thread as executing.
7553 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7555 * thread.c (thread_apply_all_command): Fix comment.
7556 (thread_command): Fix comment.
7558 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7560 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7562 * features/aarch64-core.c (create_feature_aarch64_core):
7564 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7566 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7568 * features/i386/32bit-avx512.c
7569 (create_feature_i386_32bit_avx512): Likewise.
7570 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7572 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7574 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7576 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7578 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7580 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7582 * features/i386/64bit-avx512.c
7583 (create_feature_i386_64bit_avx512): Likewise.
7584 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7586 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7588 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7590 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7592 * features/i386/64bit-segments.c
7593 (create_feature_i386_64bit_segments): Likewise.
7594 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7596 * features/i386/x32-core.c
7597 (create_feature_i386_x32_core): Likewise.
7598 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7599 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7600 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7601 * target-descriptions.c: In generated code, don't pass xml
7604 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7606 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7607 (print_xml_feature::visit_post): Likewise.
7608 (print_xml_feature::visit): Likewise.
7609 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7610 (print_xml_feature): Add new class.
7611 * regformats/regdat.sh: Null xmltarget on feature targets.
7612 * target-descriptions.c (struct target_desc): Add xmltarget.
7613 (maintenance_check_tdesc_xml_convert): Add unittest function.
7614 (tdesc_get_features_xml): Add function to get xml.
7615 (maintenance_check_xml_descriptions): Test xml generation.
7616 * xml-tdesc.c (string_read_description_xml): Add function.
7617 * xml-tdesc.h (string_read_description_xml): Add declaration.
7619 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7621 * features/Makefile: Add feature marker to targets with new style
7622 target descriptions.
7623 * regformats/aarch64.dat: Regenerate.
7624 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7625 * regformats/i386/amd64-avx-linux.dat: Likewise.
7626 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7627 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7628 * regformats/i386/amd64-linux.dat: Likewise.
7629 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7630 * regformats/i386/amd64.dat: Likewise.
7631 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7632 * regformats/i386/i386-avx-linux.dat: Likewise.
7633 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7634 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7635 * regformats/i386/i386-linux.dat: Likewise.
7636 * regformats/i386/i386-mmx-linux.dat: Likewise.
7637 * regformats/i386/i386-mpx-linux.dat: Likewise.
7638 * regformats/i386/i386.dat: Likewise.
7639 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7640 * regformats/i386/x32-avx-linux.dat: Likewise.
7641 * regformats/i386/x32-linux.dat: Likewise.
7642 * regformats/tic6x-c62x-linux.dat: Likewise.
7643 * regformats/tic6x-c64x-linux.dat: Likewise.
7644 * regformats/tic6x-c64xp-linux.dat: Likewise.
7645 * regformats/regdat.sh: Parse feature marker.
7647 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7649 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7650 (tdesc_osabi_name): Likewise.
7651 * target-descriptions.c (tdesc_architecture_name): Add new
7653 (tdesc_osabi_name): Likewise.
7655 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7657 * common/tdesc.c (tdesc_predefined_type): Move to here.
7658 (tdesc_named_type): Likewise.
7659 (tdesc_create_vector): Likewise.
7660 (tdesc_create_struct): Likewise.
7661 (tdesc_set_struct_size): Likewise.
7662 (tdesc_create_union): Likewise.
7663 (tdesc_create_flags): Likewise.
7664 (tdesc_create_enum): Likewise.
7665 (tdesc_add_field): Likewise.
7666 (tdesc_add_typed_bitfield): Likewise.
7667 (tdesc_add_bitfield): Likewise.
7668 (tdesc_add_flag): Likewise.
7669 (tdesc_add_enum_value): Likewise.
7670 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7671 (struct tdesc_type_vector): Likewise.
7672 (struct tdesc_type_field): Likewise.
7673 (struct tdesc_type_with_fields): Likewise.
7674 (tdesc_create_enum): Add declaration.
7675 (tdesc_add_typed_bitfield): Likewise.
7676 (tdesc_add_enum_value): Likewise.
7677 * target-descriptions.c (tdesc_type_field): Move from here.
7678 (tdesc_type_builtin): Likewise.
7679 (tdesc_type_vector): Likewise.
7680 (tdesc_type_with_fields): Likewise.
7681 (tdesc_predefined_types): Likewise.
7682 (tdesc_named_type): Likewise.
7683 (tdesc_create_vector): Likewise.
7684 (tdesc_create_struct): Likewise.
7685 (tdesc_set_struct_size): Likewise.
7686 (tdesc_create_union): Likewise.
7687 (tdesc_create_flags): Likewise.
7688 (tdesc_create_enum): Likewise.
7689 (tdesc_add_field): Likewise.
7690 (tdesc_add_typed_bitfield): Likewise.
7691 (tdesc_add_bitfield): Likewise.
7692 (tdesc_add_flag): Likewise.
7693 (tdesc_add_enum_value): Likewise.
7694 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7695 (tdesc_add_typed_bitfield): Likewise.
7696 (tdesc_add_enum_value): Likewise.
7698 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7700 * common/tdesc.c (tdesc_feature::accept): Move to here.
7701 (tdesc_feature::operator==): Likewise.
7702 (tdesc_create_reg): Likewise.
7703 * common/tdesc.h (tdesc_type_kind): Likewise.
7704 (struct tdesc_type): Likewise.
7705 (struct tdesc_feature): Likewise.
7706 * regformats/regdat.sh: Create a feature.
7707 * target-descriptions.c (tdesc_type_kind): Move from here.
7708 (tdesc_type): Likewise.
7709 (tdesc_type_up): Likewise.
7710 (tdesc_feature): Likewise.
7711 (tdesc_create_reg): Likewise.
7713 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7715 * Makefile.in: Add arch/tdesc.c
7716 * common/tdesc.c: New file.
7717 * common/tdesc.h (tdesc_element_visitor): Move to here.
7718 (tdesc_element): Likewise.
7719 (tdesc_reg): Likewise.
7720 (tdesc_reg_up): Likewise.
7721 * regformats/regdef.h (reg): Add offset to constructors.
7722 * target-descriptions.c (tdesc_element_visitor): Move from here.
7723 (tdesc_element): Likewise.
7724 (tdesc_reg): Likewise.
7725 (tdesc_reg_up): Likewise.
7727 2018-04-17 Tom Tromey <tom@tromey.com>
7729 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7732 2018-04-17 Tom Tromey <tom@tromey.com>
7734 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7736 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7738 * symtab.c (print_symbol_info): Skip printing filename and line
7739 number when `last' is NULL.
7740 (symtab_symbol_info): Use empty string instead of NULL for first
7741 invocation of print_symbol_info.
7742 (rbreak_command): Pass NULL to `last' parameter of
7745 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7747 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7750 2018-04-16 Pedro Alves <palves@redhat.com>
7752 * MAINTAINERS (sh): Remove.
7753 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7754 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7755 (ALLDEPFILES): Remove sh64-tdep.c.
7756 * NEWS: Mentions that support for SH-5/SH64 is removed.
7757 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7758 (sh*-*-openbsd*): Ditto.
7759 (sh64-*-elf*): Remove.
7761 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7762 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7763 * sh-tdep.c: No longer include "sh64-tdep.h".
7764 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7765 * sh64-tdep.c, sh64-tdep.h: Remove files.
7767 2018-04-16 Pedro Alves <palves@redhat.com>
7769 * MAINTAINERS: Remove m88k.
7770 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7771 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7772 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7773 * NEWS: Mention that support for m88k was removed.
7774 * configure.host (m88*-*-*): Remove support.
7775 * configure.nat (m88k-*-*): Remove support.
7776 * configure.tgt (m88*-*-openbsd*): Remove.
7777 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7779 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7781 * configure.tgt (x86_tobjs): New variable.
7782 (amd64_tobjs, i386_tobjs): Use it.
7784 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7786 * symtab.c (print_symbol_info): Precede the symbol definition by
7787 the line number when available.
7788 * NEWS: Advertise this enhancement.
7790 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7792 * NEWS (New options): announce set/show record btrace cpu.
7793 * btrace.c: Include record-btrace.h.
7794 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7795 the vendor is unknown.
7796 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7797 Maybe overwrite the btrace configuration's cpu.
7798 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7799 (btrace_fetch): Add cpu parameter. Update callers.
7800 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7801 Maybe overwrite the btrace configuration's cpu. Skip enabling
7802 errata workarounds if the vendor is unknown.
7803 * python/py-record-btrace.c: Include record-btrace.h.
7804 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7805 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7806 * record-btrace.c (record_btrace_cpu_state_kind): New.
7807 (record_btrace_cpu): New.
7808 (set_record_btrace_cpu_cmdlist): New.
7809 (record_btrace_get_cpu): New.
7810 (require_btrace_thread, record_btrace_info)
7811 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7812 (cmd_set_record_btrace_cpu_none): New.
7813 (cmd_set_record_btrace_cpu_auto): New.
7814 (cmd_set_record_btrace_cpu): New.
7815 (cmd_show_record_btrace_cpu): New.
7816 (_initialize_record_btrace): Initialize set/show record btrace cpu
7818 * record-btrace.h (record_btrace_get_cpu): New.
7820 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7822 * record.c (set_record_command): Fix typo in message.
7824 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7826 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7828 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7830 * infrun.c (process_event_stop_test): Call
7831 gdbarch_in_indirect_branch_thunk.
7832 * gdbarch.sh (in_indirect_branch_thunk): New.
7833 * gdbarch.c: Regenerated.
7834 * gdbarch.h: Regenerated.
7837 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7838 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7839 (ALLDEPFILES): Add x86-tdep.c.
7840 * arch-utils.h (default_in_indirect_branch_thunk): New.
7841 * arch-utils.c (default_in_indirect_branch_thunk): New.
7842 * i386-tdep: Include x86-tdep.h.
7843 (i386_in_indirect_branch_thunk): New.
7844 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7846 * amd64-tdep: Include x86-tdep.h.
7847 (amd64_in_indirect_branch_thunk): New.
7848 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7850 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7853 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7854 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7855 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7858 2018-04-12 Tom Tromey <tom@tromey.com>
7860 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7861 (rust_evaluate_subexp): Likewise.
7863 2018-04-12 Pedro Alves <palves@redhat.com>
7865 * procfs.c (procfs_detach): Make forward declaration's prototype
7866 match definition's protototype.
7867 (proc_get_LDT_entry): Remove stale do_cleanups call.
7869 2018-04-12 Pedro Alves <palves@redhat.com>
7871 * target.h (target_ops::to_has_exited): Delete.
7872 (target_has_exited): Delete.
7873 * target-delegates.c: Regenerate.
7875 2018-04-11 Pedro Alves <palves@redhat.com>
7877 * target.c (fileio_fh_t::t): Add comment.
7878 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7879 (target_fileio_close): Handle a NULL target.
7880 (invalidate_fileio_fh): New.
7881 (target_close): Call it.
7882 * remote.c (remote_hostio_send_command): No longer check whether
7883 remote_desc is open.
7885 2018-04-11 Pedro Alves <palves@redhat.com>
7887 * target.c (fileio_fh_t): Make it a named struct instead of a
7889 (fileio_fh_t::is_closed): New method.
7890 (DEF_VEC_O (fileio_fh_t)): Remove.
7891 (fileio_fhandles): Now a std::vector.
7892 (is_closed_fileio_fh): Delete.
7893 (acquire_fileio_fd): Adjust. Rename parameters.
7894 (release_fileio_fd): Adjust.
7895 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7896 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7897 (target_fileio_close): Adjust.
7899 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7901 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7904 2018-04-10 Pedro Alves <palves@redhat.com>
7906 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7907 (scoped_finish_thread_state): New class.
7908 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7910 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7911 (fetch_inferior_event, normal_stop): Likewise.
7912 * thread.c (finish_thread_state_cleanup): Delete.
7914 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7915 Pedro Alves <palves@redhat.com>
7917 * value.c: Include "selftest.h" and "common/array-view.h".
7918 (struct range) <operator ==>: New.
7919 (test_ranges_contain): New.
7920 (check_ranges_vector): New.
7921 (test_insert_into_bit_range_vector): New.
7922 (_initialize_values): Register selftests.
7923 * common/array-view.h (operator==, operator!=): New.
7925 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7927 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7929 * inline-frame.c: Include <algorithm>.
7930 (struct inline_state): Add constructor.
7931 (inline_state_s): Remove.
7932 (DEF_VEC_O(inline_state_s)): Remove.
7933 (inline_states): Change type to std::vector.
7934 (find_inline_frame_state): Adjust to std::vector.
7935 (allocate_inline_frame_state): Remove.
7936 (clear_inline_frame_state): Adjust to std::vector.
7937 (skip_inline_frames): Adjust to std::vector.
7939 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7941 * tracepoint.h (struct trace_state_variable): Add constructor.
7942 <name>: Change type to std::string.
7943 * tracepoint.c (tsv_s): Remove.
7944 (DEF_VEC_O(tsv_s)): Remove.
7945 (tvariables): Change to std::vector.
7946 (create_trace_state_variable): Adjust to std::vector.
7947 (find_trace_state_variable): Likewise.
7948 (find_trace_state_variable_by_number): Likewise.
7949 (delete_trace_state_variable): Likewise.
7950 (trace_variable_command): Adjust to std::string.
7951 (delete_trace_variable_command): Likewise.
7952 (tvariables_info_1): Adjust to std::vector.
7953 (save_trace_state_variables): Likewise.
7954 (start_tracing): Likewise.
7955 (merge_uploaded_trace_state_variables): Adjust to std::vector
7957 * target.h (struct target_ops)
7958 <to_download_trace_state_variable>: Pass reference to
7959 trace_state_variable.
7960 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7961 * target-delegates.c: Re-generate.
7962 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7963 (mi_tsv_deleted): Likewise.
7964 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7965 * remote.c (remote_download_trace_state_variable): Change
7966 pointer to reference and adjust.
7967 * make-target-delegates (parse_argtypes): Handle references.
7968 (write_function_header): Likewise.
7969 (munge_type): Likewise.
7971 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7973 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7974 string_view-selftests.c.
7975 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7977 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7978 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7979 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7980 * unittests/basic_string_view/element_access/char/1.cc:
7982 * unittests/basic_string_view/element_access/char/empty.cc:
7984 * unittests/basic_string_view/element_access/char/front_back.cc:
7986 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7987 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7989 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7991 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7993 * unittests/basic_string_view/operations/compare/char/1.cc:
7995 * unittests/basic_string_view/operations/compare/char/13650.cc:
7997 * unittests/basic_string_view/operations/copy/char/1.cc:
7999 * unittests/basic_string_view/operations/data/char/1.cc:
8001 * unittests/basic_string_view/operations/find/char/1.cc:
8003 * unittests/basic_string_view/operations/find/char/2.cc:
8005 * unittests/basic_string_view/operations/find/char/3.cc:
8007 * unittests/basic_string_view/operations/find/char/4.cc:
8009 * unittests/basic_string_view/operations/rfind/char/1.cc:
8011 * unittests/basic_string_view/operations/rfind/char/2.cc:
8013 * unittests/basic_string_view/operations/rfind/char/3.cc:
8015 * unittests/basic_string_view/operations/substr/char/1.cc:
8017 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8018 * unittests/string_view-selftests.c: New file.
8020 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8022 * unittests/basic_string_view/capacity/1.cc: New file.
8023 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8024 * unittests/basic_string_view/cons/char/1.cc: New file.
8025 * unittests/basic_string_view/cons/char/2.cc: New file.
8026 * unittests/basic_string_view/cons/char/3.cc: New file.
8027 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8028 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8029 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8030 * unittests/basic_string_view/element_access/char/1.cc: New file.
8031 * unittests/basic_string_view/element_access/char/2.cc: New file.
8032 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8033 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8034 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8035 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8036 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8037 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8038 * unittests/basic_string_view/include.cc: New file.
8039 * unittests/basic_string_view/inserters/char/1.cc: New file.
8040 * unittests/basic_string_view/inserters/char/2.cc: New file.
8041 * unittests/basic_string_view/inserters/char/3.cc: New file.
8042 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8043 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8044 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8045 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8046 * unittests/basic_string_view/literals/types.cc: New file.
8047 * unittests/basic_string_view/literals/values.cc: New file.
8048 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8049 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8050 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8051 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8052 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8053 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8054 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8055 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8056 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8057 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8058 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8059 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8060 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8061 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8062 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8063 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8064 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8065 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8066 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8067 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8068 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8069 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8070 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8071 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8072 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8073 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8074 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8075 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8076 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8077 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8078 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8079 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8080 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8081 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8082 * unittests/basic_string_view/operators/char/2.cc: New file.
8083 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8084 * unittests/basic_string_view/range_access/char/1.cc: New file.
8085 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8086 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8087 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8088 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8089 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8090 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8091 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8092 * unittests/basic_string_view/typedefs.cc: New file.
8093 * unittests/basic_string_view/types/1.cc: New file.
8095 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8097 * common/gdb_string_view.h: Remove libstdc++ implementation
8098 details, adjust to gdb reality.
8099 * common/gdb_string_view.tcc: Likewise.
8100 * cli/cli-script.c (struct string_view): Remove.
8101 (user_args) <m_args>: Change element type to gdb::string_view.
8102 (user_args::insert_args): Adjust.
8104 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8106 * common/gdb_string_view.h: New file.
8107 * common/gdb_string_view.tcc: New file.
8109 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8111 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8112 * configure: Re-generate.
8114 2018-04-09 Pedro Alves <palves@redhat.com>
8116 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8117 (set_target_gdbarch): Call
8118 gdb::observers::architecture_changed.notify instead of
8119 observer_notify_architecture_changed.
8121 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8123 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8124 (do_restore_current_traceframe_cleanup): Remove.
8125 (restore_current_traceframe_cleanup_dtor): Remove.
8126 (make_cleanup_restore_current_traceframe): Remove.
8127 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8129 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8130 * infrun.c (fetch_inferior_event): Use
8131 scoped_restore_current_traceframe.
8133 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8135 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8137 <n_allocated_type_units>: Remove.
8138 <all_type_units>: Change to std::vector.
8139 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8140 to std::vector change.
8141 (dwarf2_per_objfile::get_cutu): Likewise.
8142 (dwarf2_per_objfile::get_tu): Likewise.
8143 (create_signatured_type_table_from_index): Likewise.
8144 (create_signatured_type_table_from_debug_names): Likewise.
8145 (dw2_symtab_iter_next): Likewise.
8146 (dw2_print_stats): Likewise.
8147 (dw2_expand_all_symtabs): Likewise.
8148 (dw2_expand_marked_cus): Likewise.
8149 (dw2_debug_names_iterator::next): Likewise.
8150 (dwarf2_initialize_objfile): Likewise.
8151 (add_signatured_type_cu_to_table): Likewise.
8152 (create_all_type_units): Likewise.
8153 (add_type_unit): Likewise.
8154 (struct tu_abbrev_offset): Add constructor.
8155 (build_type_psymtabs_1): Adjust to std::vector change.
8156 (print_tu_stats): Likewise.
8157 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8158 (write_debug_names): Likewise.
8160 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8162 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8163 Make an std::vector.
8164 <n_comp_units>: Remove.
8165 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8166 to std::vector change.
8167 (dwarf2_per_objfile::get_cutu): Likewise.
8168 (dwarf2_per_objfile::get_cu): Likewise.
8169 (create_cus_from_index): Likewise.
8170 (create_addrmap_from_index): Likewise.
8171 (create_addrmap_from_aranges): Likewise.
8172 (dwarf2_read_index): Likewise.
8173 (dw2_find_last_source_symtab): Likewise.
8174 (dw2_map_symtabs_matching_filename): Likewise.
8175 (dw2_symtab_iter_next): Likewise.
8176 (dw2_print_stats): Likewise.
8177 (dw2_expand_all_symtabs): Likewise.
8178 (dw2_expand_symtabs_with_fullname): Likewise.
8179 (dw2_expand_marked_cus): Likewise.
8180 (dw2_map_symbol_filenames): Likewise.
8181 (create_cus_from_debug_names): Likewise.
8182 (dwarf2_read_debug_names): Likewise.
8183 (dw2_debug_names_iterator::next): Likewise.
8184 (dwarf2_initialize_objfile): Likewise.
8185 (set_partial_user): Likewise.
8186 (dwarf2_build_psymtabs_hard): Likewise.
8187 (read_comp_units_from_section): Remove arguments, adjust to
8189 (create_all_comp_units): Adjust to std::vector and
8190 read_comp_units_from_section changes.
8191 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8193 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8194 (psyms_seen_size): Likewise.
8195 (write_gdbindex): Likewise.
8196 (write_debug_names): Likewise.
8198 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8200 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8201 with dwarf2_per_objfile.
8202 (create_cus_from_index): Likewise.
8203 (create_signatured_type_table_from_index): Likewise.
8204 (dwarf2_read_index): Likewise.
8205 (dwarf2_initialize_objfile): Likewise.
8206 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8207 per_cu rather than get_dwarf2_per_objfile.
8209 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8211 * dwarf2read.h (struct signatured_type): Forward declare.
8212 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8214 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8215 (dw2_get_cutu): ...this.
8216 (dwarf2_per_objfile::get_cu): Rename from...
8217 (dw2_get_cu): ...this.
8218 (dwarf2_per_objfile::get_tu): New.
8219 (create_addrmap_from_index): Adjust.
8220 (create_addrmap_from_aranges): Adjust.
8221 (dw2_find_last_source_symtab): Adjust.
8222 (dw2_map_symtabs_matching_filename): Adjust.
8223 (dw2_symtab_iter_next): Adjust.
8224 (dw2_print_stats): Adjust.
8225 (dw2_expand_all_symtabs): Adjust.
8226 (dw2_expand_symtabs_with_fullname): Adjust.
8227 (dw2_expand_marked_cus): Adjust.
8228 (dw_expand_symtabs_matching_file_matcher): Adjust.
8229 (dw2_map_symbol_filenames): Adjust.
8230 (dw2_debug_names_iterator::next): Adjust.
8231 (dwarf2_initialize_objfile): Adjust.
8232 (set_partial_user): Adjust.
8233 (dwarf2_build_psymtabs_hard): Adjust.
8235 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8237 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8238 Remove unused variables.
8239 (dw2_map_symtabs_matching_filename): Likewise.
8240 (dwarf2_record_block_ranges): Likewise.
8241 (dwarf2_read_addr_index): Likewise.
8242 (follow_die_offset): Likewise.
8244 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8246 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8247 to symbol_file_add_main.
8249 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8252 * mi/mi-console.c (do_fputc_async_safe): New.
8253 (mi_console_file::write_async_safe): New.
8254 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8255 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8257 * ui-file.c (ui_file::putstrn): Adjust call to
8258 fputstrn_unfiltered.
8259 * utils.c (printchar): Replace do_fputs and do_fprintf
8260 parameters by do_fputc.
8261 (fputstr_filtered): Adjust call to printchar.
8262 (fputstr_unfiltered): Likewise.
8263 (fputstrn_filtered): Likewise.
8264 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8266 * utils.h (do_fputc_ftype): New typedef.
8267 (fputstrn_unfiltered): Add do_fputc parameter.
8269 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8271 * regformats/i386/i386-avx.dat: Remove.
8273 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8276 * amd64-tdep.c (amd64_none_init_abi): New function.
8277 (amd64_x32_none_init_abi): New function.
8278 (_initialize_amd64_tdep): Register handlers for x86-64 and
8279 x64_32 with GDB_OSABI_NONE.
8280 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8281 GDB_OSABI_NONE osabi.
8283 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8286 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8288 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8289 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8291 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8293 * common/byte-vector.h (char_vector): New type.
8294 * target.h (target_read_alloc): Return
8295 gdb::optional<byte_vector>.
8296 (target_read_stralloc): Return gdb::optional<char_vector>.
8297 (target_get_osdata): Return gdb::optional<char_vector>.
8298 * target.c (target_read_alloc_1): Templatize. Replacement
8299 manual memory management with vector.
8300 (target_read_alloc): Change return type, adjust.
8301 (target_read_stralloc): Change return type, adjust.
8302 (target_get_osdata): Change return type, adjust.
8303 * auxv.c (struct auxv_info) <length>: Remove.
8304 <data>: Change type to gdb::optional<byte_vector>.
8305 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8306 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8307 (target_auxv_search): Adjust.
8308 (fprint_target_auxv): Adjust.
8309 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8310 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8311 (linux_make_corefile_notes): Adjust.
8312 * osdata.c (get_osdata): Adjust.
8313 * remote.c (remote_get_threads_with_qxfer): Adjust.
8314 (remote_memory_map): Adjust.
8315 (remote_traceframe_info): Adjust.
8316 (btrace_read_config): Adjust.
8317 (remote_read_btrace): Adjust.
8318 (remote_pid_to_exec_file): Adjust.
8319 * solib-aix.c (solib_aix_get_library_list): Adjust.
8320 * solib-dsbt.c (decode_loadmap): Don't free buf.
8321 (dsbt_get_initial_loadmaps): Adjust.
8322 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8323 * solib-target.c (solib_target_current_sos): Adjust.
8324 * tracepoint.c (sdata_make_value): Adjust.
8325 * xml-support.c (xinclude_start_include): Adjust.
8326 (xml_fetch_content_from_file): Adjust.
8327 * xml-support.h (xml_fetch_another): Change return type.
8328 (xml_fetch_content_from_file): Change return type.
8329 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8330 * xml-tdesc.c (file_read_description_xml): Adjust.
8331 (fetch_available_features_from_target): Change return type.
8332 (target_fetch_description_xml): Adjust.
8333 (target_read_description_xml): Adjust.
8335 2018-04-06 Tom Tromey <tom@tromey.com>
8337 * value.c (~value): Update.
8338 (struct value) <contents>: Now unique_xmalloc_ptr.
8339 (value_contents_bits_eq, allocate_value_contents)
8340 (value_contents_raw, value_contents_all_raw)
8341 (value_contents_for_printing, value_contents_for_printing_const)
8342 (set_value_enclosing_type): Update.
8344 2018-04-06 Tom Tromey <tom@tromey.com>
8346 * value.c (range_s): Remove typedef, VEC.
8347 (struct range): Add operator<.
8348 (range_lessthan): Remove.
8349 (ranges_contain): Change type.
8351 (struct value) <unavailable, optimized_out>: Now std::vector.
8352 (value_entirely_available)
8353 (value_entirely_covered_by_range_vector)
8354 (value_entirely_unavailable, value_entirely_optimized_out):
8356 (insert_into_bit_range_vector): Change argument type.
8357 (find_first_range_overlap): Likewise.
8358 (struct ranges_and_idx, value_contents_bits_eq)
8359 (require_not_optimized_out, require_available): Update.
8360 (ranges_copy_adjusted): Change argument types.
8361 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8363 2018-04-06 Tom Tromey <tom@tromey.com>
8365 * value.c (~value): Update.
8366 (struct value) <parent>: Now a value_ref_ptr.
8367 (value_parent, set_value_parent, value_address, value_copy):
8370 2018-04-06 Tom Tromey <tom@tromey.com>
8372 * value.c (struct value): Add constructor, destructor, and member
8374 (allocate_value_lazy, value_decref): Update.
8376 2018-04-06 Tom Tromey <tom@tromey.com>
8378 * value.c (struct value) <released, next>: Remove.
8379 (all_values): Now a std::vector.
8380 (allocate_value_lazy): Update.
8381 (value_next): Remove.
8382 (value_mark, value_free_to_mark, release_value)
8383 (value_release_to_mark): Update.
8385 2018-04-06 Tom Tromey <tom@tromey.com>
8387 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8388 (free_value_chain): Remove.
8389 * value.c (free_value_chain): Remove.
8390 (value_release_to_mark): Return a std::vector.
8391 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8393 (check_condition): Update.
8394 * eval.c (fetch_subexp_value): Change "val_chain" to a
8396 * breakpoint.c (update_watchpoint): Update.
8397 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8399 2018-04-06 Tom Tromey <tom@tromey.com>
8401 * value.h (free_all_values): Remove.
8402 * value.c (free_all_values): Remove.
8404 2018-04-06 Tom Tromey <tom@tromey.com>
8406 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8407 (value_history_chain, value_history_count): Remove.
8408 (value_history): New global.
8409 (record_latest_value, access_value_history, show_values)
8410 (preserve_values): Update.
8412 2018-04-06 Tom Tromey <tom@tromey.com>
8414 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8415 * varobj.c (varobj_set_display_format, varobj_set_value)
8416 (install_default_visualizer, construct_visualizer)
8417 (install_new_value, ~varobj, varobj_get_value_type)
8418 (my_value_of_variable, varobj_editable_p): Update.
8419 * c-varobj.c (c_describe_child, c_value_of_variable)
8420 (cplus_number_of_children, cplus_describe_child): Update.
8421 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8422 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8423 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8425 2018-04-06 Tom Tromey <tom@tromey.com>
8427 * printcmd.c (last_examine_address): Change type to
8429 (do_examine, x_command): Update.
8431 2018-04-06 Tom Tromey <tom@tromey.com>
8433 * value.c (release_value): Update.
8434 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8435 (struct bpstats) <val>: Now a value_ref_ptr.
8436 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8437 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8438 (~watchpoint, print_it_watchpoint, watch_command_1)
8439 (invalidate_bp_value_on_memory_change): Update.
8441 2018-04-06 Tom Tromey <tom@tromey.com>
8443 * varobj.c (varobj_clear_saved_item)
8444 (update_dynamic_varobj_children, install_new_value, ~varobj):
8446 * value.h (value_incref): Move declaration earlier.
8447 (value_decref): Rename from value_free.
8448 (struct value_ref_policy): New.
8449 (value_ref_ptr): New typedef.
8450 (struct value_deleter): Remove.
8451 (gdb_value_up): Remove typedef.
8452 (release_value): Change return type.
8453 (release_value_or_incref): Remove.
8454 * value.c (set_value_parent): Update.
8455 (value_incref): Change return type.
8456 (value_decref): Rename from value_free.
8457 (value_free_to_mark, free_all_values, free_value_chain): Update.
8458 (release_value): Return value_ref_ptr.
8459 (release_value_or_incref): Remove.
8460 (record_latest_value, set_internalvar, clear_internalvar):
8462 * stack.c (info_frame_command): Don't call value_free.
8463 * python/py-value.c (valpy_dealloc, valpy_new)
8464 (value_to_value_object): Update.
8465 * printcmd.c (do_examine): Update.
8466 * opencl-lang.c (lval_func_free_closure): Update.
8467 * mi/mi-main.c (register_changed_p): Don't call value_free.
8468 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8469 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8470 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8472 * guile/scm-value.c (vlscm_free_value_smob)
8473 (vlscm_scm_from_value): Update.
8474 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8475 (frame_unwind_register_unsigned, get_frame_register_bytes)
8476 (put_frame_register_bytes): Don't call value_free.
8477 * findvar.c (address_from_register): Don't call value_free.
8478 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8479 * dwarf2loc.c (entry_data_value_free_closure)
8480 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8481 (dwarf2_evaluate_loc_desc_full): Update.
8482 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8483 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8484 (~watchpoint, watch_command_1)
8485 (invalidate_bp_value_on_memory_change): Update.
8486 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8488 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8491 * warning.m4: Add -Wno-error=deprecated-register.
8492 * configure: Re-generate.
8494 2018-04-05 Tom Tromey <tom@tromey.com>
8496 * linespec.h: Remove include of "vec.h".
8498 2018-04-05 Tom Tromey <tom@tromey.com>
8500 * linespec.c (typep): Remove typedef.
8501 (find_methods, find_superclass_methods): Take a std::vector.
8502 (find_method): Use std::vector.
8504 2018-04-05 Tom Tromey <tom@tromey.com>
8506 * utils.c (compare_strings): Remove.
8507 * utils.h (compare_strings): Remove.
8508 * objc-lang.h (find_imps): Update.
8509 * objc-lang.c (find_methods): Take a std::vector.
8510 (uniquify_strings, find_imps): Likewise.
8511 * linespec.c (find_methods): Take a std::vector.
8512 (decode_objc): Use std::vector.
8513 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8515 (find_method, find_function_symbols): Use std::vector.
8517 2018-04-05 Tom Tromey <tom@tromey.com>
8519 * completer.c (completion_tracker::completion_tracker): Remove
8521 (completion_tracker::discard_completions): Likewise.
8522 * breakpoint.c (ambiguous_names_p): Remove cast.
8523 * ada-lang.c (_initialize_ada_language): Remove cast.
8524 * utils.h (streq): Update.
8525 (streq_hash): Add new declaration.
8526 * utils.c (streq): Return bool.
8527 (streq_hash): New function.
8529 2018-04-05 Tom Tromey <tom@tromey.com>
8531 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8532 Remove a string copy.
8534 2018-04-05 Tom Tromey <tom@tromey.com>
8536 * linespec.c (filter_results): Use std::vector.
8537 (decode_line_2, decode_line_full): Update.
8539 2018-04-05 Tom Tromey <tom@tromey.com>
8541 * linespec.c (canonical_to_fullform): Return std::string.
8542 (filter_results): Update.
8543 (struct decode_line_2_item): Add constructor.
8544 <fullform, displayform>: Now std::string.
8545 (decode_line_2_compare_items): Now a std::sort comparator.
8546 (decode_line_2): Update.
8548 2018-04-05 Tom Tromey <tom@tromey.com>
8550 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8551 (unexpected_linespec_error): Update.
8552 (linespec_parse_basic, parse_linespec): Update.
8554 2018-04-05 Tom Tromey <tom@tromey.com>
8556 * linespec.c (linespec_parse_basic): Reindent.
8558 2018-04-05 Tom Tromey <tom@tromey.com>
8560 * minsyms.h (iterate_over_minimal_symbols): Update.
8561 * minsyms.c (iterate_over_minimal_symbols): Take a
8563 * linespec.c (struct collect_minsyms): Remove.
8564 (compare_msyms): Now a std::sort comparator.
8565 (add_minsym): Add parameters.
8566 (search_minsyms_for_name): Update. Use std::vector.
8568 2018-04-03 Tom Tromey <tom@tromey.com>
8570 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8573 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8575 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8577 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8580 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8581 printing static type.
8583 2018-04-01 Tom Tromey <tom@tromey.com>
8585 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8586 (rs6000_xfer_shared_libraries): Update.
8588 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8590 * common/gdb_vecs.h (char_ptr): Remove.
8591 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8593 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8595 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8597 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8599 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8601 * tracepoint.h (struct uploaded_tp): Initialize fields.
8602 <actions, step_actions, cmd_strings>: Change type to
8603 std::vector<char *>.
8604 * tracepoint.c (get_uploaded_tp): Allocate with new.
8605 (free_uploaded_tps): Free with delete.
8606 (parse_tracepoint_definition): Adjust to std::vector change.
8607 * breakpoint.c (read_uploaded_action): Likewise.
8608 (create_tracepoint_from_upload): Likewise.
8609 * ctf.c (ctf_write_uploaded_tp): Likewise.
8610 (SET_ARRAY_FIELD): Likewise.
8611 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8613 2018-03-30 Tom Tromey <tom@tromey.com>
8615 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8617 (svr4_keep_data_in_core): Update.
8618 (svr4_read_so_list): Update.
8620 2018-03-30 Tom Tromey <tom@tromey.com>
8622 * windows-nat.c (handle_output_debug_string, handle_exception):
8624 * target.h (target_read_string): Update.
8625 * target.c (target_read_string): Change "string" to
8627 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8629 * solib-frv.c (frv_current_sos): Update.
8630 * solib-dsbt.c (dsbt_current_sos): Update.
8631 * solib-darwin.c (darwin_current_sos): Update.
8632 * linux-thread-db.c (inferior_has_bug): Update.
8633 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8634 Update. Remove alloca.
8635 * ada-lang.c (ada_main_name): Update.
8637 2018-03-30 Tom Tromey <tom@tromey.com>
8639 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8640 (struct dwo_file_deleter): New.
8641 (dwo_file_up): New typedef.
8642 (open_and_init_dwo_file): Use dwo_file_up.
8643 (free_dwo_file_cleanup): Remove.
8645 2018-03-30 Tom Tromey <tom@tromey.com>
8647 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8648 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8650 2018-03-30 Tom Tromey <tom@tromey.com>
8652 * dwarf2read.c (class free_cached_comp_units): New class.
8653 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8654 (free_cached_comp_units): Remove function.
8656 2018-03-30 Tom Tromey <tom@tromey.com>
8658 * utils.h (make_cleanup_unpush_target): Remove.
8659 * inf-ptrace.c (struct target_unpusher): New.
8660 (target_unpush_up) New typedef.
8661 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8663 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8665 2018-03-27 Tom Tromey <tom@tromey.com>
8667 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8669 2018-03-27 Pedro Alves <palves@redhat.com>
8670 Tom Tromey <tom@tromey.com>
8672 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8673 destructor. Now a class.
8674 (gdb_readline_wrapper_cleanup): Remove function.
8675 (gdb_readline_wrapper): Remove cleanups.
8677 2018-03-27 Tom Tromey <tom@tromey.com>
8679 * typeprint.h (struct type_print_options) <local_typedefs,
8680 global_typedefs>: Remove "struct" keyword.
8681 (class typedef_hash_table): New class.
8682 (recursively_update_typedef_hash, add_template_parameters)
8683 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8684 (find_typedef_in_hash): Don't declare.
8685 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8686 (typedef_hash_table::recursively_update): Rename from
8687 recursively_update_typedef_hash. Now a member.
8688 (typedef_hash_table::add_template_parameters): Rename from
8689 add_template_parameters. Now a member.
8690 (typedef_hash_table::typedef_hash_table): Now a constructor;
8691 rename from create_typedef_hash.
8692 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8693 rename from free_typedef_hash.
8694 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8695 (do_free_global_table): Remove.
8696 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8697 from copy_type_recursive.
8698 (create_global_typedef_table): Remove.
8699 (typedef_hash_table::find_global_typedef): Now a member of
8701 (typedef_hash_table::find_typedef): Rename from
8702 find_typedef_in_hash; now a member.
8703 (whatis_exp): Update.
8704 * extension.h (struct ext_lang_type_printers): Add constructor and
8706 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8708 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8709 Now a constructor; rename from start_ext_lang_type_printers.
8710 (ext_lang_type_printers): Now a destructor; rename from
8711 free_ext_lang_type_printers.
8712 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8714 (c_type_print_base_struct_union): Update. Remove cleanups.
8716 2018-03-27 Tom Tromey <tom@tromey.com>
8718 * dwarf-index-write.c: Include <cmath>.
8720 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8722 * NEWS: Add entry describing new "set|show varsize-limit" command.
8723 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8725 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8728 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8730 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8732 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8733 * dwarf-index-common.c: New file.
8734 * dwarf-index-common.h: New file.
8735 * dwarf-index-write.c: New file.
8736 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8737 (struct dwarf2_section_info): Move from here.
8738 (dwarf2_section_info_def): Likewise.
8739 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8740 (offset_type): Likewise.
8741 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8742 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8743 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8744 (byte_swap): Likewise.
8745 (MAYBE_SWAP): Likewise.
8746 (dwarf2_per_cu_ptr): Likewise.
8747 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8748 (struct tu_stats): Likewise.
8749 (struct dwarf2_per_objfile): Likewise.
8750 (struct dwarf2_per_cu_data): Likewise.
8751 (struct signatured_type): Likewise.
8752 (sig_type_ptr): Likewise.
8753 (DEF_VEC_P (sig_type_ptr)): Likewise.
8754 (INDEX4_SUFFIX): Likewise.
8755 (INDEX5_SUFFIX): Likewise.
8756 (DEBUG_STR_SUFFIX): Likewise.
8757 (dwarf2_read_section): Make non-static.
8758 (mapped_index_string_hash): Move from here.
8759 (dwarf5_djb_hash): Likewise.
8760 (file_write): Likewise.
8761 (class data_buf): Likewise.
8762 (struct symtab_index_entry): Likewise.
8763 (struct mapped_symtab): Likewise.
8764 (find_slot): Likewise.
8765 (hash_expand): Likewise.
8766 (add_index_entry): Likewise.
8767 (uniquify_cu_indices): Likewise.
8768 (class c_str_view): Likewise.
8769 (class c_str_view_hasher): Likewise.
8770 (class vector_hasher): Likewise.
8771 (write_hash_table): Likewise.
8772 (psym_index_map): Likewise.
8773 (struct addrmap_index_data): Likewise.
8774 (add_address_entry): Likewise.
8775 (add_address_entry_worker): Likewise.
8776 (write_address_map): Likewise.
8777 (symbol_kind): Likewise.
8778 (write_psymbols): Likewise.
8779 (struct signatured_type_index_data): Likewise.
8780 (write_one_signatured_type): Likewise.
8781 (recursively_count_psymbols): Likewise.
8782 (recursively_write_psymbols): Likewise.
8783 (class debug_names): Likewise.
8784 (check_dwarf64_offsets): Likewise.
8785 (psyms_seen_size): Likewise.
8786 (write_gdbindex): Likewise.
8787 (write_debug_names): Likewise.
8788 (assert_file_size): Likewise.
8789 (write_psymtabs_to_index): Likewise.
8790 (save_gdb_index_command): Likewise.
8791 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8793 * dwarf2read.h: New file.
8795 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8798 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8799 symbol name if the CU's language stores symbol names in linkage
8801 * language.h (struct language_defn)
8802 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8803 all instances of this struct.
8805 2018-03-26 Tom Tromey <tom@tromey.com>
8807 * stack.c (backtrace_command_1): Remove verbose code.
8809 2018-03-26 Tom Tromey <tom@tromey.com>
8811 * python/py-framefilter.c (py_print_type): Don't catch
8812 exceptions. Return void.
8813 (py_print_value): Likewise.
8814 (py_print_single_arg): Likewise.
8815 (enumerate_args): Don't catch exceptions.
8816 (py_print_args): Likewise.
8817 (py_print_frame): Likewise.
8818 (gdbpy_apply_frame_filter): Catch exceptions here.
8820 2018-03-26 Tom Tromey <tom@tromey.com>
8822 * stack.c (_initialize_stack): Remove trailing newlines from help
8823 text. Add "Usage" line to "backtrace" help.
8825 2018-03-26 Tom Tromey <tom@tromey.com>
8828 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8830 2018-03-26 Tom Tromey <tom@tromey.com>
8832 * python/py-framefilter.c (py_print_single_arg): Return
8833 EXT_LANG_BT_ERROR from catch.
8835 2018-03-26 Tom Tromey <tom@tromey.com>
8838 * stack.c (backtrace_command_1): Move some code into no-filters
8841 2018-03-26 Tom Tromey <tom@tromey.com>
8843 * python/py-framefilter.c (throw_quit_or_print_exception): New
8845 (gdbpy_apply_frame_filter): Use it.
8847 2018-03-26 Tom Tromey <tom@tromey.com>
8850 * python/py-framefilter.c (py_print_type, py_print_value)
8851 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8854 2018-03-26 Tom Tromey <tom@tromey.com>
8856 * python/py-framefilter.c (enumerate_args): Use
8857 gdb::unique_xmalloc_ptr.
8859 2018-03-26 Tom Tromey <tom@tromey.com>
8861 * python/py-framefilter.c (py_print_frame): Return
8863 (gdbpy_apply_frame_filter): Update comment.
8864 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8866 <EXT_LANG_BT_NO_FILTERS>: Change value.
8868 2018-03-26 Tom Tromey <tom@tromey.com>
8871 * stack.c (backtrace_command): Parse "hide" argument.
8872 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8873 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8876 2018-03-26 Tom Tromey <tom@tromey.com>
8878 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8880 (backtrace_command): Remove "fulltrace", add "flags".
8882 2018-03-26 Tom Tromey <tom@tromey.com>
8884 * stack.c (backtrace_command): Rewrite command line parsing.
8886 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8888 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8890 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8892 * filename-seen-cache.h: Add include guard.
8894 2018-03-26 Keith Seitz <keiths@redhat.com>
8896 * symfile.c (place_section): Remove "struct" from section_addr_info
8898 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8899 "struct" keyword from section_addr_info.
8901 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8903 * regformats/regdef.h (reg): Add constructors.
8905 2018-03-25 Pedro Alves <palves@redhat.com>
8907 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8908 if then/else bodies in var_func_name extraction.
8910 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8912 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8913 lookup_minimal_symbol() to find symbol entry.
8914 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8916 2018-03-23 Keith Seitz <keiths@redhat.com>
8919 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8920 nested type definitions for C++, too.
8922 2018-03-23 Tom Tromey <tom@tromey.com>
8924 * machoread.c (struct oso_el): Add a constructor. Don't define as
8926 (macho_register_oso): Remove.
8927 (macho_symtab_read): Take a std::vector.
8928 (oso_el_compare_name): Now a std::sort comparator.
8929 (macho_symfile_read_all_oso): Take a std::vector.
8930 (macho_symfile_read): Use std::vector. Remove cleanups.
8932 2018-03-22 Tom Tromey <tom@tromey.com>
8934 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8935 (record_full_goto_bookmark): Use std::string.
8937 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8940 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8943 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8945 * rs6000-tdep.c (store_insn_p): New function.
8946 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8947 and cr_reg to their unshifted values. Use store_insn_p to
8948 match LR saves using either R1 or fdata->alloca_reg. Use
8949 store_insn_p to match CR saves. Set alloca_reg_offset
8950 when alloca_reg and framep are set. Remove lr_reg shift
8951 when assigning to fdata->lr_register.
8953 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8955 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8956 command line args instead of emitting a warning.
8958 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8960 * tracepoint.h (struct static_tracepoint_marker): Initialize
8961 fields, define default constructor, move constructor and move
8962 assignment, disable the rest.
8963 <str_id, extra>: Make std::string.
8964 (release_static_tracepoint_marker): Remove.
8965 (free_current_marker): Remove.
8966 * tracepoint.c (free_current_marker): Remove.
8967 (parse_static_tracepoint_marker_definition): Adjust to
8968 std::string, use new hex2str overload.
8969 (release_static_tracepoint_marker): Remove.
8970 (print_one_static_tracepoint_marker): Get marker by reference
8971 and adjust to std::string.
8972 (info_static_tracepoint_markers_command): Adjust to std::vector
8974 * target.h (static_tracepoint_marker_p): Remove typedef.
8975 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8976 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8978 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8980 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8981 (target_debug_print_std_vector_static_tracepoint_marker): New.
8982 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8984 (target_debug_print_static_tracepoint_marker_p): ... this.
8985 * target-delegates.c: Re-generate.
8986 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8988 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8989 (decode_static_tracepoint_spec): Adjust to std::vector.
8990 (tracepoint_print_one_detail): Adjust to std::string.
8991 (strace_marker_decode_location): Adjust to std::string.
8992 (update_static_tracepoint): Adjust to std::string, remove call
8993 to release_static_tracepoint_marker.
8994 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8995 Adjust to std::vector.
8996 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8997 (remote_static_tracepoint_markers_by_strid): Adjust to
8999 * common/rsp-low.h (hex2str): New overload with explicit count
9001 * common/rsp-low.c (hex2str): New overload with explicit count
9003 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9004 (_initialize_rsp_low_selftests): Add test_hex2str test.
9005 * unittests/tracepoint-selftests.c
9006 (test_parse_static_tracepoint_marker_definition): Adjust to
9009 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9011 * tracepoint.c (parse_static_tracepoint_marker_definition):
9012 Consider case where the definition is followed by more
9014 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9015 tracepoint-selftests.c.
9016 * unittests/tracepoint-selftests.c: New.
9018 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9020 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9023 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9025 * symtab.c (find_pc_sect_line): fixed indentation.
9027 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9029 * symtab.c (find_pc_sect_line): now uses binary search.
9031 2018-03-19 Tom Tromey <tom@tromey.com>
9033 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9036 2018-03-19 Pedro Alves <palves@redhat.com>
9037 Tom Tromey <tom@tromey.com>
9039 * unittests/observable-selftests.c: New file.
9040 * common/observable.h: New file.
9041 * observable.h: New file.
9042 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9043 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9044 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9045 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9046 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9047 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9048 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9049 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9050 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9051 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9052 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9053 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9054 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9055 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9056 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9057 tui/tui-interp.c, valops.c: Update all users.
9058 * tui/tui-hooks.c (tui_bp_created_observer)
9059 (tui_bp_deleted_observer, tui_bp_modified_observer)
9060 (tui_inferior_exit_observer, tui_before_prompt_observer)
9061 (tui_normal_stop_observer, tui_register_changed_observer):
9063 (tui_observers_token): New global.
9064 (attach_or_detach, tui_attach_detach_observers): New functions.
9065 (tui_install_hooks, tui_remove_hooks): Use
9066 tui_attach_detach_observers.
9067 * record-btrace.c (record_btrace_thread_observer): Remove.
9068 (record_btrace_thread_observer_token): New global.
9069 * observer.sh: Remove.
9070 * observer.c: Rename to observable.c.
9071 * observable.c (namespace gdb_observers): Define new objects.
9072 (observer_debug): Move into gdb_observers namespace.
9073 (struct observer, struct observer_list, xalloc_observer_list_node)
9074 (xfree_observer_list_node, generic_observer_attach)
9075 (generic_observer_detach, generic_observer_notify): Remove.
9076 (_initialize_observer): Update.
9077 Don't include observer.inc.
9078 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9079 (clean mostlyclean): Likewise.
9080 (observer.h, observer.inc): Remove targets.
9081 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9082 (COMMON_SFILES): Use observable.c, not observer.c.
9083 * .gitignore: Remove observer.h.
9085 2018-03-18 Tom Tromey <tom@tromey.com>
9087 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9089 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9091 2018-03-17 Tom Tromey <tom@tromey.com>
9093 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9095 2018-03-17 Tom Tromey <tom@tromey.com>
9097 * target.c (class scoped_target_fd): New.
9098 (target_fileio_close_cleanup): Remove.
9099 (target_fileio_read_alloc_1): Use scoped_target_fd.
9101 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9103 * silent-rules.mk: New.
9104 * Makefile.in: Include silent-rules.mk
9105 (srcdir, VPATH, top_srcdir): Move up.
9106 (COMPILE): Add ECHO_CXX.
9107 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9108 (init.c): Add ECHO_INIT_C.
9109 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9110 (version.c): Add ECHO_GEN.
9111 (printcmd.o): Add ECHO_CXX.
9112 (target-float.o): Add ECHO_CXX.
9113 (ada-exp.o): Add ECHO_CXX.
9114 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9115 (insight$(EXEEXT)): Add ECHO_CXXLD.
9116 * gnulib/configure.ac: Add AM_SILENT_RULES.
9117 * gnulib/aclocal.m4: Re-generate.
9118 * gnulib/configure: Re-generate.
9119 * gnulib/import/Makefile.in: Re-generate.
9121 2018-03-16 Tom Tromey <tom@tromey.com>
9123 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9124 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9125 * utils.c (do_free_section_addr_info)
9126 (make_cleanup_free_section_addr_info): Remove.
9127 * symfile.h (struct other_sections): Add constructor.
9128 (struct section_addr_info): Remove.
9129 (section_addr_info): New typedef.
9130 (struct sym_fns) <sym_offsets>: Change type of parameter.
9131 (build_section_addr_info_from_objfile)
9132 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9133 (default_symfile_offsets, symbol_file_add)
9134 (symbol_file_add_from_bfd)
9135 (build_section_addr_info_from_section_table): Update.
9136 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9137 * symfile.c (alloc_section_addr_info): Remove.
9138 (build_section_addr_info_from_section_table): Change return type.
9140 (build_section_addr_info_from_bfd)
9141 (build_section_addr_info_from_objfile): Likewise.
9142 (free_section_addr_info): Remove.
9143 (relative_addr_info_to_section_offsets): Change type of "addrs".
9144 (addrs_section_compar): Now a std::sort comparator.
9145 (addrs_section_sort): Change return type.
9146 (addr_info_make_relative): Change type of "addrs". Update.
9147 (default_symfile_offsets, syms_from_objfile_1)
9148 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9149 (symbol_file_add_separate): Update.
9150 (symbol_file_add): Change type of "addrs". Update.
9151 (add_symbol_file_command): Update. Remove cleanups.
9152 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9154 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9155 * solib.c (solib_read_symbols): Update.
9156 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9157 * machoread.c (macho_symfile_offsets): Update.
9158 * jit.c (jit_bfd_try_read_symtab): Update.
9160 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9162 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9163 unittests/utils-selftests.c.
9164 * unittests/utils-selftests.c: New file.
9166 2018-03-14 Tom Tromey <tom@tromey.com>
9169 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9172 2018-03-14 Tom Tromey <tom@tromey.com>
9175 * printcmd.c (printf_pointer): Allow "-" in format.
9177 2018-03-14 Tom Tromey <tom@tromey.com>
9179 * printcmd.c (_initialize_printcmd): Add usage to printf.
9181 2018-03-14 Yao Qi <qiyao@sourceware.org>
9183 * MAINTAINERS: Update my email address.
9185 2018-03-13 Tom Tromey <tom@tromey.com>
9187 * machoread.c (macho_check_dsym): Change filenamep to a
9189 (macho_symfile_read): Update.
9190 * symfile.c (load_command): Use std::string.
9192 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9194 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9195 to error message string.
9196 (riscv_register_name): Use xsnprintf instead of sprintf.
9197 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9199 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9201 (riscv_push_dummy_call): Likewise.
9203 2018-03-12 Tom Tromey <tom@tromey.com>
9205 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9206 Use gdb::byte_vector.
9207 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9209 2018-03-12 Yao Qi <yao.qi@linaro.org>
9211 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9212 parameter type to readable_regcache.
9213 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9216 2018-03-11 Tom Tromey <tom@tromey.com>
9218 * dwarf2read.c (struct nextfield): Add initializers.
9219 (struct nextfnfield): Remove.
9220 (struct fnfieldlist): Add initializers. Remove "length" and
9221 "head", use std::vector.
9222 (struct decl_field_list): Remove.
9223 (struct field_info): Add initializers.
9224 <fields, baseclasses>: Now std::vector.
9225 <nbaseclasses, nfnfields, typedef_field_list_count,
9226 nested_types_list_count>: Remove.
9227 (dwarf2_add_field, dwarf2_add_type_defn)
9228 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9229 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9230 (process_structure_scope): Update.
9232 2018-03-11 Tom Tromey <tom@tromey.com>
9234 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9235 for use by std::sort.
9236 (build_type_psymtabs_1): Use std::vector.
9238 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9240 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9241 and LIBMPFR in the printed configuration.
9243 2018-03-08 Tom Tromey <tom@tromey.com>
9245 * source.c (get_filename_and_charpos): Use scoped_fd.
9246 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9247 (procfs_pidlist): Likewise.
9248 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9249 (iterate_over_mappings): Likewise.
9251 2018-03-08 Tom Tromey <tom@tromey.com>
9253 * infcall.c (struct call_return_meta_info)
9254 <stack_temporaries_enabled>: Remove.
9255 (get_call_return_value, call_function_by_hand_dummy): Update.
9256 * thread.c (disable_thread_stack_temporaries): Remove.
9257 (enable_thread_stack_temporaries): Remove.
9258 (thread_stack_temporaries_enabled_p): Return bool.
9259 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9260 (get_last_thread_stack_temporary): Update.
9261 * eval.c (evaluate_subexp): Update.
9262 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9263 class, not a function.
9264 (value_ptr, value_vec): Remove typedefs.
9265 (class thread_info) <stack_temporaries_enabled>: Now bool.
9266 <stack_temporaries>: Now a std::vector.
9267 (thread_stack_temporaries_enabled_p)
9268 (value_in_thread_stack_temporaries): Return bool.
9270 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9272 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9273 (getpkt_or_notif_sane_1): Likewise.
9275 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9277 * build-id.c (build_id_to_debug_bfd): Use std::string.
9279 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9281 * build-id.c (find_separate_debug_file_by_buildid): Return
9283 * build-id.h (find_separate_debug_file_by_buildid): Return
9285 * coffread.c (coff_symfile_read): Adjust to std::string.
9286 * elfread.c (elf_symfile_read): Adjust to std::string.
9287 * symfile.c (separate_debug_file_exists): Change parameter to
9289 (find_separate_debug_file): Return std::string.
9290 (find_separate_debug_file_by_debuglink): Return std::string.
9291 * symfile.h (find_separate_debug_file_by_debuglink): Return
9294 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9296 * common/xml-utils.c (xml_escape_text): Move code to...
9297 (xml_escape_text_append): ... this new function.
9298 * common/xml-utils.h (xml_escape_text_append): New declaration.
9299 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9301 (_initialize_xml_utils): register test_xml_escape_text_append as
9304 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9306 * defs.h: Remove MAX_REGISTER_SIZE.
9307 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9309 * python/py-unwind.c (pyuw_sniffer): Likewise.
9311 2018-03-07 Tom Tromey <tom@tromey.com>
9313 * linux-tdep.c (linux_info_proc): Update.
9314 * target.h (struct target_ops) <to_fileio_readlink>: Return
9316 (target_fileio_readlink): Return optional<string>.
9317 * remote.c (remote_hostio_readlink): Return optional<string>.
9318 * inf-child.c (inf_child_fileio_readlink): Return
9320 * target.c (target_fileio_readlink): Return optional<string>.
9322 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9324 * regcache.c (cooked_read_test): Add riscv to the list of
9325 architectures that have a save_reggroup.
9327 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9329 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9330 value is not a dynamic class object.
9332 2018-03-06 Tom Tromey <tom@tromey.com>
9334 * rust-exp.y: Formatting fixes.
9336 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9338 * riscv-tdep.c (riscv_register_name): Remove target description
9340 (riscv_gdbarch_init): Remove target description check.
9342 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9344 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9346 * riscv-tdep.h: Likewise.
9348 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9350 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9351 (riscv_pseudo_register_write): Delete.
9352 (riscv_gdbarch_init): Remove all use of pseudo registers.
9354 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9356 * record-btrace.c (btrace_print_lines): Replace cleanup
9357 parameter with RAII equivalents.
9358 (btrace_insn_history): Replace cleanup with RAII equivalents.
9359 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9360 make_cleanup_ui_out_tuple_begin_end): Remove.
9361 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9362 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9363 make_cleanup_ui_out_list_begin_end): Remove.
9365 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9367 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9368 parameter types to std::vector. Use bool.
9369 (record_btrace_wait): Replace VEC(tp_t) with
9370 std::vector<thread_info *>.
9371 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9373 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9375 * record-btrace.c (record_btrace_disable_callback): Remove.
9376 (struct scoped_btrace_disable): New.
9377 (record_btrace_open): Use scoped_btrace_disable.
9379 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9381 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9382 reading values from registers.
9384 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9386 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9389 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9391 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9392 change parameter type. Use GDB's print functions, and use
9393 core_addr_to_string where appropriate.
9394 (riscv_push_dummy_call): Use core_addr_to_string where
9395 appropriate, update call to riscv_print_arg_location, and reindent
9397 (riscv_return_value): Update call to riscv_print_arg_location.
9399 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9400 Tim Newsome <tim@sifive.com>
9401 Albert Ou <a0u@eecs.berkeley.edu>
9402 Darius Rad <darius@bluespec.com>
9404 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9405 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9406 (ALLDEPFILES): Add riscv-tdep.c
9407 * configure.tgt: Add riscv support.
9408 * riscv-tdep.c: New file.
9409 * riscv-tdep.h: New file.
9410 * NEWS: Mention new target.
9411 * MAINTAINERS: Add entry for riscv.
9413 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9415 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9416 fields within aggregates.
9418 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9420 * record-btrace.c (btrace_print_lines): Change type of flags to
9421 gdb_disassembly_flags.
9423 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9425 * fbsd-nat.c: Include "inf-ptrace.h".
9426 (USE_SIGTRAP_SIGINFO): Conditionally define.
9427 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9428 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9429 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9431 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9433 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9435 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9436 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9437 "supports_stopped_by_hw_breakpoint" target methods.
9439 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9441 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9442 * fbsd-nat.c (debug_fbsd_nat): New variable.
9443 (show_fbsd_nat_debug): New function.
9444 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9445 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9447 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9449 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9450 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9452 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9453 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9456 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9458 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9459 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9461 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9463 * charset.c (struct charset_vector): New.
9464 (charsets): Change type to charset_vector.
9465 (find_charset_names): Adjust.
9467 (_initialize_charset): Adjust.
9469 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9471 * progspace.h (struct program_space) <deleted_solibs>: Change
9472 type to std::vector<std::string>.
9473 * progspace.c (clear_program_space_solib_cache): Adjust.
9474 * breakpoint.c (print_solib_event): Adjust.
9475 (check_status_catch_solib): Adjust.
9476 * solib.c (update_solib_list): Adjust.
9477 * ui-out.h (class ui_out) <field_string>: New overload.
9478 * ui-out.c (ui_out::field_string): New overload.
9480 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9482 * progspace.h (struct program_space): Add constructor and
9483 destructor, initialize fields.
9484 (add_program_space): Remove.
9485 * progspace.c (add_program_space): Rename to...
9486 (program_space::program_space): ... this.
9487 (release_program_space): Rename to...
9488 (program_space::~program_space): ... this.
9489 (delete_program_space): Use delete to delete program_space.
9490 (initialize_progspace): Use new to allocate program_space.
9491 * inferior.c (add_inferior_with_spaces): Likewise.
9492 (clone_inferior_command): Likewise.
9493 * infrun.c (follow_fork_inferior): Likewise.
9494 (handle_vfork_child_exec_or_exit): Likewise.
9496 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9498 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9499 (delim_string_to_char_ptr_vec): Return std::vector of
9500 gdb::unique_xmalloc_ptr.
9501 (dirnames_to_char_ptr_vec_append): Take std::vector of
9502 gdb::unique_xmalloc_ptr.
9503 (dirnames_to_char_ptr_vec): Return std::vector of
9504 gdb::unique_xmalloc_ptr.
9505 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9506 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9507 (delim_string_to_char_ptr_vec): Return an std::vector of
9508 gdb::unique_xmalloc_ptr, adjust the code.
9509 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9510 gdb::unique_xmalloc_ptr, adjust the code.
9511 (dirnames_to_char_ptr_vec): Return an std::vector of
9512 gdb::unique_xmalloc_ptr, adjust the code.
9513 * auto-load.c (auto_load_safe_path_vec): Change type to
9514 std::vector of gdb::unique_xmalloc_ptr.
9515 (auto_load_expand_dir_vars): Return an std::vector of
9516 gdb::unique_xmalloc_ptr, adjust the code.
9517 (auto_load_safe_path_vec_update): Adjust.
9518 (filename_is_in_auto_load_safe_path_vec): Adjust.
9519 (auto_load_objfile_script_1): Adjust.
9520 * build-id.c (build_id_to_debug_bfd): Adjust.
9521 * linux-thread-db.c (thread_db_load_search): Adjust.
9522 * source.c (add_path): Adjust.
9524 * symfile.c (find_separate_debug_file): Adjust.
9525 * utils.c (do_free_char_ptr_vec): Remove.
9526 (make_cleanup_free_char_ptr_vec): Remove.
9528 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9531 * common/pathstuff.c: Conditionally include "<windows.h>".
9533 2018-03-01 Georg Sauthoff <mail@georg.so>
9536 * gcore.in: Quote variables and switch interpreter to bash.
9538 2018-03-01 Tom Tromey <tom@tromey.com>
9540 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9541 assertion. Add assertion for discriminant_index.
9542 (quirk_rust_enum): Use correct base type name in univariant case.
9544 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9546 * record.c (get_call_history_modifiers): Return a
9548 (cmd_record_call_history): Adjust.
9549 * record-btrace.c (record_btrace_call_history): Adjust.
9550 (record_btrace_call_history_range): Adjust.
9551 (record_btrace_call_history_from): Adjust.
9552 * target-debug.h (target_debug_print_record_print_flags): New.
9553 * target-delegates.c: Re-generate.
9554 * target.c (target_call_history): Change flags type.
9555 (target_call_history_from): Likewise.
9556 (target_call_history_range): Likewise.
9557 * target.h (struct target_ops) <target_call_history>: Likewise.
9558 (target_call_history_from): Likewise.
9559 (target_call_history_range): Likewise.
9561 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9562 Simon Marchi <simon.marchi@polymtl.ca>
9564 * common/common-utils.c: Include "sys/stat.h".
9565 (is_regular_file): Move here from "source.c"; change return
9567 * common/common-utils.h (is_regular_file): New prototype.
9568 * common/pathstuff.c (contains_dir_separator): New function.
9569 * common/pathstuff.h (contains_dir_separator): New prototype.
9570 * source.c: Don't include "sys/stat.h".
9571 (is_regular_file): Move to "common/common-utils.c".
9573 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9575 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9576 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9577 * auto-load.c: Include "common/pathstuff.h".
9578 * common/common-def.h (current_directory): Move here.
9579 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9581 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9583 * common/pathstuff.c: New file.
9584 * common/pathstuff.h: New file.
9585 * compile/compile.c: Include "common/pathstuff.h".
9586 * defs.h (current_directory): Move to "common/common-defs.h".
9587 * dwarf2read.c: Include "common/pathstuff.h".
9589 * guile/scm-safe-call.c: Likewise.
9590 * linux-thread-db.c: Likewise.
9592 * nto-tdep.c: Likewise.
9593 * objfiles.c: Likewise.
9594 * source.c: Likewise.
9595 * symtab.c: Likewise.
9596 * utils.c: Include "common/pathstuff.h".
9597 (gdb_realpath): Move to "common/pathstuff.c".
9598 (gdb_realpath_keepfile): Likewise.
9599 (gdb_abspath): Likewise.
9600 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9601 (gdb_realpath_keepfile): Likewise.
9602 (gdb_abspath): Likewise.
9604 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9606 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9607 wildcard process pid for super_resume for kernels with a
9610 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9612 * compile/compile.c (get_args): Add additional comments
9613 explaining function.
9615 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9616 Tom Tromey <tom@tromey.com>
9618 * target.h (memory_write_request_s): Remove typedef. Don't define
9620 (target_write_memory_blocks): Change argument to std::vector.
9621 (struct memory_write_request): Add constructor.
9622 * target-memory.c (compare_block_starting_address): Return bool.
9623 Change argument types.
9624 (claim_memory): Change arguments to use std::vector.
9625 (split_regular_and_flash_blocks, blocks_to_erase)
9626 (compute_garbled_blocks): Likewise.
9627 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9628 (target_write_memory_blocks): Change argument to std::vector.
9629 * symfile.c (struct load_section_data): Add constructor and
9630 destructor. Use std::vector for "requests".
9631 (struct load_progress_data): Add initializers.
9632 (load_section_callback): Update. Use "new".
9633 (clear_memory_write_data): Remove.
9634 (generic_load): Update.
9636 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9638 * arch/aarch64.h: Use common/tdesc.h.
9640 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9642 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9643 architecture with a 64-bit ABI.
9645 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9647 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9648 ahead of target description loading.
9650 2018-02-26 Tom Tromey <tom@tromey.com>
9652 * stack.c (backtrace_command_1): Update.
9653 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9655 * python/py-framefilter.c (py_print_frame)
9656 (gdbpy_apply_frame_filter): Change type of "flags".
9657 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9659 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9660 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9661 * extension.h (enum frame_filter_flag): Rename from
9663 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9664 (apply_ext_lang_frame_filter): Change type of "flags".
9665 * extension.c (apply_ext_lang_frame_filter): Change type of
9667 * extension-priv.h (struct extension_language_ops)
9668 <apply_frame_filter>: Change type of "flags".
9670 2018-02-26 Tom Tromey <tom@tromey.com>
9673 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9674 off-by-one in py_end computation.
9675 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9677 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9680 2018-02-26 Tom Tromey <tom@tromey.com>
9682 * dwarf2read.c (struct variant_field): New.
9683 (struct nextfield) <variant>: New field.
9684 (dwarf2_add_field): Handle DW_TAG_variant_part.
9685 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9686 discriminated union.
9687 (read_structure_type): Handle DW_TAG_variant_part.
9688 (handle_struct_member_die): New function, extracted from
9689 process_structure_scope. Handle DW_TAG_variant.
9690 (process_structure_scope): Handle discriminated unions. Call
9691 handle_struct_member_die.
9693 2018-02-26 Tom Tromey <tom@tromey.com>
9695 * rust-lang.h (rust_last_path_segment): Declare.
9696 * rust-lang.c (rust_last_path_segment): Now public. Change
9698 (struct disr_info): Remove.
9699 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9700 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9701 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9702 (rust_enum_p, rust_enum_variant): New function.
9703 (rust_underscore_fields): Remove "offset" parameter.
9704 (rust_print_enum): New function.
9705 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9706 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9707 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9709 (rust_internal_print_type): New function, from rust_print_type.
9711 (rust_print_type): Call rust_internal_print_type.
9712 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9713 Update enum handling.
9714 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9715 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9716 (rust_union_quirks): New functions.
9717 (process_full_comp_unit, process_full_type_unit): Call
9719 (process_structure_scope): Update rust_unions if necessary.
9721 2018-02-26 Tom Tromey <tom@tromey.com>
9723 * value.h (value_union_variant): Declare.
9724 * valops.c (value_union_variant): New function.
9725 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9726 (struct discriminant_info): New.
9727 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9729 (struct main_type) <flag_discriminated_union>: New field.
9731 2018-02-26 Tom Tromey <tom@tromey.com>
9733 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9734 unittests/unpack-selftests.c.
9735 * unittests/unpack-selftests.c: New file.
9736 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9738 2018-02-26 Yao Qi <yao.qi@linaro.org>
9740 * dwarf2read.c (struct partial_die_info) <read>: New method.
9741 (read_partial_die): Remove the declaration.
9742 (load_partial_dies): Update.
9743 (partial_die_info::partial_die_info):
9744 (read_partial_die): Change it to partial_die_info::read.
9746 2018-02-26 Yao Qi <yao.qi@linaro.org>
9748 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9749 (fixup_partial_die): Remove declaration.
9750 (scan_partial_symbols): Update.
9751 (partial_die_parent_scope): Likewise.
9752 (partial_die_full_name): Likewise.
9753 (fixup_partial_die): Change it to partial_die_info::fixup.
9755 2018-02-26 Yao Qi <yao.qi@linaro.org>
9757 * dwarf2read.c (read_partial_die): Update the declaration.
9758 (load_partial_dies): Caller update.
9759 (read_partial_die): Remove one argument abbrev_len.
9761 2018-02-26 Yao Qi <yao.qi@linaro.org>
9763 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9764 assignment operator.
9765 (load_partial_dies): Use ctor and copy ctor.
9766 (read_partial_die): Update.
9767 (dwarf2_cu::find_partial_die): Use ctor.
9769 2018-02-26 Yao Qi <yao.qi@linaro.org>
9771 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9772 (find_partial_die_in_comp_unit): Change it to
9773 dwarf2_cu::find_partial_die.
9774 (find_partial_die): Update.
9776 2018-02-26 Yao Qi <yao.qi@linaro.org>
9778 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9781 2018-02-26 Yao Qi <yao.qi@linaro.org>
9783 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9785 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9787 * arch/amd64.h: Use common/tdesc.h.
9788 * arch/i386.c: Likewise.
9789 * arch/i386.h: Likewise.
9790 * arch/tic6x.c: Likewise.
9791 * arch/tdesc.h: Move file from here...
9792 * common/tdesc.h: ...to here.
9793 * features/aarch64-core.c: Regenerate.
9794 * features/aarch64-fpu.c: Regenerate.
9795 * features/i386/32bit-avx.c: Regenerate.
9796 * features/i386/32bit-avx512.c: Regenerate.
9797 * features/i386/32bit-core.c: Regenerate.
9798 * features/i386/32bit-linux.c: Regenerate.
9799 * features/i386/32bit-mpx.c: Regenerate.
9800 * features/i386/32bit-pkeys.c: Regenerate.
9801 * features/i386/32bit-sse.c: Regenerate.
9802 * features/i386/64bit-avx.c: Regenerate.
9803 * features/i386/64bit-avx512.c: Regenerate.
9804 * features/i386/64bit-core.c: Regenerate.
9805 * features/i386/64bit-linux.c: Regenerate.
9806 * features/i386/64bit-mpx.c: Regenerate.
9807 * features/i386/64bit-pkeys.c: Regenerate.
9808 * features/i386/64bit-segments.c: Regenerate.
9809 * features/i386/64bit-sse.c: Regenerate.
9810 * features/i386/x32-core.c: Regenerate.
9811 * features/tic6x-c6xp.c: Regenerate.
9812 * features/tic6x-core.c: Regenerate.
9813 * features/tic6x-gp.c: Regenerate.
9814 * target-descriptions.c: Use common/tdesc.h.
9815 * target-descriptions.h: Likewise.
9817 2018-02-24 Tom Tromey <tom@tromey.com>
9819 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9820 (try_thread_db_load_from_dir, thread_db_load_search): Use
9822 (info_auto_load_libthread_db_compare): Return bool. Change
9824 (info_auto_load_libthread_db): Use std::vector, std::string.
9827 2018-02-24 Tom Tromey <tom@tromey.com>
9829 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9831 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9833 * gdbarch.c: Rebuild.
9834 * gdbarch.h: Rebuild.
9835 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9836 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9837 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9840 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9842 * gdbtypes.h (sect_offset): Change type to uint64_t.
9843 (sect_offset_str): New function.
9844 * dwarf2read.c (create_addrmap_from_aranges): Use
9846 (error_check_comp_unit_head): Likewise.
9847 (create_debug_type_hash_table): Likewise.
9848 (read_cutu_die_from_dwo): Likewise.
9849 (init_cutu_and_read_dies): Likewise.
9850 (init_cutu_and_read_dies_no_follow): Likewise.
9851 (process_psymtab_comp_unit_reader): Likewise.
9852 (partial_die_parent_scope): Likewise.
9853 (peek_die_abbrev): Likewise.
9854 (process_queue): Likewise.
9855 (dwarf2_physname): Likewise.
9856 (read_namespace_alias): Likewise.
9857 (read_import_statement): Likewise.
9858 (create_dwo_cu_reader): Likewise.
9859 (create_cus_hash_table): Likewise.
9860 (lookup_dwo_cutu): Likewise.
9861 (inherit_abstract_dies): Likewise.
9862 (read_func_scope): Likewise.
9863 (read_call_site_scope): Likewise.
9864 (dwarf2_add_member_fn): Likewise.
9865 (read_common_block): Likewise.
9866 (read_module_type): Likewise.
9867 (read_typedef): Likewise.
9868 (read_subrange_type): Likewise.
9869 (load_partial_dies): Likewise.
9870 (read_partial_die): Likewise.
9871 (find_partial_die): Likewise.
9872 (read_str_index): Likewise.
9873 (dwarf2_string_attr): Likewise.
9874 (build_error_marker_type): Likewise.
9875 (lookup_die_type): Likewise.
9876 (dump_die_shallow): Likewise.
9877 (follow_die_ref): Likewise.
9878 (dwarf2_fetch_die_loc_sect_off): Likewise.
9879 (dwarf2_fetch_constant_bytes): Likewise.
9880 (follow_die_sig): Likewise.
9881 (get_signatured_type): Likewise.
9882 (get_DW_AT_signature_type): Likewise.
9883 (dwarf2_find_containing_comp_unit): Likewise.
9884 (set_die_type): Likewise.
9886 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9888 * arch/aarch64.c: Include "common-defs.h".
9889 * arch/amd64.c: Likewise.
9890 * arch/i386.c: Likewise.
9892 2018-02-21 Tom Tromey <tom@tromey.com>
9894 * value.h: (extract_field_op): Update.
9895 * eval.c (extract_field_op): Return a const char *.
9896 * expression.h (parse_expression_for_completion): Update.
9897 * completer.c (complete_expression): Update.
9898 (add_struct_fields): Make fieldname const.
9899 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9900 (mark_completion_tag, parse_exp_in_context_1): Update.
9901 (parse_expression_for_completion): Change "name" to
9902 unique_xmalloc_ptr*.
9904 2018-02-21 Tom Tromey <tom@tromey.com>
9906 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9908 2018-02-21 Yao Qi <yao.qi@linaro.org>
9910 * avr-tdep.c (avr_read_pc): Change parameter type to
9912 * gdbarch.sh (read_pc): Likewise.
9913 * gdbarch.c: Re-generated.
9914 * gdbarch.h: Re-generated.
9915 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9917 * ia64-tdep.c (ia64_read_pc): Likewise.
9918 * mips-tdep.c (mips_read_pc): Likewise.
9919 * spu-tdep.c (spu_read_pc): Likewise.
9921 2018-02-21 Yao Qi <yao.qi@linaro.org>
9923 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9924 * regcache-dump.c: New file.
9925 * regcache.c: Move register_dump to regcache-dump.c.
9926 (maintenance_print_registers): Likewise.
9927 (maintenance_print_raw_registers): Likewise.
9928 (maintenance_print_cooked_registers): Likewise.
9929 (maintenance_print_register_groups): Likewise.
9930 (maintenance_print_remote_registers): Likewise.
9931 (_initialize_regcache): Likewise.
9932 * regcache.h (register_dump): Moved from regcache.c.
9934 2018-02-21 Yao Qi <yao.qi@linaro.org>
9936 * regcache.c (regcache::regcache): Update.
9937 (regcache::invalidate): Move it to detached_regcache::invalidate.
9938 (get_thread_arch_aspace_regcache): Update.
9939 (regcache::raw_update): Update.
9940 (regcache::cooked_read): Remove some code.
9941 (regcache::cooked_read_value): Likewise.
9942 (regcache::raw_write): Remove assert on m_readonly_p.
9943 (regcache::raw_supply_integer): Move it to
9944 detached_regcache::raw_supply_integer.
9945 (regcache::raw_supply_zeroed): Likewise.
9946 * regcache.h (detached_regcache) <raw_supply_integer>: New
9948 <raw_supply_zeroed, invalidate>: Likewise.
9949 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9950 <invalidate>: Likewise.
9951 <m_readonly_p>: Removed.
9953 2018-02-21 Yao Qi <yao.qi@linaro.org>
9955 * infcmd.c (get_return_value): Let stop_regs point to
9956 get_current_regcache.
9957 * regcache.c (regcache::regcache): Remove.
9958 (register_dump_reg_buffer): New class.
9959 (regcache_print): Adjust.
9960 * regcache.h (regcache): Remove constructors.
9962 2018-02-21 Yao Qi <yao.qi@linaro.org>
9964 * regcache.c (class register_dump): New class.
9965 (register_dump_regcache, register_dump_none): New class.
9966 (register_dump_remote, register_dump_groups): New class.
9967 (regcache_print): Update.
9968 * regcache.h (regcache_dump_what): Move it to regcache.c.
9969 (regcache) <dump>: Remove.
9971 2018-02-21 Yao Qi <yao.qi@linaro.org>
9973 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9975 (jit_unwind_reg_set_impl): Call raw_supply.
9976 (jit_frame_sniffer): Use reg_buffer_rw.
9977 * record-full.c (record_full_core_regbuf): Change its type.
9978 (record_full_core_open_1): Use reg_buffer_rw.
9979 (record_full_close): Likewise.
9980 (record_full_core_fetch_registers): Use regcache->raw_supply.
9981 (record_full_core_store_registers): Likewise.
9982 * regcache.c (regcache::get_register_status): Move it to
9984 (regcache_raw_set_cached_value): Remove.
9985 (regcache::raw_set_cached_value): Remove.
9986 (regcache::raw_write): Call raw_supply.
9987 (regcache::raw_supply): Move it to reg_buffer_rw.
9988 * regcache.h (regcache_raw_set_cached_value): Remove.
9989 (reg_buffer_rw): New class.
9991 2018-02-21 Yao Qi <yao.qi@linaro.org>
9993 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9994 readonly_detached_regcache.
9995 (dummy_frame_prev_register): Use regcache->cooked_read.
9996 * frame.c (frame_save_as_regcache): Change return type.
9997 (frame_pop): Update.
9998 * frame.h (frame_save_as_regcache): Update declaration.
9999 * inferior.h (get_infcall_suspend_state_regcache): Update
10001 * infrun.c (infcall_suspend_state) <registers>: use
10002 readonly_detached_regcache.
10003 (save_infcall_suspend_state): Don't use regcache_dup.
10004 (get_infcall_suspend_state_regcache): Change return type.
10005 * linux-fork.c (struct fork_info) <savedregs>: Change to
10006 readonly_detached_regcache.
10008 (fork_save_infrun_state): Don't use regcache_dup.
10009 (info_checkpoints_command): Adjust.
10010 * mi/mi-main.c (register_changed_p): Update declaration.
10011 (mi_cmd_data_list_changed_registers): Use
10012 readonly_detached_regcache.
10013 (register_changed_p): Change parameter type to
10014 readonly_detached_regcache.
10015 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10016 readonly_detached_regcache.
10017 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10018 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10020 (regcache::save): Move it to reg_buffer.
10021 (regcache::restore): Change parameter type.
10022 (regcache_dup): Remove.
10023 * regcache.h (reg_buffer) <save>: New method.
10024 (readonly_detached_regcache): New class.
10025 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10026 readonly_detached_regcache.
10027 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10029 2018-02-21 Yao Qi <yao.qi@linaro.org>
10031 * frame.c (frame_save_as_regcache): Use regcache method save.
10032 (frame_pop): Use regcache method restore.
10033 * infrun.c (restore_infcall_suspend_state): Likewise.
10034 * linux-fork.c (fork_load_infrun_state): Likewise.
10035 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10037 * regcache.c (regcache_save): Remove.
10038 (regcache::restore): More asserts.
10039 (regcache_cpy): Remove.
10040 * regcache.h (regcache_save): Remove the declaration.
10041 (regcache::restore): Move from private to public.
10042 Remove the friend declaration of regcache_cpy.
10043 (regcache_cpy): Remove declaration.
10045 2018-02-21 Yao Qi <yao.qi@linaro.org>
10047 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10048 parameter type to 'readable_regcache *'.
10049 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10050 * arm-tdep.c (arm_neon_quad_read): Likewise.
10051 (arm_pseudo_read): Likewise.
10052 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10053 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10054 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10055 * gdbarch.c: Re-generated.
10056 * gdbarch.h: Re-generated.
10057 * gdbarch.sh (pseudo_register_read): Change parameter type to
10058 'readable_regcache *'.
10059 (pseudo_register_read_value): Likewise.
10060 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10061 (h8300_pseudo_register_read): Likewise.
10062 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10063 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10064 (i386_pseudo_register_read_into_value): Likewise.
10065 (i386_pseudo_register_read_value): Likewise.
10066 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10068 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10069 * m32c-tdep.c (m32c_raw_read): Likewise.
10070 (m32c_read_flg): Likewise.
10071 (m32c_banked_register): Likewise.
10072 (m32c_banked_read): Likewise.
10073 (m32c_sb_read): Likewise.
10074 (m32c_part_read): Likewise.
10075 (m32c_cat_read): Likewise.
10076 (m32c_r3r2r1r0_read): Likewise.
10077 (m32c_pseudo_register_read): Likewise.
10078 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10079 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10080 (mep_pseudo_cr64_read): Likewise.
10081 (mep_pseudo_register_read): Likewise.
10082 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10083 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10084 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10085 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10086 (regcache::cooked_read): Likewise.
10087 (regcache::cooked_read_value): Likewise.
10088 (regcache_cooked_read_signed):
10089 (regcache::cooked_read): Likewise.
10090 * regcache.h (readable_regcache): New class.
10091 (regcache): Inherit readable_regcache. Move some methods to
10093 * rl78-tdep.c (rl78_pseudo_register_read): Change
10094 parameter type to 'readable_regcache *'.
10095 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10096 (e500_pseudo_register_read): Change parameter type to
10097 'readable_regcache *'.
10098 (dfp_pseudo_register_read): Likewise.
10099 (vsx_pseudo_register_read): Likewise.
10100 (efpr_pseudo_register_read): Likewise.
10101 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10102 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10103 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10104 (sh64_pseudo_register_read): Likewise.
10105 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10106 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10107 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10108 (spu_pseudo_register_read): Likewise.
10109 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10110 (xtensa_pseudo_register_read): Likewise.
10112 2018-02-21 Yao Qi <yao.qi@linaro.org>
10114 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10115 (regcache::arch): Move it to reg_buffer::arch.
10116 (regcache::register_buffer): Likewise.
10117 (regcache::assert_regnum): Likewise.
10118 (regcache::num_raw_registers): Likewise.
10119 * regcache.h (reg_buffer): New class.
10120 (regcache): Inherit reg_buffer.
10122 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10124 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10125 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10127 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10129 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10131 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10133 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10134 (SFILES): Remove common/*.c files.
10135 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10136 * common/common.host: Add common reference.
10137 * configure.ac: Likewise.
10138 * configure: Regenerate.
10140 2018-02-16 Yao Qi <yao.qi@linaro.org>
10142 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10143 (block_initialize_namespace): Use new.
10144 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10145 (dwarf2_free_objfile): Use delete.
10146 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10147 (copy_type_recursive): Use new.
10148 * gdb_obstack.h (allocate_on_obstack): New.
10150 2018-02-15 Yao Qi <yao.qi@linaro.org>
10153 * inferior.c (exit_inferior_1): Reset inf->control.
10155 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10157 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10160 2018-02-14 Pedro Alves <palves@redhat.com>
10162 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10163 frame_cleanup_after_sniffer on exception.
10165 2018-02-14 Tom Tromey <tom@tromey.com>
10167 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10169 (solib_bfd_open): Make pathname const.
10170 * solib.c (solib_bfd_open): Make pathname const.
10171 * solib-spu.c (spu_bfd_fopen): Make name const.
10172 (spu_bfd_open): Make pathname const.
10173 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10174 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10176 2018-02-14 Tom Tromey <tom@tromey.com>
10178 * symfile.c (symfile_bfd_open): Update.
10179 * source.h (openp, source_full_path_of, find_and_open_source):
10180 Change argument type to unique_xmalloc_ptr.
10181 * source.c (openp): Take a unique_xmalloc_ptr.
10182 (source_full_path_of, find_and_open_source): Likewise.
10183 (open_source_file, symtab_to_fullname): Update.
10184 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10185 unique_xmalloc_ptr.
10186 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10187 (exec_file_find): Update.
10188 * psymtab.c (psymtab_to_fullname): Update.
10189 * nto-tdep.h (nto_find_and_open_solib): Update.
10190 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10191 unique_xmalloc_ptr.
10192 * exec.c (exec_file_attach): Update.
10193 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10194 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10196 2018-02-14 Tom Tromey <tom@tromey.com>
10198 * solib.c: Include source.h.
10199 * nto-tdep.c: Include source.h.
10200 * mi/mi-cmd-env.c: Include source.h.
10201 * infcmd.c: Include source.h.
10202 * exec.c: Include source.h.
10203 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10204 (add_path, directory_switch, source_path, init_source_path): Move
10206 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10207 (add_path, directory_switch, source_path, init_source_path):
10210 2018-02-14 Tom Tromey <tom@tromey.com>
10212 * solist.h (exec_file_find, solib_find): Return
10213 unique_xmalloc_ptr.
10214 (solib_bfd_fopen): Take a const char *.
10215 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10216 (exec_file_find, solib_find): Likewise.
10217 (solib_bfd_fopen): Do not take ownership of "pathname".
10218 (solib_bfd_open): Use unique_xmalloc_ptr.
10219 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10220 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10221 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10222 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10224 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10226 * ada-lang.c (name_match_type_from_name): Remove reference to
10227 ada_name_for_lookup in function's documentation.
10228 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10230 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10232 * defs.h (enum openp_flags): New enum.
10233 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10234 Move to enum openp_flags.
10235 (openp_flags): New enum flags.
10236 (openp): Change parameter type to openp_flags.
10237 * source.c (openp): Change parameter type to openp_flags.
10238 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10239 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10241 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10243 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10246 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10248 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10250 (class dwarf2_queue_guard): ...the destructor of this new class.
10251 (dw2_do_instantiate_symtab): Create instance of the new class
10252 dwarf2_queue_guard, remove cleanup.
10254 2018-02-09 Tom Tromey <tom@tromey.com>
10256 * source.c (find_source_lines): Don't reference past the end of
10259 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10261 * remote.c (remote_btrace_maybe_reopen): Change error message.
10262 * btrace.c (btrace_enable): Likewise.
10263 (parse_xml_btrace): Likewise.
10264 (parse_xml_btrace_conf): Likewise.
10266 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10268 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10269 (linux_enable_pt, linux_enable_bts): Call
10270 diagnose_perf_event_open_fail.
10272 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10274 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10275 Remove parameter and change return type. Update callers. Move it.
10276 (linux_enable_bts, linux_enable_pt): Improve error message.
10277 (linux_enable_pt): Remove zero buffer size check.
10278 (linux_enable_btrace): Improve error messages. Remove NULL return
10281 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10283 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10284 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10285 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10286 (linux_supports_pt, linux_supports_btrace): Remove.
10287 (linux_enable_bts): Call cpu_supports_bts.
10288 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10289 * remote.c (remote_supports_btrace): Remove.
10290 (init_remote_ops): Remove remote_supports_btrace.
10291 * target-delegates.c: Regenerated.
10292 * target.c (target_supports_btrace): Remove.
10293 * target.h (target_ops) <to_supports_btrace>: Remove
10294 (target_supports_btrace): Remove.
10295 * x86-linux-nat.c (x86_linux_create_target): Remove
10296 linux_supports_btrace.
10298 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10300 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10302 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10303 exception and use message in own exception.
10305 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10307 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10308 (perf_event_pt_event_type): Use gdb_file_up.
10309 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10310 scoped_fd, and scoped_mmap.
10312 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10314 * common/scoped_mmap.h: New.
10315 * unittests/scoped_mmap-selftest.c: New.
10316 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10317 unittests/scoped_mmap-selftest.c.
10319 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10321 * common/scoped_fd.h: New.
10322 * unittests/scoped_fd-selftest.c: New.
10323 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10324 unittests/scoped_fd-selftest.c.
10326 2018-02-09 Tom Tromey <tom@tromey.com>
10328 * auto-load.c (auto_load_section_scripts): Use
10329 gdb::unique_xmalloc_ptr.
10331 2018-02-09 Tom Tromey <tom@tromey.com>
10333 * auto-load.c (execute_script_contents): Use std::string.
10335 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10337 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10338 Python function, rather than a new command.
10340 2018-02-08 Tom Tromey <tom@tromey.com>
10342 * solib.c (solib_find_1): Use std::string.
10343 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10345 2018-02-08 Tom Tromey <tom@tromey.com>
10347 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10349 2018-02-08 Tom Tromey <tom@tromey.com>
10351 * source.c (find_source_lines): Use gdb::def_vector.
10353 2018-02-08 Tom Tromey <tom@tromey.com>
10355 * macrocmd.c (struct temporary_macro_definition): New.
10356 (macro_define_command): Use temporary_macro_definition. Remove
10358 (free_macro_definition_ptr): Remove.
10360 2018-02-08 Tom Tromey <tom@tromey.com>
10362 * macroexp.c (maybe_expand): Use std::string.
10364 2018-02-08 Tom Tromey <tom@tromey.com>
10366 * macroexp.c (struct macro_buffer): Add initializers for some
10368 (init_buffer, init_shared_buffer, free_buffer)
10369 (free_buffer_return_text): Remove.
10370 (macro_buffer): New constructors.
10371 (~macro_buffer): New destructor.
10372 (macro_buffer::set_shared): New method.
10373 (macro_buffer::resize_buffer, macro_buffer::appendc)
10374 (macro_buffer::appendmem): Now methods, not free functions.
10375 (set_token, append_tokens_without_splicing, stringify)
10376 (macro_stringify): Update.
10377 (gather_arguments): Change return type. Remove argc_p argument,
10378 add args_ptr argument. Use std::vector.
10379 (substitute_args): Remove argc argument. Accept std::vector.
10380 (expand): Update. Use std::vector.
10381 (scan, macro_expand, macro_expand_next): Update.
10383 2018-02-08 Tom Tromey <tom@tromey.com>
10385 * symtab.c (default_collect_symbol_completion_matches_break_on):
10386 Use unique_xmalloc_ptr.
10387 * macroscope.h: (sal_macro_scope, user_macro_scope)
10388 (default_macro_scope): Return unique_xmalloc_ptr.
10389 * macroscope.c (sal_macro_scope, user_macro_scope)
10390 (default_macro_scope): Return unique_xmalloc_ptr.
10391 * macroexp.h (macro_expand, macro_expand_once): Return
10392 unique_xmalloc_ptr.
10393 * macroexp.c (macro_expand, macro_expand_once): Return
10394 unique_xmalloc_ptr.
10395 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10396 (info_macro_command, info_macros_command): Use
10397 unique_xmalloc_ptr.
10398 * compile/compile-c-support.c (write_macro_definitions): Use
10399 unique_xmalloc_ptr.
10400 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10402 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10404 * value.c (value_static_field): Assign field type instead of
10405 containing type when returning an optimized out value.
10407 2018-02-06 Yao Qi <yao.qi@linaro.org>
10409 * ft32-tdep.c (ft32_read_pc): Remove.
10410 (ft32_write_pc): Remove.
10411 (ft32_gdbarch_init): Update.
10412 * m32r-tdep.c (m32r_read_pc): Remove.
10413 (m32r_gdbarch_init): Update.
10414 * mep-tdep.c (mep_read_pc): Remove.
10415 (mep_gdbarch_init): Update.
10416 * microblaze-tdep.c (microblaze_write_pc): Remove.
10417 (microblaze_gdbarch_init): Update.
10418 * mn10300-tdep.c (mn10300_read_pc): Remove.
10419 (mn10300_write_pc): Remove.
10420 (mn10300_gdbarch_init): Update.
10421 * moxie-tdep.c (moxie_read_pc): Remove.
10422 (moxie_write_pc): Remove.
10423 (moxie_gdbarch_init): Update.
10425 2018-02-06 Yao Qi <yao.qi@linaro.org>
10427 * expprint.c (print_subexp_standard): Handle
10428 OP_F77_UNDETERMINED_ARGLIST.
10429 (dump_subexp_body_standard): Likewise.
10431 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10433 * target-descriptions.c (tdesc_element_visitor) Add empty
10435 (tdesc_type): Move make_gdb_type from here.
10436 (tdesc_type_builtin): Likewise.
10437 (tdesc_type_vector): Likewise.
10438 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10439 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10440 (make_gdb_type_union): Likewise.
10441 (make_gdb_type_flags): Likewise.
10442 (make_gdb_type_enum): Likewise.
10443 (make_gdb_type): New function.
10444 (tdesc_register_type): Use static make_gdb_type.
10446 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10448 * infcmd.c (default_print_one_register_info): Align natural-format
10449 column values consistently one under another.
10450 (pad_to_column): New function.
10452 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10454 * dwarf2read.c (dwarf2_physname): Move commment.
10456 2018-02-01 Leszek Swirski <leszeks@google.com>
10458 * varobj.c (varobj_formatted_print_options): Allow recursive
10459 pretty printing if pretty printing is enabled.
10461 2018-02-01 Leszek Swirski <leszeks@google.com>
10463 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10464 names after a structop as a filename.
10466 2018-02-01 Yao Qi <yao.qi@linaro.org>
10468 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10469 (arm_record_coproc_data_proc): Likewise.
10471 2018-02-01 Yao Qi <yao.qi@linaro.org>
10473 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10475 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10477 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10478 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10480 2018-01-31 Pedro Alves <palves@redhat.com>
10482 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10483 * inflow.c (child_terminal_save_inferior): Wrap reference to
10484 tcgetpgrp in HAVE_TERMIOS_H.
10485 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10487 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10488 always iterate over all inferiors.
10489 (gdbsim_cntrl_c): Adjust.
10490 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10492 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10494 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10495 index type is objfile-owned if the element type is as well.
10497 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10501 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10503 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10504 "features/s390x-linux64.c".
10505 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10506 s390_linux32 and s390x_linux64.
10507 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10509 * s390-tdep.c: Include "features/s390-linux32.c" and
10510 "features/s390x-linux64.c".
10511 (s390_tdesc_valid): Add check for tdesc_has_registers.
10512 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10513 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10514 tdesc_s390x_linux64.
10515 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10516 tdesc_s390x_linux64 to...
10517 * s390-tdep.h: ...here.
10519 2018-01-30 Pedro Alves <palves@redhat.com>
10522 * config.in, configure: Regenerate.
10523 * configure.ac: Check for getpgid.
10524 * go32-nat.c (go32_pass_ctrlc): New.
10525 (go32_target): Install it.
10526 * inf-child.c (inf_child_target): Install
10527 child_terminal_save_inferior, child_pass_ctrlc and
10529 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10530 (inf_ptrace_target): No longer install it.
10531 * infcmd.c (interrupt_target_1): Adjust.
10532 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10533 (child_interrupt): Declare.
10534 (inferior::terminal_state): New.
10535 * inflow.c (struct terminal_info): Update comments.
10536 (inferior_process_group): Delete.
10537 (terminal_is_ours): Delete.
10538 (gdb_tty_state): New.
10539 (child_terminal_init): Adjust.
10540 (is_gdb_terminal, sharing_input_terminal_1)
10541 (sharing_input_terminal): New functions.
10542 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10543 Set the process's actual process group in the foreground if
10544 possible. Handle is_ours_for_output/is_ours distinction. Don't
10545 mark terminal as the inferior's if not sharing GDB's terminal.
10546 Don't check attach_flag.
10547 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10548 pass down a target_terminal_state.
10549 (child_terminal_save_inferior): New, factored out from ...
10550 (child_terminal_ours_1): ... this. Handle
10551 target_terminal_state::is_ours_for_output.
10552 (child_interrupt, child_pass_ctrlc): New.
10553 (inflow_inferior_exit): Clear the inferior's terminal_state.
10554 (copy_terminal_info): Copy the inferior's terminal state.
10555 (_initialize_inflow): Remove reference to terminal_is_ours.
10556 * inflow.h (inferior_process_group): Delete.
10557 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10558 * procfs.c (procfs_target): Don't install procfs_interrupt.
10559 (procfs_interrupt): Delete.
10560 * remote.c (remote_serial_quit_handler): Adjust.
10561 (remote_interrupt): Remove ptid parameter. Adjust.
10562 * target-delegates.c: Regenerate.
10563 * target.c: Include "terminal.h".
10564 (target_terminal::terminal_state): Rename to ...
10565 (target_terminal::m_terminal_state): ... this.
10566 (target_terminal::init): Adjust.
10567 (target_terminal::inferior): Adjust to per-inferior
10569 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10570 (target_terminal::ours, target_terminal::ours_for_output): Use
10571 target_terminal_is_ours_kind.
10572 (target_interrupt): Remove ptid parameter. Adjust.
10573 (default_target_pass_ctrlc): Adjust.
10574 * target.h (target_ops::to_terminal_save_inferior): New field.
10575 (target_ops::to_interrupt): Remove ptid_t parameter.
10576 (target_interrupt): Remove ptid_t parameter. Update comment.
10577 (target_pass_ctrlc): Update comment.
10578 * target/target.h (target_terminal_state): New scoped enum,
10579 factored out of ...
10580 (target_terminal::terminal_state): ... here.
10581 (target_terminal::inferior): Update comments.
10582 (target_terminal::restore_inferior): New.
10583 (target_terminal::is_inferior, target_terminal::is_ours)
10584 (target_terminal::is_ours_for_output): Adjust.
10585 (target_terminal::scoped_restore_terminal_state): Adjust to
10586 rename, and call restore_inferior() instead of inferior().
10587 (target_terminal::scoped_restore_terminal_state::m_state): Change
10589 (target_terminal::terminal_state): Rename to ...
10590 (target_terminal::m_terminal_state): ... this and change type.
10592 2018-01-30 Pedro Alves <palves@redhat.com>
10594 * linux-nat.c (wait_for_signal): New function.
10595 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10597 (async_terminal_is_ours)
10598 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10599 (linux_nat_add_target): Don't override
10600 to_terminal_inferior/to_terminal_ours.
10602 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10604 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10606 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10608 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10609 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10610 dwarf2_per_objfile_free here.
10611 (dwarf2_per_objfile_free): Remove.
10612 (_initialize_dwarf2_read): Don't register
10613 dwarf2_per_objfile_free as a registry cleanup.
10615 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10617 Avoid compilation errors in MinGW native builds
10619 The error is triggered by including python-internal.h, and the
10622 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10623 from build-gnulib/import/math.h:27,
10624 from d:/usr/Python26/include/pyport.h:235,
10625 from d:/usr/Python26/include/Python.h:58,
10626 from python/python-internal.h:94,
10627 from python/py-arch.c:24:
10628 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10632 This happens because Python headers define 'hypot' to expand t
10633 '_hypot' in the Windows builds.
10634 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10635 'hypoth'. This avoids a compilation error.
10637 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10639 * MAINTAINERS (Write After Approval): Fix ordering.
10641 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10643 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10645 2018-01-26 Alan Modra <amodra@gmail.com>
10647 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10648 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10649 Remove nop. Make const. Comment.
10650 (powerpc32_plt_stub_so_2): New.
10651 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10652 Correct count. Update uses.
10653 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10654 Move common code reading PLT entry word. Correct
10655 powerpc32_plt_stub PLT address calculation.
10656 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10657 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10658 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10659 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10660 (ppc64_standard_linkage8): Likewise.
10661 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10662 Correct insns description.
10663 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10665 2018-01-24 Pedro Alves <palves@redhat.com>
10667 GCC PR libstdc++/83906
10668 * gdbtypes.c (operator==(const dynamic_prop &,
10669 const dynamic_prop &)): New.
10670 (operator==(const range_bounds &, const range_bounds &)): New.
10671 (check_types_equal): Use them instead of memcmp.
10672 * gdbtypes.h (operator==(const dynamic_prop &,
10673 const dynamic_prop &)): Declare.
10674 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10675 (operator==(const range_bounds &, const range_bounds &)): Declare.
10676 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10678 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10680 * s390-linux-tdep.c (s390_record_address_mask)
10681 (s390_record_calc_disp_common, s390_record_calc_disp)
10682 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10683 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10684 (s390_process_record): Move to s390-tdep.c.
10685 (s390_linux_init_abi_any): Adjust.
10686 * s390-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): Moved from s390-linux-tdep.c
10691 (s390_gdbarch_init): Adjust.
10693 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10695 * s390-linux-nat.c (s390-tdep.h): New include.
10696 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10697 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10698 (ALLDEPFILES): Add s390-tdep.c.
10699 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10700 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10701 * s390-tdep.h: ...this. New file.
10702 * s390-linux-tdep.c (s390-tdep.h): New include.
10703 (_initialize_s390_tdep): Rename to...
10704 (_initialize_s390_linux_tdep): ...this and adjust.
10705 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10706 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10708 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10709 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10710 (s390_is_partial_instruction, s390_software_single_step)
10711 (is_non_branch_ril, s390_displaced_step_copy_insn)
10712 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10713 (s390_prologue_data, s390_addr, s390_store, s390_load)
10714 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10715 (s390_register_call_saved, s390_guess_tracepoint_registers)
10716 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10717 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10718 (s390_pseudo_register_name, s390_pseudo_register_type)
10719 (s390_pseudo_register_read, s390_pseudo_register_write)
10720 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10721 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10722 (s390_addr_bits_remove, s390_address_class_type_flags)
10723 (s390_address_class_type_flags_to_name)
10724 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10725 (s390_function_arg_float, s390_function_arg_vector)
10726 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10727 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10728 (s390_frame_align, s390_register_return_value, s390_return_value)
10729 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10730 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10731 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10732 (s390_trad_frame_prev_register, s390_unwind_cache)
10733 (s390_prologue_frame_unwind_cache)
10734 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10735 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10736 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10737 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10738 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10739 (s390_frame_base_address, s390_local_base_address)
10740 (s390_frame_base, s390_gcc_target_options)
10741 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10742 (s390_validate_reg_range, s390_tdesc_valid)
10743 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10744 * s390-tdep.c: ...this. New file.
10746 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10748 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10749 (s390_process_record, s390_gdbarch_tdep_alloc)
10750 (s390_linux_init_abi_any): Use/set new hook.
10752 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10754 * s390-linux-tdep.c (osabi.h): New include.
10755 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10756 (s390_linux_init_abi_any): New functions.
10757 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10759 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10761 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10762 tdesc_has_registers check
10764 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10766 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10767 (s390_validate_reg_range): New macro.
10768 (s390_gdbarch_init): Adjust.
10770 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10772 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10773 (s390_gdbarch_tdep_alloc): Adjust.
10774 (s390_gdbarch_init): Adjust.
10776 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10778 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10779 <have_tdb>: Change type to bool.
10780 (s390_gdbarch_tdep_alloc): Adjust.
10781 (s390_gdbarch_init): Adjust.
10783 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10785 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10786 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10787 (s390_gdbarch_tdep_alloc): New function.
10788 (s390_gdbarch_init): Allocate tdep at start and use its fields
10789 instead of separate variables.
10791 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10793 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10794 when looking for cached gdbarch and add comment for remaining.
10796 2018-01-22 Pedro Alves <palves@redhat.com>
10797 Sergio Durigan Junior <sergiodj@redhat.com>
10799 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10802 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10804 * MAINTAINERS: Update my company e-mail address.
10806 2018-01-22 Yao Qi <yao.qi@linaro.org>
10808 * regcache.c (cooked_write_test): New function.
10809 (_initialize_regcache): Register the test.
10811 2018-01-22 Yao Qi <yao.qi@linaro.org>
10813 * ia64-tdep.c (ia64_pseudo_register_read): Call
10814 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10815 * m32c-tdep.c (m32c_cat_read): Likewise.
10816 (m32c_r3r2r1r0_read): Likewise.
10817 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10818 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10820 2018-01-22 Yao Qi <yao.qi@linaro.org>
10822 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10823 method raw_read instead of regcache_raw_read.
10824 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10825 * arm-tdep.c (arm_neon_quad_read): Likewise.
10826 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10827 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10828 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10829 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10830 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10831 (i386_pseudo_register_read_into_value): Likewise.
10832 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10833 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10834 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10835 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10836 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10837 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10838 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10839 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10840 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10842 2018-01-22 Yao Qi <yao.qi@linaro.org>
10844 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10845 * configure.tgt: Remove target mt.
10846 * mt-tdep.c: Remove.
10847 * regcache.c (cooked_read_test): Remove the check for mt.
10849 2018-01-22 Yao Qi <yao.qi@linaro.org>
10851 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10852 instead of gdbarch_pseudo_register_read_value.
10854 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10856 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10859 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10861 * linespec.c (create_sals_line_offset): Remove code that preserved
10862 the symtab_and_line's line number.
10864 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10866 * varobj.c (varobj_create): Don't set valid_block when creating a
10869 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10871 * varobj.c (varobj_create): Remove out of date comment.
10873 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10876 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10877 updating innermost block.
10878 * parse.c (innermost_block_tracker::update): Take extra type
10879 parameter, and check types match before updating innermost block.
10880 (write_dollar_variable): Update innermost block for registers.
10881 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10882 (innermost_block_tracker::innermost_block_tracker): Initialise
10884 (innermost_block_tracker::reset): Take type parameter.
10885 (innermost_block_tracker::update): Take type parameter, and pass
10886 type through as needed.
10887 (innermost_block_tracker::m_types): New member.
10888 * varobj.c (varobj_create): Pass type when reseting innermost
10891 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10893 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10894 * ada-lang.c (resolve_subexp): Likewise.
10895 * breakpoint.c (set_breakpoint_condition) Likewise.
10896 (watch_command_1) Likewise.
10897 * c-exp.y (variable): Likewise.
10898 * d-exp.y (PrimaryExpression): Likewise.
10899 * f-exp.y (variable): Likewise.
10900 * go-exp.y (variable): Likewise.
10901 * m2-exp.y (variable): Likewise.
10902 * objfiles.c (objfile::~objfile): Likewise.
10903 * p-exp.y (variable): Likewise.
10904 * parse.c (innermost_block): Change type.
10905 * parser-defs.h (class innermost_block_tracker): New.
10906 (innermost_block): Change to innermost_block_tracker.
10907 * printcmd.c (display_command): Switch to innermost_block API.
10908 (do_one_display): Likewise.
10909 * rust-exp.y (do_one_display): Likewise.
10910 * symfile.c (clear_symtab_users): Likewise.
10911 * varobj.c (varobj_create): Switch to innermost_block API, replace
10912 use of innermost_block with block stored on varobj object.
10914 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10916 * expression.h (innermost_block): Remove declaration.
10917 * varobj.c: Add 'parser-defs.h' include.
10919 2018-01-19 Tom Tromey <tom@tromey.com>
10921 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10922 symbols in the static and global blocks.
10924 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10926 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10927 gdb_ptrace.h, and move including gdb_wait.h ...
10928 * nat/linux-ptrace.h: ... to here.
10930 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10932 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10933 inf_ptrace_detach_success.
10934 (inf_ptrace_detach_success): Add inferior parameter, use it
10935 instead of inferior_ptid, pass it to detach_inferior.
10936 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10938 * inferior.c (detach_inferior): Add overload that takes an
10940 * inferior.h (detach_inferior): Likewise.
10941 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10942 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10943 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10945 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10947 * target.h (struct target_ops) <to_detach>: Add inferior
10949 (target_detach): Likewise.
10950 * target.c (dispose_inferior): Pass inferior down.
10951 (target_detach): Pass inferior down. Assert that it is equal to
10952 the current inferior.
10953 * aix-thread.c (aix_thread_detach): Pass inferior down.
10954 * corefile.c (core_file_command): Pass current_inferior() down.
10955 * corelow.c (core_detach): Add inferior parameter.
10956 * darwin-nat.c (darwin_detach): Likewise.
10957 * gnu-nat.c (gnu_detach): Likewise.
10958 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10959 * infcmd.c (detach_command): Pass current_inferior() down to
10961 * infrun.c (follow_fork_inferior): Pass parent_inf to
10963 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10965 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10966 * linux-thread-db.c (thread_db_detach): Likewise.
10967 * nto-procfs.c (procfs_detach): Likewise.
10968 * procfs.c (procfs_detach): Likewise.
10969 * record.c (record_detach): Likewise.
10970 * record.h (struct inferior): Forward-declare.
10971 (record_detach): Add inferior parameter.
10972 * remote-sim.c (gdbsim_detach): Likewise.
10973 * remote.c (remote_detach_1): Likewise.
10974 (remote_detach): Likewise.
10975 (extended_remote_detach): Likewise.
10976 * sol-thread.c (sol_thread_detach): Likewise.
10977 * target-debug.h (target_debug_print_inferior_p): New macro.
10978 * target-delegates.c: Re-generate.
10979 * top.c (kill_or_detach): Pass inferior down to target_detach.
10980 * windows-nat.c (windows_detach): Add inferior parameter.
10982 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10984 * target.h (struct target_ops) <to_detach>: Remove args
10986 (target_detach): Likewise.
10987 * target.c (dispose_inferior): Adjust.
10988 (target_detach): Remove args parameter, adjust.
10989 * aix-thread.c (aix_thread_detach): Adjust.
10990 * corefile.c (core_file_command): Adjust.
10991 * corelow.c (core_detach): Adjust.
10992 * darwin-nat.c (darwin_detach): Adjust.
10993 * gnu-nat.c (gnu_detach): Adjust.
10994 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10995 * infcmd.c (detach_command): Adjust
10996 * infrun.c (follow_fork_inferior): Adjust.
10997 (handle_vfork_child_exec_or_exit): Adjust.
10998 * linux-fork.c (linux_fork_detach): Remove args parameter.
10999 * linux-fork.h (linux_fork_detach): Likewise.
11000 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11001 * linux-thread-db.c (thread_db_detach): Likewise.
11002 * nto-procfs.c (procfs_detach): Likewise.
11003 * procfs.c (procfs_detach): Likewise.
11004 (do_detach): Remove signo parameter.
11005 * record.c (record_detach): Remove args parameter.
11006 * record.h (record_detach): Likewise.
11007 * remote-sim.c (gdbsim_detach): Likewise.
11008 * remote.c (remote_detach_1): Likewise.
11009 (remote_detach): Likewise.
11010 (extended_remote_detach): Likewise.
11011 * sol-thread.c (sol_thread_detach): Likewise.
11012 * target-delegates.c: Re-generate.
11013 * top.c (struct qt_args) <args>: Remove field.
11014 (kill_or_detach): Don't pass args.
11015 (quit_force): Don't set args.
11016 * windows-nat.c (windows_detach): Remove args parameter.
11018 2018-01-19 Yao Qi <yao.qi@linaro.org>
11020 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11021 (arm_linux_init_abi): Install it.
11023 2018-01-19 Yao Qi <yao.qi@linaro.org>
11025 * osabi.c (gdb_osabi_names): Extend the regexp for
11026 arm-linux-gnueabihf.
11028 2018-01-18 Yao Qi <yao.qi@linaro.org>
11030 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11032 (abbrev_table::add_abbrev): Update.
11033 (abbrev_table::lookup_abbrev): Update.
11035 2018-01-18 Yao Qi <yao.qi@linaro.org>
11037 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11039 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11041 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11044 2018-01-17 Tom Tromey <tom@tromey.com>
11046 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11048 2018-01-17 Tom Tromey <tom@tromey.com>
11050 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11051 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11052 (create_array_type_with_stride): Update.
11053 * dwarf2read.c (set_die_type): Update.
11055 2018-01-17 Tom Tromey <tom@tromey.com>
11057 * dwarf2read.c (delayed_method_info): Remove typedef.
11058 (dwarf2_cu::method_info): Now a std::vector.
11059 (add_to_method_list): Update.
11060 (free_delayed_list): Remove.
11061 (compute_delayed_physnames): Update.
11062 (process_full_comp_unit, process_full_type_unit): Clear the method
11063 list. Remove cleanups.
11064 (psymtab_include_file_name): Add name_holder parameter. Use
11065 unique_xmalloc_ptr.
11066 (dwarf_decode_lines): Update.
11068 2018-01-17 Tom Tromey <tom@tromey.com>
11069 Simon Marchi <simon.marchi@ericsson.com>
11071 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11072 (dwarf2_per_objfile::free_cached_comp_units)
11073 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11074 (init_cutu_and_read_dies_no_follow): Update.
11075 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11076 (dwarf2_cu::~dwarf2_cu): New.
11077 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11078 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11080 2018-01-17 Tom Tromey <tom@tromey.com>
11081 Simon Marchi <simon.marchi@ericsson.com>
11083 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11084 (struct die_reader_specs) <abbrev_table>: New member.
11085 (struct abbrev_table): Add constructor.
11086 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11087 <abbrev_obstack>: Now an auto_obstack.
11088 (abbrev_table_up): New typedef.
11089 (init_cu_die_reader): Add abbrev_table parameter.
11090 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11091 Add result_dwo_abbrev_table.
11092 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11093 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11095 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11097 (skip_children): Update.
11098 (abbrev_table::alloc_abbrev): Rename from
11099 abbrev_table_alloc_abbrev.
11100 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11101 (abbrev_table::lookup_abbrev): Rename from
11102 abbrev_table_lookup_abbrev.
11103 (abbrev_table_read_table): Return abbrev_table_up.
11104 (abbrev_table_free, abbrev_table_free_cleanup)
11105 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11106 (load_partial_dies): Update.
11108 2018-01-17 Tom Tromey <tom@tromey.com>
11110 * dwarf2read.c (dwarf2_compute_name): Update comment.
11111 (read_func_scope, read_variable): Update.
11112 (new_symbol): Remove.
11113 (new_symbol_full): Rename to new_symbol.
11115 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11118 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11119 a warning instead of throwing an error, set section size to 0 and return
11121 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11123 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11125 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11127 (linux_ptrace_attach_fail_reason_string): Likewise.
11128 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11130 (linux_ptrace_attach_fail_reason_string): Likewise.
11131 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11133 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11135 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11137 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11140 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11141 checking for fs_base/gs_base fields in struct user_regs_struct.
11142 * configure: Regenerate.
11144 2018-01-17 Yao Qi <yao.qi@linaro.org>
11146 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11148 (aarch64_linux_init_abi): Install it to gdbarch hook
11149 gcc_target_options.
11151 2018-01-15 Pedro Alves <palves@redhat.com>
11153 * common/signals-state-save-restore.c
11154 (save_original_signals_state): Fix typos.
11156 2017-01-12 Tom Tromey <tom@tromey.com>
11157 Sergio Durigan Junior <sergiodj@redhat.com>
11159 * Makefile.in (install-only): Install gdb-add-index.
11161 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11163 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11165 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11167 * infrun.c (keep_going_pass_signal): Clear step-over info when
11168 insert_breakpoints fails.
11170 2018-01-11 Pedro Alves <palves@redhat.com>
11173 * infrun.c (resume): Rename to ...
11174 (resume_1): ... this.
11175 (resume): Reimplement as wrapper around resume_1.
11177 2018-01-11 Pedro Alves <palves@redhat.com>
11180 * remote.c (remote_parse_stop_reply): Default to the last-set
11181 general thread instead of to 'magic_null_ptid'.
11183 2018-01-10 Pedro Alves <palves@redhat.com>
11185 * language.h (language_get_symbol_name_matcher): Rename ...
11186 (get_symbol_name_matcher): ... this.
11187 * language.c (language_get_symbol_name_matcher): Ditto.
11188 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11191 2018-01-10 Pedro Alves <palves@redhat.com>
11195 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11196 Adjust to use language_get_symbol_name_matcher instead of
11197 language_defn::la_get_symbol_name_matcher.
11198 * language.c (language_get_symbol_name_matcher): If in Ada mode
11199 and the lookup name is a verbatim match, return Ada's matcher.
11200 * language.h (language_get_symbol_name_matcher): Adjust comment.
11201 (ada_lookup_name_info::verbatim_p):: New method.
11203 2018-01-10 Pedro Alves <palves@redhat.com>
11206 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11207 minsym's language is language_auto or language_cplus, pass down
11208 language_ada instead.
11209 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11211 2018-01-10 Pedro Alves <palves@redhat.com>
11214 * minsyms.c (linkage_name_str): New function.
11215 (iterate_over_minimal_symbols): Use it.
11217 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11219 * NEWS: Document that 'info proc' now works on FreeBSD.
11221 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11223 * configure.ac: Check for kinfo_getfile in libutil.
11224 * configure: Regenerate.
11225 * config.in: Regenerate.
11226 * fbsd-nat.c: Include "fbsd-tdep.h".
11227 (fbsd_fetch_cmdline): New.
11228 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11229 rather than calling error.
11230 (fbsd_info_proc): New.
11231 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11232 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11233 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11235 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11237 * fbsd-nat.c (struct free_deleter): Remove.
11238 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11240 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11242 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11243 NULL for an empty pathname.
11245 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11247 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11248 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11249 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11250 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11251 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11252 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11253 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11254 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11255 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11256 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11257 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11258 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11259 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11260 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11261 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11263 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11265 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11266 (gnu_xfer_auxv): New function.
11267 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11268 TARGET_OBJECT_AUXV.
11270 2018-01-08 Yao Qi <yao.qi@linaro.org>
11271 Simon Marchi <simon.marchi@ericsson.com>
11273 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11275 (COMMON_OBS): Remove selftest.o.
11276 * configure.ac: Append selftest-arch.c and common/selftest.c to
11277 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11278 * configure: Re-generated.
11279 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11281 (maintenance_info_selftests): Likewise.
11283 2018-01-08 Xavier Roirand <roirand@adacore.com>
11285 * ada-valprint.c (val_print_packed_array_elements): Use
11286 proper number of elements when printing an array indexed
11287 by an enumeration type.
11289 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11291 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11292 (dw2_get_file_names_reader): Adjust.
11293 (lookup_dwo_signatured_type): Adjust.
11294 (lookup_dwp_signatured_type): Adjust.
11295 (lookup_signatured_type): Adjust.
11296 (create_type_unit_group): Adjust.
11297 (get_type_unit_group): Adjust.
11298 (process_psymtab_comp_unit_reader): Adjust.
11299 (build_type_psymtabs_reader): Adjust.
11300 (scan_partial_symbols): Adjust.
11301 (add_partial_symbol): Adjust.
11302 (add_partial_subprogram): Adjust.
11303 (peek_die_abbrev): Adjust.
11304 (fixup_go_packaging): Adjust.
11305 (process_imported_unit_die): Adjust.
11306 (dwarf2_compute_name): Adjust.
11307 (dwarf2_physname): Adjust.
11308 (read_import_statement): Adjust.
11309 (handle_DW_AT_stmt_list): Adjust.
11310 (read_file_scope): Adjust.
11311 (read_func_scope): Adjust.
11312 (read_lexical_block_scope): Adjust.
11313 (read_call_site_scope): Adjust.
11314 (read_variable): Adjust.
11315 (dwarf2_rnglists_process): Adjust.
11316 (dwarf2_ranges_process): Adjust.
11317 (dwarf2_ranges_read): Adjust.
11318 (dwarf2_get_pc_bounds): Adjust.
11319 (dwarf2_record_block_ranges): Adjust.
11320 (dwarf2_add_field): Adjust.
11321 (dwarf2_add_member_fn): Adjust.
11322 (read_structure_type): Adjust.
11323 (process_structure_scope): Adjust.
11324 (read_enumeration_type): Adjust.
11325 (read_array_type): Adjust.
11326 (mark_common_block_symbol_computed): Adjust.
11327 (read_common_block): Adjust.
11328 (read_namespace_type): Adjust.
11329 (read_namespace): Adjust.
11330 (read_module_type): Adjust.
11331 (read_tag_pointer_type): Adjust.
11332 (read_tag_ptr_to_member_type): Adjust.
11333 (read_tag_string_type): Adjust.
11334 (read_subroutine_type): Adjust.
11335 (read_typedef): Adjust.
11336 (read_base_type): Adjust.
11337 (attr_to_dynamic_prop): Adjust.
11338 (read_subrange_type): Adjust.
11339 (read_unspecified_type): Adjust.
11340 (dwarf2_read_abbrevs): Adjust.
11341 (load_partial_dies): Adjust.
11342 (read_partial_die): Adjust.
11343 (find_partial_die): Adjust.
11344 (guess_partial_die_structure_name): Adjust.
11345 (fixup_partial_die): Adjust.
11346 (read_attribute_value): Adjust.
11347 (read_addr_index): Adjust.
11348 (read_addr_index_from_leb128): Adjust.
11349 (read_str_index): Adjust.
11350 (dwarf2_string_attr): Adjust.
11351 (get_debug_line_section): Adjust.
11352 (dwarf_decode_line_header): Adjust.
11353 (lnp_state_machine::check_line_address): Adjust.
11354 (dwarf_decode_lines_1): Adjust.
11355 (dwarf_decode_lines): Adjust.
11356 (dwarf2_start_symtab): Adjust.
11357 (var_decode_location): Adjust.
11358 (new_symbol_full): Adjust.
11359 (dwarf2_const_value_data): Adjust.
11360 (dwarf2_const_value_attr): Adjust.
11361 (dwarf2_const_value): Adjust.
11362 (die_type): Adjust.
11363 (die_containing_type): Adjust.
11364 (build_error_marker_type): Adjust.
11365 (lookup_die_type): Adjust.
11366 (guess_full_die_structure_name): Adjust.
11367 (anonymous_struct_prefix): Adjust.
11368 (determine_prefix): Adjust.
11369 (dwarf2_name): Adjust.
11370 (follow_die_ref_or_sig): Adjust.
11371 (follow_die_offset): Adjust.
11372 (follow_die_ref): Adjust.
11373 (follow_die_sig_1): Adjust.
11374 (follow_die_sig): Adjust.
11375 (get_signatured_type): Adjust.
11376 (get_DW_AT_signature_type): Adjust.
11377 (decode_locdesc): Adjust.
11378 (dwarf_decode_macros): Adjust.
11379 (cu_debug_loc_section): Adjust.
11380 (fill_in_loclist_baton): Adjust.
11381 (dwarf2_symbol_mark_computed): Adjust.
11382 (init_one_comp_unit): Don't assign
11383 dwarf2_cu::dwarf2_per_objfile.
11384 (set_die_type): Adjust.
11386 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11388 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11389 <dwarf2_per_objfile>: New field.
11390 (dwarf2_per_objfile): Remove global.
11391 (get_dwarf2_per_objfile): New function.
11392 (set_dwarf2_per_objfile): New function.
11393 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11394 dwarf2_per_objfile.
11395 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11396 (read_abbrev_offset): Likewise.
11397 (read_indirect_string): Likewise.
11398 (read_indirect_line_string): Likewise.
11399 (read_indirect_string_at_offset): Likewise.
11400 (read_indirect_string_from_dwz): Likewise.
11401 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11402 dwarf2_per_objfile.
11403 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11404 (create_all_comp_units): Change objfile parameter to
11405 dwarf2_per_objfile.
11406 (create_all_type_units): Likewise.
11407 (process_queue): Add dwarf2_per_objfile parameter.
11408 (read_and_check_comp_unit_head): Likewise.
11409 (lookup_dwo_unit_in_dwp): Likewise.
11410 (get_dwp_file): Likewise.
11411 (process_cu_includes): Likewise.
11412 (struct free_dwo_file_cleanup_data): New struct.
11413 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11414 set_dwarf2_per_objfile.
11415 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11416 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11417 context, adjust calls.
11418 (dw2_instantiate_symtab): Likewise.
11419 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11420 (dw2_get_cu): Likewise.
11421 (create_cu_from_index_list): Change objfile parameter to
11422 dwarf2_per_objfile.
11423 (create_cus_from_index_list): Get dwarf2_per_objfile from
11424 context, adjust calls.
11425 (create_cus_from_index): Likewise.
11426 (create_signatured_type_table_from_index): Change objfile
11427 parameter to dwarf2_per_objfile.
11428 (create_signatured_type_table_from_debug_names): Change objfile
11429 parameter to dwarf2_per_objfile.
11430 (create_addrmap_from_index): Likewise.
11431 (create_addrmap_from_aranges): Likewise.
11432 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11433 (dw2_setup): Remove.
11434 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11436 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11437 get_dwarf2_per_objfile.
11438 (dw2_forget_cached_source_info): Likewise.
11439 (dw2_map_symtabs_matching_filename): Likewise.
11440 (struct dw2_symtab_iterator) <index>: Remove.
11441 <dwarf2_per_objfile>: New field.
11442 (dw2_symtab_iter_init): Replace index parameter with
11443 dwarf2_per_objfile.
11444 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11445 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11446 (dw2_print_stats): Likewise.
11447 (dw2_dump): Likewise.
11448 (dw2_expand_symtabs_for_function): Likewise.
11449 (dw2_expand_all_symtabs): Likewise.
11450 (dw2_expand_symtabs_with_fullname): Likewise.
11451 (dw2_expand_marked_cus): Replace index and objfile parameters
11452 with dwarf2_per_objfile.
11453 (dw_expand_symtabs_matching_file_matcher): Add
11454 dwarf2_per_objfile parameter and adjust calls.
11455 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11457 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11458 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11460 (create_cus_from_debug_names_list): Replace objfile parameter
11461 with dwarf2_per_objfile and adjust calls.
11462 (create_cus_from_debug_names): Likewise.
11463 (dwarf2_read_debug_names): Likewise.
11464 (mapped_debug_names::namei_to_name): Adjust call.
11465 (dw2_debug_names_iterator::next): Likewise.
11466 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11467 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11468 (dw2_debug_names_dump): Likewise.
11469 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11470 (dw2_debug_names_expand_symtabs_matching): Likewise.
11471 (dwarf2_initialize_objfile): Likewise.
11472 (dwarf2_build_psymtabs): Likewise.
11473 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11475 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11476 (read_and_check_comp_unit_head): Likewise.
11477 (read_abbrev_offset): Likewise.
11478 (create_debug_type_hash_table): Likewise.
11479 (create_debug_types_hash_table): Likewise.
11480 (create_all_type_units): Replace objfile parameter with
11481 dwarf2_per_objfile.
11482 (add_type_unit): Add dwarf2_per_objfile parameter.
11483 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11484 with dwarf2_per_objfile.
11485 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11486 (lookup_dwp_signatured_type): Likewise.
11487 (lookup_signatured_type): Likewise.
11488 (read_cutu_die_from_dwo): Likewise.
11489 (init_tu_and_read_dwo_dies): Likewise.
11490 (init_cutu_and_read_dies): Likewise.
11491 (init_cutu_and_read_dies_no_follow): Likewise.
11492 (allocate_type_unit_groups_table): Add objfile parameter.
11493 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11494 (get_type_unit_group): Likewise.
11495 (process_psymtab_comp_unit): Update call.
11496 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11497 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11498 (print_tu_stats): Likewise.
11499 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11500 in void* parameter.
11501 (build_type_psymtabs): Change objfile parameter to
11502 dwarf2_per_objfile.
11503 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11504 passed in void* parameter.
11505 (process_skeletonless_type_units): Change objfile parameter to
11506 dwarf2_per_objfile.
11507 (set_partial_user): Likewise.
11508 (dwarf2_build_psymtabs_hard): Likewise.
11509 (read_comp_units_from_section): Likewise.
11510 (create_all_comp_units): Likewise.
11511 (scan_partial_symbols): Update calls.
11512 (add_partial_symbol): Likewise.
11513 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11514 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11515 (process_queue): Add dwarf2_per_objfile parameter.
11516 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11517 (compute_compunit_symtab_includes): Likewise.
11518 (process_cu_includes): Add dwarf2_per_objfile parameter.
11519 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11520 (process_full_type_unit): Likewise.
11521 (process_imported_unit_die): Update call.
11522 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11523 (read_file_scope): Likewise.
11524 (allocate_dwo_file_hash_table): Add objfile parameter.
11525 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11526 (create_cus_hash_table): Likewise.
11527 (create_dwp_hash_table): Likewise.
11528 (create_dwo_unit_in_dwp_v1): Likewise.
11529 (create_dwp_v2_section): Likewise.
11530 (create_dwo_unit_in_dwp_v2): Likewise.
11531 (lookup_dwo_unit_in_dwp): Likewise.
11532 (try_open_dwop_file): Likewise.
11533 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11534 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11535 cleanup to include a reference to dwarf2_per_objfile.
11536 (open_dwp_file): Add dwarf2_per_objfile parameter.
11537 (open_and_init_dwp_file): Likewise.
11538 (get_dwp_file): Likewise.
11539 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11540 (queue_and_load_all_dwo_tus): Update call.
11541 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11543 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11544 (dwarf2_ranges_process): Likewise.
11545 (dwarf2_get_pc_bounds): Likewise.
11546 (mark_common_block_symbol_computed): Likewise.
11547 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11548 (dwarf2_read_abbrevs): Update call.
11549 (read_partial_die): Use dwarf2_per_objfile from cu.
11550 (find_partial_die): Likewise.
11551 (fixup_partial_die): Likewise.
11552 (read_attribute_value): Likewise.
11553 (read_indirect_string_at_offset_from): Add objfile parameter.
11554 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11556 (read_indirect_string_from_dwz): Add objfile parameter.
11557 (read_indirect_string): Add objfile parameter.
11558 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11559 (read_addr_index): Use dwarf2_per_objfile from cu.
11560 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11562 (read_str_index): Use dwarf2_per_objfile from cu.
11563 (get_debug_line_section): Likewise.
11564 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11565 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11566 (new_symbol_full): Use dwarf2_per_objfile from cu.
11567 (build_error_marker_type): Likewise.
11568 (lookup_die_type): Likewise.
11569 (determine_prefix): Likewise.
11570 (follow_die_offset): Likewise.
11571 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11572 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11573 (dwarf2_fetch_die_type_sect_off): Likewise.
11574 (dwarf2_get_die_type): Likewise.
11575 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11576 (get_signatured_type): Likewise.
11577 (get_DW_AT_signature_type): Likewise.
11578 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11579 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11580 (cu_debug_loc_section): Likewise.
11581 (fill_in_loclist_baton): Likewise.
11582 (dwarf2_symbol_mark_computed): Likewise.
11583 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11584 dwarf2_per_objfile.
11585 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11587 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11588 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11589 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11590 (set_die_type): Use dwarf2_free_objfile from cu.
11591 (get_die_type_at_offset): Likewise.
11592 (dwarf2_per_objfile_free): Don't assign global variable.
11593 (debug_names) <constructor>: Add dwarf2_per_objfile
11594 parameter, update m_debugstrlookup construction.
11595 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11597 <m_dwarf2_per_objfile>: New field.
11598 <lookup>: Use m_dwarf2_per_objfile.
11599 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11600 (psyms_seen_size): Likewise.
11601 (write_gdbindex): Replace objfile parameter with
11602 dwarf2_per_objfile.
11603 (write_debug_names): Likewise.
11604 (write_psymtabs_to_index): Likewise.
11605 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11608 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11610 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11611 <dwarf2_per_objfile>: New field.
11612 (struct dwarf2_per_cu_data) <objfile>: Remove.
11613 <dwarf2_per_objfile>: New field.
11614 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11616 (create_signatured_type_table_from_index): Likewise.
11617 (create_debug_type_hash_table): Likewise.
11618 (fill_in_sig_entry_from_dwo_entry): Likewise.
11619 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11620 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11622 (create_partial_symtab): Access objfile through
11623 dwarf2_per_objfile.
11624 (process_psymtab_comp_unit_reader): Likewise.
11625 (read_comp_units_from_section): Likewise.
11626 (scan_partial_symbols): Likewise.
11627 (add_partial_symbol): Likewise.
11628 (add_partial_subprogram): Likewise.
11629 (peek_die_abbrev): Likewise.
11630 (fixup_go_packaging): Likewise.
11631 (process_full_comp_unit): Likewise.
11632 (process_full_type_unit): Likewise.
11633 (process_imported_unit_die): Likewise.
11634 (dwarf2_compute_name): Likewise.
11635 (dwarf2_physname): Likewise.
11636 (read_import_statement): Likewise.
11637 (create_cus_hash_table): Assign dwarf2_physname instead of
11639 (read_func_scope): Access objfile through dwarf2_per_objfile.
11640 (read_lexical_block_scope): Likewise.
11641 (read_call_site_scope): Likewise.
11642 (read_variable): Likewise.
11643 (dwarf2_rnglists_process): Likewise.
11644 (dwarf2_ranges_process): Likewise.
11645 (dwarf2_ranges_read): Likewise.
11646 (dwarf2_record_block_ranges): Likewise.
11647 (dwarf2_add_field): Likewise.
11648 (dwarf2_add_member_fn): Likewise.
11649 (read_structure_type): Likewise.
11650 (process_structure_scope): Likewise.
11651 (read_enumeration_type): Likewise.
11652 (read_array_type): Likewise.
11653 (read_common_block): Likewise.
11654 (read_namespace_type): Likewise.
11655 (read_namespace): Likewise.
11656 (read_module_type): Likewise.
11657 (read_tag_pointer_type): Likewise.
11658 (read_tag_ptr_to_member_type): Likewise.
11659 (read_tag_string_type): Likewise.
11660 (read_subroutine_type): Likewise.
11661 (read_typedef): Likewise.
11662 (read_base_type): Likewise.
11663 (attr_to_dynamic_prop): Likewise.
11664 (read_subrange_type): Likewise.
11665 (read_unspecified_type): Likewise.
11666 (load_partial_dies): Likewise.
11667 (read_partial_die): Likewise.
11668 (find_partial_die): Likewise.
11669 (guess_partial_die_structure_name): Likewise.
11670 (fixup_partial_die): Likewise.
11671 (read_attribute_value): Likewise.
11672 (read_addr_index_from_leb128): Likewise.
11673 (dwarf2_read_addr_index): Likewise.
11674 (dwarf2_string_attr): Likewise.
11675 (lnp_state_machine::check_line_address): Likewise.
11676 (dwarf_decode_lines_1): Likewise.
11677 (dwarf_decode_lines): Likewise.
11678 (dwarf2_start_symtab): Likewise.
11679 (var_decode_location): Likewise.
11680 (new_symbol_full): Likewise.
11681 (dwarf2_const_value_data): Likewise.
11682 (dwarf2_const_value_attr): Likewise.
11683 (dwarf2_const_value): Likewise.
11684 (die_type): Likewise.
11685 (die_containing_type): Likewise.
11686 (lookup_die_type): Likewise.
11687 (guess_full_die_structure_name): Likewise.
11688 (anonymous_struct_prefix): Likewise.
11689 (dwarf2_name): Likewise.
11690 (follow_die_ref_or_sig): Likewise.
11691 (follow_die_offset): Likewise.
11692 (follow_die_ref): Likewise.
11693 (dwarf2_fetch_die_loc_sect_off): Likewise.
11694 (dwarf2_fetch_constant_bytes): Likewise.
11695 (dwarf2_fetch_die_type_sect_off): Likewise.
11696 (dwarf2_get_die_type): Likewise.
11697 (follow_die_sig): Likewise.
11698 (decode_locdesc): Likewise.
11699 (dwarf2_per_cu_objfile): Likewise.
11700 (dwarf2_per_cu_text_offset): Likewise.
11701 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11703 (set_die_type): Access objfile through
11704 dwarf2_per_objfile.
11706 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11708 * valprint.c (converted_character_d): Remove typedef.
11709 (DEF_VEC_O (converted_character_d)): Remove.
11710 (count_next_character): Use std::vector.
11711 (print_converted_chars_to_obstack): Likewise.
11712 (generic_printstr): Likewise.
11714 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11716 * xml-support.h (struct gdb_xml_value): Add constructor.
11717 <value>: Change type to unique_xmalloc_ptr.
11718 (gdb_xml_value_s): Remove typedef.
11719 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11720 (gdb_xml_element_start_handler): Change parameter type to
11722 (xml_find_attribute): Likewise.
11723 * xml-support.c (xml_find_attribute): Change parameter type to
11724 std::vector and adjust.
11725 (gdb_xml_values_cleanup): Remove.
11726 (gdb_xml_parser::start_element): Adjust to std::vector.
11727 (xinclude_start_include): Change paraeter type to std::vector
11729 * btrace.c (check_xml_btrace_version): Likewise.
11730 (parse_xml_btrace_block): Likewise.
11731 (parse_xml_btrace_pt_config_cpu): Likewise.
11732 (parse_xml_btrace_pt): Likewise.
11733 (parse_xml_btrace_conf_bts): Likewise.
11734 (parse_xml_btrace_conf_pt): Likewise.
11735 * memory-map.c (memory_map_start_memory): Likewise.
11736 (memory_map_start_property): Likewise.
11737 * osdata.c (osdata_start_osdata): Likewise.
11738 (osdata_start_item): Likewise.
11739 (osdata_start_column): Likewise.
11740 * remote.c (start_thread): Likewise.
11741 * solib-aix.c (library_list_start_library): Likewise.
11742 (library_list_start_list): Likewise.
11743 * solib-svr4.c (library_list_start_library): Likewise.
11744 (svr4_library_list_start_list): Likewise.
11745 * solib-target.c (library_list_start_segment): Likewise.
11746 (library_list_start_section): Likewise.
11747 (library_list_start_library): Likewise.
11748 (library_list_start_list): Likewise.
11749 * tracepoint.c (traceframe_info_start_memory): Likewise.
11750 (traceframe_info_start_tvar): Likewise.
11751 * xml-syscall.c (syscall_start_syscall): Likewise.
11752 * xml-tdesc.c (tdesc_start_target): Likewise.
11753 (tdesc_start_feature): Likewise.
11754 (tdesc_start_reg): Likewise.
11755 (tdesc_start_union): Likewise.
11756 (tdesc_start_struct): Likewise.
11757 (tdesc_start_flags): Likewise.
11758 (tdesc_start_enum): Likewise.
11759 (tdesc_start_field): Likewise.
11760 (tdesc_start_enum_value): Likewise.
11761 (tdesc_start_vector): Likewise.
11763 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11765 * extension.h (struct xmethod_worker) <clone>: Remove.
11766 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11768 (python_xmethod_worker::clone): Remove.
11769 * valops.c (find_overload_match): Use std::move instead of
11772 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11774 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11775 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11776 <free_xmethod_worker_data>: Remove.
11777 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11778 <get_xmethod_arg_types>: Remove.
11779 <get_xmethod_result_type>: Remove.
11780 <invoke_xmethod>: Remove.
11781 * extension.c (new_xmethod_worker): Remove.
11782 (clone_xmethod_worker): Remove.
11783 (get_matching_xmethod_workers): Return void, pass std::vector by
11785 (get_xmethod_arg_types): Rename to...
11786 (xmethod_worker::get_arg_types): ... this, and adjust.
11787 (get_xmethod_result_type): Rename to...
11788 (xmethod_worker::get_result_type): ... this, and adjust.
11789 (invoke_xmethod): Remove.
11790 (free_xmethod_worker): Remove.
11791 (free_xmethod_worker_vec): Remove.
11792 * extension.h (enum ext_lang_rc): Move here from
11794 (struct xmethod_worker): Add constructor and destructor.
11797 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11798 virtual pure methods.
11799 <get_arg_types, get_result_type>: New methods.
11800 (xmethod_worker_ptr): Remove typedef.
11801 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11802 (xmethod_worker_vec): Remove typedef.
11803 (xmethod_worker_up): New typedef.
11804 (invoke_xmethod): Remove.
11805 (clone_xmethod_worker): Remove.
11806 (free_xmethod_worker): Remove.
11807 (free_xmethod_worker_vec): Remove.
11808 (get_xmethod_arg_types): Remove.
11809 (get_xmethod_result_type): Remove.
11810 * valops.c (find_method_list): Use std::vector, don't use
11811 intermediate vector.
11812 (value_find_oload_method_list): Use std::vector.
11813 (find_overload_match): Use std::vector.
11814 (find_oload_champ): Use std::vector.
11815 * value.c (value_free): Use operator delete.
11816 (value_of_xmethod): Rename to...
11817 (value_from_xmethod): ... this. Don't assign
11818 xmethod_worker::value, take rvalue-reference.
11819 (result_type_of_xmethod): Adjust.
11820 (call_xmethod): Adjust.
11821 * value.h: Include extension.h.
11822 (struct xmethod_worker): Don't forward-declare.
11823 (value_of_xmethod): Rename to...
11824 (value_from_xmethod): ... this, take rvalue-reference.
11825 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11826 (struct python_xmethod_worker): ... this, add constructor and
11828 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11829 (gdbpy_free_xmethod_worker_data): Rename to...
11830 (python_xmethod_worker::~python_xmethod_worker): ... this and
11832 (gdbpy_clone_xmethod_worker_data): Rename to...
11833 (python_xmethod_worker::clone): ... this and adjust.
11834 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11836 (gdbpy_get_xmethod_arg_types): Rename to...
11837 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11838 (gdbpy_get_xmethod_result_type): Rename to...
11839 (python_xmethod_worker::do_get_result_type): ... this and
11841 (gdbpy_invoke_xmethod): Rename to...
11842 (python_xmethod_worker::invoke): ... this and adjust.
11843 (new_python_xmethod_worker): Rename to...
11844 (python_xmethod_worker::python_xmethod_worker): ... this and
11846 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11848 (gdbpy_free_xmethod_worker_data): Remove.
11849 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11850 (gdbpy_get_xmethod_arg_types): Remove.
11851 (gdbpy_get_xmethod_result_type): Remove.
11852 (gdbpy_invoke_xmethod): Remove.
11853 * python/python.c (python_extension_ops): Remove obsolete
11856 2018-01-05 Pedro Alves <palves@redhat.com>
11859 * common/signals-state-save-restore.c
11860 (save_original_signals_state): New parameter 'quiet'. Warn if we
11861 find a custom handler preinstalled, instead of internal erroring.
11862 But only warn if !quiet.
11863 * common/signals-state-save-restore.h
11864 (save_original_signals_state): New parameter 'quiet'.
11865 * main.c (captured_main_1): Move save_original_signals_state call
11866 after option handling, and pass QUIET.
11868 2018-01-05 Pedro Alves <palves@redhat.com>
11870 * spu-tdep.c (spu_catch_start): Pass
11871 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11873 2018-01-05 Pedro Alves <palves@redhat.com>
11876 * ada-lang.c (literal_symbol_name_matcher): New function.
11877 (ada_get_symbol_name_matcher): Use it for
11878 symbol_name_match_type::SEARCH_NAME.
11879 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11880 it down instead of assuming symbol_name_match_type::FULL.
11881 * block.h (block_lookup_symbol): New parameter 'match_type'.
11882 * c-valprint.c (print_unpacked_pointer): Use
11883 lookup_symbol_search_name instead of lookup_symbol.
11884 * compile/compile-object-load.c (get_out_value_type): Pass down
11885 symbol_name_match_type::SEARCH_NAME.
11886 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11887 symbol_name_match_type::FULL.
11888 * cp-support.c (cp_get_symbol_name_matcher): Handle
11889 symbol_name_match_type::SEARCH_NAME.
11890 * infrun.c (insert_exception_resume_breakpoint): Use
11891 lookup_symbol_search_name.
11892 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11893 * psymtab.c (maintenance_check_psymtabs): Use
11894 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11895 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11896 SYMBOL_SEARCH_NAME.
11897 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11898 if symbol_name_match_type::SEARCH_NAME.
11899 (lookup_symbol_in_language): Pass down
11900 symbol_name_match_type::FULL.
11901 (lookup_symbol_search_name): New.
11902 (lookup_language_this): Pass down
11903 symbol_name_match_type::SEARCH_NAME.
11904 (lookup_symbol_aux, lookup_local_symbol): New parameter
11905 'match_type'. Pass it down.
11906 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11907 (lookup_symbol_search_name): New declaration.
11908 (lookup_symbol_in_block): New 'match_type' parameter.
11910 2018-01-05 Pedro Alves <palves@redhat.com>
11913 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11915 (ada_lookup_symbol): Reimplement in terms of
11916 ada_lookup_symbol_list, bits factored out from
11917 ada_lookup_encoded_symbol.
11919 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11921 * ada-exp.y (write_object_renaming): When subscripting an array
11922 using a symbol as the index, pass the block in call to
11923 ada_lookup_encoded_symbol when looking that symbol up.
11925 2018-01-05 Jerome Guitton <guitton@adacore.com>
11927 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11930 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11932 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11933 the case where VALUE_LVAL (val0) is not lval_memory.
11935 2018-01-05 Xavier Roirand <roirand@adacore.com>
11937 * ada-valprint.c (print_optional_low_bound): Handle
11938 character-indexed array printing like boolean-indexed array
11941 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11943 * NEWS: Create a new section for the next release branch.
11944 Rename the section of the current branch, now that it has
11947 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11949 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11950 * version.in: Bump version to 8.1.50.DATE-git.
11952 2018-01-03 Xavier Roirand <roirand@adacore.com>
11954 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11956 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11958 (default_exception_support_info) <catch_handlers_sym>: Add field.
11959 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11960 (ada_exception_name_addr_1): Add "catch handlers" handling.
11961 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11962 Update all callers.
11963 (create_excep_cond_exprs) <ex>: Add parameter.
11964 (re_set_exception): Update create_excep_cond_exprs call.
11965 (print_it_exception, print_one_exception, print_mention_exception)
11966 (print_recreate_exception): Add "catch handler" handling.
11967 (allocate_location_catch_handlers, re_set_catch_handlers)
11968 (check_status_catch_handlers, print_it_catch_handlers)
11969 (print_one_catch_handlers, print_mention_catch_handlers)
11970 (print_recreate_catch_handlers): New function.
11971 (catch_handlers_breakpoint_ops): New variable.
11972 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11973 Add parameter. Add "catch handler" handling.
11974 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11975 Add "catch handler" handling.
11976 (ada_exception_catchpoint_cond_string): Add "catch handler"
11978 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11980 (catch_ada_handlers_command): New function.
11981 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11982 operations structure.
11983 (_initialize_ada_language): Add "catch handlers" command entry.
11984 * NEWS: Document "catch handlers" feature.
11986 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11988 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11989 account when creating the array type of the slice.
11990 (ada_value_slice): Likewise.
11992 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11994 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11996 (create_array_type_with_stride): Add byte_stride_prop parameter.
11997 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11998 New parameter. Update all callers in this file.
11999 (array_type_has_dynamic_stride): New function.
12000 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12001 of arrays with dynamic byte strides.
12002 * dwarf2read.c (read_array_type): Add support for dynamic
12003 DW_AT_byte_stride attributes.
12005 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12007 * dwarf2read.c (read_unspecified_type): Treat
12008 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12010 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12012 Update copyright year range in all GDB files.
12014 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12016 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12017 and gdb/testsuite/gdb.base/step-line.c.
12019 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12021 * copyright.py (main): Dump the contents of
12022 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12023 even if BY_HAND is empty.
12025 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12027 * top.c (print_gdb_version): Update Copyright year in version
12030 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12032 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12034 For older changes see ChangeLog-2017.
12040 version-control: never