1 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
2 Hafiz Abid Qadeer <abidh@codesourcery.com>
3 Don Breazeal <donb@codesourcery.com>
5 * csky-linux-tdep.c: New file.
6 * csky-tdep.c: Likewise.
7 * csky-tdep.h: Likewise.
8 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
10 (HFILES_NO_SRCDIR): Add csky-tdep.h.
11 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
12 * configure.tgt: Add csky support.
14 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
16 * python/py-framefilter.c (py_print_frame): Print frame architecture
17 when printing on an MI output.
19 2018-08-27 Tom Tromey <tom@tromey.com>
23 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
25 2018-08-27 Tom Tromey <tom@tromey.com>
27 * aarch64-linux-tdep.c
28 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
31 2018-08-27 Tom Tromey <tom@tromey.com>
33 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
35 (ppc64_standard_linkage1, ppc64_standard_linkage2)
36 (ppc64_standard_linkage3, ppc64_standard_linkage4)
37 (ppc64_standard_linkage5, ppc64_standard_linkage6)
38 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
41 2018-08-27 Tom Tromey <tom@tromey.com>
43 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
44 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
46 2018-08-27 Tom Tromey <tom@tromey.com>
48 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
49 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
51 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
53 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
55 * sparc-linux-tdep.c (sparc32_linux_sigframe)
56 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
57 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
59 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
60 (ppc64_linux_sigaction_tramp_frame)
61 (ppc32_linux_sighandler_tramp_frame)
62 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
63 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
64 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
65 * mn10300-linux-tdep.c (am33_linux_sigframe)
66 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
67 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
68 * mips-linux-tdep.c (mips_linux_o32_sigframe)
69 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
70 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
71 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
72 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
73 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
74 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
75 * microblaze-linux-tdep.c
76 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
77 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
78 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
79 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
80 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
81 * common/common-types.h (ULONGEST_MAX): New define.
82 (CORE_ADDR_MAX): Fix formatting.
83 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
84 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
85 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
86 (arm_linux_rt_sigreturn_tramp_frame)
87 (arm_eabi_linux_sigreturn_tramp_frame)
88 (arm_eabi_linux_rt_sigreturn_tramp_frame)
89 (thumb2_eabi_linux_sigreturn_tramp_frame)
90 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
91 (arm_linux_restart_syscall_tramp_frame)
92 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
93 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
94 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
96 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
98 2018-08-27 Tom Tromey <tom@tromey.com>
100 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
102 * mips-tdep.c (mips_deal_with_atomic_sequence)
103 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
104 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
105 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
106 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
108 * aarch64-tdep.c (aarch64_software_single_step): Use
111 2018-08-27 Tom Tromey <tom@tromey.com>
113 * linespec.c (complete_linespec_component): Add cast to "char".
114 * completer.c (completion_tracker::build_completion_result): Add
117 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
119 * solist.h (struct solist, struct target_so_ops): Fix
122 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
124 * ada-tasks.c (ada_task_info_s): Remove typedef.
125 (DEF_VEC_O(ada_task_info_s)): Remove.
126 (struct ada_tasks_inferior_data): Initialize fields.
127 <task_list>: Make an std::vector.
128 (get_ada_tasks_inferior_data): Allocate with new.
129 (ada_get_task_number): Adjust.
130 (get_task_number_from_id): Likewise.
131 (valid_task_id): Likewise.
132 (ada_get_task_info_from_ptid): Likewise.
133 (iterate_over_live_ada_tasks): Likewise.
134 (add_ada_task): Likewise.
135 (read_known_tasks): Likewise.
136 (ada_build_task_list): Likewise.
137 (print_ada_task_info): Likewise.
138 (info_task): Likewise.
139 (task_command_1): Likewise.
141 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
143 * ada-lang.c (add_angle_brackets): Return std::string.
145 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
147 * python/py-threadevent.c (py_get_event_thread): Initialize
150 2018-08-24 Pedro Alves <palves@redhat.com>
152 * python/py-bpevent.c (create_breakpoint_event_object): Use
154 * python/py-continueevent.c (emit_continue_event): Use
156 * python/py-exitedevent.c (create_exited_event_object): Return a
158 (emit_exited_event): Use copy-initialization.
159 * python/py-inferior.c (python_new_inferior)
160 (python_inferior_deleted, add_thread_object): Use
162 * python/py-infevents.c (create_inferior_call_event_object)
163 (create_register_changed_event_object)
164 (create_memory_changed_event_object): Return a gdbpy_ref<>.
165 (emit_inferior_call_event, emit_memory_changed_event)
166 (emit_register_changed_event): Use copy-initialization.
167 * python/py-newobjfileevent.c (create_new_objfile_event_object):
168 Return a gdbpy_ref<>.
169 (emit_new_objfile_event): Use copy-initialization.
170 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
171 (emit_clear_objfiles_event): Use copy-initialization.
172 * python/py-signalevent.c (create_signal_event_object): Use
174 * python/py-threadevent.c (create_thread_event_object): Use
177 2018-08-24 Pedro Alves <palves@redhat.com>
178 Simon Marchi <simon.marchi@ericsson.com>
181 * python/py-continueevent.c: Include "gdbthread.h".
182 (create_continue_event_object): Add intro comment. Add 'ptid'
183 parameter. Use it to find thread to pass to
184 create_thread_event_object.
185 (emit_continue_event): Pass PTID down to
186 create_continue_event_object.
187 * python/py-event.h (py_get_event_thread): Declare.
188 (create_thread_event_object): Remove default from 'thread'
190 * python/py-stopevent.c (create_stop_event_object): Use
192 * python/py-threadevent.c (get_event_thread): Rename to ...
193 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
194 and use it to find the thread.
195 (create_thread_event_object): Assert that THREAD isn't null.
196 Don't find the event thread here.
198 2018-08-23 Kevin Buettner <kevinb@redhat.com>
200 * block.h (blockrange, blockranges): New struct declarations.
201 (struct block): Add new field named `ranges'.
202 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
203 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
204 macros for accessing ranges in struct block.
205 (make_blockranges): New declaration.
206 block.c (make_blockranges): New function.
207 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
209 * symtab.h (find_pc_partial_function): Add new parameter `block'.
210 * blockframe.c (cache_pc_function_block): New static global.
211 (clear_pc_function_cache): Clear cache_pc_function_block.
212 (find_pc_partial_function): Move comment to symtab.h. Add
213 support for non-contiguous blocks.
214 * cli/cli-cmds.c (block.h): Include.
215 (print_disassembly): Handle printing of non-contiguous blocks.
216 (disassemble_current_function): Likewise.
217 (disassemble_command): Likewise.
219 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
221 * blockframe.c (get_pc_function_start): Likewise.
222 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
223 (gcc_symbol_address): Likewise.
224 * compile/compile-object-run.c (compile_object_run): Likewise.
225 * compile/compile.c (get_expr_block_and_pc): Likewise.
226 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
227 (func_addr_to_tail_call_list): Likewise.
228 * findvar.c (default_read_var_value): Likewise.
229 * inline-frame.c (inline_frame_this_id): Likewise.
230 (skip-inline_frames): Likewise.
231 * infcmd.c (until_next_command): Likewise.
232 * linespec.c (convert_linespec_to_sals): Likewise.
233 * parse.c (parse_exp_in_context_1): Likewise.
234 * printcmd.c (build_address_symbolic): likewise.
235 (info_address_command): Likewise.
236 symtab.c (find_function_start_sal): Likewise.
237 (skip_prologue_sal): Likewise.
238 (find_function_alias_target): Likewise.
239 (find_gnu_ifunc): Likewise.
240 * stack.c (find_frame_funname): Likewise.
241 * symtab.c (fixup_symbol_section): Likewise.
242 (find_function_start_sal): Likewise.
243 (skip_prologue_sal): Likewsie.
244 (find_function_alias_target): Likewise.
245 (find_gnu_ifunc): Likewise.
246 * tracepoint.c (info_scope_command): Likewise.
247 * value.c (value_fn_field): Likewise.
249 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
250 in place of find_pc_partial_function.
251 * blockframe.c (find_function_entry_range_from_pc): New function.
252 * symtab.h (find_function_entry_range_from_pc): Declare and document.
253 * objfiles.c (objfile_relocate1): Relocate start and end addresses
254 for each range in a block.
257 2018-08-23 Xavier Roirand <roirand@adacore.com>
259 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
262 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
264 * solib-svr4.c (read_program_headers_from_bfd): Return
265 gdb::optional<gdb::byte_vector>.
266 (svr4_exec_displacement): Adjust.
268 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
270 * solib-svr4.c (read_program_header): Return
271 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
272 (find_program_interpreter): Return
273 gdb::optional<gdb::byte_vector>.
274 (scan_dyntag_auxv): Adjust.
275 (enable_break): Adjust.
276 (svr4_exec_displacement): Adjust.
278 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
280 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
281 * inf-child.c (inf_child_target::terminal_save_inferior): New.
283 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
285 * guile/scm-string.c (gdbscm_scm_from_printf): Use
287 * guile/scm-utils.c (gdbscm_printf): Likewise.
288 * serial.c (serial_printf): Likewise.
289 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
291 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
293 * stack.c (print_frame): Print frame architecture when printing on
295 * NEWS: Mention new "arch" attribute in frame output.
297 2018-08-21 Alan Hayward <alan.hayward@arm.com>
299 * arch/aarch64.h (aarch64_regnum): Update comment.
301 2018-08-21 Alan Hayward <alan.hayward@arm.com>
303 * NEWS: Add SVE to 8.2 section.
305 2018-08-21 Pedro Alves <palves@redhat.com>
307 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
308 out from gdbscm_parse_function_args.
309 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
310 gdbscm_parse_function_args_1.
312 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
315 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
318 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
320 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
322 2018-08-19 Michael Spang <spang@google.com>
325 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
328 2018-08-18 Kevin Buettner <kevinb@redhat.com>
330 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
331 dwarf_variable_value.
332 * dwarf2-frame.c (class dwarf_expr_executor):
333 Add override for dwarf_variable_value.
334 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
335 (class symbol_needs_eval_context): Likewise.
336 (indirect_synthetic_pointer): Add forward declaration.
337 (sect_variable_value): New function.
338 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
339 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
340 for DW_OP_GNU_variable_value.
342 2018-08-16 Tom Tromey <tom@tromey.com>
344 * top.c (read_command_file): Update.
345 (command_line_input): Remove "repeat" argument.
346 * ada-lang.c (get_selections): Update.
347 * linespec.c (decode_line_2): Update.
348 * defs.h (command_line_input): Remove argument.
349 * cli/cli-script.c (read_next_line): Update.
350 * python/py-gdb-readline.c: Update.
352 2018-08-17 Tom Tromey <tom@tromey.com>
354 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
357 2018-08-15 Tom Tromey <tom@tromey.com>
359 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
361 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
363 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
364 If used, use find_pc_partial_function to find address range
366 * mi/mi-main.c (mi_cmd_list_features): Report
367 "data-disassemble-a-option" feature.
368 * NEWS: Mention new -data-disassemble option -a.
370 2018-08-13 Tom Tromey <tom@tromey.com>
372 * common/common-defs.h (_FORTIFY_SOURCE): Define.
374 2018-08-13 Alan Hayward <alan.hayward@arm.com>
376 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
377 (aarch64_linux_collect_sve_regset): Likewise.
378 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
379 * regcache.h (regcache_map_entry_size): New function.
381 2018-08-13 Alan Hayward <alan.hayward@arm.com>
383 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
384 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
385 (SVE_HEADER_VL_LENGTH): Likewise.
386 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
387 (SVE_HEADER_FLAGS_LENGTH): Likewise.
388 (SVE_HEADER_RESERVED_LENGTH): Likewise.
389 (SVE_HEADER_SIZE_OFFSET): Likewise.
390 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
391 (SVE_HEADER_VL_OFFSET): Likewise.
392 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
393 (SVE_HEADER_FLAGS_OFFSET): Likewise.
394 (SVE_HEADER_RESERVED_OFFSET): Likewise.
395 (SVE_HEADER_SIZE): Likewise.
396 (aarch64_linux_core_read_vq): Add function.
397 (aarch64_linux_core_read_description): Check for SVE section.
399 2018-08-13 Alan Hayward <alan.hayward@arm.com>
401 * aarch64-fbsd-tdep.c
402 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
404 * aarch64-linux-tdep.c
405 (aarch64_linux_iterate_over_regset_sections): Likewise.
407 (alpha_linux_iterate_over_regset_sections):
409 (alphanbsd_iterate_over_regset_sections): Likewise.
411 (amd64fbsd_iterate_over_regset_sections): Likewise.
413 (amd64_linux_iterate_over_regset_sections): Likewise.
415 (armbsd_iterate_over_regset_sections): Likewise.
417 (arm_fbsd_iterate_over_regset_sections): Likewise.
419 (arm_linux_iterate_over_regset_sections): Likewise.
420 * corelow.c (get_core_registers_cb): Likewise.
421 (core_target::fetch_registers): Likewise.
422 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
423 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
424 * gdbarch.h (void): Regenerate.
425 * gdbarch.sh: Add supply_size and collect_size.
426 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
427 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
428 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
429 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
430 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
431 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
432 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
433 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
434 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
435 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
436 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
437 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
438 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
439 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
440 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
441 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
442 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
443 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
444 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
445 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
446 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
447 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
448 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
449 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
450 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
451 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
452 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
453 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
454 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
455 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
457 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
459 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
462 2018-08-10 Keith Seitz <keiths@redhat.com>
464 * compile/compile-c-support.c (add_code_header, add_code_footer):
465 Move into policy class.
466 (c_push_user_expression, pop_user_expression_nop)
467 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
468 (compile_program): New host class.
469 (c_compile_program): New typedef.
470 (c_compute_porgram): Use c_compile_program.
472 2018-08-10 Keith Seitz <keiths@redhat.com>
474 * compile/compile-internal.h (compile_instance::~compile_instance):
475 Remove calls to htab_delete.
476 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
477 * compile.c (compile_instance::compile_instance): Initialize
478 htab unique pointers.
479 (compile_instance::get_cached_type, compile_instance::insert_type)
480 (compile_instance::error_symbol_once): Update for unique_ptr.
482 2018-08-10 Keith Seitz <keiths@redhat.com>
484 * compile/compile-c-symbols.c (struct symbol_error)
485 (hash_symbol_error, eq_symbol_error, del_symbol_error)
486 (compile_instance::insert_symbol_error)
487 (compile_instance::error_symbol_once): Move to ...
488 * compile/compile.c: ... here.
490 2018-08-10 Keith Seitz <keiths@redhat.com>
492 * compile/compile-c-support.c (c_get_compile_context): Use `new'
493 instead of `new_compile_instance'.
494 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
496 If the symbol error map is not initialized, create it.
497 (generate_c_for_for_one_symbol): Do not check/initialize
498 the symbol error map.
499 * compile/compile-c-types.c (compile_c_instance): Make a class.
501 (compile_instance::compile_instance): Initialize the type cache.
502 (get_cached_type): New function.
503 (insert_type): Update description.
504 (compile_c_instance::m_default_cflags): Define.
505 (convert_type): Update description. Use get_cached_type.
506 (delete_instance): Moved to destructor.
507 (new_compile_instance): Moved to constructor.
508 * compile/compile-c.h (compile_c_instance): Make class inheriting
509 from compile_instance.
510 <base>: Remove field.
511 <type_map, symbol_err_map>: Move to base class.
512 <c_plugin>: Rename to `m_plugin' and remove pointer type.
513 * compile/compile-internal.h (compile_instance): Make class.
514 <type_map_t, symbol_err_map_t>: Define.
515 <fe>: Rename to `m_gcc_fe'.
516 <scope, block, gcc_target_options>: Add `m_' prefix.
517 <m_type_map, m_symbol_err_map>: New fields, moved from
520 (convert_type, new_compile_instance): Remove.
521 * compile/compile.c (cleanup_compile_instance): Remove.
522 (compile_to_object): Use unique_ptr to eliminate cleanups.
523 (compile_instance::set_print_callback, compile_instance::version)
524 (compile_instance::set_verbose)
525 (compile_instance::set_driver_filename)
526 (compile_instance::set_triplet_regexp)
527 (compile_instance::set_arguments)
528 (compile_instance::set_source_file)
529 (compile_instance::compile): Define.
531 2018-08-10 Keith Seitz <keiths@redhat.com>
533 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
534 * compile/compile-c-types.c: Define GCC_METHODN macros and include
535 gcc-c-fe.def to define C plugin.
536 (delete_instance): Delete `c_plugin'.
537 (new_compile_instance): Initialize `c_plugin'.
538 * compile/compile-c.h: Include gcc_c_plugin.h.
539 (struct compile_c_instance) <c_plugin>: New member.
540 * gcc-c-plugin.h: New file.
541 Update all callers with API change.
543 2018-08-10 Keith Seitz <keiths@redhat.com>
545 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
546 (HFILES_NO_SRCDIR): ... to here.
547 Add compile-internal.h and compile-c.h.
548 * compile/compile-c-support.c: Include compile-c.h.
549 * compile/compile-c-symbols.c: Include compile-c.h.
550 (generate_c_for_variable_locations): Update comment.
551 * compile/compile-c-types.c: Include compile-c.h.
552 * compile/compile-c.h: New file -- moved C language declarations
553 from other files here.
554 * compile/compile-internal.h: Do not include hashtab.h or
556 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
557 (gcc_convert_symbol, gcc_symbol_address)
558 (generate_c_for_variable_locations, c_get_mode_for_size)
559 (c_get_range_decl_name): Definitions moved to compile-c.h.
560 * compile/compile-loc2c.c: Include compile-c.h.
562 2018-08-10 Keith Seitz <keiths@redhat.com>
564 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
565 (c_symbol_substitution_name): ... this.
568 2018-08-10 Keith Seitz <keiths@redhat.com>
570 * compile/compile-c-support.c (c_compute_program): Use
571 unique_xmalloc_ptr to eliminate cleanup.
572 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
573 Return a unique_xmalloc_ptr and eliminate cleanup.
574 * compile/compile-internal.h (generate_c_for_variable_locations):
575 Return unique_xmalloc_ptr and update description.
577 2018-08-10 Alan Hayward <alan.hayward@arm.com>
579 * corelow.c (core_target::get_core_register_section): Rename
580 min_size to section_min_size.
582 2018-08-09 Jim Wilson <jimw@sifive.com>
584 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
585 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
586 * NEWS: Mention new GNU/Linux RISC-V target.
587 * configure.host: Add riscv*-*-linux*.
588 * configure.nat: Add riscv*.
589 * configure.tgt: Add riscv*-*-linux*.
590 * riscv-linux-nat.c: New file.
591 * riscv-linux-tdep.c: New file.
593 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
595 * infrun.c (resume): Make static, add forward declaration.
596 (proceed): Update header comment.
597 * infrun.h (resume): Delete declaration.
599 2018-08-09 Tom Tromey <tom@tromey.com>
601 * riscv-tdep.h: Minor formatting fixes.
603 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
605 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
606 * dwarf-index-cache.c (create_dir_and_check): Likewise.
607 (test_mkdir_recursive): Likewise.
608 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
610 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
612 * valarith.c (value_subscripted_rvalue): If an array is not in
613 memory, and we don't know the upper bound, then we can't know that
614 the requested element exists or not.
616 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
618 * target.c (str_comma_list_concat_elem): Fix typo in comment.
619 (target_options_to_string): Add comment.
621 2018-08-08 Tom Tromey <tom@tromey.com>
623 * unittests/scoped_mmap-selftests.c: Check result of "write".
625 2018-08-08 Jim Wilson <jimw@sifive.com>
627 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
628 (decode_register_index_short): New.
629 (decode_j_type_insn, decode_cj_type_insn): New.
630 (decode_b_type_insn, decode_cb_type_insn): New.
631 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
632 local xlen. Check xlen when decoding ambiguous compressed insns. In
633 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
634 is_c_sw_insn instead of is_sw_insn.
635 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
636 (riscv_software_single_step): New.
637 * riscv-tdep.h (riscv_software_single_step): Declare.
639 * riscv-tdep.c (riscv_isa_xlen): Drop static.
640 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
642 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
645 * target.c (dispose_inferior): Don't dispose of inferiors that are
648 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
650 * remote.c (remote_target::download_tracepoint): Change char* to
653 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
655 * target.h (target_options_to_string): Return an std::string.
656 * target.c (str_comma_list_concat_elem): Return void, use
658 (do_option): Likewise.
659 (target_options_to_string): Return an std::string.
660 * linux-nat.c (linux_nat_target::wait): Adjust.
661 * target-debug.h (target_debug_print_options): Adjust.
663 2018-08-07 Tom Tromey <tom@tromey.com>
665 * Makefile.in (CPPFLAGS): New variable.
666 (INTERNAL_CPPFLAGS): Use it.
668 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
670 * NEWS: Mention the index cache.
672 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
674 * common/pathstuff.h (get_standard_cache_dir): New.
675 * common/pathstuff.c (get_standard_cache_dir): New.
676 * build-id.h (build_id_to_string): New.
677 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
678 DEBUG_STR_SUFFIX): Move to here.
679 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
680 DEBUG_STR_SUFFIX): Move from there.
681 (write_psymtabs_to_index): Make non-static, add basename
682 parameter. Write to temporary files, rename when done.
683 (save_gdb_index_command): Adjust call to
684 write_psymtabs_to_index.
685 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
687 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
688 (get_gdb_index_contents_from_cache): New.
689 (get_gdb_index_contents_from_cache_dwz): New.
690 (dwarf2_initialize_objfile): Read index from cache.
691 (dwarf2_build_psymtabs): Save to index.
692 * dwarf-index-cache.h: New file.
693 * dwarf-index-cache.c: New file.
694 * dwarf-index-write.h: New file.
696 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
698 * gnulib/aclocal.m4: Re-generate.
699 * gnulib/config.in: Re-generate.
700 * gnulib/configure: Re-generate.
701 * gnulib/import/Makefile.am: Re-generate.
702 * gnulib/import/Makefile.in: Re-generate.
703 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
704 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
705 * gnulib/import/m4/mkdir.m4: New file.
706 * gnulib/import/mkdir.c: New file.
707 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
710 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
712 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
713 * common/scoped_mmap.c: New file.
714 * common/scoped_mmap.h (destroy): New method.
715 (~scoped_mmap, reset): Use destroy.
716 (scoped_mmap): New move constructor.
717 (mmap_file): New declaration.
718 * unittests/scoped_mmap-selftests.c (test_normal,
719 test_invalid_filename, run_tests): New functions.
720 (_initialize_scoped_mmap_selftests): Register selftest.
722 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
724 * dwarf2read.c (read_gdb_index_from_section): Rename to...
725 (read_gdb_index_from_buffer): ... this. Remove section
726 parameter, add buffer parameter.
727 (get_gdb_index_contents_ftype,
728 get_gdb_index_contents_dwz_ftype): New typedefs.
729 (dwarf2_read_gdb_index): Add callback parameters to get the
731 (get_gdb_index_contents_from_section): New.
732 (dwarf2_initialize_objfile): Update call to
733 dwarf2_read_gdb_index.
735 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
737 * common/filestuff.h (gdb_fopen_cloexec): New overload.
738 (gdb_open_cloexec): Likewise.
739 * nat/linux-osdata.c (command_from_pid): Use string_printf.
740 (commandline_from_pid): Likewise.
741 (linux_xfer_osdata_threads): Likewise.
742 (linux_xfer_osdata_fds): Likewise.
743 * ada-lang.c (is_package_name): Likewise.
744 * auxv.c (procfs_xfer_auxv): Likewise.
745 * breakpoint.c (print_one_breakpoint_location): Use
747 (print_one_catch_solib): Use string_printf.
748 * coff-pe-read.c (add_pe_exported_sym): Likewise.
749 (add_pe_forwarded_sym): Likewise.
750 * dwarf2read.c (create_type_unit_group): Likewise.
751 (build_error_marker_type): Likewise.
752 * infcall.c (get_function_name): Likewise.
753 * valprint.c (print_converted_chars_to_obstack): Likewise.
754 * xtensa-tdep.c (xtensa_register_type): Likewise.
756 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
758 * remote.c (remote_target::download_tracepoint): Fix format
761 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
763 * tracefile.c: Include common/byte-vector.h.
764 (trace_save): Change type of buf to gdb::byte_vector. Initialize
765 with trace_regblock_size if needed. Update uses of buf.
767 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
769 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
770 std::vector<unsigned char>.
771 * tracepoint.c (collection_list::collection_list): Remove
772 m_regs_mask initializer from initializer list. Resize
773 m_regs_mask using the largest remote register number.
774 (collection_list::add_remote_register): Remove size check on
775 m_regs_mask. Use at to access element.
776 (collection_list::stringify): Change type of temp_buf to
777 gdb::char_vector. Update uses of temp_buf. Resize if needed to
778 stringify the register mask. Use pack_hex_byte for the register
781 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
783 * tracepoint.h (class collection_list) <add_register>: Remove.
784 <add_remote_register, add_ax_registers, add_local_register>:
786 <add_memrange>: Add scope parameter.
787 * tracepoint.c (encode_actions_1): Likewise.
788 (collection_list::add_register): Rename to ...
789 (collection_list::add_remote_register): ... this. Update
791 (collection_list::add_ax_registers, add_local_register): New
793 (collection_list::add_memrange): Add scope parameter. Call
794 add_local_register instead of add_register.
795 (finalize_tracepoint_aexpr): New function.
796 (collection_list::collect_symbol): Update calls to add_memrange.
797 Call add_local_register instead of add_register. Call
798 add_ax_registers. Call finalize_tracepoint_aexpr.
799 (encode_actions_1): Get remote regnos for $reg action. Call
800 add_remote_register, add_ax_registers, and add_local_register.
801 Update call to add_memrange. Call finalize_tracepoint_aexpr.
802 (validate_actionline): Call finalize_tracepoint_aexpr.
804 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
806 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
807 Replace array buf with gdb::char_vector buf, of size
808 get_remote_packet_size (). Replace references to buf and
809 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
810 and xsnprintf with snprintf. Raise errors if the buffer is too
813 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
815 * remote.c (remote_target::download_tracepoint): Fix the has_more
816 predicate in the QTDP action list iteration.
818 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
820 * remote.c (remote_target::download_tracepoint): Fix indentation
823 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
825 * proc-api.c (_initialize_proc_api): Remove c, unused.
826 * procfs.c (procfs_init_inferior): Remove signals, unused.
827 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
830 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
831 Andrew Burgess <andrew.burgess@embecosm.com>
833 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
834 'W_STOPCODE (0)' as this could be ambiguous.
836 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
838 * ser-tcp.c (net_open): Fix thinko when deciding whether to
839 disable TCP's Nagle algorithm (use "ai_protocol" instead of
842 2018-08-02 Tom Tromey <tom@tromey.com>
845 * dwarf2read.c (read_func_scope): Set symtab on template parameter
847 (process_structure_scope): Likewise.
849 2018-08-02 Xavier Roirand <roirand@adacore.com>
852 * darwin-nat.c (darwin_kill_inferior): Fix handling of
855 2018-08-02 Tom Tromey <tom@tromey.com>
857 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
858 (darwin_suspend_inferior, darwin_resume_inferior)
859 (darwin_decode_notify_message, darwin_resume_inferior_threads)
860 (darwin_check_new_threads): Check result of get_darwin_inferior.
862 2018-07-31 Joel Brobecker <brobecker@adacore.com>
866 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
868 * varobj.c (varobj_get_path_expr_parent): Report an error if
869 parent is a dynamic varobj.
871 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
873 * gnulib/aclocal.m4: Re-generate.
874 * gnulib/config.in: Re-generate.
875 * gnulib/configure: Re-generate.
876 * gnulib/import/Makefile.in: Re-generate.
877 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
878 * gnulib/import/m4/onceonly.m4: Re-generate.
880 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
882 * target-descriptions.c (struct xml_test_tdesc): New.
883 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
884 (record_xml_tdesc): Update.
885 (maintenance_check_xml_descriptions): Update.
886 * target-descriptions.h (record_xml_tdesc): Update comment.
888 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
890 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
891 checking array bounds are defined.
893 2018-07-30 Tom Tromey <tom@tromey.com>
895 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
896 irreflexivity violation.
898 2018-07-30 Tom Tromey <tom@tromey.com>
900 * cli/cli-decode.c (lookup_cmd): Remove lint code.
901 * value.c (unpack_long): Remove lint code.
902 * valops.c (value_ind): Remove lint code.
903 * valarith.c (value_x_binop, value_x_unop, value_equal)
904 (value_pos): Remove lint code.
906 2018-07-28 Tom de Vries <tdevries@suse.de>
908 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
909 with undefined upper bound as <optimized out>.
911 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
913 * gcore.in: Rename variable "name" to "prefix". Expand
916 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
918 * windows-nat.c (windows_nat_target::create_inferior): Update to
919 call close() in global namespace.
921 2018-07-26 Tom Tromey <tom@tromey.com>
923 * dwarf-index-write.c (add_address_entry): Don't add objfile
925 * dbxread.c (find_stab_function): Rename from
926 find_stab_function_addr. Return a bound_minimal_symbol.
927 (read_dbx_symtab): Use raw_text_low, raw_text_high.
928 Don't add objfile offsets.
929 (end_psymtab): Use raw_text_low, raw_text_high,
930 MSYMBOL_VALUE_RAW_ADDRESS.
931 (read_ofile_symtab): Update.
932 (process_one_symbol): Update.
933 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
935 (dw2_relocate): Remove.
936 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
938 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
940 (process_psymtab_comp_unit_reader, add_partial_symbol)
941 (add_partial_subprogram, dwarf2_ranges_read): Update.
942 (load_partial_dies): Update.
943 (add_address_entry): Don't add objfile offsets.
944 (dwarf2_build_include_psymtabs): Update.
945 (create_addrmap_from_aranges): Don't add objfile offsets.
946 (dw2_find_pc_sect_compunit_symtab): Update.
947 * mdebugread.c (parse_symbol): Don't add objfile offsets.
948 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
950 (parse_partial_symbols): Don't add objfile offsets. Use
951 raw_text_low, raw_text_high. Update.
952 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
953 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
954 or call 'relocate' quick function. Clear psymbol_map.
955 * psympriv.h (struct partial_symbol) <address>: Add section
957 <set_unrelocated_address>: Rename from set_address.
958 <raw_text_low, raw_text_high>: New methods.
959 <text_low, text_high>: Add objfile parameter.
960 (add_psymbol_to_bcache): Add 'section' parameter. Call
961 set_unrelocated_address.
962 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
963 (find_pc_psymbol): Update.
964 (fixup_psymbol_section, relocate_psymtabs): Remove.
965 (dump_psymtab, psym_functions): Update.
966 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
968 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
969 (start_psymtab_common): Update.
970 * symfile-debug.c (debug_qf_relocate): Remove.
971 (debug_sym_quick_functions): Update.
972 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
973 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
976 2018-07-26 Tom Tromey <tromey@redhat.com>
978 * dbxread.c (end_psymtab): Use text_high_valid and
980 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
981 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
982 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
984 <text_low_valid, text_high_valid>: New fields.
985 <set_text_low, set_text_high>: Update.
986 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
988 2018-07-26 Tom Tromey <tom@tromey.com>
990 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
992 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
993 textlow and texthigh fields.
994 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
996 * mdebugread.c (parse_lines, parse_partial_symbols)
997 (psymtab_to_symtab_1): Update.
998 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
999 Rename fields. Update comment. Now private.
1000 <text_low, text_high, set_text_low, set_text_high>: New methods.
1001 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1002 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1003 (start_psymtab_common, maintenance_info_psymtabs)
1004 (maintenance_check_psymtabs): Update.
1005 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1007 (scan_xcoff_symtab): Update.
1009 2018-07-26 Tom Tromey <tromey@redhat.com>
1011 * psympriv.h (struct partial_symbol) <unrelocated_address,
1012 address, set_address>: New methods.
1013 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1014 (fixup_psymbol_section, relocate_psymtabs): Update.
1015 (print_partial_symbols): Add 'objfile' parameter. Update.
1016 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1019 2018-07-26 Tom Tromey <tom@tromey.com>
1021 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1022 (debug_names::write_psymbols): Update.
1023 * psympriv.h (struct partial_symbol): Derive from
1024 general_symbol_info.
1025 <obj_section>: New method.
1026 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1027 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1028 (find_pc_sect_psymbol, fixup_psymbol_section)
1029 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1030 (print_partial_symbols, recursively_search_psymtabs)
1031 (compare_psymbols, psymbol_hash, psymbol_compare)
1032 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1033 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1035 2018-07-26 Tom Tromey <tromey@redhat.com>
1037 * dbxread.c (end_psymtab): Remove dead code.
1039 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1041 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1042 DWARF unwinders are disabled.
1043 * dwarf2-frame.c: Add dwarf2read.h include.
1044 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1046 (dwarf2_frame_unwinders_enabled_p): Define.
1047 (show_dwarf_unwinders_enabled_p): New function.
1048 (_initialize_dwarf2_frame): Register switch to control DWARF
1050 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1051 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1052 (show_dwarf_cmdlist): Remove static keyword.
1053 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1054 (show_dwarf_cmdlist): Declare.
1055 * NEWS: Document new feature.
1057 2018-07-26 Tom de Vries <tdevries@suse.de>
1059 PR breakpoints/23366
1060 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1062 2018-07-26 Tom de Vries <tdevries@suse.de>
1064 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1065 DW_AT_count can't be translated to a dynamic prop.
1067 2018-07-25 Tom de Vries <tdevries@suse.de>
1069 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1072 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1074 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1076 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1078 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1080 2018-07-24 Keith Seitz <keiths@redhat.comt
1083 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1084 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1085 instead of add_symbol_to_list.
1086 (read_file_scope): Call prepare_one_comp_unit before reading
1089 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1091 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1093 2018-07-24 Tom Tromey <tom@tromey.com>
1095 * utils.c (malloc, realloc, free): Don't declare.
1096 * configure, config.in: Rebuild.
1097 * configure.ac: Don't check for declarations of free, malloc, or
1100 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1102 * aarch64-linux-nat.c
1103 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1105 * arm-linux-nat.c (fetch_regs): Likewise.
1106 (store_regs): Likewise.
1107 (fetch_vfp_regs): Likewise.
1108 (store_vfp_regs): Likewise.
1109 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1110 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1111 (arm_linux_nat_target::insert_watchpoint): Likewise.
1112 (arm_linux_nat_target::remove_watchpoint): Likewise.
1113 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1115 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1117 * ppc-linux-nat.c (fetch_register): Likewise.
1118 (fetch_all_gp_regs): Likewise.
1119 (fetch_ppc_registers): Likewise.
1120 (store_all_gp_regs): Likewise.
1121 (store_ppc_registers): Likewise.
1122 (hwdebug_insert_point): Likewise.
1123 (can_use_watchpoint_cond_accel): Likewise.
1124 * remote-sim.c (gdb_os_write_stdout): Likewise.
1126 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1127 Tom Tromey <tom@tromey.com>
1129 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1131 * configure: Rebuild.
1133 2018-07-22 Tom Tromey <tom@tromey.com>
1135 * regformats/regdat.sh: Define xmltarget_${name} inside
1136 #ifndef IN_PROCESS_AGENT.
1138 2018-07-22 Tom Tromey <tom@tromey.com>
1140 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1142 2018-07-22 Tom Tromey <tom@tromey.com>
1144 * symfile.c (reread_symbols): Notify iter, not objfile.
1146 2018-07-22 Tom Tromey <tom@tromey.com>
1148 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1150 (ravenscar_thread_target::prepare_to_store): Likewise.
1152 2018-07-22 Tom Tromey <tom@tromey.com>
1154 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1155 unused variable. Call value_fetch_lazy when needed.
1156 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1157 Remove unused variable. Call value_fetch_lazy when needed.
1159 2018-07-22 Tom Tromey <tom@tromey.com>
1161 * m32c-tdep.c (mark_dma): Return void.
1162 (make_regs): Remove unused declarations.
1164 2018-07-22 Tom Tromey <tom@tromey.com>
1166 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1167 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1168 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1169 bkscm_get_valid_block_smob_arg_unsafe for effect.
1171 2018-07-22 Tom Tromey <tom@tromey.com>
1173 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1176 2018-07-22 Tom Tromey <tom@tromey.com>
1178 * windows-nat.c (saved_context): Conditionally define.
1179 * remote.c (remote_target::remote_btrace_maybe_reopen):
1180 Conditionally declare "warned".
1181 * inflow.c (sigquit_ours): Conditionally define.
1182 (new_tty): Move "tty" declaration inside #if.
1183 * guile/guile.c (guile_datadir): Conditionally define.
1184 * charset.c (set_be_le_names): Move some declarations inside #if.
1185 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1187 (parse_xml_btrace_conf): Likewise.
1189 2018-07-22 Tom Tromey <tom@tromey.com>
1191 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1193 2018-07-22 Tom Tromey <tom@tromey.com>
1195 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1196 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1197 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1198 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1199 * stack.c (frame_apply_level_command): Remove unused variable.
1200 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1201 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1202 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1204 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1205 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1206 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1208 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1209 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1211 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1212 Remove unused variable.
1213 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1215 * common/tdesc.c (print_xml_feature::visit): Remove unused
1217 * compile/compile-object-load.c (store_regs): Remove unused
1219 * complaints.c (clear_complaints): Remove unused variable.
1220 * corelow.c (core_target_open): Remove unused variable.
1221 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1223 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1225 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1227 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1229 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1231 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1233 * ia64-tdep.c (examine_prologue): Remove unused variable.
1234 * infcall.c (run_inferior_call): Remove unused variable.
1235 * inferior.c (exit_inferior): Remove unused variable.
1236 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1237 * linespec.c (decode_line_2): Remove unused variable.
1238 * linux-nat.c (super_close): Remove.
1239 * linux-tdep.c (linux_info_proc): Remove unused variable.
1240 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1241 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1242 Remove unused variable.
1243 * parse.c (find_minsym_type_and_address): Remove unused variable.
1244 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1246 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1248 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1250 * record-btrace.c (record_btrace_target::store_registers): Remove
1252 (cmd_show_record_btrace_cpu): Remove unused variable.
1253 * riscv-tdep.c (riscv_register_reggroup_p)
1254 (riscv_push_dummy_call, riscv_return_value): Remove unused
1256 * rust-exp.y (literal): Remove unused variable.
1257 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1259 <STRUCTOP_ANONYMOUS>: Likewise.
1260 * s390-linux-tdep.c (s390_linux_init_abi_31)
1261 (s390_linux_init_abi_64): Remove unused variable.
1262 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1263 (file_select_thread, net_windows_open, _initialize_ser_windows):
1264 Remove unused variables.
1265 * symtab.c (find_pc_sect_line): Remove unused variable.
1266 * target-memory.c (compute_garbled_blocks): Remove unused
1268 (target_write_memory_blocks): Remove unused variable.
1269 * target.c (target_stack::unpush): Remove unused variables.
1270 * tracepoint.c (start_tracing, all_tracepoint_actions)
1271 (merge_uploaded_trace_state_variables)
1272 (print_one_static_tracepoint_marker): Remove unused variable.
1273 * unittests/basic_string_view/element_access/char/1.cc (test01):
1274 Remove unused variable.
1275 * windows-nat.c (windows_continue, windows_add_all_dlls)
1276 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1277 Remove unused variables.
1279 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1281 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1282 attr_profile in HAVE_ELF.
1283 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1286 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1288 * frame.c (frame_register_unwind): Change parameter name.
1289 (frame_unwind_register): Likewise.
1290 (frame_unwind_register_value): Likewise.
1291 (frame_unwind_register_signed): Likewise.
1292 (frame_unwind_register_unsigned): Likewise.
1293 * frame.h (frame_register_unwind): Likewise.
1294 (frame_unwind_register): Likewise.
1295 (frame_unwind_register_value): Likewise.
1296 (frame_unwind_register_signed): Likewise.
1297 (frame_unwind_register_unsigned): Likewise.
1298 (frame_unwind_arch): Likewise.
1300 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1302 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1305 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1307 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1308 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1311 2018-07-20 Keith Seitz <keiths@redhat.com>
1313 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1314 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1315 m_compunit_symtab, m_language>: Add "m_" prefix.
1317 * buildsym.c: Update all uses.
1319 2018-07-20 Tom Tromey <tom@tromey.com>
1321 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1322 * buildsym.h (record_line_ftype): Remove typedef.
1324 2018-07-20 Tom Tromey <tom@tromey.com>
1326 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1327 (end_expandable_symtab): Likewise.
1328 (end_symtab_get_static_block): Likewise.
1329 (end_symtab_from_static_block): Likewise.
1330 * buildsym-legacy.c (augment_type_symtab): Remove.
1331 (end_expandable_symtab): Remove.
1332 (end_symtab_get_static_block): Remove.
1333 (end_symtab_from_static_block): Remove.
1335 2018-07-20 Tom Tromey <tom@tromey.com>
1337 * dwarf2read.c: Include buildsym.h.
1338 (struct dwarf2_cu) <builder>: New method.
1339 (fixup_go_packaging): Update.
1340 (process_full_comp_unit, process_full_type_unit): Update. Don't
1341 use scoped_free_pendings.
1342 (using_directives): Add "cu" parameter, remove "language".
1343 (read_import_statement, setup_type_unit_groups, )
1344 (read_func_scope, read_lexical_block_scope)
1345 (dwarf2_record_block_ranges, read_namespace): Update.
1346 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1347 (lnp_state_machine::handle_end_sequence): Update.
1348 (class lnp_state_machine) <m_cu>: New member.
1349 <m_record_line_callback>: Remove.
1350 <m_currently_recording_lines>: New member.
1351 (lnp_state_machine::handle_set_file): Update.
1352 (noop_record_line): Remove.
1353 (dwarf_record_line_p): Add cu parameter.
1354 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1355 (lnp_state_machine::record_line)
1356 (lnp_state_machine::lnp_state_machine)
1357 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1358 (dwarf_decode_lines): Update.
1359 (dwarf2_start_subfile): Add cu parameter.
1360 (dwarf2_start_symtab, new_symbol): Update.
1361 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1362 Remove dwarf2_per_objfile parameter.
1363 (dwarf_decode_macros): Update.
1365 2018-07-20 Tom Tromey <tom@tromey.com>
1367 * stabsread.c (define_symbol): Update.
1368 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1369 * dwarf2read.c (new_symbol): Update.
1370 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1371 * cp-namespace.c: Include buildsym.h.
1372 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1373 * buildsym-legacy.c (get_buildsym_compunit): New function.
1375 2018-07-20 Tom Tromey <tom@tromey.com>
1377 * xcoffread.c: Include buildsym-legacy.h.
1378 * windows-nat.c: Include buildsym-legacy.h.
1379 * stabsread.c: Include buildsym-legacy.h.
1380 * mdebugread.c: Include buildsym-legacy.h.
1381 * buildsym-legacy.h: New file.
1382 * buildsym-legacy.c: New file, from buildsym.c.
1383 * go32-nat.c: Include buildsym-legacy.h.
1384 * dwarf2read.c: Include buildsym-legacy.h.
1385 * dbxread.c: Include buildsym-legacy.h.
1386 * cp-namespace.c: Include buildsym-legacy.h.
1387 * coffread.c: Include buildsym-legacy.h.
1388 * buildsym.h: Move some contents to buildsym-legacy.h.
1389 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1391 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1393 2018-07-20 Tom Tromey <tom@tromey.com>
1395 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1396 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1397 (buildsym_compunit::buildsym_compunit)
1398 (buildsym_compunit::~buildsym_compunit)
1399 (buildsym_compunit::get_macro_table): Define.
1401 2018-07-20 Tom Tromey <tom@tromey.com>
1403 * buildsym.c (reset_symtab_globals): Remove.
1404 (buildsym_compunit::end_symtab_from_static_block): Update.
1405 (buildsym_compunit::augment_type_symtab): Update.
1406 (end_symtab_from_static_block): Call free_buildsym_compunit.
1407 (augment_type_symtab, end_symtab, end_expandable_symtab):
1410 2018-07-20 Tom Tromey <tom@tromey.com>
1412 * arch-utils.c: Do not include buildsym.h.
1413 * mipsread.c: Do not include buildsym.h.
1414 * machoread.c: Do not include buildsym.h.
1415 * elfread.c: Do not include buildsym.h.
1417 2018-07-20 Tom Tromey <tom@tromey.com>
1419 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1421 (buildsym_compunit): Add new constructor.
1422 (struct buildsym_compunit) <get_last_source_file, finish_block,
1423 record_block_range, start_subfile, patch_subfile_names,
1424 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1425 set_last_source_start_addr, get_last_source_start_addr,
1426 get_local_using_directives, set_local_using_directives,
1427 get_global_using_directives, outermost_context_p,
1428 get_current_context_stack, get_context_stack_depth,
1429 get_current_subfile, get_local_symbols, get_file_symbols,
1430 get_global_symbols, record_debugformat, record_producer,
1431 push_context, pop_context, end_symtab_get_static_block,
1432 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1434 <record_pending_block, finish_block_internal, make_blockvector,
1435 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1439 2018-05-22 Tom Tromey <tom@tromey.com>
1441 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1443 (finish_block_internal): Update.
1445 2018-07-20 Tom Tromey <tom@tromey.com>
1447 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1449 (finish_block_internal): Update.
1451 2018-07-20 Tom Tromey <tom@tromey.com>
1453 * buildsym.h (EXTERN): Don't define or undef.
1454 * buildsym.c (EXTERN): Don't define.
1456 2018-07-20 Tom Tromey <tom@tromey.com>
1458 * buildsym.c: Remove TODO comment.
1460 2018-07-20 Tom Tromey <tom@tromey.com>
1462 * coffread.c (coff_symtab_read): Update.
1463 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1464 (xcoff_new_init): Update.
1465 * mipsread.c (mipscoff_new_init): Update.
1466 * mdebugread.c (mdebug_build_psymtabs): Update.
1467 * elfread.c (elf_new_init): Update.
1468 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1470 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1471 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1472 (stabsect_build_psymtabs): Update.
1473 * buildsym.h (buildsym_init): Don't declare.
1474 * buildsym.c: Update comment.
1475 (prepare_for_building): Remove.
1476 (start_symtab, restart_symtab): Update.
1477 (reset_symtab_globals): Update comment.
1478 (buildsym_init): Remove.
1480 2018-07-20 Tom Tromey <tom@tromey.com>
1482 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1483 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1484 (read_enum_type, common_block_start, common_block_end)
1485 (cleanup_undefined_types_1, finish_global_stabs): Update.
1486 * mdebugread.c (psymtab_to_symtab_1): Update.
1487 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1488 (read_lexical_block_scope, new_symbol): Update.
1489 * dbxread.c (process_one_symbol): Update.
1490 * coffread.c (coff_symtab_read, process_coff_symbol)
1491 (coff_read_enum_type): Update.
1492 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1494 (get_local_symbols, get_file_symbols, get_global_symbols): New
1496 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1498 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1499 (~scoped_free_pendings): Update.
1500 (finish_block, prepare_for_building, reset_symtab_globals)
1501 (end_symtab_get_static_block, end_symtab_with_blockvector)
1502 (augment_type_symtab, push_context): Update.
1503 (get_local_symbols, get_file_symbols, get_global_symbols): New
1505 (buildsym_init): Update.
1507 2018-07-20 Tom Tromey <tom@tromey.com>
1509 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1510 (process_full_type_unit): Likewise.
1511 (dwarf2_start_symtab): Set list_in_scope.
1513 2018-07-20 Tom Tromey <tom@tromey.com>
1515 * dwarf2read.c (process_psymtab_comp_unit_reader)
1516 (build_type_psymtabs_reader): Do not set list_in_scope.
1518 2018-07-20 Tom Tromey <tom@tromey.com>
1520 * buildsym.c (free_pendings): Remove.
1521 (add_symbol_to_list, scoped_free_pendings)
1522 (finish_block_internal, buildsym_init): Update.
1524 2018-07-20 Tom Tromey <tom@tromey.com>
1526 * xcoffread.c (read_xcoff_symtab): Update.
1527 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1529 * dbxread.c (process_one_symbol): Update.
1530 * coffread.c (coff_symtab_read): Update.
1531 * buildsym.h (finish_block): Update.
1532 * buildsym.c (finish_block): Remove "listhead" argument.
1533 (end_symtab_get_static_block): Update.
1535 2018-07-20 Tom Tromey <tom@tromey.com>
1537 * buildsym.h (class scoped_free_pendings): Remove constructor.
1538 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1540 <m_pending_block_obstack, m_pending_blocks>: New members.
1541 (pending_block_obstack, pending_blocks): Remove.
1542 (scoped_free_pendings::scoped_free_pendings): Default.
1543 (~scoped_free_pendings): Update.
1544 (free_pending_blocks): Remove.
1545 (finish_block_internal, record_pending_block, make_blockvector)
1546 (end_symtab_get_static_block, augment_type_symtab, push_context)
1547 (buildsym_init): Update.
1549 2018-07-20 Tom Tromey <tom@tromey.com>
1551 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1552 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1554 (pending_addrmap, pending_addrmap_obstack)
1555 (pending_addrmap_interesting): Remove.
1556 (scoped_free_pendings, record_block_range, make_blockvector)
1557 (prepare_for_building, reset_symtab_globals, buildsym_init):
1560 2018-07-20 Tom Tromey <tom@tromey.com>
1562 * xcoffread.c (process_linenos): Update.
1563 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1564 * mdebugread.c (psymtab_to_symtab_1): Update.
1565 * dwarf2read.c (setup_type_unit_groups)
1566 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1567 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1568 * dbxread.c (process_one_symbol): Update.
1569 * coffread.c (coff_symtab_read, enter_linenos)
1570 (process_coff_symbol): Update.
1571 * buildsym.h (current_subfile): Don't declare.
1572 (get_current_subfile): Declare.
1573 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1575 (start_subfile, free_buildsym_compunit, push_subfile)
1576 (prepare_for_building, start_symtab): Update.
1577 (get_current_subfile): New function.
1579 2018-07-20 Tom Tromey <tom@tromey.com>
1581 * coffread.c (coff_symtab_read): Update.
1582 * xcoffread.c (read_xcoff_symtab): Update.
1583 * dwarf2read.c (new_symbol): Update.
1584 (read_func_scope, read_lexical_block_scope): Update.
1585 * dbxread.c (process_one_symbol): Update.
1586 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1587 (outermost_context_p): Remove macro.
1588 (outermost_context_p, get_current_context_stack)
1589 (get_context_stack_depth): Declare.
1590 (pop_context): Return struct context_stack.
1591 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1593 (context_stack_size): Remove.
1594 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1595 (prepare_for_building, end_symtab_get_static_block)
1596 (augment_type_symtab, push_context): Update.
1597 (pop_context): Return struct context_stack.
1598 (outermost_context_p, get_current_context_stack)
1599 (get_context_stack_depth): New functions.
1600 (buildsym_init): Update.
1602 2018-07-20 Tom Tromey <tom@tromey.com>
1604 * rust-exp.y: Now a pure parser. Update all rules.
1605 (%union): Move earlier.
1606 (current_parser, work_obstack): Remove globals.
1607 (rust_parser, ~rust_parser): Update.
1608 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1609 lex_character, lex_number, lex_string, lex_identifier,
1610 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1611 convert_name, convert_params_to_expression,
1612 convert_ast_to_expression, ast_basic_type, ast_operation,
1613 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1614 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1615 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1616 ast_array_type, ast_slice_type, ast_reference_type,
1617 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1618 (rust_parse): Update.
1619 (rustyyerror, rustyylex): Add parser parameter.
1620 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1621 (rust_lex_stringish_test, rust_lex_test_sequence)
1622 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1623 (rust_lex_test_push_back, rust_lex_tests): Update.
1625 2018-07-19 Pedro Alves <palves@redhat.com>
1627 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1628 gdb::unique_xmalloc_ptr.
1629 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1630 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1631 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1632 copy-initialization.
1633 * guile/scm-pretty-print.c (ppscm_print_children): Use
1634 gdb::unique_xmalloc_ptr instead of cleanups.
1635 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1636 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1637 gdb::unique_xmalloc_ptr.
1638 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1639 Adjust to use gdb::unique_xmalloc_ptr.
1640 * guile/scm-utils.c (extract_arg): Adjust.
1641 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1642 gdb::unique_xmalloc_ptr instead of a cleanup.
1644 2018-07-19 Tom Tromey <tom@tromey.com>
1646 * utils.c (do_value_free_to_mark)
1647 (make_cleanup_value_free_to_mark): Remove.
1648 * utils.h (make_cleanup_value_free_to_mark): Remove.
1650 2018-07-19 Pedro Alves <palves@redhat.com>
1652 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1653 forwarding reference.
1655 2018-07-18 Pedro Alves <palves@redhat.com>
1657 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1658 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1661 2018-07-18 Pedro Alves <palves@redhat.com>
1663 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1665 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1667 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1668 directly instead of a cleanup.
1669 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1670 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1671 (vlscm_binop_gdbthrow): New, factored out from ...
1672 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1673 (vlscm_rich_compare): Use gdbscm_wrap.
1674 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1675 instead of a cleanup.
1676 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1678 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1679 Use xfree directly instead of a cleanup.
1680 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1681 Adjust to use gdbscm_wrap and scoped_value_mark.
1682 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1683 (gdbscm_value_address, gdbscm_value_dereference)
1684 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1686 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1687 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1689 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1690 gdbscm_wrap and scoped_value_mark.
1691 (gdbscm_value_to_string): Use xfree directly instead of a
1692 cleanup. Move 'buffer' unique_ptr to TRY scope.
1693 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1694 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1696 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1697 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1699 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1702 2018-07-18 Tom de Vries <tdevries@suse.de>
1704 * findvar.c (default_read_var_value): Also resolve dynamic type for
1705 LOC_OPTIMIZED_OUT vars.
1707 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1709 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1712 2018-07-17 Tom Tromey <tom@tromey.com>
1714 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1715 (compute_enum_list, pascm_set_param_value_x)
1716 (gdbscm_parameter_value): Update.
1717 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1718 (gdbscm_scm_to_host_string): Update.
1719 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1721 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1722 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1723 * guile/scm-string.c (gdbscm_scm_to_string): Return
1725 (gdbscm_scm_to_host_string): Likewise.
1727 2018-07-17 Tom Tromey <tom@tromey.com>
1729 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1730 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1731 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1732 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1735 2018-07-17 Tom Tromey <tom@tromey.com>
1737 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1738 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1740 * guile/scm-cmd.c (cmdscm_function): Update.
1741 * guile/scm-pretty-print.c
1742 (ppscm_print_exception_unless_memory_error): Update.
1743 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1744 Return unique_xmalloc_ptr.
1746 2018-07-17 Tom Tromey <tom@tromey.com>
1748 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1751 2018-07-17 Jim Wilson <jimw@sifive.com>
1753 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1754 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1755 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1756 unecessary braces after EF_RISCV_RVC test. Delete call to
1757 set_gdbarch_decr_pc_after_break.
1759 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1760 RISCV_LAST_FP_REGNUM + 1.
1761 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1763 2018-07-17 Tom Tromey <tom@tromey.com>
1765 * configure.ac: Remove --disable-gdbcli.
1766 * configure: Rebuild.
1767 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1768 (SUBDIR_CLI_CFLAGS): Remove.
1769 (SFILES): Use SUBDIR_CLI_SRCS.
1770 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1772 2018-07-17 Tom Tromey <tom@tromey.com>
1775 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1777 2018-07-16 Jim Wilson <jimw@sifive.com>
1779 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1781 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1783 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1785 (libunwind_frame_sniffer): Likewise.
1786 (libunwind_frame_prev_register): Likewise.
1787 (libunwind_sigtramp_frame_sniffer): Likewise.
1788 * ia64-tdep.c (ia64_access_reg): Likewise.
1789 (ia64_access_rse_reg): Likewise.
1790 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1791 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1793 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1795 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1797 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1799 * remote-sim.c (gdbsim_target::close,
1800 gdbsim_target::mourn_inferior): Remove unused variables.
1802 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1804 * ia64-tdep.c (ktab_buf): New global.
1805 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1806 (get_kernel_table): Adjust.
1808 2018-07-16 Tom Tromey <tom@tromey.com>
1810 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1811 * dwarf2read.c (using_directives, new_symbol): Use
1812 outermost_context_p.
1813 * dbxread.c (process_one_symbol): Use outermost_context_p.
1814 * coffread.c (coff_symtab_read): Use outermost_context_p.
1816 2018-07-16 Tom Tromey <tom@tromey.com>
1818 * dwarf2read.c (using_directives, read_func_scope)
1819 (read_lexical_block_scope): Update.
1820 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1821 * buildsym.h (local_using_directives, global_using_directives):
1823 (get_local_using_directives, set_local_using_directives)
1824 (get_global_using_directives): Declare.
1825 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1826 m_global_using_directives>: New members.
1827 (finish_block_internal, prepare_for_building)
1828 (reset_symtab_globals, end_symtab_get_static_block)
1829 (push_context): Update.
1830 (get_local_using_directives, set_local_using_directives)
1831 (get_global_using_directives): New functions.
1832 (buildsym_init): Update.
1834 2018-07-16 Tom Tromey <tom@tromey.com>
1836 * xcoffread.c (xcoff_initial_scan): Don't call
1837 free_pending_blocks.
1838 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1839 * buildsym.h (class scoped_free_pendings): Add constructor.
1840 (free_pending_blocks): Don't declare.
1841 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1842 (free_pending_blocks): Now static.
1844 2018-07-16 Tom Tromey <tom@tromey.com>
1846 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1847 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1849 (struct subfile_stack): Remove.
1850 (subfile_stack): Remove.
1851 (push_subfile, pop_subfile, buildsym_init): Update.
1853 2018-07-16 Tom Tromey <tom@tromey.com>
1855 * buildsym.c (push_subfile): Use gdb_assert.
1856 (pop_subfile): Use gdb_assert.
1858 2018-07-16 Tom Tromey <tom@tromey.com>
1860 * buildsym.h (merge_symbol_lists): Remove.
1861 * buildsym.c (merge_symbol_lists): Remove.
1863 2018-07-16 Tom Tromey <tom@tromey.com>
1865 * stabsread.c (scan_file_globals): Update comment.
1866 * stabsread.h (scan_file_globals): Move from buildsym.h.
1867 * buildsym.h (scan_file_globals): Move to stabsread.h.
1869 2018-07-16 Tom Tromey <tom@tromey.com>
1871 * xcoffread.c (xcoff_new_init): Update.
1872 * mipsread.c (mipscoff_new_init): Update.
1873 * mdebugread.c (mdebug_build_psymtabs): Update.
1874 * elfread.c (elf_new_init): Update.
1875 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1876 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1877 * buildsym.h (buildsym_new_init): Don't declare.
1878 * buildsym.c (buildsym_new_init): Remove.
1880 2018-07-16 Tom Tromey <tom@tromey.com>
1882 * stabsread.h (within_function): Move from buildsym.h.
1883 * stabsread.c (start_stabs): Clear within_function.
1884 * coffread.c (coff_start_symtab): Clear within_function.
1885 * buildsym.h (within_function): Move to stabsread.h.
1886 * buildsym.c (prepare_for_building): Update.
1888 2018-07-16 Tom Tromey <tom@tromey.com>
1890 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1891 * dwarf2read.c (dwarf2_start_symtab): Don't set
1892 processing_gcc_compilation.
1893 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1895 2018-07-16 Tom Tromey <tom@tromey.com>
1897 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1898 (next_symbol_text_func): Move from buildsym.h.
1899 * stabsread.c (hashname): Move from buildsym.c.
1900 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1901 (next_symbol_text_func, hashname): Move to stabsread.h.
1902 * buildsym.c: Don't include bcache.h
1903 (hashname): Move to stasbread.c.
1905 2018-07-16 Tom Tromey <tom@tromey.com>
1907 * buildsym.h (context_stack_size): Don't declare.
1908 * buildsym.c (context_stack_size): New global.
1910 2018-07-16 Tom Tromey <tom@tromey.com>
1912 * dbxread.c (processing_acc_compilation): New global.
1913 * buildsym.h (processing_acc_compilation): Don't declare.
1915 2018-07-16 Tom Tromey <tom@tromey.com>
1917 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1918 * dbxread.c (read_ofile_symtab): Update.
1919 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1920 * buildsym.h (last_source_start_addr): Remove.
1921 (set_last_source_start_addr, get_last_source_start_addr):
1923 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1925 (struct buildsym_compunit) <m_last_source_start_addr>: New
1927 (prepare_for_building): Remove start_addr parameter.
1928 (start_symtab, restart_symtab, end_symtab_get_static_block)
1929 (end_symtab_with_blockvector): Update.
1930 (set_last_source_start_addr, get_last_source_start_addr): New
1933 2018-07-16 Tom Tromey <tom@tromey.com>
1935 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1937 (have_line_numbers): Remove.
1938 (record_line, prepare_for_building, end_symtab_get_static_block)
1939 (augment_type_symtab): Update.
1941 2018-07-16 Tom Tromey <tom@tromey.com>
1943 * buildsym.c (~buildsym_compunit): Free the macro table.
1944 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1946 <m_pending_macros>: New member.
1947 (pending_macros): Remove.
1948 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1949 (reset_symtab_globals, end_symtab_get_static_block)
1950 (end_symtab_with_blockvector, augment_type_symtab)
1951 (buildsym_init): Update.
1953 2018-07-16 Tom Tromey <tom@tromey.com>
1955 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1957 (buildsym_compunit::set_last_source_file): New method.
1958 <m_last_source_file>: New member.
1959 (prepare_for_building): Remove "name" parameter.
1960 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1961 (last_source_file): Remove.
1962 (set_last_source_file, get_last_source_file): Update.
1964 2018-07-16 Tom Tromey <tom@tromey.com>
1966 * buildsym.c (prepare_for_building): Add assert.
1968 2018-07-16 Tom Tromey <tom@tromey.com>
1970 * buildsym.c (~buildsym_compunit): Update.
1971 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1972 (start_subfile, patch_subfile_names)
1973 (end_symtab_with_blockvector): Update.
1975 2018-07-16 Tom Tromey <tom@tromey.com>
1977 * buildsym.c (struct buildsym_compunit): Add constructor,
1978 destructor, initializers.
1979 (start_buildsym_compunit): Remove.
1980 (free_buildsym_compunit): Use "delete".
1981 (start_symtab, restart_symtab): Use "new".
1983 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1985 * symfile.c (set_objfile_default_section_offset): Remove struct
1988 2018-07-14 Stafford Horne <shorne@gmail.com>
1990 * (Responsible Maintainers): Add myself as or1k maintainer.
1992 2018-07-13 Tom Tromey <tom@tromey.com>
1994 * symfile.c (set_objfile_default_section_offset): Use extra braces
1997 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1999 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2002 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2004 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2005 unittests/cli-utils-selftests.c
2006 * unittests/cli-utils-selftests.c: New file.
2008 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2010 * NEWS: Mention new commands. Mention change to 'thread apply'.
2012 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2014 * thread.c (thr_try_catch_cmd): New function.
2015 (thread_apply_all_command): Handle qcs flags.
2016 (thread_apply_command): Handle qcs flags.
2017 (taas_command): New function.
2018 (tfaas_command): New function.
2019 (_initialize_thread): Update to setup the new commands 'taas
2020 and 'tfaas'. Change doc string for 'thread apply'.
2022 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2024 * stack.c: (trailing_outermost_frame): New function, mostly
2025 extracted from backtrace_command_1.
2026 (leading_innermost_frame): New function.
2027 (backtrace_command_1): Update to call trailing_outermost_frame.
2028 (frame_apply_command_count): New function.
2029 (frame_apply_level_command): New function.
2030 (frame_apply_all_command): New function.
2031 (frame_apply_command): New function.
2032 (faas_command): New function.
2033 (frame_cmd_list): New variable.
2034 (_initialize_stack): Update to setup the new commands 'frame apply'
2037 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2039 * cli-utils.c (number_or_range_parser::get_number): Only handle
2040 numbers or convenience var as numbers.
2041 (parse_flags): New function.
2042 (parse_flags_qcs): New function.
2043 (number_or_range_parser::finished): Ensure parsing end is detected
2044 before end of string.
2045 * cli-utils.h (parse_flags): New function.
2046 (parse_flags_qcs): New function.
2047 (number_or_range_parser): Remove m_finished bool.
2048 (number_or_range_parser::skip_range): Set m_in_range to false.
2050 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2052 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2055 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2056 Jan Kratochvil <jan.kratochvil@redhat.com>
2057 Paul Fertser <fercerpav@gmail.com>
2058 Tsutomu Seki <sekiriki@gmail.com>
2059 Pedro Alves <palves@redhat.com>
2061 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2062 'unittests/parse-connection-spec-selftests.c'.
2063 (COMMON_SFILES): Add 'common/netstuff.c'.
2064 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2065 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2066 * common/netstuff.c: New file.
2067 * common/netstuff.h: New file.
2068 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2069 (wait_for_connect): Update comment. New parameter
2070 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2071 Use 'sock' directly instead of 'scb->fd'.
2072 (try_connect): New function, with code from 'net_open'.
2073 (net_open): Rewrite main loop to deal with multiple
2074 sockets/addresses. Handle IPv6-style hostnames; implement
2075 support for IPv6 connections.
2076 * unittests/parse-connection-spec-selftests.c: New file.
2078 2018-07-11 Pedro Alves <palves@redhat.com>
2081 * remote.c (remote_target::remote_detach_pid): Call
2082 set_current_process.
2084 2018-07-11 Pedro Alves <palves@redhat.com>
2086 * h8300-tdep.c (h8300_gdbarch_init): Remove
2087 set_gdbarch_ecoff_reg_to_regnum calls.
2089 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2092 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2093 offsets/sizes for static members of a class/struct.
2095 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2097 * target-descriptions.c (tdesc_register_bitsize): Rename.
2098 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2099 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2100 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2102 2018-07-10 Tom Tromey <tom@tromey.com>
2104 * breakpoint.c (moribund_locations): Now static and a
2106 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2107 (build_bpstat_chain, update_global_location_list)
2108 (breakpoint_retire_moribund): Update.
2109 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2112 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2114 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2115 (riscv_register_reggroup_p): Use new function, remove unneeded
2117 (riscv_push_dummy_call): Extend assert to compare against xlen or
2118 flen based on register type.
2120 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2122 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2124 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2126 * remote.c (show_hardware_watchpoint_limit): New function.
2127 (show_hardware_watchpoint_length_limit): New function.
2128 (show_hardware_breakpoint_limit): New function.
2129 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2130 where appropriate, update help text.
2132 2018-07-09 Tom Tromey <tom@tromey.com>
2134 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2135 (CLIBS): Don't mention NAT_CLIBS.
2137 2018-07-09 Tom Tromey <tom@tromey.com>
2139 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2140 (LIBGDB_OBS, clean mostlyclean): Update.
2141 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2143 2018-07-09 Tom Tromey <tom@tromey.com>
2145 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2146 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2147 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2149 2018-07-09 Tom Tromey <tom@tromey.com>
2151 * Makefile.in (ALLDEPFILES): Remove exec.c.
2152 (COMMON_OBS): Remove exec.o.
2153 (COMMON_SFILES): Add exec.c.
2155 2018-07-09 Tom Tromey <tom@tromey.com>
2157 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2159 2018-07-09 Tom Tromey <tom@tromey.com>
2161 * Makefile.in (clean mostlyclean): Remove stamp-version.
2162 (version.c): Depend on stamp-version.
2163 (stamp-version): New rule, from version.c rule.
2165 2018-07-09 Tom Tromey <tom@tromey.com>
2167 * Makefile.in (init.c): Depend on stamp-init.
2168 (stamp-init): New rule, from init.c rule.
2169 (clean mostlyclean): Remove stamp-init.
2171 2018-07-09 Tom Tromey <tom@tromey.com>
2173 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2174 SUBDIR_GCC_COMPILE_SRCS.
2176 2018-07-09 Tom Tromey <tom@tromey.com>
2178 * Makefile.in (init.c): Remove some unused sed rules.
2180 2018-07-09 Tom Tromey <tom@tromey.com>
2182 * Makefile.in (TSOBS): Remove.
2183 (INIT_FILES): Update.
2184 (LIBGDB_OBS): Update.
2185 (COMMON_SFILES): Add inflow.c.
2186 (SFILES): Remove inflow.c.
2188 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2190 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2192 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2194 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2195 get_saveloc_name, is_signal_frame_name, step_name,
2196 init_remote_name, create_addr_space_name,
2197 destroy_addr_space_name, search_unwind_table_name,
2198 find_dyn_list_name): Constify.
2200 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2202 * darwin-nat.c (darwin_pthread_kill): New function.
2203 (darwin_resume_thread): Use darwin_pthread_kill.
2205 2018-07-05 Tom de Vries <tdevries@suse.de>
2207 * macroexp.c (macro_buffer) <operator=>: New member function.
2209 2018-07-04 Tom Tromey <tom@tromey.com>
2211 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2213 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2215 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2216 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2217 * maint.c: Likewise.
2220 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2222 * NEWS: Create a new section for the next release branch.
2223 Rename the section of the current branch, now that it has
2226 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2228 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2229 * version.in: Bump version to 8.2.50.DATE-git.
2231 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2232 Pedro Alves <palves@redhat.com>
2234 * linux-nat.c (linux_init_ptrace): Rename to ...
2235 (linux_init_ptrace_procfs): ... this. Call
2236 linux_proc_init_warnings.
2237 (linux_nat_target::post_attach)
2238 (linux_nat_target::post_startup_inferior): Adjust.
2239 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2240 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2242 2018-07-04 Tom de Vries <tdevries@suse.de>
2244 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2246 (read_comp_unit_head): ... here.
2248 2018-07-03 Tom Tromey <tom@tromey.com>
2250 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2251 (stop_tracing, tstatus_command)
2252 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2253 (print_one_static_tracepoint_marker): Update.
2254 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2256 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2258 (all_tracepoints, static_tracepoints_here): Return std::vector.
2260 2018-07-03 Tom Tromey <tom@tromey.com>
2262 * common/ptid.c (ptid_equal): Remove.
2263 * common/ptid.h (ptid_equal): Don't declare.
2264 * ada-tasks.c: Update.
2265 * breakpoint.c: Update.
2266 * common/agent.c: Update.
2267 * corelow.c: Update.
2268 * darwin-nat-info.c: Update.
2269 * darwin-nat.c: Update.
2271 * dtrace-probe.c: Update.
2272 * dummy-frame.c: Update.
2273 * fbsd-nat.c: Update.
2275 * gdbthread.h: Update.
2276 * gnu-nat.c: Update.
2277 * go32-nat.c: Update.
2278 * inf-loop.c: Update.
2279 * inf-ptrace.c: Update.
2280 * infcall.c: Update.
2284 * linux-fork.c: Update.
2285 * linux-nat.c: Update.
2286 * linux-thread-db.c: Update.
2287 * mi/mi-cmd-var.c: Update.
2288 * mi/mi-interp.c: Update.
2289 * mi/mi-main.c: Update.
2290 * nto-procfs.c: Update.
2291 * ppc-linux-tdep.c: Update.
2293 * python/py-inferior.c: Update.
2294 * python/py-record-btrace.c: Update.
2295 * python/py-record.c: Update.
2296 * ravenscar-thread.c: Update.
2297 * regcache.c: Update.
2298 * remote-sim.c: Update.
2300 * sol-thread.c: Update.
2303 * tui/tui-stack.c: Update.
2305 * windows-nat.c: Update.
2306 * windows-tdep.c: Update.
2308 2018-07-03 Tom Tromey <tom@tromey.com>
2310 * common/ptid.c (ptid_match): Remove.
2311 * common/ptid.h (ptid_match): Don't declare.
2312 * fbsd-nat.c: Update.
2315 * linux-nat.c: Update.
2316 * record-btrace.c: Update.
2317 * regcache.c: Update.
2320 2018-07-03 Tom Tromey <tom@tromey.com>
2322 * common/ptid.c (ptid_tid_p): Remove.
2323 * common/ptid.h (ptid_tid_p): Don't declare.
2324 * sol-thread.c: Update.
2326 2018-07-03 Tom Tromey <tom@tromey.com>
2328 * common/ptid.c (ptid_lwp_p): Remove.
2329 * common/ptid.h (ptid_lwp_p): Don't declare.
2330 * fbsd-nat.c: Update.
2331 * linux-nat.c: Update.
2332 * nat/linux-procfs.c: Update.
2333 * nat/x86-linux-dregs.c: Update.
2334 * sol-thread.c: Update.
2336 2018-07-03 Tom Tromey <tom@tromey.com>
2338 * common/ptid.c (ptid_is_pid): Remove.
2339 * common/ptid.h (ptid_is_pid): Don't declare.
2341 * linux-nat.c: Update.
2342 * mi/mi-interp.c: Update.
2346 2018-07-03 Tom Tromey <tom@tromey.com>
2348 * common/ptid.c (ptid_get_tid): Remove.
2349 * common/ptid.h (ptid_get_tid): Don't declare.
2350 * ada-tasks.c: Update.
2351 * aix-thread.c: Update.
2352 * bsd-uthread.c: Update.
2353 * darwin-nat.c: Update.
2354 * fbsd-nat.c: Update.
2355 * i386-darwin-nat.c: Update.
2357 * linux-tdep.c: Update.
2358 * nto-procfs.c: Update.
2359 * ppc-ravenscar-thread.c: Update.
2360 * python/py-infthread.c: Update.
2361 * ravenscar-thread.c: Update.
2362 * sol-thread.c: Update.
2363 * sparc-ravenscar-thread.c: Update.
2364 * windows-nat.c: Update.
2366 2018-07-03 Tom Tromey <tom@tromey.com>
2368 * common/ptid.c (ptid_get_lwp): Remove.
2369 * common/ptid.h (ptid_get_lwp): Don't declare.
2370 * aarch64-linux-nat.c: Update.
2371 * ada-tasks.c: Update.
2372 * aix-thread.c: Update.
2373 * amd64-linux-nat.c: Update.
2374 * arm-linux-nat.c: Update.
2375 * corelow.c: Update.
2376 * fbsd-nat.c: Update.
2377 * fbsd-tdep.c: Update.
2378 * gnu-nat.c: Update.
2379 * i386-cygwin-tdep.c: Update.
2380 * i386-gnu-nat.c: Update.
2381 * i386-linux-nat.c: Update.
2382 * ia64-linux-nat.c: Update.
2383 * inf-ptrace.c: Update.
2385 * linux-fork.c: Update.
2386 * linux-nat.c: Update.
2387 * linux-tdep.c: Update.
2388 * linux-thread-db.c: Update.
2389 * mips-linux-nat.c: Update.
2390 * nat/aarch64-linux-hw-point.c: Update.
2391 * nat/aarch64-linux.c: Update.
2392 * nat/linux-btrace.c: Update.
2393 * nat/linux-osdata.c: Update.
2394 * nat/linux-procfs.c: Update.
2395 * nat/x86-linux-dregs.c: Update.
2396 * obsd-nat.c: Update.
2397 * ppc-fbsd-nat.c: Update.
2398 * ppc-linux-nat.c: Update.
2400 * python/py-infthread.c: Update.
2401 * ravenscar-thread.c: Update.
2403 * s390-linux-nat.c: Update.
2404 * sol-thread.c: Update.
2405 * sol2-tdep.c: Update.
2406 * spu-linux-nat.c: Update.
2407 * x86-linux-nat.c: Update.
2408 * xtensa-linux-nat.c: Update.
2410 2018-07-03 Tom Tromey <tom@tromey.com>
2412 * common/ptid.c (ptid_get_pid): Remove.
2413 * common/ptid.h (ptid_get_pid): Don't declare.
2414 * aarch64-linux-nat.c: Update.
2415 * ada-lang.c: Update.
2416 * aix-thread.c: Update.
2417 * alpha-bsd-nat.c: Update.
2418 * amd64-fbsd-nat.c: Update.
2419 * amd64-linux-nat.c: Update.
2420 * arm-linux-nat.c: Update.
2421 * arm-nbsd-nat.c: Update.
2423 * break-catch-syscall.c: Update.
2424 * breakpoint.c: Update.
2425 * bsd-uthread.c: Update.
2426 * corelow.c: Update.
2428 * darwin-nat.c: Update.
2429 * fbsd-nat.c: Update.
2430 * fbsd-tdep.c: Update.
2432 * gnu-nat.c: Update.
2433 * hppa-nbsd-nat.c: Update.
2434 * hppa-obsd-nat.c: Update.
2435 * i386-fbsd-nat.c: Update.
2436 * ia64-linux-nat.c: Update.
2437 * inf-ptrace.c: Update.
2439 * inferior.c: Update.
2440 * inferior.h: Update.
2443 * linux-fork.c: Update.
2444 * linux-nat.c: Update.
2445 * linux-tdep.c: Update.
2446 * linux-thread-db.c: Update.
2447 * m68k-bsd-nat.c: Update.
2448 * mi/mi-interp.c: Update.
2449 * mi/mi-main.c: Update.
2450 * mips-linux-nat.c: Update.
2451 * mips-nbsd-nat.c: Update.
2452 * mips64-obsd-nat.c: Update.
2453 * nat/aarch64-linux-hw-point.c: Update.
2454 * nat/aarch64-linux.c: Update.
2455 * nat/linux-btrace.c: Update.
2456 * nat/linux-osdata.c: Update.
2457 * nat/linux-procfs.c: Update.
2458 * nat/x86-linux-dregs.c: Update.
2459 * nto-procfs.c: Update.
2460 * obsd-nat.c: Update.
2461 * ppc-linux-nat.c: Update.
2462 * ppc-nbsd-nat.c: Update.
2463 * ppc-obsd-nat.c: Update.
2464 * proc-service.c: Update.
2466 * python/py-inferior.c: Update.
2467 * python/py-infthread.c: Update.
2468 * ravenscar-thread.c: Update.
2470 * remote-sim.c: Update.
2472 * rs6000-nat.c: Update.
2473 * s390-linux-nat.c: Update.
2474 * sh-nbsd-nat.c: Update.
2475 * sol-thread.c: Update.
2476 * sparc-nat.c: Update.
2477 * sparc64-tdep.c: Update.
2478 * spu-linux-nat.c: Update.
2479 * spu-tdep.c: Update.
2480 * target-debug.h: Update.
2483 * tid-parse.c: Update.
2484 * tracefile-tfile.c: Update.
2485 * vax-bsd-nat.c: Update.
2486 * windows-nat.c: Update.
2487 * x86-linux-nat.c: Update.
2488 * x86-nat.c: Update.
2490 2018-07-03 Tom Tromey <tom@tromey.com>
2492 * common/ptid.c (pid_to_ptid): Remove.
2493 * common/ptid.h (pid_to_ptid): Don't declare.
2494 * aix-thread.c: Update.
2495 * arm-linux-nat.c: Update.
2496 * common/ptid.c: Update.
2497 * common/ptid.h: Update.
2498 * corelow.c: Update.
2500 * darwin-nat.c: Update.
2501 * fbsd-nat.c: Update.
2502 * fork-child.c: Update.
2503 * gnu-nat.c: Update.
2504 * go32-nat.c: Update.
2505 * inf-ptrace.c: Update.
2507 * inferior.c: Update.
2509 * linux-fork.c: Update.
2510 * linux-nat.c: Update.
2511 * nat/aarch64-linux-hw-point.c: Update.
2512 * nat/fork-inferior.c: Update.
2513 * nat/x86-linux-dregs.c: Update.
2514 * nto-procfs.c: Update.
2515 * obsd-nat.c: Update.
2517 * progspace.c: Update.
2519 * rs6000-nat.c: Update.
2520 * s390-linux-nat.c: Update.
2521 * sol-thread.c: Update.
2522 * spu-linux-nat.c: Update.
2525 * tracefile-tfile.c: Update.
2526 * windows-nat.c: Update.
2528 2018-07-03 Tom Tromey <tom@tromey.com>
2530 * common/ptid.h (ptid_build): Don't declare.
2531 * common/ptid.c (ptid_build): Remove.
2532 * aix-thread.c: Update.
2533 * bsd-kvm.c: Update.
2534 * bsd-uthread.c: Update.
2535 * common/agent.c: Update.
2536 * common/ptid.c: Update.
2537 * common/ptid.h: Update.
2538 * corelow.c: Update.
2539 * darwin-nat.c: Update.
2540 * fbsd-nat.c: Update.
2541 * gnu-nat.c: Update.
2542 * linux-fork.c: Update.
2543 * linux-nat.c: Update.
2544 * linux-thread-db.c: Update.
2545 * nat/linux-osdata.c: Update.
2546 * nat/linux-procfs.c: Update.
2547 * nto-procfs.c: Update.
2548 * obsd-nat.c: Update.
2549 * proc-service.c: Update.
2551 * ravenscar-thread.c: Update.
2552 * remote-sim.c: Update.
2554 * sol-thread.c: Update.
2556 * windows-nat.c: Update.
2558 2018-07-03 Tom Tromey <tom@tromey.com>
2560 * infrun.c (follow_exec): Use exit_inferior_silent.
2561 * inferior.c (exit_inferior_num_silent): Remove.
2562 * inferior.h (exit_inferior_num_silent): Don't declare.
2564 2018-07-03 Tom Tromey <tom@tromey.com>
2567 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2568 inferior_ptid on error.
2570 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2571 Simon Marchi <simon.marchi@polymtl.ca>
2574 * disasm.h (gdb_disassembler): Add
2575 `m_disassembler_options_holder'. member
2576 * disasm.c (get_all_disassembler_options): New function.
2577 (gdb_disassembler::gdb_disassembler): Use it.
2578 (gdb_buffered_insn_length_init_dis): Likewise.
2579 (gdb_buffered_insn_length): Adjust accordingly.
2580 (set_disassembler_options): Handle options with arguments.
2581 (show_disassembler_options_sfunc): Likewise. Add a leading new
2582 line if showing options with descriptions.
2583 (disassembler_options_completer): Adapt to using the
2584 `disasm_options_and_args_t' structure.
2585 * mips-tdep.c (mips_disassembler_options): New variable.
2586 (mips_disassembler_options_o32): Likewise.
2587 (mips_disassembler_options_n32): Likewise.
2588 (mips_disassembler_options_n64): Likewise.
2589 (gdb_print_insn_mips): Don't set `disassembler_options'.
2590 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2592 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2593 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2594 `gdbarch_disassembler_options_implicit' and
2595 `gdbarch_valid_disassembler_options'.
2596 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2597 `disasm_options_and_args_t' structure.
2598 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2600 (valid_disassembler_options): Switch from `disasm_options_t' to
2601 the `disasm_options_and_args_t' structure.
2602 * NEWS: Document `set disassembler-options' support for the MIPS
2604 * gdbarch.h: Regenerate.
2605 * gdbarch.c: Regenerate.
2607 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2609 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2611 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2613 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2614 parameter in call to amd64_target_description.
2615 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2616 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2617 (amd64fbsd_init_abi): Likewise.
2618 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2619 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2620 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2621 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2623 2018-06-29 Pedro Alves <palves@redhat.com>
2625 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2626 "segments" parameter.
2627 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2628 (_initialize_amd64_tdep): Update call to
2629 amd64_create_target_description.
2630 (amd64_target_description): Add "segments" parameter. Adjust
2631 the implementation to use it.
2632 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2633 call to amd64_create_target_description.
2634 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2635 * gdb/arch/amd64.h (amd64_create_target_description): Add
2636 "segments" register.
2637 * gdb/arch/amd64.c (amd64_create_target_description): Add
2638 "segments" parameter. Call create_feature_i386_64bit_segments
2639 only if SEGMENTS is true.
2640 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2641 call to amd64_create_target_description.
2643 2018-06-29 Pedro Alves <palves@redhat.com>
2645 * thread.c (thread_target_id_str): New, factored out from ...
2646 (print_thread_info_1): ... here. Use it to compute the max
2647 "Target Id" column width.
2649 2018-06-29 Pedro Alves <palves@redhat.com>
2651 * remote.c (remote_target::extra_thread_info): Delete
2652 'display_buf' and 'n' locals. from the cache, regardless of
2653 packet mechanims is in use. Use cache for qThreadExtra and qP
2656 2018-06-29 Pedro Alves <palves@redhat.com>
2658 * blockframe.c (find_pc_sect_containing_function): New function.
2659 * breakpoint.c (print_breakpoint_location): Don't call
2660 find_pc_sect_function.
2661 * linespec.c (create_sals_line_offset): Record the location's
2663 * linespec.c (convert_address_location_to_sals): Fill in sal's
2664 symbol with find_pc_sect_containing_function.
2665 * symtab.c (find_function_start_sal): Rename to ...
2666 (find_function_start_sal_1): ... this.
2667 (find_function_start_sal): Reimplement as wrapper around
2668 find_function_start_sal_1, and use
2669 find_pc_sect_containing_function to fill in the sal's symbol.
2670 (find_function_start_sal(symbol*, bool)): Adjust.
2671 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2673 (find_pc_sect_containing_function): Declare.
2675 2018-06-29 Pedro Alves <palves@redhat.com>
2677 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2678 true if the the location has no symbol.
2680 2018-06-28 Tom Tromey <tom@tromey.com>
2682 * NEWS: Mention --enable-codesign.
2683 * silent-rules.mk (ECHO_SIGN): New variable.
2684 * configure.ac: Add --enable-codesign.
2685 * configure: Rebuild.
2686 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2687 (gdb$(EXEEXT)): Optionally invoke codesign.
2689 2018-06-28 Pedro Alves <palves@redhat.com>
2691 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2693 (switch_to_thread_no_regs): Adjust comment.
2694 * infcmd.c (stop_pc): Delete.
2695 (post_create_inferior, info_program_command): Replace references
2696 to stop_pc with references to thread_info->suspend.stop_pc.
2697 * inferior.h (stop_pc): Delete declaration.
2698 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2699 (handle_inferior_event_1, handle_signal_stop)
2700 (process_event_stop_test, keep_going_stepped_thread)
2701 (handle_step_into_function, handle_step_into_function_backward)
2702 (print_stop_location): Replace references to stop_pc with
2703 references to thread_info->suspend.stop_pc.
2704 (struct infcall_suspend_state) <stop_pc>: Delete field.
2705 (save_infcall_suspend_state, restore_infcall_suspend_state):
2706 Remove references to inf_stat->stop_pc.
2707 * linux-fork.c (fork_load_infrun_state): Likewise.
2708 * record-btrace.c (record_btrace_set_replay): Likewise.
2709 * record-full.c (record_full_goto_entry): Likewise.
2710 * remote.c (print_one_stopped_thread): Likewise.
2711 * target.c (target_resume): Extend comment.
2712 * thread.c (set_executing_thread): New.
2713 (set_executing): Use it.
2714 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2715 Remove references to stop_pc.
2717 2018-06-28 Pedro Alves <palves@redhat.com>
2719 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2720 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2722 2018-06-28 Tom Tromey <tom@tromey.com>
2724 * coffread.c (coff_symfile_finish): Update.
2725 * xcoffread.c (xcoff_symfile_finish): Update.
2726 * elfread.c (elf_symfile_finish): Update.
2727 * symfile.h (dwarf2_free_objfile): Don't declare.
2728 * dwarf2read.c (_initialize_dwarf2_read): Use
2729 register_objfile_data_with_cleanup.
2730 (dwarf2_free_objfile): Now static. Change signature.
2732 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2734 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2735 option "-o" to add-symbol-file-load to add an offset to each
2736 section's load address.
2737 * symfile.c (set_objfile_default_section_offset): New function.
2739 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2741 * symfile.c (add_symbol_file_command): Make sure that sections
2742 with the same name are sorted in the same order.
2744 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2746 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2747 require the second argument. If omitted, load sections at the
2748 addresses specified in the file.
2750 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2752 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2753 (_initialize_symfile): Add option "-o" to symbol-file to add an
2754 offset to each section of the symbol file.
2756 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2758 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2760 2018-06-27 Tom Tromey <tom@tromey.com>
2762 * stack.c (_initialize_stack): Update "func" help text.
2764 2018-06-27 Tom Tromey <tom@tromey.com>
2766 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2768 (unwind_infopy_str, pyuw_create_unwind_info)
2769 (unwind_infopy_add_saved_register, pyuw_sniffer)
2770 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2772 (struct saved_reg): Add constructor.
2773 <value>: Now a gdbpy_ref<>.
2775 2018-06-27 Tom Tromey <tom@tromey.com>
2777 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2779 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2781 * gdb-gdb.py.in: Format using autopep8.
2783 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2785 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2786 (type_lookup_function): Recognize CORE_ADDR values.
2788 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2790 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2793 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2795 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2798 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2800 * gdb-gdb.py: Move to...
2801 * gdb-gdb.py.in: ... here.
2802 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2803 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2805 (distclean): Remove gdb-gdb.py when cleaning.
2806 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2807 * configure: Re-generate.
2809 2018-06-27 Pedro Alves <palves@redhat.com>
2811 * proc-service.c (get_ps_regcache): New.
2812 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2813 (ps_lsetfpregs): Use it.
2815 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2818 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2819 (dwarf_decode_lines_1): Adjust.
2821 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2823 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2825 <info_proc>: Likewise.
2827 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2829 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2830 to windows_fetch_one_register, and only handle the case of
2831 fetching one register. Move the code that reloads the context
2832 and iterates over all registers if R is negative to...
2833 (windows_nat_target::fetch_registers): ... here.
2834 (do_windows_store_inferior_registers): Rename to
2835 windows_store_one_register, and only handle the case of storing
2836 one register. Move the code that handles the case where r is
2838 (windows_nat_target::store_registers) ... here.
2840 2018-06-26 Tom Tromey <tom@tromey.com>
2843 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2844 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2846 (rust_internal_print_type): Add podata parameter.
2847 (rust_print_type): Update.
2849 2018-06-26 Tom Tromey <tom@tromey.com>
2851 * typeprint.h (struct print_offset_data) <update, finish,
2852 maybe_print_hole>: New methods.
2853 <indentation>: New constant.
2854 * typeprint.c (print_offset_data::indentation): Define.
2855 (print_offset_data::maybe_print_hole, print_offset_data::update)
2856 (print_offset_data::finish): Move from c-typeprint.c and rename.
2857 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2858 (print_spaces_filtered_with_print_options): Update.
2859 (c_print_type_union_field_offset, maybe_print_hole)
2860 (c_print_type_struct_field_offset): Move to typeprint.c and
2862 (c_type_print_base_struct_union): Update.
2864 2018-06-25 Pedro Alves <palves@redhat.com>
2866 * gdbthread.h (thread_info_ref, delete_thread)
2867 (delete_thread_silent, first_thread_of_inferior)
2868 (any_thread_of_inferior, switch_to_thread)
2869 (enable_thread_stack_temporaries)
2870 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2871 (get_last_thread_stack_temporary)
2872 (value_in_thread_stack_temporaries, can_access_registers_thread):
2873 Spell out "struct thread_info" instead of just "thread_info".
2874 * inferior.h (notice_new_inferior): Likewise.
2876 2018-06-25 Pedro Alves <palves@redhat.com>
2878 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2879 pass thread_info pointer to delete_thread.
2880 (windows_nat_target::detach): Pass inferior pointer to
2882 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2884 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2885 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2886 and pass a thread_info pointer to delete_thread.
2887 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2888 pass thread_info pointer to delete_thread.
2889 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2890 delete_thread_silent call.
2891 * procfs.c (procfs_target::detach): Pass inferior pointer to
2893 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2894 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2895 delete_thread_silent call.
2896 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2897 pass thread_info pointer to delete_thread.
2898 (windows_nat_target::detach): Pass inferior pointer to
2901 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2903 * regcache.c (readable_regcache::read_part): Fix asserts.
2904 (reg_buffer::raw_collect_part): New function.
2905 (regcache::write_part): Fix asserts.
2906 (reg_buffer::raw_supply_part): New function.
2907 (regcache::transfer_regset_register): New helper function.
2908 (regcache::transfer_regset): Call new functions.
2909 (regcache_supply_regset): Use gdb_byte*.
2910 (regcache::supply_regset): Likewise.
2911 (regcache_collect_regset): Likewise.
2912 (regcache::collect_regset): Likewise.
2913 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2914 (reg_buffer::raw_supply_part): Likewise.
2915 (regcache::transfer_regset_register): Likewise.
2916 (regcache::transfer_regset): Use gdb_byte*.
2918 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2920 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2922 2018-06-21 Pedro Alves <palves@redhat.com>
2924 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2925 instead of a ptid_t. All callers adjusted.
2926 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2928 (print_ada_task_info, display_current_task_id, task_command_1):
2930 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2932 (breakpoint_kind): Adjust.
2933 (remove_breakpoints_pid): Rename to ...
2934 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2935 pointer. All callers adjusted.
2936 (bpstat_clear_actions): Use inferior_thread.
2937 (get_bpstat_thread): New.
2938 (bpstat_do_actions): Use it.
2939 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2940 to take a thread_info pointer. All callers adjusted.
2941 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2942 (breakpoint_re_set_thread): Use inferior_thread.
2943 * breakpoint.h (struct inferior): Forward declare.
2944 (bpstat_stop_status): Update.
2945 (remove_breakpoints_pid): Delete.
2946 (remove_breakpoints_inf): New.
2947 * bsd-uthread.c (bsd_uthread_target::wait)
2948 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2949 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2950 (maint_btrace_packet_history_cmd)
2951 (maint_btrace_clear_packet_history_cmd): Adjust.
2952 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2954 * cli/cli-interp.c: Include "inferior.h".
2955 * common/refcounted-object.h (struct
2956 refcounted_object_ref_policy): New.
2957 * compile/compile-object-load.c: Include gdbthread.h.
2958 (store_regs): Use inferior_thread.
2959 * corelow.c (core_target::close): Use current_inferior.
2960 (core_target_open): Adjust to use first_thread_of_inferior and use
2961 the current inferior.
2962 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2963 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2964 <thread>: ... this new field. All references adjusted.
2965 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2966 Take a thread_info pointer instead of a ptid_t.
2967 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2968 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2969 thread_info pointer instead of a ptid_t.
2970 * elfread.c: Include "inferior.h".
2971 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2972 Use inferior_thread.
2973 * eval.c (evaluate_subexp): Likewise.
2974 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2976 * gdb_proc_service.h (struct thread_info): Forward declare.
2977 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2978 <thread>: ... this new field. All references adjusted.
2979 * gdbarch.h, gdbarch.c: Regenerate.
2980 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2981 'thread' parameter. All implementations and callers adjusted.
2982 * gdbthread.h (thread_info) <set_running>: New method.
2983 (delete_thread, delete_thread_silent): Take a thread_info pointer
2985 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2986 (first_thread_of_process): Delete, replaced by ...
2987 (first_thread_of_inferior): ... this new function. All callers
2989 (any_live_thread_of_process): Delete, replaced by ...
2990 (any_live_thread_of_inferior): ... this new function. All callers
2992 (switch_to_thread, switch_to_no_thread): Declare.
2993 (is_executing): Delete.
2994 (enable_thread_stack_temporaries): Update comment.
2995 <enable_thread_stack_temporaries>: Take a thread_info pointer
2996 instead of a ptid_t. Incref the thread.
2997 <~enable_thread_stack_temporaries>: Decref the thread.
3000 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3001 (get_last_thread_stack_temporary)
3002 (value_in_thread_stack_temporaries, can_access_registers_thread):
3003 Take a thread_info pointer instead of a ptid_t. All callers
3005 * infcall.c (get_call_return_value): Use inferior_thread.
3006 (run_inferior_call): Work with thread pointers instead of ptid_t.
3007 (call_function_by_hand_dummy): Work with thread pointers instead
3008 of ptid_t. Use thread_info_ref.
3009 * infcmd.c (proceed_thread_callback): Access thread's state
3011 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3012 access thread's state directly.
3013 (continue_command): Use inferior_thread.
3014 (info_program_command): Use find_thread_ptid and access thread
3016 (proceed_after_attach_callback): Use thread state directly.
3017 (notice_new_inferior): Take a thread_info pointer instead of a
3018 ptid_t. All callers adjusted.
3019 (exit_inferior): Take an inferior pointer instead of a pid. All
3021 (exit_inferior_silent): New.
3022 (detach_inferior): Delete.
3023 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3024 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3025 (detach_inferior_command, kill_inferior_command): Use
3026 find_inferior_id instead of valid_gdb_inferior_id and
3027 gdb_inferior_id_to_pid.
3028 (inferior_command): Use inferior and thread pointers.
3029 * inferior.h (struct thread_info): Forward declare.
3030 (notice_new_inferior): Take a thread_info pointer instead of a
3031 ptid_t. All callers adjusted.
3032 (detach_inferior): Delete declaration.
3033 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3034 instead of a pid. All callers adjusted.
3035 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3036 (valid_gdb_inferior_id): Delete.
3037 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3038 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3039 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3041 <inf>: ... this new field.
3042 <step_ptid>: Delete, replaced by ...
3043 <step_thread>: ... this new field.
3044 (get_displaced_stepping_state): Take an inferior pointer instead
3045 of a pid. All callers adjusted.
3046 (displaced_step_in_progress_any_inferior): Adjust.
3047 (displaced_step_in_progress_thread): Take a thread pointer instead
3048 of a ptid_t. All callers adjusted.
3049 (displaced_step_in_progress, add_displaced_stepping_state): Take
3050 an inferior pointer instead of a pid. All callers adjusted.
3051 (get_displaced_step_closure_by_addr): Adjust.
3052 (remove_displaced_stepping_state): Take an inferior pointer
3053 instead of a pid. All callers adjusted.
3054 (displaced_step_prepare_throw, displaced_step_prepare)
3055 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3056 All callers adjusted.
3057 (start_step_over): Adjust.
3058 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3059 displaced step queue.
3060 (do_target_resume): Adjust.
3061 (fetch_inferior_event): Use inferior_thread.
3062 (context_switch, get_inferior_stop_soon): Take an
3063 execution_control_state pointer instead of a ptid_t. All callers
3065 (switch_to_thread_cleanup): Delete.
3066 (stop_all_threads): Use scoped_restore_current_thread.
3067 * inline-frame.c: Include "gdbthread.h".
3068 (inline_state) <inline_state>: Take a thread pointer instead of a
3069 ptid_t. All callers adjusted.
3070 <ptid>: Delete, replaced by ...
3071 <thread>: ... this new field.
3072 (find_inline_frame_state): Take a thread pointer instead of a
3073 ptid_t. All callers adjusted.
3074 (skip_inline_frames, step_into_inline_frame)
3075 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3076 pointer instead of a ptid_t. All callers adjusted.
3077 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3078 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3079 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3081 * linux-nat.c (get_detach_signal): Likewise.
3082 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3083 (thread_db_notice_clone): Adjust.
3084 (thread_db_find_new_threads_silently)
3085 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3086 a thread pointer instead of a ptid_t. All callers adjusted.
3087 * mi/mi-cmd-var.c: Include "inferior.h".
3088 (mi_cmd_var_update_iter): Update to use thread pointers.
3089 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3091 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3093 (mi_output_running): ... this new function.
3094 (mi_on_resume_1): Adjust to use it.
3095 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3096 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3098 (interrupt_thread_callback): : Adjust to use thread and inferior
3100 * proc-service.c: Include "gdbthread.h".
3101 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3102 * progspace-and-thread.c: Include "inferior.h".
3103 * progspace.c: Include "inferior.h".
3104 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3105 hold a reference to an inferior_object.
3106 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3108 * python/py-inferior.c (struct inferior_object): Give the type a
3109 tag name instead of a typedef.
3110 (python_on_normal_stop): No need to check if the current thread is
3112 (inferior_to_inferior_object): Change return type to
3113 inferior_object. All callers adjusted.
3114 (find_thread_object): Delete, bits factored out to ...
3115 (thread_to_thread_object): ... this new function.
3116 * python/py-infthread.c (create_thread_object): Use
3117 inferior_to_inferior_object.
3118 (thpy_is_stopped): Use thread pointer directly.
3119 (gdbpy_selected_thread): Use inferior_thread.
3120 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3121 field, replaced with ...
3122 <thread>: ... this new field. All users adjusted.
3123 (btpy_insn_or_gap_new): Drop const.
3124 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3126 * python/py-record.c: Include "gdbthread.h".
3127 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3128 a ptid_t. All callers adjusted.
3129 (gdbpy_current_recording): Use inferior_thread.
3130 * python/py-record.h (recpy_record_object) <ptid>: Delete
3131 field, replaced with ...
3132 <thread>: ... this new field. All users adjusted.
3133 (recpy_element_object) <ptid>: Delete
3134 field, replaced with ...
3135 <thread>: ... this new field. All users adjusted.
3136 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3137 a ptid_t. All callers adjusted.
3138 * python/py-threadevent.c: Include "gdbthread.h".
3139 (get_event_thread): Use thread_to_thread_object.
3140 * python/python-internal.h (struct inferior_object): Forward
3142 (find_thread_object, find_inferior_object): Delete declarations.
3143 (thread_to_thread_object, inferior_to_inferior_object): New
3145 * record-btrace.c: Include "inferior.h".
3146 (require_btrace_thread): Use inferior_thread.
3147 (record_btrace_frame_sniffer)
3148 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3149 (get_thread_current_frame): Use scoped_restore_current_thread and
3151 (get_thread_current_frame): Use thread pointer directly.
3152 (record_btrace_replay_at_breakpoint): Use thread's inferior
3154 * record-full.c: Include "inferior.h".
3155 * regcache.c: Include "gdbthread.h".
3156 (get_thread_arch_regcache): Use the inferior's address space
3158 (get_thread_regcache, registers_changed_thread): New.
3159 * regcache.h (get_thread_regcache(thread_info *thread)): New
3161 (registers_changed_thread): New.
3162 (remote_target) <remote_detach_1>: Swap order of parameters.
3163 (remote_add_thread): <remote_add_thread>: Return the new thread.
3164 (get_remote_thread_info(ptid_t)): New overload.
3165 (remote_target::remote_notice_new_inferior): Use thread pointers
3167 (remote_target::process_initial_stop_replies): Use
3168 thread_info::set_running.
3169 (remote_target::remote_detach_1, remote_target::detach)
3170 (extended_remote_target::detach): Adjust.
3171 * stack.c (frame_show_address): Use inferior_thread.
3172 * target-debug.h (target_debug_print_thread_info_pp): New.
3173 * target-delegates.c: Regenerate.
3174 * target.c (default_thread_address_space): Delete.
3175 (memory_xfer_partial_1): Use current_inferior.
3176 (target_detach): Use current_inferior.
3177 (target_thread_address_space): Delete.
3178 (generic_mourn_inferior): Use current_inferior.
3179 * target.h (struct target_ops) <thread_address_space>: Delete.
3180 (target_thread_address_space): Delete.
3181 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3183 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3184 thread pointer instead of a ptid_t. Adjust all callers.
3185 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3186 (first_thread_of_process): Delete, replaced by ...
3187 (first_thread_of_inferior): ... this new function. All callers
3189 (any_thread_of_process): Rename to ...
3190 (any_thread_of_inferior): ... this, and take an inferior pointer.
3191 (any_live_thread_of_process): Rename to ...
3192 (any_live_thread_of_inferior): ... this, and take an inferior
3194 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3195 (value_in_thread_stack_temporaries)
3196 (get_last_thread_stack_temporary): Take a thread pointer instead
3197 of a ptid_t. Adjust all callers.
3198 (thread_info::set_running): New.
3199 (validate_registers_access): Use inferior_thread.
3200 (can_access_registers_ptid): Rename to ...
3201 (can_access_registers_thread): ... this, and take a thread
3203 (print_thread_info_1): Adjust to compare thread pointers instead
3205 (switch_to_no_thread, switch_to_thread): Make extern.
3206 (scoped_restore_current_thread::~scoped_restore_current_thread):
3207 Use m_thread pointer directly.
3208 (scoped_restore_current_thread::scoped_restore_current_thread):
3209 Use inferior_thread.
3210 (thread_command): Use thread pointer directly.
3211 (thread_num_make_value_helper): Use inferior_thread.
3212 * top.c (execute_command): Use inferior_thread.
3213 * tui/tui-interp.c: Include "inferior.h".
3214 * varobj.c (varobj_create): Use inferior_thread.
3215 (value_of_root_1): Use find_thread_global_id instead of
3216 global_thread_id_to_ptid.
3218 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3220 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3222 (regcache::write_part): Likewise.
3223 (readable_regcache::cooked_read_part): Update comment.
3224 (readable_regcache::cooked_write_part): Likewise.
3225 * regcache.h: (readable_regcache::read_part): Likewise.
3226 (regcache::write_part): Likewise.
3228 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3229 Dirk Schubert <dirk.schubert@arm.com>
3231 * aarch64-linux-nat.c (post_attach): New.
3232 (aarch64_linux_nat_target::post_attach): Override post_attach to
3233 record the number of hardware debug registers.
3235 2018-06-20 Tom Tromey <tom@tromey.com>
3237 * python/py-param.c (add_setshow_generic): Make parameters const.
3238 (parmpy_init): Update.
3240 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3242 * regcache.h (regcache_cooked_read_ftype): Rename to...
3243 (register_read_ftype): ...this, change type to function_view.
3244 (class reg_buffer) <save>: Remove src parameter.
3245 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3246 parameter non-const in first overload. Remove src parameter in
3248 * regcache.c (do_cooked_read): Remove.
3249 (readonly_detached_regcache::readonly_detached_regcache): Make
3250 parameter non-const, adjust call to other constructor.
3251 (reg_buffer::save): Remove src parameter.
3252 * frame.c (do_frame_register_read): Remove.
3253 (frame_save_as_regcache): Use lambda function.
3254 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3255 parameter to ppu2spu_data *.
3256 (ppu2spu_sniffer): Use lambda function.
3258 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3260 * record-full.c (record_full_target::insert_breakpoint): Remove
3261 "struct" keyword, add const.
3263 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3265 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3266 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3267 * configure.ac: Remove AC_PREREQ, add missing quoting.
3268 * gnulib/configure.ac: Modernize usage of
3269 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3270 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3271 (AUTOMAKE_VERSION): Bump to 1.15.1.
3272 * configure: Re-generate.
3273 * config.in: Re-generate.
3274 * aclocal.m4: Re-generate.
3275 * gnulib/aclocal.m4: Re-generate.
3276 * gnulib/config.in: Re-generate.
3277 * gnulib/configure: Re-generate.
3278 * gnulib/import/Makefile.in: Re-generate.
3280 2018-06-19 Pedro Alves <palves@redhat.com>
3282 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3283 (lookup_minimal_symbol_by_pc_section): ... here with
3284 gdb_assert_not_reached added.
3286 2018-06-19 Pedro Alves <palves@redhat.com>
3288 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3289 parameter with a block parameter. Compare location's block symbol
3290 with the frame's block instead of addresses.
3291 (skip_inline_frames): Pass the current block instead of the
3292 frame's address. Break out as soon as we determine the frame
3293 should not be skipped.
3295 2018-06-18 Tom Tromey <tom@tromey.com>
3297 * solib-aix.c (solib_aix_get_section_offsets): Return
3299 (solib_aix_solib_create_inferior_hook): Update.
3301 2018-06-18 Tom Tromey <tom@tromey.com>
3303 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3305 2018-06-18 Tom Tromey <tom@tromey.com>
3307 * solib-frv.c (frv_relocate_main_executable): Use
3309 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3312 2018-06-18 Tom Tromey <tom@tromey.com>
3314 * objfiles.h (inhibit_section_map_updates): Update.
3315 (resume_section_map_updates, resume_section_map_updates_cleanup):
3317 * solib-svr4.c (svr4_handle_solib_event): Update.
3318 * objfiles.c (inhibit_section_map_updates): Return
3319 scoped_restore_tmpl<int>.
3320 (resume_section_map_updates, resume_section_map_updates_cleanup):
3323 2018-06-18 Tom Tromey <tom@tromey.com>
3325 * valprint.h (read_string): Update.
3326 * valprint.c (read_string): Change type of "buffer".
3327 (val_print_string): Update.
3328 * python/py-value.c (valpy_string): Update.
3329 * language.h (struct language_defn) <la_get_string>: Change
3331 (default_get_string, c_get_string): Update.
3332 * language.c (default_get_string): Change type of "buffer".
3333 * guile/scm-value.c (gdbscm_value_to_string): Update.
3334 * c-lang.c (c_get_string): Change type of "buffer".
3336 2018-06-18 Tom Tromey <tom@tromey.com>
3338 * ser-mingw.c (struct pipe_state_destroyer): New.
3339 (pipe_state_up): New typedef.
3340 (cleanup_pipe_state): Remove.
3341 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3343 2018-06-18 Tom Tromey <tom@tromey.com>
3345 * rust-lang.h (rust_yyerror): Don't declare.
3346 * rust-lang.c (rust_language_defn): Update.
3347 * rust-exp.y (yyerror): Now static.
3348 * parse.c (parse_exp_in_context_1): Update.
3349 * p-lang.h (p_yyerror): Don't declare.
3350 * p-lang.c (p_language_defn): Update.
3351 * p-exp.y (yyerror): Now static.
3352 * opencl-lang.c (opencl_language_defn): Update.
3353 * objc-lang.c (objc_language_defn): Update.
3354 * m2-lang.h (m2_yyerror): Don't declare.
3355 * m2-lang.c (m2_language_defn): Update.
3356 * m2-exp.y (yyerror): Now static.
3357 * language.h (struct language_defn) <la_error>: Remove.
3358 * language.c (unk_lang_error): Remove.
3359 (unknown_language_defn, auto_language_defn): Remove.
3360 * go-lang.h (go_yyerror): Don't declare.
3361 * go-lang.c (go_language_defn): Update.
3362 * go-exp.y (yyerror): Now static.
3363 * f-lang.h (f_yyerror): Don't declare.
3364 * f-lang.c (f_language_defn): Update.
3365 * f-exp.y (yyerror): Now static.
3366 * d-lang.h (d_yyerror): Don't declare.
3367 * d-lang.c (d_language_defn): Update.
3368 * d-exp.y (yyerror): Now static.
3369 * c-lang.h (c_yyerror): Don't declare.
3370 * c-lang.c (c_language_defn, cplus_language_defn)
3371 (asm_language_defn, minimal_language_defn): Update.
3372 * c-exp.y (yyerror): Now static.
3373 * ada-lang.h (ada_yyerror): Don't declare.
3374 * ada-lang.c (ada_language_defn): Update.
3375 * ada-exp.y (yyerror): Now static.
3377 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3379 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3380 (store_sveregs_to_thread): Likewise.
3381 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3382 (aarch64_linux_store_inferior_registers): Likewise.
3383 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3385 (aarch64_sve_regs_copy_to_regcache): Likewise.
3386 (aarch64_sve_regs_copy_from_regcache): Likewise.
3387 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3389 (aarch64_sve_regs_copy_to_regcache): Likewise.
3390 (aarch64_sve_regs_copy_from_regcache): Likewise.
3391 (sve_context): Structure from Linux headers.
3392 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3393 (SVE_SIG_ZREG_SIZE): Likewise.
3394 (SVE_SIG_PREG_SIZE): Likewise.
3395 (SVE_SIG_FFR_SIZE): Likewise.
3396 (SVE_SIG_REGS_OFFSET): Likewise.
3397 (SVE_SIG_ZREGS_OFFSET): Likewise.
3398 (SVE_SIG_ZREG_OFFSET): Likewise.
3399 (SVE_SIG_ZREGS_SIZE): Likewise.
3400 (SVE_SIG_PREGS_OFFSET): Likewise.
3401 (SVE_SIG_PREG_OFFSET): Likewise.
3402 (SVE_SIG_PREGS_SIZE): Likewise.
3403 (SVE_SIG_FFR_OFFSET): Likewise.
3404 (SVE_SIG_REGS_SIZE): Likewise.
3405 (SVE_SIG_CONTEXT_SIZE): Likewise.
3406 (SVE_PT_REGS_MASK): Likewise.
3407 (SVE_PT_REGS_FPSIMD): Likewise.
3408 (SVE_PT_REGS_SVE): Likewise.
3409 (SVE_PT_VL_INHERIT): Likewise.
3410 (SVE_PT_VL_ONEXEC): Likewise.
3411 (SVE_PT_REGS_OFFSET): Likewise.
3412 (SVE_PT_FPSIMD_OFFSET): Likewise.
3413 (SVE_PT_FPSIMD_SIZE): Likewise.
3414 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3415 (SVE_PT_SVE_PREG_SIZE): Likewise.
3416 (SVE_PT_SVE_FFR_SIZE): Likewise.
3417 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3418 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3419 (__SVE_SIG_TO_PT): Likewise.
3420 (SVE_PT_SVE_OFFSET): Likewise.
3421 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3422 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3423 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3424 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3425 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3426 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3427 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3428 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3429 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3430 (SVE_PT_SVE_SIZE): Likewise.
3431 (SVE_PT_SIZE): Likewise.
3432 (HAS_SVE_STATE): New define.
3434 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3436 * nat/aarch64-sve-linux-sigcontext.h: New file.
3437 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3439 (SVE_VQ_MIN): Likewise.
3440 (SVE_VQ_MAX): Likewise.
3441 (SVE_VL_MIN): Likewise.
3442 (SVE_VL_MAX): Likewise.
3443 (SVE_NUM_ZREGS): Likewise.
3444 (SVE_NUM_PREGS): Likewise.
3445 (sve_vl_valid): Likewise.
3446 (struct user_sve_header): Likewise.
3448 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3449 Richard Bunt <Richard.Bunt@arm.com>
3451 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3452 was requested by GDB.
3454 2018-06-15 Tom de Vries <tdevries@suse.de>
3456 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3458 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3460 * gnulib/update-gnulib.sh: Print expected versions of
3463 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3465 * arch-utils.c (default_type_align): Use type_length_units.
3466 * gdbtypes.c (type_align): Use type_length_units.
3468 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3470 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3471 of 'define' command.
3473 2018-06-14 Tom de Vries <tdevries@suse.de>
3476 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3477 get_no_prettyformat_print_options.
3479 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3481 * sparc-nat.h: Include target.h.
3482 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3483 <fetch_registers>: Remove this argument in function call.
3484 <store_registers>: Remove this argument in function call, remove
3486 <low_forget_process>: Call sparc64_forget_process instead of
3487 sparc_forget_process.
3489 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3491 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3492 (procfs_target::make_corefile_notes): Adjust to new
3493 target_read_alloc return type.
3495 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3496 Stephen Roberts <stephen.roberts@arm.com>
3499 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3500 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3501 Move should_notify_stop local into more inner scope.
3503 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3504 Stephen Roberts <stephen.roberts@arm.com>
3507 * infrun.c (resume_1): Add call to mark_async_event_handler.
3509 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3511 * infrun.c (do_target_wait): Change old version of $pc printed.
3513 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3515 * dwarf2read.c (read_index_from_section): Rename to...
3516 (read_gdb_index_from_section): ... this, update all callers.
3517 (dwarf2_read_index): Rename to...
3518 (dwarf2_read_gdb_index): ... this, update all callers.
3520 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3522 * gdb/hppa-linux-nat.c
3523 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3524 hppa_linux_nat_target::fetch_registers.
3526 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3528 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3529 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3530 (AARCH64_DWARF_SVE_FFR): Likewise.
3531 (AARCH64_DWARF_SVE_P0): Likewise.
3532 (AARCH64_DWARF_SVE_Z0): Likewise.
3534 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3536 * common/common-regcache.h (raw_compare): New function.
3537 * regcache.c (regcache::raw_compare): Likewise.
3538 * regcache.h (regcache::raw_compare): New declaration.
3540 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3542 * common/common-regcache.h (reg_buffer_common): New structure.
3543 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3544 (reg_buffer::raw_supply): Likewise.
3545 (reg_buffer::raw_supply_integer): Likewise.
3546 (reg_buffer::raw_supply_zeroed): Likewise.
3547 (reg_buffer::raw_collect): Likewise.
3548 (reg_buffer::raw_collect_integer): Likewise.
3549 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3550 (reg_buffer::raw_supply): Likewise.
3551 (reg_buffer::raw_supply_integer): Likewise.
3552 (reg_buffer::raw_supply_zeroed): Likewise.
3553 (reg_buffer::raw_collect): Likewise.
3554 (reg_buffer::raw_collect_integer): Likewise.
3556 2018-06-10 Tom Tromey <tom@tromey.com>
3558 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3559 (class remote_state) <stop_reply_queue>: Now std::vector.
3560 (remote_state::~remote_state)
3561 (remote_target::stop_reply_queue_length): Update.
3562 (struct queue_iter_param, remove_child_of_pending_fork)
3563 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3564 (check_pending_event_prevents_wildcard_vcont_callback)
3565 (remove_stop_reply_for_inferior)
3566 (remove_stop_reply_of_remote_state)
3567 (remote_notif_remove_once_on_match)
3568 (stop_reply_match_ptid_and_ws)
3569 (remote_kill_child_of_pending_fork): Remove.
3570 (remote_target::remove_new_fork_children)
3571 (remote_target::check_pending_events_prevent_wildcard_vcont)
3572 (remote_target::discard_pending_stop_replies)
3573 (remote_target::discard_pending_stop_replies_in_queue)
3574 (remote_target::remote_notif_remove_queued_reply)
3575 (remote_target::queued_stop_reply)
3576 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3577 (remote_target::wait, remote_target::kill_new_fork_children)
3578 (remote_target::async): Update.
3580 2018-06-10 Tom Tromey <tom@tromey.com>
3582 * record-full.c (record_full_arch_list_cleanups): Remove.
3583 (record_full_message): Use try/catch.
3584 (record_full_wait_cleanups): Remove.
3585 (record_full_wait_1): Use try/catch.
3586 (record_full_restore): Likewise.
3588 2018-06-10 Tom Tromey <tom@tromey.com>
3590 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3591 declare VEC. Add constructor.
3592 <in_target_beneath>: Now bool.
3593 (record_full_breakpoints): Now a std::vector, static.
3594 (record_full_sync_record_breakpoints)
3595 (record_full_init_record_breakpoints)
3596 (record_full_target::insert_breakpoint)
3597 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3599 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3601 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3602 * serial.c (serial_interface_lookup): Remove struct keyword.
3604 2018-06-10 Tom Tromey <tom@tromey.com>
3606 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3608 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3610 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3612 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3613 "beneath" as a method.
3614 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3615 Use "beneath" as a method.
3617 2018-06-10 Tom Tromey <tom@tromey.com>
3619 * tracefile.c (struct trace_file_writer_deleter): New.
3620 <operator()>: Rename from trace_file_writer_xfree.
3621 (trace_file_writer_up): New typedef.
3622 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3624 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3626 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3627 <m_registers, m_register_status>: Change type to
3629 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3632 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3634 * common/common-regcache.h (enum register_status): Add
3635 underlying type "signed char".
3636 * regcache.h (reg_buffer) <m_register_status>: Change type to
3638 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3639 register_status instead of signed char.
3640 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3641 (reg_buffer::get_register_status): Remove cast.
3642 (readable_regcache::raw_read): Remove cast.
3643 (readable_regcache::cooked_read): Remove cast.
3645 2018-06-09 Tom Tromey <tom@tromey.com>
3647 * source.c (reverse_search_command, forward_search_command): Use
3650 2018-06-09 Tom Tromey <tom@tromey.com>
3652 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3653 (serial_ops_list): Now static, std::vector.
3654 (serial_interface_lookup, serial_add_interface): Update.
3656 2018-06-09 Tom Tromey <tom@tromey.com>
3658 * dwarf2read.c (process_cu_includes): Update.
3659 (process_full_comp_unit): Update.
3660 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3663 2018-06-08 Paul Koning <paul_koning@dell.com>
3667 * python/python.c (do_start_initialization):
3668 Avoid call to internal Python API.
3669 (init__gdb_module): New function.
3671 2018-06-08 Gary Benson <gbenson@redhat.com>
3673 * linux-thread-db.c (valprint.h): New include.
3674 (struct check_thread_db_info): New structure.
3675 (check_thread_db_on_load, tdb_testinfo): New static globals.
3676 (check_thread_db, check_thread_db_callback): New functions.
3677 (try_thread_db_load_1): Run integrity checks if requested.
3678 (maintenance_check_libthread_db): New function.
3679 (_initialize_thread_db): Register "maint check libthread-db"
3680 and "maint set/show check-libthread-db".
3681 * NEWS: Mention the above new commands.
3683 2018-06-08 Tom Tromey <tom@tromey.com>
3685 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3688 2018-06-08 Tom Tromey <tom@tromey.com>
3690 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3692 2018-06-08 Tom Tromey <tom@tromey.com>
3694 * common/btrace-common.h (struct btrace_data): Add constructor,
3695 destructor, move assignment operator.
3696 <empty, clear, fini>: New methods.
3697 <format>: Initialize.
3698 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3699 (btrace_data_empty): Don't declare.
3700 * common/btrace-common.c (btrace_data_init): Remove.
3701 (btrace_data::fini): Rename from btrace_data_fini.
3702 (btrace_data::empty): Rename from btrace_data_empty.
3703 (btrace_data::clear): Rename from btrace_data_clear. Return
3705 * btrace.h (make_cleanup_btrace_data): Don't declare.
3706 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3707 (parse_xml_btrace): Update.
3708 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3709 (maint_btrace_clear_packet_history_cmd): Update.
3711 2018-06-07 Pedro Alves <palves@redhat.com>
3713 * target.h (target_ops) <beneath>: Now a method. All references
3715 (class target_stack): New.
3716 * target.c (g_target_stack): New.
3717 (g_current_top_target): Delete.
3718 (current_top_target): Get the top target out of g_target_stack.
3719 (target_stack::push, target_stack::unpush): New.
3720 (push_target, unpush_target): Reimplement.
3721 (target_is_pushed): Reimplement in terms of g_target_stack.
3722 (target_ops::beneath, target_stack::find_beneath): New.
3724 2018-06-07 Pedro Alves <palves@redhat.com>
3726 * target.h (find_target_beneath): Delete declaration.
3727 * target.c (find_target_beneath): Delete definition.
3728 * aix-thread.c: All callers of find_target_beneath adjusted to
3729 call target_ops::beneath instead.
3730 * bsd-uthread.c: Likewise.
3731 * linux-thread-db.c: Likewise.
3732 * ravenscar-thread.c: Likewise.
3733 * sol-thread.c: Likewise.
3734 * spu-multiarch.c: Likewise.
3736 2018-06-07 Pedro Alves <palves@redhat.com>
3738 * target.h (target_ops) <beneath>: Now a method. All references
3740 (target_ops) <m_beneath>: New.
3741 * target.c (target_ops::beneath): New.
3742 * corelow.c: Adjust all references to target_ops::beneath.
3743 * linux-thread-db.c: Likewise.
3744 * make-target-delegates: Likewise.
3745 * record-btrace.c: Likewise.
3746 * record-full.c: Likewise.
3747 * remote.c: Likewise.
3748 * target.c: Likewise.
3749 * target-delegates.c: Regenerate.
3751 2018-06-07 Pedro Alves <palves@redhat.com>
3753 * target.h (target_stack): Delete.
3754 (current_top_target): Declare function.
3755 * target.c (target_stack): Delete.
3756 (g_current_top_target): New.
3757 (current_top_target): New function.
3758 * auxv.c: Use current_top_target instead of target_stack
3760 * avr-tdep.c: Likewise.
3761 * breakpoint.c: Likewise.
3762 * corefile.c: Likewise.
3763 * elfread.c: Likewise.
3765 * exceptions.c: Likewise.
3766 * frame.c: Likewise.
3767 * gdbarch-selftests.c: Likewise.
3768 * gnu-v3-abi.c: Likewise.
3769 * ia64-tdep.c: Likewise.
3770 * ia64-vms-tdep.c: Likewise.
3771 * infcall.c: Likewise.
3772 * infcmd.c: Likewise.
3773 * infrun.c: Likewise.
3774 * linespec.c: Likewise.
3775 * linux-tdep.c: Likewise.
3776 * minsyms.c: Likewise.
3777 * ppc-linux-nat.c: Likewise.
3778 * ppc-linux-tdep.c: Likewise.
3779 * procfs.c: Likewise.
3780 * regcache.c: Likewise.
3781 * remote.c: Likewise.
3782 * rs6000-tdep.c: Likewise.
3783 * s390-linux-nat.c: Likewise.
3784 * s390-tdep.c: Likewise.
3785 * solib-aix.c: Likewise.
3786 * solib-darwin.c: Likewise.
3787 * solib-dsbt.c: Likewise.
3788 * solib-spu.c: Likewise.
3789 * solib-svr4.c: Likewise.
3790 * solib-target.c: Likewise.
3791 * sparc-tdep.c: Likewise.
3792 * sparc64-tdep.c: Likewise.
3793 * spu-tdep.c: Likewise.
3794 * symfile.c: Likewise.
3795 * symtab.c: Likewise.
3796 * target-descriptions.c: Likewise.
3797 * target-memory.c: Likewise.
3798 * target.c: Likewise.
3799 * target.h: Likewise.
3800 * tracefile-tfile.c: Likewise.
3801 * tracepoint.c: Likewise.
3802 * valops.c: Likewise.
3803 * valprint.c: Likewise.
3804 * value.c: Likewise.
3805 * windows-tdep.c: Likewise.
3806 * mi/mi-main.c: Likewise.
3808 2018-06-07 Tom Tromey <tom@tromey.com>
3810 * valprint.h (build_address_symbolic): Declare.
3811 * printcmd.c (print_address_symbolic): Update.
3812 (build_address_symbolic): Change "name" and "filename" to
3814 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3816 * defs.h (build_address_symbolic): Remove declaration.
3818 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3820 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3821 (aarch64_vnv_type): Add function.
3822 (aarch64_pseudo_register_name): Add V regs for SVE.
3823 (aarch64_pseudo_register_type): Likewise.
3824 (aarch64_pseudo_register_reggroup_p): Likewise.
3825 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3826 (aarch64_pseudo_read_value): Add V regs for SVE.
3827 (aarch64_pseudo_write_2): Use V0 offset for SVE
3828 (aarch64_pseudo_write): Add V regs for SVE.
3829 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3831 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3833 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3834 (sve_vl_from_vq): Likewise.
3836 2018-06-05 Tom Tromey <tom@tromey.com>
3838 * cli/cli-cmds.c (show_version): Update.
3839 * top.c (print_gdb_version): Add "interactive" parameter.
3841 * main.c (captured_main_1): Update.
3842 * top.h (print_gdb_version): Add "interactive" parameter and a
3845 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3847 * common/enum-flags.h: Add trailing semicolon to example in
3850 2018-06-05 Tom Tromey <tom@tromey.com>
3853 * NEWS: Add entry about pager.
3854 * utils.c (pagination_disabled_for_command): New global.
3855 (prompt_for_continue): Allow "c" response to prompt.
3856 (reinitialize_more_filter): Clear
3857 pagination_disabled_for_command.
3858 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3860 2018-06-04 Tom Tromey <tom@tromey.com>
3862 * ada-lang.h (ada_lookup_symbol_list): Update.
3863 * ada-lang.c (resolve_subexp): Update.
3864 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3866 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3867 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3868 results parameter to std::vector.
3869 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3871 * ada-exp.y (block_lookup): Update.
3872 (select_possible_type_sym): Change type of syms. Remove nsyms
3874 (write_var_or_type, write_name_assoc): Update.
3876 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3878 * windows-nat.c (windows_nat_target::xfer_partial): Return
3879 TARGET_XFER_E_IO if we need to delegate to the target beneath
3880 but BENEATH is NULL.
3882 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3884 * Makefile.in (config.status): Add configure.nat as a
3887 2018-06-04 Tom Tromey <tom@tromey.com>
3889 * cp-name-parser.y (cpname_state): Add method declarations.
3890 (HANDLE_QUAL): Update.
3891 (cpname_state::d_grab, cpname_state::fill_comp)
3892 (cpname_state::make_operator, cpname_state::make_dtor)
3893 (cpname_state::make_builtin_type, cpname_state::make_name)
3894 (cpname_state::d_qualify, cpname_state::d_int_type)
3895 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3896 (%union): Move earlier.
3898 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3900 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3902 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3904 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3905 (aarch64_pseudo_write_1): Likewise.
3906 (aarch64_pseudo_read_value): Use helper.
3907 (aarch64_pseudo_write): Likewise.
3909 2018-06-04 Pedro Alves <palves@redhat.com>
3911 * darwin-nat.c (darwin_ops): Delete.
3912 (darwin_attach_pid): Use get_native_target.
3914 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3916 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3917 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3919 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3921 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3922 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3923 (aarch64_gdbarch_init): Check for SVE.
3924 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3926 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3928 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3929 * aarch64-tdep.h (aarch64_read_description): Likewise.
3930 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3931 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3932 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3933 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3934 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3936 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3938 * value.c (value_fetch_lazy_bitfield): New.
3939 (value_fetch_lazy_memory): New.
3940 (value_fetch_lazy_register): New.
3941 (value_fetch_lazy): Factor out to smaller functions.
3943 2018-06-01 Tom Tromey <tom@tromey.com>
3945 * cp-name-parser.y (backslashable, represented): Now const.
3947 2018-06-01 Tom Tromey <tom@tromey.com>
3949 * cp-name-parser.y: Include parser-defs.h.
3950 (parser_fprintf): Remove declaration.
3952 2018-06-01 Tom Tromey <tom@tromey.com>
3954 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3956 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3957 (global_result): Remove globals.
3958 (struct cpname_state): New.
3959 (yyparse): Don't declare.
3960 (yylex, yyerror): Move declarations after %union.
3961 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3962 (make_name): Add state parameter.
3964 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3966 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3968 (yylex): Add lvalp, state parameters.
3969 (yyerror): Add state parameter.
3970 (cp_demangled_name_to_comp): Update.
3972 2018-06-01 Tom Tromey <tom@tromey.com>
3974 * cp-name-parser.y (parser_fprintf): Declare.
3975 (GDB_YY_REMAP_PREFIX): Define.
3976 Include yy-remap.h. Don't redefine yy* identifiers.
3978 2018-06-01 Tom Tromey <tom@tromey.com>
3980 * python/py-type.c (typy_legacy_template_argument): Update.
3981 * cp-support.h (cp_demangled_name_to_comp): Update.
3982 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3983 parameter to be a "std::string *".
3986 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3988 * ada-lex.l: Include "diagnostics.h" instead of
3989 "common/diagnostics.h".
3990 * unittests/environ-selftests.c: Likewise.
3991 * common/diagnostics.h: Moved to ../include.
3993 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3995 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3996 to language_mode_manual while calling breakpoint_re_set_one.
3998 2018-06-01 Tom Tromey <tom@tromey.com>
4000 * valops.c (value_cast_structs, destructor_name_p): Update.
4001 * symtab.c (gdb_mangle_name): Update.
4002 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4004 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4005 (pascal_object_print_value_fields, pascal_object_print_value):
4007 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4008 * linespec.c (find_methods): Update.
4009 * gdbtypes.h (type_name_no_tag): Remove.
4010 (type_name_or_error): Rename from type_name_no_tag_or_error.
4011 * gdbtypes.c (type_name_no_tag): Remove.
4012 (type_name_or_error): Rename from type_name_no_tag_or_error.
4013 (lookup_struct_elt_type, check_typedef): Update.
4014 * expprint.c (print_subexp_standard): Update.
4015 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4016 * d-namespace.c (d_lookup_nested_symbol): Update.
4017 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4018 (cp_print_class_member): Update.
4019 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4020 * completer.c (add_struct_fields): Update.
4021 * c-typeprint.c (cp_type_print_derivation_info)
4022 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4024 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4025 (ada_prefer_type, ada_is_exception_sym): Update.
4027 2018-06-01 Tom Tromey <tom@tromey.com>
4029 * valops.c (enum_constant_from_type, value_namespace_elt)
4030 (value_maybe_namespace_elt): Update.
4031 * valarith.c (find_size_for_pointer_math): Update.
4032 * target-descriptions.c (make_gdb_type): Update.
4033 * symmisc.c (print_symbol): Update.
4034 * stabsread.c (define_symbol, read_type)
4035 (complain_about_struct_wipeout, add_undefined_type)
4036 (cleanup_undefined_types_1): Update.
4037 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4038 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4039 (rust_internal_print_type, rust_composite_type)
4040 (rust_evaluate_funcall, rust_evaluate_subexp)
4041 (rust_inclusive_range_type_p): Update.
4042 * python/py-type.c (typy_get_tag): Update.
4043 * p-typeprint.c (pascal_type_print_base): Update.
4044 * mdebugread.c (parse_symbol, parse_type): Update.
4045 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4047 * guile/scm-type.c (gdbscm_type_tag): Update.
4048 * go-lang.c (sixg_string_p): Update.
4049 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4051 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4052 (TYPE_TAG_NAME): Remove.
4053 * gdbtypes.c (type_name_no_tag): Simplify.
4054 (check_typedef, check_types_equal, recursive_dump_type)
4055 (copy_type_recursive, arch_composite_type): Update.
4056 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4057 in summary mode when needed.
4058 * eval.c (evaluate_funcall): Update.
4059 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4060 (process_structure_scope, read_enumeration_type)
4061 (read_namespace_type, read_module_type, determine_prefix): Update.
4062 * cp-support.c (inspect_type): Update.
4063 * coffread.c (process_coff_symbol, decode_base_type): Update.
4064 * c-varobj.c (c_is_path_expr_parent): Update.
4065 * c-typeprint.c (c_type_print_base_struct_union): Update.
4066 (c_type_print_base_1): Update. Print struct/class/union/enum in
4067 summary when using C language.
4068 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4069 (gen_maybe_namespace_elt): Update.
4070 * ada-lang.c (ada_type_name): Simplify.
4071 (empty_record, ada_template_to_fixed_record_type_1)
4072 (template_to_static_fixed_type)
4073 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4075 2018-06-01 Tom Tromey <tom@tromey.com>
4077 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4079 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4080 (c_print_type): Update.
4081 (c_print_type): New overload.
4082 (c_type_print_varspec_prefix, c_type_print_args)
4083 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4084 (c_type_print_base_struct_union, c_type_print_base_1)
4085 (cp_type_print_method_args): Add "language" parameter.
4086 (c_type_print_base): Update.
4087 * c-lang.h (c_print_type): Add new overload.
4089 2018-06-01 Tom Tromey <tom@tromey.com>
4091 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4092 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4094 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4096 * aarch64-tdep.c (aarch64_sve_register_names): New const
4098 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4099 (AARCH64_SVE_Z_REGS_NUM): New define.
4100 (AARCH64_SVE_P_REGS_NUM): Likewise.
4101 (AARCH64_SVE_NUM_REGS): Likewise.
4103 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4105 * nat/linux-ptrace.h [__alpha__]
4106 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4109 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4111 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4112 the endianness selected.
4113 * NEWS: Document `set endian auto' mode operation update.
4115 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4117 * Makefile.in: Add new header.
4118 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4119 (sve_vl_from_vg): Likewise.
4120 (sve_vq_from_vl): Likewise.
4121 (sve_vl_from_vq): Likewise.
4122 (sve_vq_from_vg): Likewise.
4123 (sve_vg_from_vq): Likewise.
4124 * configure.nat: Add new c file.
4125 * nat/aarch64-sve-linux-ptrace.c: New file.
4126 * nat/aarch64-sve-linux-ptrace.h: New file.
4128 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4130 * aarch64-linux-nat.c (aarch64_linux_read_description):
4132 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4134 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4135 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4136 (aarch64_gdbarch_init): Add parmeter zero.
4137 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4138 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4139 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4141 * doc/gdb.texinfo: Describe SVE feature
4142 * features/aarch64-sve.c: New file.
4144 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4147 * gdbarch.sh (significant_addr_bit): Default to zero when
4148 not set by target architecture.
4149 * gdbarch.c: Re-generated.
4150 * utils.c (address_significant): Update.
4152 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4154 * stack.c (func_command): Remove trailing newline in call to error.
4156 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4158 * regcache.h (regcache_raw_collect): Remove, update callers to
4159 use regcache::raw_collect.
4160 * regcache.c (regcache_raw_collect): Remove.
4162 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4164 * regcache.h (regcache_raw_supply): Remove, update callers to
4165 use detached_regcache::raw_supply.
4166 * regcache.c (regcache_raw_supply): Remove.
4168 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4170 * regcache.h (regcache_cooked_write_part): Remove, update
4171 callers to use regcache::cooked_write_part.
4172 * regcache.c (regcache_cooked_write_part): Remove.
4174 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4176 * regcache.h (regcache_cooked_read_part): Remove, update callers
4177 to use readable_regcache::cooked_read_part.
4178 * regcache.c (regcache_cooked_read_part): Remove.
4180 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4182 * regcache.h (regcache_cooked_read_value): Remove, update
4183 callers to use readable_regcache::cooked_read_value.
4184 * regcache.c (regcache_cooked_read_value): Remove.
4186 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4188 * regcache.h (regcache_cooked_write): Remove, update callers to
4189 use regcache::cooked_write.
4190 * regcache.c (regcache_cooked_write): Remove.
4192 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4194 * regcache.h (regcache_invalidate): Remove, update callers to
4195 use detached_regcache::invalidate instead.
4196 * regcache.c (regcache_invalidate): Remove.
4198 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4200 * regcache.h (regcache_raw_write_part): Remove, update callers
4201 to use regcache::raw_write_part instead.
4202 * regcache.c (regcache_raw_write_part): Remove.
4204 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4206 * regcache.h (regcache_raw_read_part): Remove, update callers to
4207 use readable_regcache::raw_read_part instead.
4208 * regcache.c (regcache_raw_read_part): Remove.
4210 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4212 * regcache.h (regcache_cooked_read): Remove, update callers to
4213 use readable_regcache::cooked_read instead.
4214 * regcache.c (regcache_cooked_read): Remove.
4216 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4218 * regcache.h (regcache_raw_write): Remove, update callers to use
4219 regcache::raw_write instead.
4220 * regcache.c (regcache_raw_write): Remove.
4222 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4224 * regcache.h (regcache_raw_read): Remove, update callers to use
4225 readable_regcache::raw_read instead.
4226 * regcache.c (regcache_raw_read): Remove.
4228 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4230 * regcache.h (regcache_raw_update): Remove, update callers to
4231 use readable_regcache::raw_update instead.
4232 * regcache.c (regcache_raw_update): Remove.
4234 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4236 * regcache.h (regcache_register_status): Remove, update callers
4237 to use reg_buffer::get_register_status directly instead.
4238 * regcache.c (regcache_register_status): Remove.
4240 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4242 * regcache.h (regcache_get_ptid): Remove, update all callers to
4243 call regcache::ptid instead.
4244 * regcache.c (regcache_get_ptid): Remove.
4246 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4248 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4250 2018-05-30 Pedro Alves <palves@redhat.com>
4252 * common/common-exceptions.h (exception_rethrow): Use
4255 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4257 * breakpoint.c (print_solib_event, check_status_catch_solib):
4258 Remove struct keyword in range-based for loops.
4259 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4260 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4262 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4264 * symfile.c (addr_info_make_relative): Likewise.
4265 * thread.c (value_in_thread_stack_temporaries): Likewise.
4267 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4270 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4271 aggregate type to get its real type before accessing it.
4273 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4275 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4276 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4277 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4278 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4279 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4280 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4281 * printcmd.c (info_address_command): Likewise.
4283 2018-05-29 Tom Tromey <tom@tromey.com>
4285 * windows-nat.c (handle_exception): Update fall-through comment.
4287 2018-05-29 Tom Tromey <tom@tromey.com>
4289 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4290 (struct program_space) <added_solibs>: Now a std::vector.
4291 * breakpoint.c (print_solib_event): Update.
4292 (check_status_catch_solib): Update.
4293 * progspace.c (clear_program_space_solib_cache): Update.
4294 * solib.c (update_solib_list): Update.
4296 2018-05-29 Tom Tromey <tom@tromey.com>
4298 * python/py-type.c (typy_richcompare): Update.
4299 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4300 * gdbtypes.h (types_deeply_equal): Return bool.
4301 (types_equal): Likewise.
4302 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4304 (check_types_equal): Change worklist to std::vector. Return
4306 (struct type_equality_entry): Add constructor.
4307 (compare_maybe_null_strings): Return bool.
4308 (check_types_worklist): Return bool. Change worklist to
4310 (types_deeply_equal): Use std::vector.
4311 (types_equal): Return bool.
4312 (compare_maybe_null_strings): Simplify.
4314 2018-05-29 Tom Tromey <tom@tromey.com>
4316 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4318 2018-05-29 Tom Tromey <tom@tromey.com>
4320 * objc-lang.h: Don't include cp-support.h.
4321 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4324 2018-05-27 Tom Tromey <tom@tromey.com>
4326 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4328 2018-05-25 Tom Tromey <tom@tromey.com>
4330 * value.c (value::location): Initialize.
4332 2018-05-25 Tom Tromey <tom@tromey.com>
4334 * dbxread.c (init_bincl_list): Remove.
4335 (bincl_list): Now a std::vector.
4336 (bincls_allocated, next_bincl): Remove.
4337 (free_bincl_list, do_free_bincl_list_cleanup)
4338 (make_cleanup_free_bincl_list): Remove.
4339 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4341 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4342 (struct header_file_location): Add constructor.
4343 (add_bincl_to_list): Remove.
4345 2018-05-25 Tom Tromey <tom@tromey.com>
4347 * tui/tui.c (tui_enable): Update.
4348 * mi/mi-interp.c (mi_interp::init): Update.
4349 * interps.h (class interp) <name>: New method.
4350 <m_name>: Rename from name.
4351 (~scoped_restore_interp): Update.
4352 * interps.c (interp::interp): Update.
4353 (interp_add, interp_set, interp_lookup_existing)
4354 (current_interp_named_p): Update.
4356 2018-05-25 Tom Tromey <tom@tromey.com>
4358 * interps.c (interp_name): Remove.
4359 * mi/mi-interp.c (mi_interp::init): Update.
4360 * interps.h (interp_name): Remove.
4361 (~scoped_restore_interp): Update.
4362 * tui/tui.c (tui_enable): Update.
4364 2018-05-25 Tom Tromey <tom@tromey.com>
4366 * utils.c (fputs_maybe_filtered): Update.
4367 * linespec.c (decode_line_full): Update.
4368 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4369 (mi_print_breakpoint_for_event, mi_solib_loaded)
4370 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4371 (mi_user_selected_context_changed): Update.
4372 * mi/mi-main.c (mi_execute_command): Update.
4373 * cli/cli-script.c (execute_control_command): Update.
4374 * python/python.c (execute_gdb_command): Update.
4375 * solib.c (info_sharedlibrary_command): Update.
4376 * interps.c (interp_ui_out): Remove.
4377 * interps.h (interp_ui_out): Remove.
4379 2018-05-25 Tom Tromey <tom@tromey.com>
4381 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4382 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4383 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4385 2018-05-25 Tom Tromey <tom@tromey.com>
4387 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4388 * interps.c (interp_exec): Use scoped_restore.
4390 2018-05-25 Tom Tromey <tom@tromey.com>
4392 * remote.c (remote_target::remote_file_get): Use
4394 (remote_target::remote_file_put): Likewise.
4396 2018-05-25 Tom Tromey <tom@tromey.com>
4398 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4400 (get_pe_section_index, add_pe_exported_sym): Update.
4401 (read_pe_exported_syms): Use gdb::def_vector.
4403 2018-05-25 Tom Tromey <tom@tromey.com>
4405 * frame.c (remove_prev_frame): Remove.
4406 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4408 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4410 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4412 * mips-linux-nat.c (supply_fpregset): Always call
4413 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4414 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4415 `mips_fill_fpregset'.
4416 * mips-linux-tdep.c (mips_supply_fpregset)
4417 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4418 (mips_fill_fpregset_wrapper): Remove functions.
4419 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4420 (mips_linux_fpregset): Remove variable.
4421 (mips_linux_iterate_over_regset_sections): Use
4422 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4423 (mips_linux_o32_sigframe_init): Remove comment.
4425 2018-05-25 Pedro Alves <palves@redhat.com>
4427 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4428 (struct readahead_cache, struct packet_reg, struct
4429 remote_arch_state, class remote_state): Move higher up in the
4431 (remote_target::m_remote_state): Now an object instead of a pointer.
4432 (remote_target::get_remote_state): Adjust.
4434 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4436 * stack.c (select_and_print_frame): Delete.
4437 (struct function_bounds): Move struct within function.
4438 (func_command): Most content moved into new function
4439 find_frame_for_function, use new function, print result, add
4441 (find_frame_for_function): New function, now returns a result.
4443 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4445 * stack.c (iterate_over_block_arg_vars): Fix comment.
4446 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4448 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4452 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4454 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4456 * frame.h (class scoped_restore_selected_frame): New class.
4457 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4458 of any exception, use scoped_restore_selected_frame to restore the
4461 2018-05-24 Pedro Alves <palves@redhat.com>
4463 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4466 2018-05-23 Tom Tromey <tom@tromey.com>
4468 * complaints.c (struct complaints): Remove.
4469 (symfile_complaint_book): Remove.
4470 (series): New global.
4471 (complaint_internal): Update.
4472 (clear_complaints): Update.
4474 2018-05-23 Tom Tromey <tom@tromey.com>
4476 * complaints.c (counters): New global.
4477 (struct complain): Remove.
4478 (struct complaints) <root>: Remove.
4479 (complaint_sentinel): Remove.
4480 (symfile_complaint_book): Update.
4481 (find_complaint) Remove.
4482 (complaint_internal, clear_complaints): Update.
4484 2018-05-23 Tom Tromey <tom@tromey.com>
4486 * complaints.c (struct complain) <file, line>: Remove.
4487 (find_complaint): Remove file, line parameters.
4488 (complaint_internal): Update.
4490 2018-05-23 Tom Tromey <tom@tromey.com>
4492 * complaints.c (vcomplaint): Remove.
4493 (complaint_internal) Merge in contents of vcomplaint.
4495 2018-05-23 Tom Tromey <tom@tromey.com>
4497 * complaints.c (struct complaints) <explanation>: Remove.
4498 (symfile_explanations): Remove.
4499 (symfile_complaint_book): Update.
4500 (vcomplaint): Update.
4501 (struct explanation): Remove.
4503 2018-05-23 Tom Tromey <tom@tromey.com>
4505 * complaints.c (symfile_complaints): Remove.
4506 (complaint_internal): Remove "complaints" parameter.
4507 (clear_complaints, vcomplaint): Remove "c" parameter.
4508 (get_complaints): Remove.
4509 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4510 (dwarf2_debug_line_missing_file_complaint)
4511 (dwarf2_debug_line_missing_end_sequence_complaint)
4512 (dwarf2_complex_location_expr_complaint)
4513 (dwarf2_const_value_length_mismatch_complaint)
4514 (dwarf2_section_buffer_overflow_complaint)
4515 (dwarf2_macro_malformed_definition_complaint)
4516 (dwarf2_invalid_attrib_class_complaint)
4517 (create_addrmap_from_index, dw2_symtab_iter_next)
4518 (dw2_expand_marked_cus)
4519 (dw2_debug_names_iterator::find_vec_in_debug_names)
4520 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4521 (create_debug_type_hash_table, init_cutu_and_read_dies)
4522 (partial_die_parent_scope, add_partial_enumeration)
4523 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4524 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4525 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4526 (create_cus_hash_table, create_dwp_hash_table)
4527 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4528 (dwarf2_rnglists_process, dwarf2_ranges_process)
4529 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4530 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4531 (handle_struct_member_die, process_structure_scope)
4532 (read_array_type, read_common_block, read_module_type)
4533 (read_tag_pointer_type, read_typedef, read_base_type)
4534 (read_subrange_type, load_partial_dies, partial_die_info::read)
4535 (partial_die_info::read, partial_die_info::read)
4536 (partial_die_info::read, read_checked_initial_length_and_offset)
4537 (dwarf2_string_attr, read_formatted_entries)
4538 (dwarf_decode_line_header)
4539 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4540 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4541 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4542 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4543 (get_signatured_type, get_DW_AT_signature_type)
4544 (decode_locdesc, file_file_name, consume_improper_spaces)
4545 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4546 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4547 (dwarf2_symbol_mark_computed, set_die_type)
4548 (read_attribute_value): Update.
4549 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4551 * dbxread.c (unknown_symtype_complaint)
4552 (lbrac_mismatch_complaint, repeated_header_complaint)
4553 (set_namestring, function_outside_compilation_unit_complaint)
4554 (read_dbx_symtab, process_one_symbol): Update.
4555 * gdbtypes.c (stub_noname_complaint): Update.
4556 * windows-nat.c (handle_unload_dll): Update.
4557 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4558 (decode_base_type): Update.
4559 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4560 (eb_complaint, record_include_begin, record_include_end)
4561 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4562 (process_xcoff_symbol, read_symbol)
4563 (function_outside_compilation_unit_complaint)
4564 (scan_xcoff_symtab): Update.
4565 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4566 * buildsym.c (finish_block_internal, make_blockvector)
4567 (end_symtab_get_static_block, augment_type_symtab): Update.
4568 * dtrace-probe.c (dtrace_process_dof)
4569 (dtrace_static_probe_ops::get_probes): Update.
4570 * complaints.h (struct complaint): Don't declare.
4571 (symfile_complaints): Remove.
4572 (complaint_internal): Remove "complaints" parameter.
4573 (complaint): Likewise.
4574 (clear_complaints): Likewise.
4575 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4576 (reread_symbols): Update.
4577 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4578 (dwarf2_frame_cache, decode_frame_entry): Update.
4579 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4580 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4581 (info_selectors_command): Update.
4582 * macrotab.c (macro_include, check_for_redefinition)
4583 (macro_undef): Update.
4584 * objfiles.c (filter_overlapping_sections): Update.
4585 * stabsread.c (invalid_cpp_abbrev_complaint)
4586 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4587 (define_symbol, error_type, read_type, rs6000_builtin_type)
4588 (stabs_method_name_from_physname, read_member_functions)
4589 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4590 (attach_fields_to_type, complain_about_struct_wipeout)
4591 (read_range_type, read_args, common_block_start)
4592 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4594 * mdebugread.c (index_complaint, unknown_ext_complaint)
4595 (basic_type_complaint, bad_tag_guess_complaint)
4596 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4597 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4598 (parse_procedure, parse_lines)
4599 (function_outside_compilation_unit_complaint)
4600 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4601 (bad_tag_guess_complaint, reg_value_complaint): Update.
4602 * cp-support.c (demangled_name_complaint): Update.
4603 * macroscope.c (sal_macro_scope): Update.
4604 * dwarf-index-write.c (class debug_names): Update.
4606 2018-05-23 Tom Tromey <tom@tromey.com>
4608 * complaints.c (clear_complaints): Remove "noisy" parameter.
4609 * complaints.h (clear_complaints): Update.
4610 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4611 (reread_symbols): Update.
4613 2018-05-23 Tom Tromey <tom@tromey.com>
4615 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4617 (vcomplaint, clear_complaints): Update.
4618 (symfile_explanations): Remove some messages.
4620 2018-05-23 Tom Tromey <tom@tromey.com>
4622 * complaints.c (internal_complaint): Remove.
4623 * complaints.h (internal_complaint): Remove.
4625 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4627 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4629 2018-05-22 Pedro Alves <palves@redhat.com>
4631 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4632 (remote_fileio_badfd, remote_fileio_return_errno)
4633 (remote_fileio_return_success, remote_fileio_func_open)
4634 (remote_fileio_func_open, remote_fileio_func_close)
4635 (remote_fileio_func_read, remote_fileio_func_write)
4636 (remote_fileio_func_lseek, remote_fileio_func_rename)
4637 (remote_fileio_func_unlink, remote_fileio_func_stat)
4638 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4639 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4640 remote_target parameter.
4641 (remote_fio_func_map) <func>: Add remote_target parameter.
4642 (do_remote_fileio_request, remote_fileio_request):
4643 * remote-fileio.h (remote_fileio_request):
4644 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4645 remote_target parameter.
4646 (remote_notif_process, handle_notification): Adjust to pass down
4648 (remote_notif_state_allocate): Add remote_target parameter. Save
4650 * remote-notif.h (struct remote_target): Forward declare.
4651 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4652 remote_target parameter.
4653 (struct remote_notif_state) <remote>: New field.
4654 (remote_notif_ack, remote_notif_parse): Add remote_target
4656 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4657 remote_target parameter.
4658 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4659 (threads_listing_context, rmt_thread_action, protocol_feature)
4660 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4661 (packet_result, struct threads_listing_context, remote_state):
4662 Move definitions and declarations higher up.
4663 (remote_target) <~remote_target>: Declare.
4664 (remote_download_command_source, remote_file_put, remote_file_get)
4665 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4666 (remote_hostio_pread_vFile, remote_hostio_send_command)
4667 (remote_hostio_set_filesystem, remote_hostio_open)
4668 (remote_hostio_close, remote_hostio_unlink, remote_state)
4669 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4670 (get_memory_write_packet_size, get_memory_read_packet_size)
4671 (append_pending_thread_resumptions, remote_detach_1)
4672 (append_resumption, remote_resume_with_vcont)
4673 (add_current_inferior_and_thread, wait_ns, wait_as)
4674 (process_stop_reply, remote_notice_new_inferior)
4675 (process_initial_stop_replies, remote_add_thread)
4676 (btrace_sync_conf, remote_btrace_maybe_reopen)
4677 (remove_new_fork_children, kill_new_fork_children)
4678 (discard_pending_stop_replies, stop_reply_queue_length)
4679 (check_pending_events_prevent_wildcard_vcont)
4680 (discard_pending_stop_replies_in_queue, stop_reply)
4681 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4682 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4683 (remote_interrupt_as, remote_interrupt_ns)
4684 (remote_get_noisy_reply, remote_query_attached)
4685 (remote_add_inferior, remote_current_thread, get_current_thread)
4686 (set_thread, set_general_thread, set_continue_thread)
4687 (set_general_process, write_ptid)
4688 (remote_unpack_thread_info_response, remote_get_threadinfo)
4689 (parse_threadlist_response, remote_get_threadlist)
4690 (remote_threadlist_iterator, remote_get_threads_with_ql)
4691 (remote_get_threads_with_qxfer)
4692 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4693 (get_offsets, remote_check_symbols, remote_supported_packet)
4694 (remote_query_supported, remote_packet_size)
4695 (remote_serial_quit_handler, remote_detach_pid)
4696 (remote_vcont_probe, remote_resume_with_hc)
4697 (send_interrupt_sequence, interrupt_query)
4698 (remote_notif_get_pending_events, fetch_register_using_p)
4699 (send_g_packet, process_g_packet, fetch_registers_using_g)
4700 (store_register_using_P, store_registers_using_G)
4701 (set_remote_traceframe, check_binary_download)
4702 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4703 (remote_xfer_live_readonly_partial, remote_read_bytes)
4704 (remote_send_printf, remote_flash_write, readchar)
4705 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4706 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4707 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4708 (extended_remote_disable_randomization, extended_remote_run)
4709 (send_environment_packet, extended_remote_environment_support)
4710 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4711 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4712 (packet_command): Now methods of ...
4713 (remote_target): ... this class.
4714 (m_remote_state) <remote_target>: New field.
4715 (struct remote_state) <stop_reply_queue,
4716 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4718 (remote_state::remote_state): Allocate stop_reply_queue.
4719 (remote_state): Delete global.
4720 (get_remote_state_raw): Delete.
4721 (remote_target::get_remote_state): Allocate m_remote_state on
4723 (get_current_remote_target): New.
4724 (remote_ops, extended_remote_ops): Delete.
4725 (wait_forever_enabled_p, remote_async_inferior_event_token):
4726 Delete, moved to struct remote_state.
4727 (remote_target::close): Delete self. Destruction bits split to
4729 (remote_target::~remote_target): ... this.
4730 (show_memory_packet_size): Adjust to use
4731 get_current_remote_target.
4732 (struct protocol_feature) <func>: Add remote_target parameter.
4733 All callers adjusted.
4734 (curr_quit_handler_target): New.
4735 (remote_serial_quit_handler): Reimplement.
4736 (remote_target::open_1): Adjust to use get_current_remote_target.
4737 Heap-allocate remote_target/extended_remote_target instances.
4738 (vcont_builder::vcont_builder): Add remote_target parameter, and
4739 save it in m_remote. All callers adjusted.
4740 (vcont_builder::m_remote): New field.
4741 (vcont_builder::restart, vcont_builder::flush)
4742 (vcont_builder::push_action): Use it.
4743 (remote_target::commit_resume): Use it.
4744 (struct queue_iter_param) <remote>: New field.
4745 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4746 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4747 (check_pending_event_prevents_wildcard_vcont_callback)
4748 (remote_target::check_pending_events_prevent_wildcard_vcont)
4749 (remote_target::discard_pending_stop_replies)
4750 (remote_target::discard_pending_stop_replies_in_queue)
4751 (remote_target::remote_notif_remove_queued_reply): Fill in
4753 (remote_notif_get_pending_events): New.
4754 (remote_target::readchar, remote_target::remote_serial_write):
4755 Save/restore curr_quit_handler_target.
4757 (kill_new_fork_children): Fill in 'remote' field.
4758 (packet_command): Use get_current_remote_target, defer to
4759 remote_target method of same name.
4760 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4761 parameter, and save it in m_remote. All callers adjusted.
4762 (scoped_remote_fd::release): Use m_remote.
4763 (scoped_remote_fd::m_remote): New field.
4764 (remote_file_put, remote_file_get, remote_file_delete): Use
4765 get_current_remote_target, defer to remote_target method of same
4767 (remote_btrace_reset): Add remote_state paremeter. Update all
4769 (remote_async_inferior_event_handler). Pass down 'data'.
4770 (remote_new_objfile): Use get_current_remote_target.
4771 (remote_target::vcont_r_supported): New.
4772 (set_range_stepping): Use get_current_remote_target and
4773 remote_target::vcont_r_supported.
4774 (_initialize_remote): Don't allocate 'remote_state' and
4775 'stop_reply_queue' globals.
4776 * remote.h (struct remote_target): Forward declare.
4777 (getpkt, putpkt, remote_notif_get_pending_events): Add
4778 'remote_target' parameter.
4780 2018-05-22 Pedro Alves <palves@redhat.com>
4782 * remote.c (vcont_builder): Now a class. Make all data members
4784 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4786 (vcont_builder_restart): Rename to ...
4787 (vcont_builder::restart): ... this.
4788 (vcont_builder_flush): Rename to ...
4789 (vcont_builder::flush): ... this.
4790 (vcont_builder_push_action): Rename to ...
4791 (vcont_builder::push_action): ... this.
4792 (remote_target::commit_resume): Adjust.
4794 2018-05-22 Pedro Alves <palves@redhat.com>
4796 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4797 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4798 (get_fixed_memory_packet_size): New.
4799 (get_memory_packet_size): Use it.
4800 (set_memory_packet_size): Don't override the config size with
4801 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4802 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4803 Don't refer to get_memory_packet_size if not connected to a remote
4804 target. Show "(default)" if configured size is 0.
4806 2018-05-22 Pedro Alves <palves@redhat.com>
4808 * remote.c (remote_target::mourn_inferior): Move
4809 discard_pending_stop_replies call here from ...
4810 (_initialize_remote): ... here.
4812 2018-05-22 Pedro Alves <palves@redhat.com>
4814 * remote.c (compare_section_command): Remove set_general_process
4817 2018-05-22 Pedro Alves <palves@redhat.com>
4819 * remote.c (struct packet_reg, struct remote_arch_state):
4820 Move higher up in the file.
4821 (remote_state) <m_arch_states>: Store remote_arch_state values
4822 instead of remote_arch_state pointers.
4823 (remote_state::get_remote_arch_state): Adjust.
4825 2018-05-22 Pedro Alves <palves@redhat.com>
4827 * remote.c: Include <unordered_map>.
4828 (remote_state): Now a class.
4829 (remote_state) <get_remote_arch_state>: Declare method.
4830 <get_remote_arch_state>: New field.
4831 (remote_arch_state) <remote_arch_state>: Declare ctor.
4832 <regs>: Now a unique_ptr.
4833 (remote_gdbarch_data_handle): Delete.
4834 (get_remote_arch_state): Delete.
4835 (remote_state::get_remote_arch_state): New.
4836 (get_remote_state): Adjust to call remote_state's
4837 get_remote_arch_state method.
4838 (init_remote_state): Delete, bits factored out to ...
4839 (remote_arch_state::remote_arch_state): ... this new method.
4840 (get_remote_packet_size, get_memory_packet_size)
4841 (process_g_packet, remote_target::fetch_registers)
4842 (remote_target::prepare_to_store, store_registers_using_G)
4843 (remote_target::store_registers, remote_target::get_trace_status):
4844 Adjust to call remote_state's method.
4845 (_initialize_remote): Remove reference to
4846 remote_gdbarch_data_handle.
4848 2018-05-22 Pedro Alves <palves@redhat.com>
4850 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4851 pread>: New method declarations.
4852 (remote_target::open_1): Adjust.
4853 (readahead_cache_invalidate): Rename to ...
4854 (readahead_cache::invalidate): ... this, and adjust to be a class
4856 (readahead_cache_invalidate_fd): Rename to ...
4857 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4859 (remote_hostio_pwrite): Adjust.
4860 (remote_hostio_pread_from_cache): Rename to ...
4861 (readahead_cache::pread): ... this, and adjust to be a class
4863 (remote_hostio_close): Adjust.
4865 2018-05-22 Pedro Alves <palves@redhat.com>
4867 * remote.c (remote_hostio_close_cleanup): Delete.
4868 (class scoped_remote_fd): New.
4869 (remote_file_put, remote_file_get): Use it.
4871 2018-05-22 Pedro Alves <palves@redhat.com>
4873 (struct vCont_action_support): Use bool and initialize all fields.
4874 (struct readahead_cache): Initialize all fields.
4875 (remote_state): Use bool and initialize all fields.
4876 (remote_state::remote_state, remote_state::~remote_state): New.
4877 (new_remote_state): Delete.
4878 (_initialize_remote): Use new to allocate remote_state.
4880 2018-05-22 Pedro Alves <palves@redhat.com>
4884 * c-exp.y: Include "c-support.h".
4885 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4886 of tolower. Use c_ident_is_alpha to scan names.
4887 * c-lang.c: Include "c-support.h".
4888 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4889 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4890 * c-support.h: New file, with bits factored out from ...
4891 * cp-name-parser.y: ... this file.
4892 Include "c-support.h".
4893 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4894 c-support.h and renamed.
4895 (symbol_end, yylex): Adjust.
4897 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4899 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4900 parameter type to CORE_ADDR.
4901 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4902 parameter type in declaration to CORE_ADDR.
4903 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4904 target_auxv_search to get AT_HWCAP and use the result to get the
4906 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4907 to CORE_ADDR. Remove the cast of the return value to unsigned
4908 long. Fix error predicate of target_auxv_search.
4909 (ppc_linux_nat_target::read_description): Change the type of the
4910 hwcap variable to CORE_ADDR.
4912 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4914 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4915 if the size of fpscr is larger than 32 bits.
4917 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4919 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4920 (ppc32_linux_vsxregmap): New global.
4921 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4922 regcache_supply_regset, and regcache_collect_regset.
4923 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4924 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4925 (fetch_vsx_register, store_vsx_register): Remove.
4926 (fetch_vsx_registers): Add regno parameter. Get regset using
4927 ppc_linux_vsxregset. Use regset to supply registers.
4928 (store_vsx_registers): Add regno parameter. Get regset using
4929 ppc_linux_vsxregset. Use regset to collect registers.
4930 (fetch_register): Call fetch_vsx_registers instead of
4932 (store_register): Call store_vsx_registers instead of
4934 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4935 new regno parameter.
4936 (store_ppc_registers): Call store_vsx_registers with -1 for the
4937 new regno parameter.
4938 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4939 (ppc_collect_vsxregset): Remove.
4941 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4943 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4945 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4946 for vector register offset fields.
4947 (ppc64_fbsd_reg_offsets): Likewise.
4948 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4949 to vector register offset fields.
4950 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4951 to vector register offset fields.
4952 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4953 vector register offset fields.
4954 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4955 initializers for vector register offset fields.
4956 (rs6000_aix64_reg_offsets): Likewise.
4957 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4958 (ppc_supply_vrregset): Remove.
4959 (ppc_collect_vrregset): Remove.
4960 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4961 (ppc_linux_vrregset) : New function.
4962 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4963 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4964 (ppc32_linux_vrregset): Remove.
4965 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4966 and use result instead of ppc32_linux_vrregset.
4967 (ppc32_linux_reg_offsets): Remove initializers for vector register
4969 (ppc64_linux_reg_offsets): Likewise.
4970 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4971 * ppc-linux-nat.c: Include regset.h.
4972 (gdb_vrregset_t): Adjust comment to account for little-endian
4974 (supply_vrregset, fill_vrregset): Remove.
4975 (fetch_altivec_register, store_altivec_register): Remove.
4976 (fetch_altivec_registers): Add regno parameter. Get regset using
4977 ppc_linux_vrregset. Use regset to supply registers.
4978 (store_altivec_registers): Add regno parameter. Get regset using
4979 ppc_linux_vrregset. Use regset to collect registers.
4980 (fetch_register): Call fetch_altivec_registers instead of
4981 fetch_altivec_register.
4982 (store_register): Call store_altivec_registers instead of
4983 store_altivec_register.
4984 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4985 the new regno parameter.
4986 (store_ppc_registers): Call store_altivec_registers with -1 for
4987 the new regno parameter.
4989 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4991 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4992 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4993 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4994 (gdb_vrregset_t): Change array type size to
4995 PPC_LINUX_SIZEOF_VRREGSET.
4996 (gdb_vsxregset_t): Change array type size to
4997 PPC_LINUX_SIZEOF_VSXREGSET.
4998 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4999 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5000 PPC_LINUX_SIZEOF_VSXREGSET.
5002 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5004 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5005 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5007 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5008 ppc_linux_target_wordsize with tid.
5009 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5011 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5012 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5013 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5014 tid parameter. Remove static specifier.
5015 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5016 (ppc_linux_target_wordsize): New declaration.
5018 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5020 * arch/ppc-linux-common.c: New file.
5021 * arch/ppc-linux-common.h: New file.
5022 * arch/ppc-linux-tdesc.h: New file.
5023 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5024 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5025 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5026 arch/ppc-linux-tdesc.h.
5027 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5028 arch/ppc-linux-tdesc.h.
5029 (ppc_linux_nat_target::read_description): Remove target
5030 description matching code. Fill a ppc_linux_features struct and
5031 call ppc_linux_match_description with it. Move comment about ISA
5032 2.05 to ppc-linux-common.c.
5033 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5034 arch/ppc-linux-tdesc.h.
5035 (ppc_linux_core_read_description): Remove target description
5036 matching code. Fill a ppc_linux_features struct and call
5037 ppc_linux_match_description with it.
5038 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5039 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5040 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5041 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5042 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5043 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5044 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5045 (tdesc_powerpc_e500l): Remove.
5047 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5049 * ada-lang.c (catch_assert_command): Pass empty string instead
5050 of NULL for excep_string argument.
5052 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5054 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5055 the width of the requested register exceeds the width of the
5058 2018-05-21 Tom Tromey <tom@tromey.com>
5060 * printcmd.c (output_command): Remove.
5061 (output_command_const): Rename to output_command.
5062 * valprint.h (output_command): Rename from output_command_const.
5063 * tracepoint.c (trace_dump_actions): Call output_command.
5065 2018-05-21 Tom Tromey <tom@tromey.com>
5067 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5068 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5069 * ada-lang.h (create_ada_exception_catchpoint): Update.
5070 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5072 (create_excep_cond_exprs, ~ada_catchpoint)
5073 (should_stop_exception, print_one_exception)
5074 (print_mention_exception, print_recreate_exception): Update.
5075 (ada_get_next_arg): Remove.
5076 (catch_ada_exception_command_split): Use std::string. Change type
5077 of "excep_string", "cond_string".
5078 (catch_ada_exception_command): Update.
5079 (create_ada_exception_catchpoint): Change type of excep_string.
5080 (ada_exception_sal): Remove excep_string parameter.
5081 (~ada_catchpoint): Remove.
5083 2018-05-21 Tom Tromey <tom@tromey.com>
5085 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5088 2018-05-21 Tom Tromey <tom@tromey.com>
5090 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5091 Return unique_xmalloc_ptr.
5092 (print_it_exception): Update.
5094 2018-05-21 Tom Tromey <tom@tromey.com>
5096 * tracepoint.c (trace_dump_actions): Use std::string.
5098 2018-05-21 Tom Tromey <tom@tromey.com>
5100 * symfile.c (reread_symbols): Use std::string for original_name.
5102 2018-05-21 Tom Tromey <tom@tromey.com>
5104 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5105 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5108 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5110 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5112 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5113 * objfiles.c (get_objfile_bfd_data): Allocate
5114 objfile_per_bfd_storage with obstack_new when allocating on
5117 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5119 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5121 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5122 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5123 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5124 (add_pending): Likewise.
5125 (parse_symbol): Likewise.
5126 (parse_partial_symbols): Likewise.
5127 (psymtab_to_symtab_1): Likewise.
5128 (new_psymtab): Likewise.
5129 (elfmdebug_build_psymtabs): Likewise.
5130 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5131 * objfiles.c (get_objfile_bfd_data): Likewise.
5132 (objfile_register_static_link): Likewise.
5133 * psymtab.c (allocate_psymtab): Likewise.
5134 * stabsread.c (read_member_functions): Likewise.
5135 * xcoffread.c (xcoff_end_psymtab): Likewise.
5137 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5139 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5140 compiler supports std::is_trivially_constructible.
5141 * common/poison.h: Include obstack.h.
5142 (IsMallocable): Define to is_trivially_constructible if the
5143 compiler supports it, define to true_type otherwise.
5147 (XOBNEWVEC): Redefine.
5148 * gdb_obstack.h (obstack_zalloc): New.
5149 (OBSTACK_ZALLOC): Redefine.
5150 (obstack_calloc): New.
5151 (OBSTACK_CALLOC): Redefine.
5153 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5154 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5156 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5157 obstack_calloc/obstack_zalloc.
5158 (gdbarch_obstack_zalloc): Remove.
5159 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5161 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5163 * stack.c (backtrace_command_1): Remove useless variable int i.
5165 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5167 * stack.c (print_frame_info): Fix comment.
5169 2018-05-18 Tom Tromey <tom@tromey.com>
5171 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5172 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5173 (~dwarf2_per_objfile): Update
5174 (dwarf2_get_dwz_file): Use new.
5175 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5178 2018-05-18 Tom Tromey <tom@tromey.com>
5180 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5182 * dwarf2read.c (struct dwp_file): Add constructor and
5184 (open_and_init_dwp_file): Return a unique_ptr.
5185 (dwarf2_per_objfile, create_dwp_hash_table)
5186 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5187 (lookup_dwo_unit_in_dwp): Update.
5188 (open_and_init_dwp_file, get_dwp_file): Update.
5190 2018-05-18 Tom Tromey <tom@tromey.com>
5192 * dwarf2read.c (dwarf2_per_objfile): Update.
5193 (struct mapped_index): Add initializers.
5194 (dwarf2_read_index): Use new.
5195 (dw2_symtab_iter_init): Update.
5196 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5199 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5201 * dwarf2read.c (mapped_index) <total_size>: Remove.
5203 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5205 * unittests/format_pieces-selftests.c (test_format_specifier):
5208 2018-05-18 Tom Tromey <tom@tromey.com>
5210 * c-typeprint.c (maybe_print_hole): New function.
5211 (c_print_type_struct_field_offset): Update.
5212 (c_type_print_base_struct_union): Call maybe_print_hole.
5214 2018-05-17 Keith Seitz <keiths@redhat.com>
5216 * breakpoint.c (build_bpstat_chain): New function, moved from
5218 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5219 If no stop chain is passed, call build_bpstat_chain to build it.
5220 * breakpoint.h (build_bpstat_chain): Declare.
5221 (bpstat_stop_status): Move documentation here from breakpoint.c.
5222 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5223 build the stop chain and pass it to skip_inline_frames.
5224 Pass this stop chain to bpstat_stop_status.
5225 * inline-frame.c: Include breakpoint.h.
5226 (stopped_by_user_bp_inline_frame): New function.
5227 (skip_inline_frames): Add parameter `stop_chain'.
5228 Move documention to inline-frame.h.
5229 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5230 whether the frame should be elided.
5231 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5232 Add moved documentation and update for new parameter.
5234 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5237 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5238 unittests/format_pieces-selftests.c.
5239 * common/format.h (format_piece) <operator==>: New.
5240 (format_pieces) <operator[]>: Remove.
5241 * common/format.c (format_pieces::format_pieces): Handle \e.
5242 * unittests/format_pieces-selftests.c: New.
5244 2018-05-17 Tom Tromey <tom@tromey.com>
5247 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5248 (dw2_instantiate_symtab): Add skip_partial parameter.
5249 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5250 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5251 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5252 (dw2_expand_symtabs_matching_one)
5253 (dw2_find_pc_sect_compunit_symtab)
5254 (dw2_debug_names_lookup_symbol)
5255 (dw2_debug_names_expand_symtabs_for_function): Update.
5256 (init_cutu_and_read_dies): Add skip_partial parameter.
5257 (process_psymtab_comp_unit, build_type_psymtabs_1)
5258 (process_skeletonless_type_unit, load_partial_comp_unit)
5259 (psymtab_to_symtab_1): Update.
5260 (load_full_comp_unit): Add skip_partial parameter.
5261 (process_imported_unit_die, dwarf2_read_addr_index)
5262 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5263 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5264 (read_signatured_type): Update.
5266 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5268 * value.c (release_value): Remove unused variable.
5269 (record_latest_value): Likewise.
5270 (access_value_history): Likewise.
5271 (preserve_values): Likewise.
5273 2018-05-17 Tom Tromey <tom@tromey.com>
5275 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5278 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5281 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5282 Also handle registers whose width is not a multiple of
5284 (linux_nat_trad_target::store_register): Likewise.
5286 2018-05-16 Tom Tromey <tom@tromey.com>
5288 * gdbcore.h (core_bfd): Redefine.
5289 * corelow.c (core_target::close): Update.
5290 (core_target_open): Update.
5291 * progspace.h (struct program_space) <cbfd>: Now a
5294 2018-05-16 Tom Tromey <tom@tromey.com>
5297 * symfile-add-flags.h (enum symfile_add_flags)
5298 <SYMFILE_NOT_FILENAME>: New constant.
5299 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5300 objfile name from BFD.
5301 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5302 * minidebug.c (find_separate_debug_file_in_section): Put
5303 ".gnu_debugdata" into BFD's file name.
5305 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5307 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5310 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5313 * aarch64-tdep.c (aarch64_analyze_prologue,
5314 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5315 Indicate not interested in errors.
5317 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5319 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5320 Supply the MIPS_ZERO_REGNUM register.
5322 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5324 * mips-tdep.c (mask_address_var): Make variable static.
5326 2018-05-14 Tom Tromey <tom@tromey.com>
5328 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5330 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5332 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5333 FXSAVE_ADDR for the mxcsr register.
5335 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5337 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5339 2018-05-11 Pedro Alves <palves@redhat.com>
5341 * corelow.c (core_target) <core_target>: No longer inline.
5342 Initialize m_core_gdbarch, m_core_vec and build the section table
5344 <~core_target>: New.
5345 <core_gdbarch, get_core_register_section>: New methods.
5346 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5347 factored out from ...
5348 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5350 (sniff_core_bfd): Add gdbarch parameter.
5351 (core_close): Delete, merged into ...
5352 (core_target::close): ... here. Delete self.
5353 (core_close_cleanup): Delete.
5354 (core_target_open): Allocate a core_target on the heap. Use a
5355 unique_ptr instead of a cleanup. Bits moved into the core_target
5356 ctor. Adjust to use core_target methods instead of globals.
5357 (get_core_register_section): Rename to ...
5358 (core_target::get_core_register_section): ... this and adjust.
5359 (struct get_core_registers_cb_data): New.
5360 (get_core_registers_cb): Use it. Use bool.
5361 (core_target::fetch_registers, core_target::files_info)
5362 (core_target::xfer_partial, core_target::read_description)
5363 (core_target::pid_to, core_target::thread_name): Adjust to
5364 reference class fields instead of globals.
5365 * target.h (struct target_ops_deleter, target_ops_up): New.
5367 2018-05-11 Pedro Alves <palves@redhat.com>
5369 * corefile.c (core_file_command): Move to corelow.c.
5370 * corelow.c (the_core_target): Delete.
5371 (core_file_command): Moved from corefile.c. Check exec_bfd
5372 instead of the_core_target. Use target_detach instead of calling
5373 into the_core_target directly.
5374 (maybe_say_no_core_file_now): New.
5375 (core_target::detach): Use it.
5376 (_initialize_corelow): Remove references to the_core_target.
5377 * gdbcore.h (the_core_target): Delete.
5379 2018-05-11 Tom Tromey <tromey@redhat.com>
5380 Pedro Alves <palves@redhat.com>
5382 * corefile.c (core_bfd): Remove.
5383 * gdbcore.h (core_bfd): Now a macro.
5384 * progspace.h (struct program_space) <cbfd>: New field.
5386 2018-05-11 Tom Tromey <tom@tromey.com>
5388 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5391 2018-05-10 Tom Tromey <tom@tromey.com>
5393 * configure: Rebuild.
5394 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5396 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5399 * regformats/regdat.sh: Adjust script, following the addition
5400 of the new expedite_regs parameter to init_target_desc.
5402 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5405 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5406 set_gdbarch_significant_addr_bit.
5407 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5408 set_gdbarch_significant_addr_bit.
5409 * utils.c (address_significant): Update to sign extend addr.
5411 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5413 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5414 (xtensa_linux_init_abi): Limit tdep->num_regs by
5415 tdep->num_nopriv_regs.
5416 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5417 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5420 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5422 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5424 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5426 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5427 (I387_MXCSR_INIT_VAL): New constant.
5428 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5429 buffer if it was supplied by the inferior.
5430 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5431 (i387_xsave_get_clear_bv): New function.
5432 (i387_supply_xsave): Only read x87 control registers from the
5433 xsave buffer if the feature is enabled, and the state will have
5434 been written, otherwise, provide a suitable default.
5435 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5436 including x87 control registers. Update control registers if they
5437 have changed from the default value, and mark features as enabled
5439 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5441 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5443 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5445 2018-05-07 Tom Tromey <tom@tromey.com>
5447 * configure: Rebuild.
5448 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5450 2018-05-07 Tom Tromey <tom@tromey.com>
5453 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5454 bit. Use correct value for VDIV.
5456 2018-05-04 Tom Tromey <tom@tromey.com>
5458 * configure: Rebuild.
5459 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5461 2018-05-04 Tom Tromey <tom@tromey.com>
5463 * linux-record.c (record_linux_system_call) <case
5464 RECORD_SYS_RECVFROM>: Add "break".
5466 2018-05-04 Tom Tromey <tom@tromey.com>
5468 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5469 Add missing "break".
5470 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5471 Add missing "break".
5473 2018-05-04 Tom Tromey <tom@tromey.com>
5475 * rs6000-tdep.c (ppc_process_record_op4)
5476 (ppc_process_record_op63): Add fall-through comment.
5478 2018-05-04 Tom Tromey <tom@tromey.com>
5480 * i386-tdep.c (i386_process_record): Add fall-through comment.
5482 2018-05-04 Tom Tromey <tom@tromey.com>
5484 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5487 2018-05-04 Tom Tromey <tom@tromey.com>
5489 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5490 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5491 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5493 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5495 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5498 2018-05-04 Tom Tromey <tom@tromey.com>
5500 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5502 2018-05-04 Tom Tromey <tom@tromey.com>
5504 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5505 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5506 * symfile.c (section_is_mapped): Fix fall-through comment.
5507 * stabsread.c (define_symbol, read_member_functions): Fix
5508 fall-through comment.
5509 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5511 * remote.c (remote_wait_as): Fix fall-through comment.
5512 * p-exp.y (yylex): Fix fall-through comment.
5513 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5515 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5516 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5517 * jv-exp.y (yylex): Fix fall-through comment.
5518 * go-exp.y (lex_one_token): Fix fall-through comment.
5519 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5520 fall-through comment.
5521 * f-exp.y (yylex): Fix fall-through comment.
5522 * dwarf2read.c (process_die): Fix fall-through comments.
5523 * dbxread.c (process_one_symbol): Fix fall-through comment.
5524 * d-exp.y (lex_one_token): Fix fall-through comment.
5525 * cp-name-parser.y (yylex): Fix fall-through comment.
5526 * coffread.c (coff_symtab_read): Fix fall-through comment.
5527 * c-exp.y (lex_one_token): Fix fall-through comment.
5528 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5530 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5533 2018-05-04 Tom Tromey <tom@tromey.com>
5536 * NEWS: Mention gdb.execute change.
5537 * gdbcmd.h (execute_control_command): Don't declare.
5538 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5539 execute_control_commands, execute_control_commands_to_string.
5540 * cli/cli-script.h (execute_control_commands)
5541 (execute_control_commands_to_string): Declare.
5542 (execute_control_command): Add from_tty parameter.
5543 * cli/cli-script.c (execute_control_commands)
5544 (execute_control_commands_to_string): New functions.
5545 (execute_user_command): Use execute_control_commands.
5546 (execute_control_command_1): Add "from_tty" parameter. Update.
5547 (execute_control_command): Likewise.
5549 2018-05-04 Tom Tromey <tom@tromey.com>
5552 * NEWS: Mention that breakpoint commands are writable.
5553 * python/py-breakpoint.c (bppy_set_commands): New function.
5554 (breakpoint_object_getset) <"commands">: Use it.
5556 2018-05-04 Tom Tromey <tom@tromey.com>
5558 * tracepoint.c (actions_command): Update.
5559 * mi/mi-cmd-break.c (mi_command_line_array)
5560 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5561 (mi_read_next_line): Remove.
5562 (mi_cmd_break_commands): Update.
5563 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5565 * cli/cli-script.c (get_command_line): Update.
5566 (process_next_line): Use function_view. Constify.
5567 (recurse_read_control_structure, read_command_lines)
5568 (read_command_lines_1): Change argument types to function_view.
5569 (do_define_command, document_command): Update.
5570 * breakpoint.h (check_tracepoint_command): Don't declare.
5571 * breakpoint.c (check_tracepoint_command): Remove.
5572 (commands_command_1, create_tracepoint_from_upload): Update.
5574 2018-05-04 Tom Tromey <tom@tromey.com>
5577 * cli/cli-script.h (enum command_control_type) <define_control>:
5579 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5580 (build_command_line, execute_control_command_1)
5581 (process_next_line): Likewise.
5582 (do_define_command): New function, extracted from define_command.
5583 (define_command): Use it.
5585 2018-05-04 Tom Tromey <tom@tromey.com>
5587 * tracepoint.c (actions_command): Update.
5588 * cli/cli-script.h (read_command_lines): Update.
5589 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5590 (MAX_TMPBUF): Remove define.
5591 (define_command): Use string_printf.
5592 (document_command): Likewise.
5593 * breakpoint.c (commands_command_1): Update.
5595 2018-05-04 Tom Tromey <tom@tromey.com>
5597 * top.c (execute_command): Update.
5598 * cli/cli-script.h (print_command_lines): Now varargs.
5599 * cli/cli-script.c (print_command_lines): Now varargs.
5600 (execute_control_command_1) <case while_control, case if_control>:
5603 2018-05-04 Tom Tromey <tom@tromey.com>
5605 * tracepoint.c (all_tracepoint_actions): Rename from
5606 all_tracepoint_actions_and_cleanup. Change return type.
5607 (actions_command, encode_actions_1, encode_actions)
5608 (trace_dump_actions, tdump_command): Update.
5609 * remote.c (remote_download_command_source): Update.
5610 * python/python.c (gdbpy_eval_from_control_command)
5611 (python_command, python_interactive_command): Update.
5612 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5613 * guile/guile.c (guile_command)
5614 (gdbscm_eval_from_control_command, guile_command): Update.
5615 * compile/compile.c (compile_code_command)
5616 (compile_print_command, compile_to_object): Update.
5617 * cli/cli-script.h (struct command_lines_deleter): New.
5618 (counted_command_line): New typedef.
5619 (struct command_line): Add constructor, destructor.
5620 <body_list>: Remove.
5621 <body_list_0, body_list_1>: New members.
5622 (command_line_up): Remove typedef.
5623 (read_command_lines, read_command_lines_1, get_command_line):
5625 (copy_command_lines): Don't declare.
5626 * cli/cli-script.c (build_command_line): Use "new".
5627 (get_command_line): Return counted_command_line.
5628 (print_command_lines, execute_user_command)
5629 (execute_control_command_1, while_command, if_command): Update.
5630 (realloc_body_list): Remove.
5631 (process_next_line, recurse_read_control_structure): Update.
5632 (read_command_lines, read_command_lines_1): Return counted_command_line.
5633 (free_command_lines): Use "delete".
5634 (copy_command_lines): Remove.
5635 (define_command, document_command, show_user_1): Update.
5636 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5637 a counted_command_line.
5638 * breakpoint.h (counted_command_line): Remove typedef.
5639 (breakpoint_set_commands): Update.
5640 * breakpoint.c (check_no_tracepoint_commands)
5641 (validate_commands_for_breakpoint): Update.
5642 (breakpoint_set_commands): Change commands to be a
5643 counted_command_line.
5644 (commands_command_1, update_dprintf_command_list)
5645 (create_tracepoint_from_upload): Update.
5647 2018-05-04 Tom Tromey <tom@tromey.com>
5649 * cli/cli-decode.h (cmd_list_element): New constructor.
5650 (~cmd_list_element): New destructor.
5651 (struct cmd_list_element): Add initializers.
5652 * cli/cli-decode.c (do_add_cmd): Use "new".
5653 (delete_cmd): Use "delete".
5655 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5656 Pedro Alves <palves@redhat.com>
5658 PR breakpoints/19806 and support for PR external/20207.
5659 * NEWS: Mention Aarch64 watchpoint improvements.
5660 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5661 watchpoints and PR external/20207 watchpoints.
5662 * nat/aarch64-linux-hw-point.c
5663 (kernel_supports_any_contiguous_range): New.
5664 (aarch64_watchpoint_offset): New.
5665 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5666 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5667 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5668 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5669 next_addr_orig_p. Support PR external/20207 watchpoints.
5670 (aarch64_downgrade_regs): New.
5671 (aarch64_dr_state_insert_one_point): New parameters offset and
5673 (aarch64_dr_state_remove_one_point): Likewise.
5674 (aarch64_handle_breakpoint): Update caller.
5675 (aarch64_handle_aligned_watchpoint): Likewise.
5676 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5678 (aarch64_linux_set_debug_regs): Remove const from state. Call
5679 aarch64_downgrade_regs.
5680 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5681 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5682 (DR_CONTROL_MASK): ... this.
5683 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5684 (unsigned int aarch64_watchpoint_offset): New prototype.
5685 (aarch64_linux_set_debug_regs): Remove const from state.
5686 * utils.c (align_up, align_down): Move to ...
5687 * common/common-utils.c (align_up, align_down): ... here.
5688 * utils.h (align_up, align_down): Move to ...
5689 * common/common-utils.h (align_up, align_down): ... here.
5691 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5693 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5694 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5695 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5696 Re-implement to match the ABI as summarized in GCC's
5697 gcc/config/sparc/sparc.c. All callers updated.
5698 (sparc32_store_arguments): Remove assertion.
5700 2018-05-04 Tom Tromey <tom@tromey.com>
5702 * printcmd.c: Don't include tui.h.
5703 (decode_format): Use skip_spaces.
5705 2018-05-04 Tom Tromey <tom@tromey.com>
5708 * printcmd.c (last_count): New global.
5709 (x_command): Use saved count when repeating.
5711 2018-05-04 Tom Tromey <tom@tromey.com>
5713 * nto-procfs.c (do_closedir_cleanup): Remove.
5714 (procfs_pidlist): Use gdb_dir_up.
5715 * procfs.c (do_closedir_cleanup): Remove.
5716 (proc_update_threads): Use gdb_dir_up.
5717 * common/filestuff.h (struct gdb_dir_deleter): New.
5718 (gdb_dir_up): New typedef.
5720 2018-05-04 Tom Tromey <tom@tromey.com>
5722 * ada-lang.c (print_mention_exception): Use std::string.
5724 2018-05-04 Tom Tromey <tom@tromey.com>
5726 * ada-lang.c (create_excep_cond_exprs): Update.
5727 (ada_exception_catchpoint_cond_string): Use std::string.
5729 2018-05-04 Tom Tromey <tom@tromey.com>
5731 * ada-lang.c (xget_renaming_scope): Return std::string.
5732 (old_renaming_is_invisible): Update.
5734 2018-05-04 Tom Tromey <tom@tromey.com>
5736 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5737 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5739 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5741 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5743 2018-05-04 Tom Tromey <tom@tromey.com>
5745 * remote.c (remote_query_supported_append): Change type.
5746 (remote_check_symbols): Update.
5748 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5751 * configure.ac: Prepend libpython.
5752 * python/python-config.py: Likewise.
5753 * configure: Regenerate.
5755 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5757 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5759 2018-05-03 Pedro Alves <palves@redhat.com>
5762 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5763 override. Write 'true' instead of '1'.
5764 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5767 2018-05-02 Pedro Alves <palves@redhat.com>
5769 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5770 add_inf_child_target.
5771 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5772 add_inf_child_target.
5773 * aix-thread.c (aix_thread_target_info): New.
5774 (aix_thread_target) <shortname, longname, doc>: Delete.
5776 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5777 add_inf_child_target.
5778 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5779 add_inf_child_target.
5780 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5781 add_inf_child_target.
5782 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5783 add_inf_child_target.
5784 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5785 add_inf_child_target.
5786 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5787 add_inf_child_target.
5788 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5789 add_inf_child_target.
5790 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5791 add_inf_child_target.
5792 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5793 add_inf_child_target.
5794 * bfd-target.c (target_bfd_target_info): New.
5795 (target_bfd) <shortname, longname, doc>: Delete.
5797 * bsd-kvm.c (bsd_kvm_target_info): New.
5798 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5800 (bsd_kvm_target::open): Rename to ...
5801 (bsd_kvm_target_open): ... this. Adjust.
5802 * bsd-uthread.c (bsd_uthread_target_info): New.
5803 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5805 * corefile.c (core_file_command): Adjust.
5806 * corelow.c (core_target_info): New.
5807 (core_target) <shortname, longname, doc>: Delete.
5809 (core_target::open): Rename to ...
5810 (core_target_open): ... this. Adjust.
5811 * ctf.c (ctf_target_info): New.
5812 (ctf_target) <shortname, longname, doc>: Delete.
5814 (ctf_target::open): Rename to ...
5815 (ctf_target_open): ... this.
5816 (_initialize_ctf): Adjust.
5817 * exec.c (exec_target_info): New.
5818 (exec_target) <shortname, longname, doc>: Delete.
5820 (exec_target::open): Rename to ...
5821 (exec_target_open): ... this.
5822 * gdbcore.h (core_target_open): Declare.
5823 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5824 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5825 add_inf_child_target.
5826 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5827 add_inf_child_target.
5828 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5829 add_inf_child_target.
5830 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5831 add_inf_child_target.
5832 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5833 add_inf_child_target.
5834 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5835 add_inf_child_target.
5836 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5837 add_inf_child_target.
5838 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5839 add_inf_child_target.
5840 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5841 add_inf_child_target.
5842 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5843 add_inf_child_target.
5844 * inf-child.c (inf_child_target_info): New.
5845 (inf_child_target::info): New.
5846 (inf_child_open_target): Remove 'target' parameter. Use
5847 get_native_target instead.
5848 (inf_child_target::open): Delete.
5849 (add_inf_child_target): New.
5850 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5853 (add_inf_child_target): Declare.
5854 (inf_child_open_target): Declare.
5855 * linux-thread-db.c (thread_db_target_info): New.
5856 (thread_db_target) <shortname, longname, doc>: Delete.
5858 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5859 add_inf_child_target.
5860 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5861 add_inf_child_target.
5862 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5863 add_inf_child_target.
5864 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5865 add_inf_child_target.
5866 * make-target-delegates (print_class): Adjust.
5867 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5868 add_inf_child_target.
5869 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5870 add_inf_child_target.
5871 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5872 add_inf_child_target.
5873 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5874 add_inf_child_target.
5875 * nto-procfs.c (nto_native_target_info): New.
5876 (nto_procfs_target_native) <shortname, longname, doc>:
5879 (nto_procfs_target_info): New.
5880 (nto_procfs_target_procfs) <shortname, longname, doc>:
5883 (init_procfs_targets): Adjust.
5884 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5885 add_inf_child_target.
5886 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5887 add_inf_child_target.
5888 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5889 add_inf_child_target.
5890 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5891 add_inf_child_target.
5892 * ravenscar-thread.c (ravenscar_target_info): New.
5893 (ravenscar_thread_target) <shortname, longname, doc>:
5896 * record-btrace.c (record_btrace_target_info):
5897 (record_btrace_target) <shortname, longname, doc>: Delete.
5899 (record_btrace_target::open): Rename to ...
5900 (record_btrace_target_open): ... this. Adjust.
5901 * record-full.c (record_longname, record_doc): New.
5902 (record_full_base_target) <shortname, longname, doc>: Delete.
5904 (record_full_target_info): New.
5905 (record_full_target): <shortname>: Delete.
5907 (record_full_core_open_1, record_full_open_1): Update comments.
5908 (record_full_base_target::open): Rename to ...
5909 (record_full_open): ... this.
5910 (cmd_record_full_restore): Update.
5911 (_initialize_record_full): Update.
5912 * remote-sim.c (remote_sim_target_info): New.
5913 (gdbsim_target) <shortname, longname, doc>: Delete.
5915 (gdbsim_target::open): Rename to ...
5916 (gdbsim_target_open): ... this.
5917 (_initialize_remote_sim): Adjust.
5918 * remote.c (remote_doc): New.
5919 (remote_target_info): New.
5920 (remote_target) <shortname, longname, doc>: Delete.
5922 (extended_remote_target_info): New.
5923 (extended_remote_target) <shortname, longname, doc>: Delete.
5925 (remote_target::open_1): Make static. Adjust.
5926 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5927 * s390-linux-nat.c (_initialize_s390_nat): Use
5928 add_inf_child_target.
5929 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5930 add_inf_child_target.
5931 * sol-thread.c (thread_db_target_info): New.
5932 (sol_thread_target) <shortname, longname, doc>: Delete.
5934 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5935 add_inf_child_target.
5936 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5937 add_inf_child_target.
5938 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5939 add_inf_child_target.
5940 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5941 add_inf_child_target.
5942 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5943 add_inf_child_target.
5944 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5945 add_inf_child_target.
5946 * spu-linux-nat.c (_initialize_spu_nat): Use
5947 add_inf_child_target.
5948 * spu-multiarch.c (spu_multiarch_target_info): New.
5949 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5951 * target-delegates.c: Regenerate.
5952 * target.c: Include <unordered_map>.
5953 (target_ops_p): Delete.
5954 (DEF_VEC_P(target_ops_p)): Delete.
5955 (target_factories): New.
5956 (test_target_info): New.
5957 (test_target_ops::info): New.
5958 (open_target): Adjust to use target_factories.
5959 (add_target_with_completer): Rename to ...
5960 (add_target): ... this. Change prototype. Register target_info
5961 and open callback in target_factories. Register target_info in
5962 command context instead of target_ops.
5963 (add_target): Delete old implementation.
5964 (add_deprecated_target_alias): Change prototype. Adjust.
5965 (the_native_target): New.
5966 (set_native_target, get_native_target): New.
5967 (find_default_run_target): Use the_native_target.
5968 (find_attach_target, find_run_target): Simplify.
5969 (target_ops::open): Delete.
5970 (dummy_target_info): New.
5971 (dummy_target::shortname, dummy_target::longname)
5972 (dummy_target::doc): Delete.
5973 (dummy_target::info): New.
5974 (debug_target::shortname, debug_target::longname)
5975 (debug_target::doc): Delete.
5976 (debug_target::info): New.
5977 * target.h (struct target_info): New.
5978 (target_ops::~target_ops): Add comment.
5979 (target_ops::info): New.
5980 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5981 longer virtual. Implement in terms of target_info.
5982 (set_native_target, get_native_target): Declare.
5983 (target_open_ftype): New.
5984 (add_target, add_target_with_completer)
5985 (add_deprecated_target_alias): Change prototype.
5986 (test_target) <shortname, longname, doc>: Delete.
5988 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5989 add_inf_child_target.
5990 * tracefile-tfile.c (tfile_target_info): New.
5991 (tfile_target) <shortname, longname, doc>: Delete.
5993 (tfile_target::open): Rename to ...
5994 (tfile_target_open): ... this.
5995 (_initialize_tracefile_tfile): Adjust.
5996 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5997 add_inf_child_target.
5998 * windows-nat.c (_initialize_windows_nat): Use
5999 add_inf_child_target.
6000 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6001 add_inf_child_target.
6003 2018-05-02 Pedro Alves <palves@redhat.com>
6005 * linux-nat.h (linux_nat_target) <low_new_thread,
6006 low_delete_thread, low_new_fork, low_forget_process,
6007 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6008 New virtual methods.
6009 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6010 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6011 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6012 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6013 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6015 * linux-fork.c (delete_fork): Adjust to call low method.
6016 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6017 (linux_nat_new_fork, linux_nat_forget_process_hook)
6018 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6019 (linux_nat_status_is_event):
6020 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6021 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6023 (sigtrap_is_event): Rename to ...
6024 (linux_nat_target::low_status_is_event): ... this.
6025 (linux_nat_set_status_is_event): Delete.
6026 (save_stop_reason, linux_nat_wait_1)
6027 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6029 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6030 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6031 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6032 (linux_nat_set_prepare_to_resume): Delete.
6033 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6034 low virtual methods.
6035 * amd64-linux-nat.c: Likewise.
6036 * arm-linux-nat.c: Likewise.
6037 * i386-linux-nat.c: Likewise.
6038 * ia64-linux-nat.c: Likewise.
6039 * mips-linux-nat.c: Likewise.
6040 * ppc-linux-nat.c: Likewise.
6041 * s390-linux-nat.c: Likewise.
6042 * sparc64-linux-nat.c: Likewise.
6043 * x86-linux-nat.c: Likewise.
6044 * x86-linux-nat.h: Include "nat/x86-linux.h".
6045 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6046 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6049 2018-05-02 Pedro Alves <palves@redhat.com>
6051 * target.h (target_ops)
6052 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6053 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6054 stopped_by_watchpoint, have_continuable_watchpoint,
6055 stopped_data_address, watchpoint_addr_within_range,
6056 can_accel_watchpoint_condition, can_run, thread_alive,
6057 has_all_memory, has_memory, has_stack, has_registers,
6058 has_execution, can_async_p, is_async_p, supports_non_stop,
6059 always_non_stop_p, can_execute_reverse, supports_multi_process,
6060 supports_enable_disable_tracepoint,
6061 supports_disable_randomization, supports_string_tracing,
6062 supports_evaluation_of_breakpoint_conditions,
6063 can_run_breakpoint_commands, filesystem_is_local,
6064 can_download_tracepoint, get_trace_state_variable_value,
6065 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6066 record_is_replaying, record_will_replay,
6067 augmented_libraries_svr4_read>: Adjust to return bool.
6068 * aarch64-linux-nat.c: All implementations adjusted.
6069 * aix-thread.c: All implementations adjusted.
6070 * arm-linux-nat.c: All implementations adjusted.
6071 * breakpoint.c: All implementations adjusted.
6072 * bsd-kvm.c: All implementations adjusted.
6073 * bsd-uthread.c: All implementations adjusted.
6074 * corelow.c: All implementations adjusted.
6075 * ctf.c: All implementations adjusted.
6076 * darwin-nat.c: All implementations adjusted.
6077 * darwin-nat.h: All implementations adjusted.
6078 * exec.c: All implementations adjusted.
6079 * fbsd-nat.c: All implementations adjusted.
6080 * fbsd-nat.h: All implementations adjusted.
6081 * gnu-nat.c: All implementations adjusted.
6082 * gnu-nat.h: All implementations adjusted.
6083 * go32-nat.c: All implementations adjusted.
6084 * ia64-linux-nat.c: All implementations adjusted.
6085 * inf-child.c: All implementations adjusted.
6086 * inf-child.h: All implementations adjusted.
6087 * inf-ptrace.c: All implementations adjusted.
6088 * inf-ptrace.h: All implementations adjusted.
6089 * linux-nat.c: All implementations adjusted.
6090 * linux-nat.h: All implementations adjusted.
6091 * mips-linux-nat.c: All implementations adjusted.
6092 * nto-procfs.c: All implementations adjusted.
6093 * ppc-linux-nat.c: All implementations adjusted.
6094 * procfs.c: All implementations adjusted.
6095 * ravenscar-thread.c: All implementations adjusted.
6096 * record-btrace.c: All implementations adjusted.
6097 * record-full.c: All implementations adjusted.
6098 * remote-sim.c: All implementations adjusted.
6099 * remote.c: All implementations adjusted.
6100 * s390-linux-nat.c: All implementations adjusted.
6101 * sol-thread.c: All implementations adjusted.
6102 * spu-multiarch.c: All implementations adjusted.
6103 * target-delegates.c: All implementations adjusted.
6104 * target.c: All implementations adjusted.
6105 * target.h: All implementations adjusted.
6106 * tracefile-tfile.c: All implementations adjusted.
6107 * tracefile.c: All implementations adjusted.
6108 * tracefile.h: All implementations adjusted.
6109 * windows-nat.c: All implementations adjusted.
6110 * x86-linux-nat.h: All implementations adjusted.
6111 * x86-nat.h: All implementations adjusted.
6113 2018-05-02 Pedro Alves <palves@redhat.com>
6115 * make-target-delegates (scan_target_h): Don't trim lines here.
6116 Replace sequences of tabs and/or whitespace with a single
6118 (top level, parsing methods): Trim each line before processing it
6121 2018-05-02 Pedro Alves <palves@redhat.com>
6122 John Baldwin <jhb@freebsd.org>
6124 * target.h (enum strata) <debug_stratum>: New.
6125 (struct target_ops) <all delegation methods>: Replace by C++
6126 virtual methods, and drop "to_" prefix. All references updated
6128 <to_shortname, to_longname, to_doc, to_data,
6129 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6130 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6131 virtual methods. All references updated throughout.
6132 <can_attach, supports_terminal_ours, can_create_inferior,
6133 get_thread_control_capabilities, attach_no_wait>: New
6135 <insert_breakpoint, remove_breakpoint>: Now
6136 TARGET_DEFAULT_NORETURN methods.
6137 <info_proc>: Now returns bool.
6139 (OPS_MAGIC): Delete.
6140 (current_target): Delete. All references replaced by references
6142 (target_stack): ... this. New.
6143 (target_shortname, target_longname): Adjust.
6144 (target_can_run): Now a function declaration.
6145 (default_child_has_all_memory, default_child_has_memory)
6146 (default_child_has_stack, default_child_has_registers)
6147 (default_child_has_execution): Remove target_ops parameter.
6148 (complete_target_initialization): Delete.
6149 (memory_breakpoint_target): New template class.
6150 (test_target_ops): Refactor as a C++ class with virtual methods.
6151 * make-target-delegates (NAME_PART): Tighten.
6152 (POINTER_PART, CP_SYMBOL): New.
6153 (SIMPLE_RETURN_PART): Reimplement.
6154 (VEC_RETURN_PART): Expect less.
6155 (RETURN_PART, VIRTUAL_PART): New.
6156 (METHOD): Adjust to C++ virtual methods.
6157 (scan_target_h): Remove reference to C99.
6158 (dname): Output "target_ops::" prefix.
6159 (write_function_header): Adjust to output a C++ class method.
6160 (write_declaration): New.
6161 (write_delegator): Adjust to output a C++ class method.
6162 (tdname): Output "dummy_target::" prefix.
6163 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6165 (tdefault_names, debug_names): Delete.
6166 (return_types, tdefaults, styles, argtypes_array): New.
6167 (top level): All methods are delegators.
6169 (top level): Print dummy_target and debug_target classes.
6170 * target-delegates.c: Regenerate.
6171 * target-debug.h (target_debug_print_enum_info_proc_what)
6172 (target_debug_print_thread_control_capabilities)
6173 (target_debug_print_thread_info_p): New.
6174 * target.c (dummy_target): Delete.
6175 (the_dummy_target, the_debug_target): New.
6176 (target_stack): Now extern.
6177 (set_targetdebug): Push/unpush debug target.
6178 (default_child_has_all_memory, default_child_has_memory)
6179 (default_child_has_stack, default_child_has_registers)
6180 (default_child_has_execution): Remove target_ops parameter.
6181 (complete_target_initialization): Delete.
6182 (add_target_with_completer): No longer call
6183 complete_target_initialization.
6184 (target_supports_terminal_ours): Use regular delegation.
6185 (update_current_target): Delete.
6186 (push_target): No longer check magic number. Don't call
6187 update_current_target.
6188 (unpush_target): Don't call update_current_target.
6189 (target_is_pushed): No longer check magic number.
6190 (target_require_runnable): Skip for all stratums over
6192 (target_ops::info_proc): New.
6193 (target_info_proc): Use find_target_at and
6194 find_default_run_target.
6195 (target_supports_disable_randomization): Use regular delegation.
6196 (target_get_osdata): Use find_target_at.
6197 (target_ops::open, target_ops::close, target_ops::can_attach)
6198 (target_ops::attach, target_ops::can_create_inferior)
6199 (target_ops::create_inferior, target_ops::can_run)
6200 (target_can_run): New.
6201 (default_fileio_target): Use regular delegation.
6202 (target_ops::fileio_open, target_ops::fileio_pwrite)
6203 (target_ops::fileio_pread, target_ops::fileio_fstat)
6204 (target_ops::fileio_close, target_ops::fileio_unlink)
6205 (target_ops::fileio_readlink): New.
6206 (target_fileio_open_1, target_fileio_unlink)
6207 (target_fileio_readlink): Always call the target method. Handle
6209 (return_zero, return_zero_has_execution): Delete.
6210 (init_dummy_target): Delete.
6211 (dummy_target::dummy_target, dummy_target::shortname)
6212 (dummy_target::longname, dummy_target::doc)
6213 (debug_target::debug_target, debug_target::shortname)
6214 (debug_target::longname, debug_target::doc): New.
6215 (target_supports_delete_record): Use regular delegation.
6216 (setup_target_debug): Delete.
6217 (maintenance_print_target_stack): Skip debug_stratum.
6218 (initialize_targets): Instantiate the_dummy_target and
6220 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6222 (target_auxv_search, fprint_target_auxv): Adjust.
6223 (info_auxv_command): Adjust to use target_stack.
6224 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6225 * exceptions.c (print_flush): Handle a NULL target_stack.
6226 * regcache.c (target_ops_no_register): Refactor as class with
6229 * exec.c (exec_target): New class.
6230 (exec_ops): Now an exec_target.
6231 (exec_open, exec_close_1, exec_get_section_table)
6232 (exec_xfer_partial, exec_files_info, exec_has_memory)
6233 (exec_make_note_section): Refactor as exec_target methods.
6234 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6236 (exec_target::find_memory_regions): New.
6237 (_initialize_exec): Don't call init_exec_ops.
6238 * gdbcore.h (exec_file_clear): Delete.
6240 * corefile.c (core_target): Delete.
6241 (core_file_command): Adjust.
6242 * corelow.c (core_target): New class.
6243 (the_core_target): New.
6244 (core_close): Remove target_ops parameter.
6245 (core_close_cleanup): Adjust.
6246 (core_target::close): New.
6247 (core_open, core_detach, get_core_registers, core_files_info)
6248 (core_xfer_partial, core_thread_alive, core_read_description)
6249 (core_pid_to_str, core_thread_name, core_has_memory)
6250 (core_has_stack, core_has_registers, core_info_proc): Rework as
6251 core_target methods.
6252 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6253 (_initialize_corelow): Initialize the_core_target.
6254 * gdbcore.h (core_target): Delete.
6255 (the_core_target): New.
6257 * ctf.c: (ctf_target): New class.
6258 (ctf_ops): Now a ctf_target.
6259 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6260 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6261 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6263 (init_ctf_ops): Delete.
6264 (_initialize_ctf): Don't call it.
6265 * tracefile-tfile.c (tfile_target): New class.
6266 (tfile_ops): Now a tfile_target.
6267 (tfile_open, tfile_close, tfile_files_info)
6268 (tfile_get_tracepoint_status, tfile_trace_find)
6269 (tfile_fetch_registers, tfile_xfer_partial)
6270 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6271 Refactor as tfile_target methods.
6272 (tfile_xfer_partial_features): Remove target_ops parameter.
6273 (init_tfile_ops): Delete.
6274 (_initialize_tracefile_tfile): Don't call it.
6275 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6276 (tracefile_has_stack, tracefile_has_registers)
6277 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6278 tracefile_target methods.
6279 (init_tracefile_ops): Delete.
6280 (tracefile_target::tracefile_target): New.
6281 * tracefile.h: Include "target.h".
6282 (tracefile_target): New class.
6283 (init_tracefile_ops): Delete.
6285 * spu-multiarch.c (spu_multiarch_target): New class.
6286 (spu_ops): Now a spu_multiarch_target.
6287 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6288 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6289 (spu_search_memory, spu_mourn_inferior): Refactor as
6290 spu_multiarch_target methods.
6291 (init_spu_ops): Delete.
6292 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6293 complete_target_initialization.
6295 * ravenscar-thread.c (ravenscar_thread_target): New class.
6296 (ravenscar_ops): Now a ravenscar_thread_target.
6297 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6298 (ravenscar_thread_alive, ravenscar_pid_to_str)
6299 (ravenscar_fetch_registers, ravenscar_store_registers)
6300 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6301 (ravenscar_stopped_by_hw_breakpoint)
6302 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6303 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6304 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6306 (init_ravenscar_thread_ops): Delete.
6307 (_initialize_ravenscar): Remove references to
6308 init_ravenscar_thread_ops and complete_target_initialization.
6310 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6311 (bsd_uthread_target): New class.
6312 (bsd_uthread_ops): Now a bsd_uthread_target.
6313 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6314 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6315 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6316 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6317 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6318 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6319 (bsd_uthread_target): Delete function.
6320 (_initialize_bsd_uthread): Remove reference to
6321 complete_target_initialization.
6323 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6324 (target_bfd): ... this new class.
6325 (target_bfd_xfer_partial, target_bfd_get_section_table)
6326 (target_bfd_close): Refactor as target_bfd methods.
6327 (target_bfd::~target_bfd): New.
6328 (target_bfd_reopen): Adjust.
6329 (target_bfd::close): New.
6331 * record-btrace.c (record_btrace_target): New class.
6332 (record_btrace_ops): Now a record_btrace_target.
6333 (record_btrace_open, record_btrace_stop_recording)
6334 (record_btrace_disconnect, record_btrace_close)
6335 (record_btrace_async, record_btrace_info)
6336 (record_btrace_insn_history, record_btrace_insn_history_range)
6337 (record_btrace_insn_history_from, record_btrace_call_history)
6338 (record_btrace_call_history_range)
6339 (record_btrace_call_history_from, record_btrace_record_method)
6340 (record_btrace_is_replaying, record_btrace_will_replay)
6341 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6342 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6343 (record_btrace_store_registers, record_btrace_prepare_to_store)
6344 (record_btrace_to_get_unwinder)
6345 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6346 (record_btrace_commit_resume, record_btrace_wait)
6347 (record_btrace_stop, record_btrace_can_execute_reverse)
6348 (record_btrace_stopped_by_sw_breakpoint)
6349 (record_btrace_supports_stopped_by_sw_breakpoint)
6350 (record_btrace_stopped_by_hw_breakpoint)
6351 (record_btrace_supports_stopped_by_hw_breakpoint)
6352 (record_btrace_update_thread_list, record_btrace_thread_alive)
6353 (record_btrace_goto_begin, record_btrace_goto_end)
6354 (record_btrace_goto, record_btrace_stop_replaying_all)
6355 (record_btrace_execution_direction)
6356 (record_btrace_prepare_to_generate_core)
6357 (record_btrace_done_generating_core): Refactor as
6358 record_btrace_target methods.
6359 (init_record_btrace_ops): Delete.
6360 (_initialize_record_btrace): Remove reference to
6361 init_record_btrace_ops.
6362 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6363 the execution_direction global.
6364 (record_full_base_target, record_full_target)
6365 (record_full_core_target): New classes.
6366 (record_full_ops): Now a record_full_target.
6367 (record_full_core_ops): Now a record_full_core_target.
6368 (record_full_target::detach, record_full_target::disconnect)
6369 (record_full_core_target::disconnect)
6370 (record_full_target::mourn_inferior, record_full_target::kill):
6372 (record_full_open, record_full_close, record_full_async): Refactor
6373 as methods of the record_full_base_target class.
6374 (record_full_resume, record_full_commit_resume): Refactor
6375 as methods of the record_full_target class.
6376 (record_full_wait, record_full_stopped_by_watchpoint)
6377 (record_full_stopped_data_address)
6378 (record_full_stopped_by_sw_breakpoint)
6379 (record_full_supports_stopped_by_sw_breakpoint)
6380 (record_full_stopped_by_hw_breakpoint)
6381 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6382 methods of the record_full_base_target class.
6383 (record_full_store_registers, record_full_xfer_partial)
6384 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6385 Refactor as methods of the record_full_target class.
6386 (record_full_can_execute_reverse, record_full_get_bookmark)
6387 (record_full_goto_bookmark, record_full_execution_direction)
6388 (record_full_record_method, record_full_info, record_full_delete)
6389 (record_full_is_replaying, record_full_will_replay)
6390 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6391 (record_full_stop_replaying): Refactor as methods of the
6392 record_full_base_target class.
6393 (record_full_core_resume, record_full_core_kill)
6394 (record_full_core_fetch_registers)
6395 (record_full_core_prepare_to_store)
6396 (record_full_core_store_registers, record_full_core_xfer_partial)
6397 (record_full_core_insert_breakpoint)
6398 (record_full_core_remove_breakpoint)
6399 (record_full_core_has_execution): Refactor
6400 as methods of the record_full_core_target class.
6401 (record_full_base_target::supports_delete_record): New.
6402 (init_record_full_ops): Delete.
6403 (init_record_full_core_ops): Delete.
6404 (record_full_save): Refactor as method of the
6405 record_full_base_target class.
6406 (_initialize_record_full): Remove references to
6407 init_record_full_ops and init_record_full_core_ops.
6409 * remote.c (remote_target, extended_remote_target): New classes.
6410 (remote_ops): Now a remote_target.
6411 (extended_remote_ops): Now an extended_remote_target.
6412 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6413 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6414 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6415 (remote_pass_signals, remote_set_syscall_catchpoint)
6416 (remote_program_signals, )
6417 (remote_thread_always_alive): Remove target_ops parameter.
6418 (remote_thread_alive, remote_thread_name)
6419 (remote_update_thread_list, remote_threads_extra_info)
6420 (remote_static_tracepoint_marker_at)
6421 (remote_static_tracepoint_markers_by_strid)
6422 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6423 (remote_open): Refactor as methods of remote_target.
6424 (extended_remote_open, extended_remote_detach)
6425 (extended_remote_attach, extended_remote_post_attach):
6426 (extended_remote_supports_disable_randomization)
6427 (extended_remote_create_inferior): : Refactor as method of
6428 extended_remote_target.
6429 (remote_set_permissions, remote_open_1, remote_detach)
6430 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6431 (remote_resume, remote_commit_resume, remote_stop)
6432 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6433 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6434 (remote_prepare_to_store, remote_store_registers)
6435 (remote_flash_erase, remote_flash_done, remote_files_info)
6436 (remote_kill, remote_mourn, remote_insert_breakpoint)
6437 (remote_remove_breakpoint, remote_insert_watchpoint)
6438 (remote_watchpoint_addr_within_range)
6439 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6440 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6441 (remote_supports_stopped_by_sw_breakpoint)
6442 (remote_stopped_by_hw_breakpoint)
6443 (remote_supports_stopped_by_hw_breakpoint)
6444 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6445 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6446 (remote_verify_memory): Refactor as methods of remote_target.
6447 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6449 (remote_xfer_partial, remote_get_memory_xfer_limit)
6450 (remote_search_memory, remote_rcmd, remote_memory_map)
6451 (remote_pid_to_str, remote_get_thread_local_address)
6452 (remote_get_tib_address, remote_read_description): Refactor as
6453 methods of remote_target.
6454 (remote_target::fileio_open, remote_target::fileio_pwrite)
6455 (remote_target::fileio_pread, remote_target::fileio_close): New.
6456 (remote_hostio_readlink, remote_hostio_fstat)
6457 (remote_filesystem_is_local, remote_can_execute_reverse)
6458 (remote_supports_non_stop, remote_supports_disable_randomization)
6459 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6460 (remote_supports_enable_disable_tracepoint)
6461 (remote_supports_string_tracing)
6462 (remote_can_run_breakpoint_commands, remote_trace_init)
6463 (remote_download_tracepoint, remote_can_download_tracepoint)
6464 (remote_download_trace_state_variable, remote_enable_tracepoint)
6465 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6466 (remote_trace_start, remote_get_trace_status)
6467 (remote_get_tracepoint_status, remote_trace_stop)
6468 (remote_trace_find, remote_get_trace_state_variable_value)
6469 (remote_save_trace_data, remote_get_raw_trace_data)
6470 (remote_set_disconnected_tracing, remote_core_of_thread)
6471 (remote_set_circular_trace_buffer, remote_traceframe_info)
6472 (remote_get_min_fast_tracepoint_insn_len)
6473 (remote_set_trace_buffer_size, remote_set_trace_notes)
6474 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6475 (remote_disable_btrace, remote_teardown_btrace)
6476 (remote_read_btrace, remote_btrace_conf)
6477 (remote_augmented_libraries_svr4_read, remote_load)
6478 (remote_pid_to_exec_file, remote_can_do_single_step)
6479 (remote_execution_direction, remote_thread_handle_to_thread_info):
6480 Refactor as methods of remote_target.
6481 (init_remote_ops, init_extended_remote_ops): Delete.
6482 (remote_can_async_p, remote_is_async_p, remote_async)
6483 (remote_thread_events, remote_upload_tracepoints)
6484 (remote_upload_trace_state_variables): Refactor as methods of
6486 (_initialize_remote): Remove references to init_remote_ops and
6487 init_extended_remote_ops.
6489 * remote-sim.c (gdbsim_target): New class.
6490 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6491 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6492 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6493 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6494 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6495 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6496 Refactor as methods of gdbsim_target.
6497 (gdbsim_ops): Now a gdbsim_target.
6498 (init_gdbsim_ops): Delete.
6499 (gdbsim_cntrl_c): Adjust.
6500 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6502 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6503 (the_amd64_linux_nat_target): New.
6504 (amd64_linux_fetch_inferior_registers)
6505 (amd64_linux_store_inferior_registers): Refactor as methods of
6506 amd64_linux_nat_target.
6507 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6508 * i386-linux-nat.c: Don't include "linux-nat.h".
6509 (i386_linux_nat_target): New class.
6510 (the_i386_linux_nat_target): New.
6511 (i386_linux_fetch_inferior_registers)
6512 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6513 as methods of i386_linux_nat_target.
6514 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6515 * inf-child.c (inf_child_ops): Delete.
6516 (inf_child_fetch_inferior_registers)
6517 (inf_child_store_inferior_registers): Delete.
6518 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6519 methods of inf_child_target.
6520 (inf_child_target::supports_terminal_ours)
6521 (inf_child_target::terminal_init)
6522 (inf_child_target::terminal_inferior)
6523 (inf_child_target::terminal_ours_for_output)
6524 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6525 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6527 (inf_child_open, inf_child_disconnect, inf_child_close)
6528 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6529 (inf_child_post_startup_inferior, inf_child_can_run)
6530 (inf_child_pid_to_exec_file): Refactor as methods of
6532 (inf_child_follow_fork): Delete.
6533 (inf_child_target::can_create_inferior)
6534 (inf_child_target::can_attach): New.
6535 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6536 (inf_child_target::has_stack, inf_child_target::has_registers)
6537 (inf_child_target::has_execution): New.
6538 (inf_child_fileio_open, inf_child_fileio_pwrite)
6539 (inf_child_fileio_pread, inf_child_fileio_fstat)
6540 (inf_child_fileio_close, inf_child_fileio_unlink)
6541 (inf_child_fileio_readlink, inf_child_use_agent)
6542 (inf_child_can_use_agent): Refactor as methods of
6544 (return_zero, inf_child_target): Delete.
6545 (inf_child_target::inf_child_target): New.
6546 * inf-child.h: Include "target.h".
6547 (inf_child_target): Delete function prototype.
6548 (inf_child_target): New class.
6549 (inf_child_open_target, inf_child_mourn_inferior)
6550 (inf_child_maybe_unpush_target): Delete.
6551 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6552 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6553 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6554 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6555 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6556 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6557 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6558 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6559 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6560 methods of inf_ptrace_target.
6561 (inf_ptrace_target): Delete function.
6562 * inf-ptrace.h: Include "inf-child.h".
6563 (inf_ptrace_target): Delete function declaration.
6564 (inf_ptrace_target): New class.
6565 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6566 * linux-nat.c (linux_target): New.
6567 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6568 (linux_nat_target::~linux_nat_target): New.
6569 (linux_child_post_attach, linux_child_post_startup_inferior)
6570 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6571 (linux_child_remove_fork_catchpoint)
6572 (linux_child_insert_vfork_catchpoint)
6573 (linux_child_remove_vfork_catchpoint)
6574 (linux_child_insert_exec_catchpoint)
6575 (linux_child_remove_exec_catchpoint)
6576 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6577 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6578 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6579 (linux_nat_stopped_data_address)
6580 (linux_nat_stopped_by_sw_breakpoint)
6581 (linux_nat_supports_stopped_by_sw_breakpoint)
6582 (linux_nat_stopped_by_hw_breakpoint)
6583 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6584 (linux_nat_kill, linux_nat_mourn_inferior)
6585 (linux_nat_xfer_partial, linux_nat_thread_alive)
6586 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6587 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6588 (linux_child_static_tracepoint_markers_by_strid)
6589 (linux_nat_is_async_p, linux_nat_can_async_p)
6590 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6591 (linux_nat_supports_multi_process)
6592 (linux_nat_supports_disable_randomization, linux_nat_async)
6593 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6594 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6595 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6596 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6597 methods of linux_nat_target.
6598 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6599 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6601 (check_stopped_by_watchpoint): Adjust.
6602 (linux_xfer_partial): Delete.
6603 (linux_target_install_ops, linux_target, linux_nat_add_target):
6605 (linux_nat_target::linux_nat_target): New.
6606 * linux-nat.h: Include "inf-ptrace.h".
6607 (linux_nat_target): New.
6608 (linux_target, linux_target_install_ops, linux_nat_add_target):
6609 Delete function declarations.
6610 (linux_target): Declare global.
6611 * linux-thread-db.c (thread_db_target): New.
6612 (thread_db_target::thread_db_target): New.
6613 (thread_db_ops): Delete.
6614 (the_thread_db_target): New.
6615 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6616 (thread_db_update_thread_list, thread_db_pid_to_str)
6617 (thread_db_extra_thread_info)
6618 (thread_db_thread_handle_to_thread_info)
6619 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6620 (thread_db_resume): Refactor as methods of thread_db_target.
6621 (init_thread_db_ops): Delete.
6622 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6623 * x86-linux-nat.c: Don't include "linux-nat.h".
6624 (super_post_startup_inferior): Delete.
6625 (x86_linux_nat_target::~x86_linux_nat_target): New.
6626 (x86_linux_child_post_startup_inferior)
6627 (x86_linux_read_description, x86_linux_enable_btrace)
6628 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6629 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6630 methods of x86_linux_nat_target.
6631 (x86_linux_create_target): Delete. Bits folded ...
6632 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6634 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6635 (x86_linux_nat_target): New class.
6636 (x86_linux_create_target): Delete.
6637 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6638 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6639 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6640 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6641 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6642 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6644 (x86_use_watchpoints): Delete.
6645 * x86-nat.h: Include "breakpoint.h" and "target.h".
6646 (x86_use_watchpoints): Delete.
6647 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6648 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6649 (x86_insert_watchpoint, x86_remove_watchpoint)
6650 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6651 (x86_stopped_by_hw_breakpoint): New declarations.
6652 (x86_nat_target): New template class.
6654 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6655 (the_ppc_linux_nat_target): New.
6656 (ppc_linux_fetch_inferior_registers)
6657 (ppc_linux_can_use_hw_breakpoint)
6658 (ppc_linux_region_ok_for_hw_watchpoint)
6659 (ppc_linux_ranged_break_num_registers)
6660 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6661 (ppc_linux_insert_mask_watchpoint)
6662 (ppc_linux_remove_mask_watchpoint)
6663 (ppc_linux_can_accel_watchpoint_condition)
6664 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6665 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6666 (ppc_linux_watchpoint_addr_within_range)
6667 (ppc_linux_masked_watch_num_registers)
6668 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6669 (ppc_linux_read_description): Refactor as methods of
6670 ppc_linux_nat_target.
6671 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6673 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6674 (procfs_target): New class.
6675 (the_procfs_target): New.
6676 (procfs_target): Delete function.
6677 (procfs_auxv_parse, procfs_attach, procfs_detach)
6678 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6679 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6680 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6681 (procfs_create_inferior, procfs_update_thread_list)
6682 (procfs_thread_alive, procfs_pid_to_str)
6683 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6684 (procfs_stopped_data_address, procfs_insert_watchpoint)
6685 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6686 (proc_find_memory_regions, procfs_info_proc)
6687 (procfs_make_note_section): Refactor as methods of procfs_target.
6688 (_initialize_procfs): Adjust.
6689 * sol-thread.c (sol_thread_target): New class.
6690 (sol_thread_ops): Now a sol_thread_target.
6691 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6692 (sol_thread_fetch_registers, sol_thread_store_registers)
6693 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6694 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6695 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6696 (init_sol_thread_ops): Delete.
6697 (_initialize_sol_thread): Adjust. Remove references to
6698 init_sol_thread_ops and complete_target_initialization.
6700 * windows-nat.c (windows_nat_target): New class.
6701 (windows_fetch_inferior_registers)
6702 (windows_store_inferior_registers, windows_resume, windows_wait)
6703 (windows_attach, windows_detach, windows_pid_to_exec_file)
6704 (windows_files_info, windows_create_inferior)
6705 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6706 (windows_close, windows_pid_to_str, windows_xfer_partial)
6707 (windows_get_tib_address, windows_get_ada_task_ptid)
6708 (windows_thread_name, windows_thread_alive): Refactor as
6709 windows_nat_target methods.
6710 (do_initial_windows_stuff): Adjust.
6711 (windows_target): Delete function.
6712 (_initialize_windows_nat): Adjust.
6714 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6715 (darwin_mourn_inferior, darwin_kill_inferior)
6716 (darwin_create_inferior, darwin_attach, darwin_detach)
6717 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6718 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6719 (darwin_supports_multi_process): Refactor as darwin_nat_target
6721 (darwin_resume_to, darwin_files_info): Delete.
6722 (_initialize_darwin_inferior): Rename to ...
6723 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6724 * darwin-nat.h: Include "inf-child.h".
6725 (darwin_nat_target): New class.
6726 (darwin_complete_target): Delete.
6727 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6728 (darwin_target): New.
6729 (i386_darwin_fetch_inferior_registers)
6730 (i386_darwin_store_inferior_registers): Refactor as methods of
6732 (darwin_complete_target): Delete, with ...
6733 (_initialize_i386_darwin_nat): ... bits factored out here.
6735 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6736 (the_alpha_linux_nat_target): New.
6737 (alpha_linux_register_u_offset): Refactor as
6738 alpha_linux_nat_target method.
6739 (_initialize_alpha_linux_nat): Adjust.
6740 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6741 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6742 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6743 methods of linux_nat_trad_target.
6744 (linux_trad_target): Delete.
6745 * linux-nat-trad.h (linux_trad_target): Delete function.
6746 (linux_nat_trad_target): New class.
6747 * mips-linux-nat.c (mips_linux_nat_target): New class.
6748 (super_fetch_registers, super_store_registers, super_close):
6750 (the_mips_linux_nat_target): New.
6751 (mips64_linux_regsets_fetch_registers)
6752 (mips64_linux_regsets_store_registers)
6753 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6754 (mips_linux_register_u_offset, mips_linux_read_description)
6755 (mips_linux_can_use_hw_breakpoint)
6756 (mips_linux_stopped_by_watchpoint)
6757 (mips_linux_stopped_data_address)
6758 (mips_linux_region_ok_for_hw_watchpoint)
6759 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6760 (mips_linux_close): Refactor as methods of mips_linux_nat.
6761 (_initialize_mips_linux_nat): Adjust to C++ification.
6763 * aix-thread.c (aix_thread_target): New class.
6764 (aix_thread_ops): Now an aix_thread_target.
6765 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6766 (aix_thread_fetch_registers, aix_thread_store_registers)
6767 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6768 (aix_thread_thread_alive, aix_thread_pid_to_str)
6769 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6770 Refactor as methods of aix_thread_target.
6771 (init_aix_thread_ops): Delete.
6772 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6773 and complete_target_initialization.
6774 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6775 (rs6000_nat_target): New class.
6776 (the_rs6000_nat_target): New.
6777 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6778 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6779 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6780 (super_create_inferior): Delete.
6781 (_initialize_rs6000_nat): Adjust to C++ification.
6783 * arm-linux-nat.c (arm_linux_nat_target): New class.
6784 (the_arm_linux_nat_target): New.
6785 (arm_linux_fetch_inferior_registers)
6786 (arm_linux_store_inferior_registers, arm_linux_read_description)
6787 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6788 (arm_linux_remove_hw_breakpoint)
6789 (arm_linux_region_ok_for_hw_watchpoint)
6790 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6791 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6792 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6793 arm_linux_nat_target.
6794 (_initialize_arm_linux_nat): Adjust to C++ification.
6796 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6797 (the_aarch64_linux_nat_target): New.
6798 (aarch64_linux_fetch_inferior_registers)
6799 (aarch64_linux_store_inferior_registers)
6800 (aarch64_linux_child_post_startup_inferior)
6801 (aarch64_linux_read_description)
6802 (aarch64_linux_can_use_hw_breakpoint)
6803 (aarch64_linux_insert_hw_breakpoint)
6804 (aarch64_linux_remove_hw_breakpoint)
6805 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6806 (aarch64_linux_region_ok_for_hw_watchpoint)
6807 (aarch64_linux_stopped_data_address)
6808 (aarch64_linux_stopped_by_watchpoint)
6809 (aarch64_linux_watchpoint_addr_within_range)
6810 (aarch64_linux_can_do_single_step): Refactor as methods of
6811 aarch64_linux_nat_target.
6812 (super_post_startup_inferior): Delete.
6813 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6815 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6816 (the_hppa_linux_nat_target): New.
6817 (hppa_linux_fetch_inferior_registers)
6818 (hppa_linux_store_inferior_registers): Refactor as methods of
6819 hppa_linux_nat_target.
6820 (_initialize_hppa_linux_nat): Adjust to C++ification.
6822 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6823 (the_ia64_linux_nat_target): New.
6824 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6825 (ia64_linux_stopped_data_address)
6826 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6827 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6828 ia64_linux_nat_target methods.
6829 (super_xfer_partial): Delete.
6830 (_initialize_ia64_linux_nat): Adjust to C++ification.
6832 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6833 (the_m32r_linux_nat_target): New.
6834 (m32r_linux_fetch_inferior_registers)
6835 (m32r_linux_store_inferior_registers): Refactor as
6836 m32r_linux_nat_target methods.
6837 (_initialize_m32r_linux_nat): Adjust to C++ification.
6839 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6840 (the_m68k_linux_nat_target): New.
6841 (m68k_linux_fetch_inferior_registers)
6842 (m68k_linux_store_inferior_registers): Refactor as
6843 m68k_linux_nat_target methods.
6844 (_initialize_m68k_linux_nat): Adjust to C++ification.
6846 * s390-linux-nat.c (s390_linux_nat_target): New class.
6847 (the_s390_linux_nat_target): New.
6848 (s390_linux_fetch_inferior_registers)
6849 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6850 (s390_insert_watchpoint, s390_remove_watchpoint)
6851 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6852 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6853 (s390_auxv_parse, s390_read_description): Refactor as methods of
6854 s390_linux_nat_target.
6855 (_initialize_s390_nat): Adjust to C++ification.
6857 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6858 (the_sparc_linux_nat_target): New.
6859 (_initialize_sparc_linux_nat): Adjust to C++ification.
6860 * sparc-nat.c (sparc_fetch_inferior_registers)
6861 (sparc_store_inferior_registers): Remove target_ops parameter.
6862 * sparc-nat.h (sparc_fetch_inferior_registers)
6863 (sparc_store_inferior_registers): Remove target_ops parameter.
6864 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6865 (the_sparc64_linux_nat_target): New.
6866 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6868 * spu-linux-nat.c (spu_linux_nat_target): New class.
6869 (the_spu_linux_nat_target): New.
6870 (spu_child_post_startup_inferior, spu_child_post_attach)
6871 (spu_child_wait, spu_fetch_inferior_registers)
6872 (spu_store_inferior_registers, spu_xfer_partial)
6873 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6875 (_initialize_spu_nat): Adjust to C++ification.
6877 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6878 (the_tilegx_linux_nat_target): New.
6879 (fetch_inferior_registers, store_inferior_registers):
6880 Refactor as methods.
6881 (_initialize_tile_linux_nat): Adjust to C++ification.
6883 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6884 (the_xtensa_linux_nat_target): New.
6885 (xtensa_linux_fetch_inferior_registers)
6886 (xtensa_linux_store_inferior_registers): Refactor as
6887 xtensa_linux_nat_target methods.
6888 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6890 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6891 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6892 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6893 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6894 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6895 (fbsd_stopped_by_sw_breakpoint)
6896 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6897 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6898 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6899 (fbsd_post_startup_inferior, fbsd_post_attach)
6900 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6901 (fbsd_set_syscall_catchpoint)
6902 (super_xfer_partial, super_resume, super_wait)
6903 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6904 (fbsd_handle_debug_trap): Remove target_ops parameter.
6905 (fbsd_nat_add_target): Delete.
6906 * fbsd-nat.h: Include "inf-ptrace.h".
6907 (fbsd_nat_add_target): Delete.
6908 (USE_SIGTRAP_SIGINFO): Define.
6909 (fbsd_nat_target): New class.
6911 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6912 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6913 (amd64bsd_target): Delete.
6914 * amd64-bsd-nat.h: New file.
6915 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6917 (amd64_fbsd_nat_target): New class.
6918 (the_amd64_fbsd_nat_target): New.
6919 (amd64fbsd_read_description): Refactor as method of
6920 amd64_fbsd_nat_target.
6921 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6922 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6923 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6924 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6925 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6926 (i386bsd_target): Delete.
6927 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6928 (i386bsd_fetch_inferior_registers)
6929 (i386bsd_store_inferior_registers): Declare.
6930 (i386_bsd_nat_target): New class.
6931 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6932 (the_i386_fbsd_nat_target): New.
6933 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6934 i386_fbsd_nat_target methods.
6935 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6936 (_initialize_i386fbsd_nat): Adjust to C++ification.
6937 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6938 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6939 (_initialize_x86_bsd_nat): Adjust to C++ification.
6940 * x86-bsd-nat.h: Include "x86-nat.h".
6941 (x86bsd_target): Delete declaration.
6942 (x86bsd_nat_target): New class.
6944 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6945 (the_aarch64_fbsd_nat_target): New.
6946 (aarch64_fbsd_fetch_inferior_registers)
6947 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6948 aarch64_fbsd_nat_target.
6949 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6950 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6951 (the_alpha_bsd_nat_target): New.
6952 (alphabsd_fetch_inferior_registers)
6953 (alphabsd_store_inferior_registers): Refactor as
6954 alpha_bsd_nat_target methods.
6955 (_initialize_alphabsd_nat): Refactor as methods of
6956 alpha_bsd_nat_target.
6957 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6958 (the_amd64_nbsd_nat_target): New.
6959 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6960 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6961 (the_amd64_obsd_nat_target): New.
6962 (_initialize_amd64obsd_nat): Adjust to C++ification.
6963 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6964 (the_arm_fbsd_nat_target): New.
6965 (arm_fbsd_fetch_inferior_registers)
6966 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6967 (_initialize_arm_fbsd_nat): Refactor as methods of
6968 arm_fbsd_nat_target.
6969 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6970 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6971 (the_arm_netbsd_nat_target): New.
6972 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6973 arm_netbsd_nat_target.
6974 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6975 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6976 (the_hppa_nbsd_nat_target): New.
6977 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6978 hppa_nbsd_nat_target methods.
6979 (_initialize_hppanbsd_nat): Adjust to C++ification.
6980 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6981 (the_hppa_obsd_nat_target): New.
6982 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6983 methods of hppa_obsd_nat_target.
6984 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6986 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6987 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6989 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6990 (_initialize_i386obsd_nat): Use add_target.
6991 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6992 (the_m68k_bsd_nat_target): New.
6993 (m68kbsd_fetch_inferior_registers)
6994 (m68kbsd_store_inferior_registers): Refactor as methods of
6995 m68k_bsd_nat_target.
6996 (_initialize_m68kbsd_nat): Adjust to C++ification.
6997 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6998 (the_mips_fbsd_nat_target): New.
6999 (mips_fbsd_fetch_inferior_registers)
7000 (mips_fbsd_store_inferior_registers): Refactor as methods of
7001 mips_fbsd_nat_target.
7002 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7004 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7005 (the_mips_nbsd_nat_target): New.
7006 (mipsnbsd_fetch_inferior_registers)
7007 (mipsnbsd_store_inferior_registers): Refactor as methods of
7008 mips_nbsd_nat_target.
7009 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7010 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7011 (the_mips64_obsd_nat_target): New.
7012 (mips64obsd_fetch_inferior_registers)
7013 (mips64obsd_store_inferior_registers): Refactor as methods of
7014 mips64_obsd_nat_target.
7015 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7017 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7019 * nbsd-nat.h: Include "inf-ptrace.h".
7020 (nbsd_nat_target): New class.
7021 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7022 (obsd_wait): Refactor as methods of obsd_nat_target.
7023 (obsd_add_target): Delete.
7024 * obsd-nat.h: Include "inf-ptrace.h".
7025 (obsd_nat_target): New class.
7026 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7027 (the_ppc_fbsd_nat_target): New.
7028 (ppcfbsd_fetch_inferior_registers)
7029 (ppcfbsd_store_inferior_registers): Refactor as methods of
7030 ppc_fbsd_nat_target.
7031 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7033 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7034 (the_ppc_nbsd_nat_target): New.
7035 (ppcnbsd_fetch_inferior_registers)
7036 (ppcnbsd_store_inferior_registers): Refactor as methods of
7037 ppc_nbsd_nat_target.
7038 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7039 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7040 (the_ppc_obsd_nat_target): New.
7041 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7042 methods of ppc_obsd_nat_target.
7043 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7045 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7046 (the_sh_nbsd_nat_target): New.
7047 (shnbsd_fetch_inferior_registers)
7048 (shnbsd_store_inferior_registers): Refactor as methods of
7050 (_initialize_shnbsd_nat): Adjust to C++ification.
7051 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7052 (inf_ptrace_xfer_partial): Delete.
7053 (sparc_xfer_partial, sparc_target): Delete.
7054 * sparc-nat.h (sparc_fetch_inferior_registers)
7055 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7056 (sparc_target): Delete function declaration.
7057 (sparc_target): New template class.
7058 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7059 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7060 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7061 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7063 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7064 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7065 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7066 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7068 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7069 (the_vax_bsd_nat_target): New.
7070 (vaxbsd_fetch_inferior_registers)
7071 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7073 (_initialize_vaxbsd_nat): Adjust to C++ification.
7075 * bsd-kvm.c (bsd_kvm_target): New class.
7076 (bsd_kvm_ops): Now a bsd_kvm_target.
7077 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7078 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7079 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7081 (bsd_kvm_return_one): Delete.
7082 (bsd_kvm_add_target): Adjust to C++ification.
7084 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7085 (nto_procfs_target_procfs): New classes.
7086 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7087 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7088 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7089 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7090 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7091 (procfs_remove_hw_breakpoint, procfs_resume)
7092 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7093 (procfs_kill_inferior, procfs_store_registers)
7094 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7095 as methods of nto_procfs_target.
7096 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7097 (nto_native_ops): Delete.
7098 (procfs_open, procfs_native_open): Delete.
7099 (nto_native_ops): Now an nto_procfs_target_native.
7100 (init_procfs_targets): Adjust to C++ification.
7101 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7102 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7103 Refactor as methods of nto_procfs_target.
7105 * go32-nat.c (go32_nat_target): New class.
7106 (the_go32_nat_target): New.
7107 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7108 (go32_store_registers, go32_xfer_partial, go32_files_info)
7109 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7110 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7111 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7112 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7113 (go32_target): Delete.
7114 (_initialize_go32_nat): Adjust to C++ification.
7116 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7117 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7118 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7119 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7121 (gnu_target): Delete.
7122 * gnu-nat.h (gnu_target): Delete.
7123 (gnu_nat_target): New class.
7124 * i386-gnu-nat.c (gnu_base_target): New.
7125 (i386_gnu_nat_target): New class.
7126 (the_i386_gnu_nat_target): New.
7127 (_initialize_i386gnu_nat): Adjust to C++ification.
7129 2018-05-02 Pedro Alves <palves@redhat.com>
7131 * bfd-target.c (target_bfd_xclose): Rename to ...
7132 (target_bfd_close): ... this.
7133 (target_bfd_reopen): Adjust.
7134 * target.c (target_close): Remove references to to_xclose.
7135 * target.h (target_ops::to_xclose): Delete.
7136 (target_ops::to_close): Update comments.
7138 2018-05-02 Pedro Alves <palves@redhat.com>
7140 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7142 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7143 * inf-ptrace.c (inf_ptrace_register_u_offset)
7144 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7145 (inf_ptrace_store_register, inf_ptrace_store_registers)
7146 (inf_ptrace_trad_target): Move to ...
7147 * linux-nat-trad.c: ... this new file.
7148 * linux-nat-trad.h: New file.
7149 * linux-nat.c (linux_target_install_ops): Make extern.
7150 (linux_trad_target): Delete.
7151 * linux-nat.h (linux_trad_target): Delete declaration.
7152 (linux_target_install_ops): Declare.
7153 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7156 2018-05-02 Pedro Alves <palves@redhat.com>
7158 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7159 procfs_target/add_target here.
7160 * procfs.c (procfs_target): Make static.
7161 (_initialize_procfs): Call add_target here.
7162 * procfs.h (struct target_ops): Remove forward declaration.
7163 (procfs_target): Remove declaration.
7164 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7166 2018-05-02 Pedro Alves <palves@redhat.com>
7168 * procfs.c (procfs_stopped_by_watchpoint)
7169 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7170 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7172 (procfs_use_watchpoints): Delete, move contents...
7173 (procfs_target): ... here.
7174 * procfs.h (procfs_use_watchpoints): Delete declaration.
7175 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7176 procfs_use_watchpoints.
7177 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7178 procfs_use_watchpoints.
7180 2018-05-02 Tom Tromey <tom@tromey.com>
7183 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7184 and var_zuinteger_unlimited.
7185 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7186 and PARAM_ZUINTEGER_UNLIMITED.
7187 (set_parameter_value): Handle var_zuinteger and
7188 var_zuinteger_unlimited.
7189 (add_setshow_generic): Likewise.
7190 (parmpy_init): Likewise.
7192 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7195 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7196 pointer is not null before dereferencing it.
7198 2018-04-30 Tom Tromey <tom@tromey.com>
7200 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7203 2018-04-30 Tom Tromey <tom@tromey.com>
7205 * breakpoint.c (mention): Remove use of is_mi_like_p.
7206 (print_mention_ranged_breakpoint): Likewise.
7207 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7210 2018-04-30 Tom Tromey <tom@tromey.com>
7212 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7214 2018-04-30 Tom Tromey <tom@tromey.com>
7216 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7217 (info_spu_event_command): Remove some uses of is_mi_like_p.
7219 2018-04-30 Tom Tromey <tom@tromey.com>
7221 * python/py-framefilter.c (py_print_single_arg)
7222 (enumerate_locals, py_print_args, py_print_frame): Remove some
7223 uses of is_mi_like_p.
7225 2018-04-30 Tom Tromey <tom@tromey.com>
7228 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7229 * ui-out.h (ui_out::is_mi_like_p): Now const.
7230 (ui_out::do_is_mi_like_p): Now const.
7231 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7233 2018-04-30 Tom Tromey <tom@tromey.com>
7235 * varobj.c (varobj_set_visualizer): Use new_reference.
7236 * python/python.c (gdbpy_decode_line): Use new_reference.
7237 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7240 2018-04-30 Tom Tromey <tom@tromey.com>
7242 * varobj.c (install_new_value): Use new_reference.
7243 * value.h (value_incref): Return void. Swap intro comment with
7245 * value.c (set_value_parent): Use new_reference.
7246 (value_incref): Return void. Update intro comment.
7247 (release_value): Use new_reference.
7248 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7250 2018-04-30 Tom Tromey <tom@tromey.com>
7252 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7253 * gdb_bfd.h (new_bfd_ref): Remove.
7254 (gdb_bfd_open): Update comment.
7255 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7256 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7257 (gdb_bfd_fdopenr): Use new_reference.
7258 * exec.c (exec_file_attach): Use new_reference.
7260 2018-04-30 Tom Tromey <tom@tromey.com>
7262 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7265 2018-04-30 Tom Tromey <tom@tromey.com>
7267 * jit.c (jit_read_code_entry): Use type_align.
7268 * i386-tdep.c (i386_gdbarch_init): Don't call
7269 set_gdbarch_long_long_align_bit.
7270 * gdbarch.sh: Remove long_long_align_bit.
7271 * gdbarch.c, gdbarch.h: Rebuild.
7272 * arc-tdep.c (arc_type_align): New function.
7273 (arc_gdbarch_init): Use arc_type_align. Don't call
7274 set_gdbarch_long_long_align_bit.
7276 2018-04-30 Tom Tromey <tom@tromey.com>
7278 * rust-lang.c (rust_type_alignment): Remove.
7279 (rust_composite_type): Use type_align.
7281 2018-04-30 Tom Tromey <tom@tromey.com>
7283 * NEWS: Mention Type.align.
7284 * python/py-type.c (typy_get_alignof): New function.
7285 (type_object_getset): Add "alignof".
7287 2018-04-30 Tom Tromey <tom@tromey.com>
7291 * std-operator.def (UNOP_ALIGNOF): New operator.
7292 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7294 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7295 * c-lang.c (c_op_print_tab): Add alignof.
7296 * c-exp.y (ALIGNOF): New token.
7297 (exp): Add "ALIGNOF" production.
7298 (ident_tokens): Add _Alignof and alignof.
7300 2018-04-30 Tom Tromey <tom@tromey.com>
7302 * i386-tdep.c (i386_type_align): New function.
7303 (i386_gdbarch_init): Update.
7304 * gdbarch.sh (type_align): New method.
7305 * gdbarch.c, gdbarch.h: Rebuild.
7306 * arch-utils.h (default_type_align): Declare.
7307 * arch-utils.c (default_type_align): New function.
7308 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7309 (struct type) <align_log2>: New field.
7310 <instance_flags>: Now a bitfield.
7311 (TYPE_RAW_ALIGN): New macro.
7312 (type_align, type_raw_align, set_type_align): Declare.
7313 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7315 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7316 (get_alignment, maybe_set_alignment): New functions.
7317 (read_structure_type, read_enumeration_type, read_array_type)
7318 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7319 (read_subrange_type, read_base_type): Set type alignment.
7321 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7323 * dwarf2read.c (read_index_from_section): Use bool.
7325 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7328 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7331 2018-04-29 John Reiser <jreiser@BitWagon.com>
7334 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7335 last step, and do it atomically.
7337 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7339 * compile/compile-c-types.c (convert_int, convert_float):
7342 2018-04-27 Tom Tromey <tom@tromey.com>
7345 * rust-lang.c (rust_inclusive_range_type_p): New function.
7346 (rust_range): Handle inclusive ranges.
7347 (rust_compute_range): Likewise.
7348 * rust-exp.y (struct rust_op) <inclusive>: New field.
7349 (DOTDOTEQ): New constant.
7350 (range_expr): Add "..=" productions.
7351 (operator_tokens): Add "..=" token.
7352 (ast_range): Add "inclusive" parameter.
7353 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7355 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7357 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7358 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7360 * expprint.c (print_subexp_standard): Handle new bounds values.
7361 (dump_subexp_body_standard): Likewise.
7363 2018-04-27 Tom Tromey <tom@tromey.com>
7365 * configure: Rebuild.
7366 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7367 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7369 (class symbol_needs_eval_context): Likewise.
7370 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7371 (mock_mapped_index::symbol_name_at): Use "override". Remove
7373 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7375 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7376 * aarch64-tdep.c (instruction_reader::read): Use "override".
7377 (instruction_reader_test::read): Likewise.
7378 * arm-tdep.c (instruction_reader::read): Use "override".
7379 (instruction_reader_thumb::read): Likewise.
7381 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7384 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7385 instead of remote_send.
7386 (remote_send): Remove.
7388 2018-04-26 Pedro Alves <palves@redhat.com>
7390 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7391 find_function_start_sal instead of find_pc_line.
7393 2018-04-26 Pedro Alves <palves@redhat.com>
7395 * breakpoint.c (set_breakpoint_location_function): Handle
7397 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7398 * elfread.c (elf_symtab_read): Give data symbols with
7399 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7400 (elf_rel_plt_read): Update comment.
7401 * linespec.c (convert_linespec_to_sals): Handle
7403 (minsym_found): Handle mst_data_gnu_ifunc.
7404 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7405 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7406 * parse.c (find_minsym_type_and_address): Handle
7408 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7409 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7410 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7412 <mst_data_gnu_ifunc>: New enumerator.
7414 2018-04-26 Pedro Alves <palves@redhat.com>
7416 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7417 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7418 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7420 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7421 (lookup_minimal_symbol_by_pc): Adjust.
7422 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7423 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7424 * minsyms.h (lookup_msym_prefer): New enum.
7425 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7426 parameter by a lookup_msym_prefer parameter.
7428 2018-04-26 Pedro Alves <palves@redhat.com>
7430 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7431 ends in "@plt" instead of looking at the symbol's section.
7433 2018-04-26 Pedro Alves <palves@redhat.com>
7435 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7437 (find_pc_partial_function_gnu_ifunc): Rename to ...
7438 (find_pc_partial_function): ... this, and remove references to
7440 (find_pc_partial_function): Delete old implementation.
7441 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7443 2018-04-26 Pedro Alves <palves@redhat.com>
7445 * linespec.c (struct bound_minimal_symbol_search_key): New.
7446 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7447 skip first line if we found a GNU ifunc minimal symbol by name.
7448 (compare_msymbols): Change parameters to work with a destructured
7450 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7453 2018-04-26 Pedro Alves <palves@redhat.com>
7455 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7456 ifunc targets here. Instead, if we have an ifunc minsym, use its
7458 (add_location_to_breakpoint): Store the minsym and the objfile in
7459 the breakpoint location.
7460 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7461 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7462 Record the minsym in the sal.
7463 * symtab.h (symtab_and_line) <msymbol>: New field.
7465 2018-04-26 Pedro Alves <palves@redhat.com>
7467 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7468 unless we actually resolved the ifunc.
7470 2018-04-26 Pedro Alves <palves@redhat.com>
7472 * c-exp.y (variable production): Prefer ifunc minsyms over
7473 regular function symbols.
7474 * symtab.c (find_gnu_ifunc): New function.
7475 * minsyms.h (lookup_msym_prefer): New enum.
7476 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7477 parameter by a lookup_msym_prefer parameter.
7478 * symtab.h (find_gnu_ifunc): New declaration.
7480 2018-04-26 Pedro Alves <palves@redhat.com>
7482 * blockframe.c (find_gnu_ifunc_target_type): New function.
7483 (find_function_type): New.
7484 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7485 return a value with a memory address.
7486 (eval_call): For calls to GNU ifunc functions, try to find the
7487 type of the target function from the type that the resolver
7489 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7491 * infcall.c (find_function_return_type): Delete.
7492 (find_function_addr): Add 'function_type' parameter. For calls to
7493 GNU ifunc functions, try to find the type of the target function
7494 from the type that the resolver returns, and return it via
7496 (call_function_by_hand_dummy): Adjust to use the function type
7497 returned by find_function_addr.
7498 (find_function_addr): Add 'function_type' parameter and move
7500 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7503 2018-04-26 Pedro Alves <palves@redhat.com>
7505 * c-exp.y (variable production): Skip finding an alias for ifunc
7508 2018-04-26 Pedro Alves <palves@redhat.com>
7510 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7512 2018-04-25 Pedro Alves <palves@redhat.com>
7514 * infcmd.c (kill_command): Print the pid as string, not the whole
7515 thread's ptid. Add comment. s/has been killed/killed/ in output
7517 * remote.c (remote_detach_1): Print the pid as string, not the
7518 whole thread's ptid.
7520 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7521 Sergio Durigan Junior <sergiodj@redhat.com>
7522 Pedro Alves <palves@redhat.com>
7524 * infcmd.c (kill_command): Print message when inferior has
7526 * inferior.c (print_inferior_events): Remove 'static'. Set as
7528 (add_inferior): Improve message printed when
7529 'print_inferior_events' is on.
7530 (exit_inferior): Remove message printed when
7531 'print_inferior_events' is on.
7532 (detach_inferior): Improve message printed when
7533 'print_inferior_events' is on.
7534 (initialize_inferiors): Use 'add_inferior_silent' to set
7535 'current_inferior_'.
7536 * inferior.h (print_inferior_events): Declare here as
7538 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7539 '[Detaching...]' messages when 'print_inferior_events' is on.
7540 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7541 as prefix/suffix for messages. Remove periods. Fix erroneous
7542 'Detaching after fork from child...', replace it by '... from
7544 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7545 prefix/suffix when printing 'Detaching...' messages. Print
7546 them when 'print_inferior_events' is on.
7547 * remote.c (remote_detach_1): Print message when detaching
7548 from inferior and '!is_fork_parent'.
7550 2018-04-24 Tom Tromey <tom@tromey.com>
7552 * cli-out.h: Reindent.
7554 2018-04-24 Tom Tromey <tom@tromey.com>
7556 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7557 (cli_ui_out::do_field_string): Use fputs_filtered.
7558 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7560 2018-04-23 Tom Tromey <tom@tromey.com>
7562 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7563 gdb::unique_xmalloc_ptr.
7565 2018-04-23 Tom Tromey <tom@tromey.com>
7567 * configure: Rebuild.
7569 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7572 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7573 prepare_for_testing. Set normal_bp to r_debug_state if target
7576 2018-04-21 Pedro Alves <palves@redhat.com>
7577 Rajendra SY <rajendra.sy@gmail.com>
7579 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7580 * remote.c (extended_remote_attach): In all-stop mode, mark the
7581 thread as executing.
7583 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7585 * thread.c (thread_apply_all_command): Fix comment.
7586 (thread_command): Fix comment.
7588 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7590 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7592 * features/aarch64-core.c (create_feature_aarch64_core):
7594 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7596 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7598 * features/i386/32bit-avx512.c
7599 (create_feature_i386_32bit_avx512): Likewise.
7600 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7602 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7604 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7606 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7608 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7610 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7612 * features/i386/64bit-avx512.c
7613 (create_feature_i386_64bit_avx512): Likewise.
7614 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7616 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7618 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7620 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7622 * features/i386/64bit-segments.c
7623 (create_feature_i386_64bit_segments): Likewise.
7624 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7626 * features/i386/x32-core.c
7627 (create_feature_i386_x32_core): Likewise.
7628 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7629 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7630 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7631 * target-descriptions.c: In generated code, don't pass xml
7634 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7636 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7637 (print_xml_feature::visit_post): Likewise.
7638 (print_xml_feature::visit): Likewise.
7639 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7640 (print_xml_feature): Add new class.
7641 * regformats/regdat.sh: Null xmltarget on feature targets.
7642 * target-descriptions.c (struct target_desc): Add xmltarget.
7643 (maintenance_check_tdesc_xml_convert): Add unittest function.
7644 (tdesc_get_features_xml): Add function to get xml.
7645 (maintenance_check_xml_descriptions): Test xml generation.
7646 * xml-tdesc.c (string_read_description_xml): Add function.
7647 * xml-tdesc.h (string_read_description_xml): Add declaration.
7649 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7651 * features/Makefile: Add feature marker to targets with new style
7652 target descriptions.
7653 * regformats/aarch64.dat: Regenerate.
7654 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7655 * regformats/i386/amd64-avx-linux.dat: Likewise.
7656 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7657 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7658 * regformats/i386/amd64-linux.dat: Likewise.
7659 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7660 * regformats/i386/amd64.dat: Likewise.
7661 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7662 * regformats/i386/i386-avx-linux.dat: Likewise.
7663 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7664 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7665 * regformats/i386/i386-linux.dat: Likewise.
7666 * regformats/i386/i386-mmx-linux.dat: Likewise.
7667 * regformats/i386/i386-mpx-linux.dat: Likewise.
7668 * regformats/i386/i386.dat: Likewise.
7669 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7670 * regformats/i386/x32-avx-linux.dat: Likewise.
7671 * regformats/i386/x32-linux.dat: Likewise.
7672 * regformats/tic6x-c62x-linux.dat: Likewise.
7673 * regformats/tic6x-c64x-linux.dat: Likewise.
7674 * regformats/tic6x-c64xp-linux.dat: Likewise.
7675 * regformats/regdat.sh: Parse feature marker.
7677 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7679 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7680 (tdesc_osabi_name): Likewise.
7681 * target-descriptions.c (tdesc_architecture_name): Add new
7683 (tdesc_osabi_name): Likewise.
7685 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7687 * common/tdesc.c (tdesc_predefined_type): Move to here.
7688 (tdesc_named_type): Likewise.
7689 (tdesc_create_vector): Likewise.
7690 (tdesc_create_struct): Likewise.
7691 (tdesc_set_struct_size): Likewise.
7692 (tdesc_create_union): Likewise.
7693 (tdesc_create_flags): Likewise.
7694 (tdesc_create_enum): Likewise.
7695 (tdesc_add_field): Likewise.
7696 (tdesc_add_typed_bitfield): Likewise.
7697 (tdesc_add_bitfield): Likewise.
7698 (tdesc_add_flag): Likewise.
7699 (tdesc_add_enum_value): Likewise.
7700 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7701 (struct tdesc_type_vector): Likewise.
7702 (struct tdesc_type_field): Likewise.
7703 (struct tdesc_type_with_fields): Likewise.
7704 (tdesc_create_enum): Add declaration.
7705 (tdesc_add_typed_bitfield): Likewise.
7706 (tdesc_add_enum_value): Likewise.
7707 * target-descriptions.c (tdesc_type_field): Move from here.
7708 (tdesc_type_builtin): Likewise.
7709 (tdesc_type_vector): Likewise.
7710 (tdesc_type_with_fields): Likewise.
7711 (tdesc_predefined_types): Likewise.
7712 (tdesc_named_type): Likewise.
7713 (tdesc_create_vector): Likewise.
7714 (tdesc_create_struct): Likewise.
7715 (tdesc_set_struct_size): Likewise.
7716 (tdesc_create_union): Likewise.
7717 (tdesc_create_flags): Likewise.
7718 (tdesc_create_enum): Likewise.
7719 (tdesc_add_field): Likewise.
7720 (tdesc_add_typed_bitfield): Likewise.
7721 (tdesc_add_bitfield): Likewise.
7722 (tdesc_add_flag): Likewise.
7723 (tdesc_add_enum_value): Likewise.
7724 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7725 (tdesc_add_typed_bitfield): Likewise.
7726 (tdesc_add_enum_value): Likewise.
7728 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7730 * common/tdesc.c (tdesc_feature::accept): Move to here.
7731 (tdesc_feature::operator==): Likewise.
7732 (tdesc_create_reg): Likewise.
7733 * common/tdesc.h (tdesc_type_kind): Likewise.
7734 (struct tdesc_type): Likewise.
7735 (struct tdesc_feature): Likewise.
7736 * regformats/regdat.sh: Create a feature.
7737 * target-descriptions.c (tdesc_type_kind): Move from here.
7738 (tdesc_type): Likewise.
7739 (tdesc_type_up): Likewise.
7740 (tdesc_feature): Likewise.
7741 (tdesc_create_reg): Likewise.
7743 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7745 * Makefile.in: Add arch/tdesc.c
7746 * common/tdesc.c: New file.
7747 * common/tdesc.h (tdesc_element_visitor): Move to here.
7748 (tdesc_element): Likewise.
7749 (tdesc_reg): Likewise.
7750 (tdesc_reg_up): Likewise.
7751 * regformats/regdef.h (reg): Add offset to constructors.
7752 * target-descriptions.c (tdesc_element_visitor): Move from here.
7753 (tdesc_element): Likewise.
7754 (tdesc_reg): Likewise.
7755 (tdesc_reg_up): Likewise.
7757 2018-04-17 Tom Tromey <tom@tromey.com>
7759 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7762 2018-04-17 Tom Tromey <tom@tromey.com>
7764 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7766 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7768 * symtab.c (print_symbol_info): Skip printing filename and line
7769 number when `last' is NULL.
7770 (symtab_symbol_info): Use empty string instead of NULL for first
7771 invocation of print_symbol_info.
7772 (rbreak_command): Pass NULL to `last' parameter of
7775 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7777 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7780 2018-04-16 Pedro Alves <palves@redhat.com>
7782 * MAINTAINERS (sh): Remove.
7783 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7784 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7785 (ALLDEPFILES): Remove sh64-tdep.c.
7786 * NEWS: Mentions that support for SH-5/SH64 is removed.
7787 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7788 (sh*-*-openbsd*): Ditto.
7789 (sh64-*-elf*): Remove.
7791 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7792 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7793 * sh-tdep.c: No longer include "sh64-tdep.h".
7794 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7795 * sh64-tdep.c, sh64-tdep.h: Remove files.
7797 2018-04-16 Pedro Alves <palves@redhat.com>
7799 * MAINTAINERS: Remove m88k.
7800 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7801 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7802 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7803 * NEWS: Mention that support for m88k was removed.
7804 * configure.host (m88*-*-*): Remove support.
7805 * configure.nat (m88k-*-*): Remove support.
7806 * configure.tgt (m88*-*-openbsd*): Remove.
7807 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7809 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7811 * configure.tgt (x86_tobjs): New variable.
7812 (amd64_tobjs, i386_tobjs): Use it.
7814 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7816 * symtab.c (print_symbol_info): Precede the symbol definition by
7817 the line number when available.
7818 * NEWS: Advertise this enhancement.
7820 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7822 * NEWS (New options): announce set/show record btrace cpu.
7823 * btrace.c: Include record-btrace.h.
7824 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7825 the vendor is unknown.
7826 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7827 Maybe overwrite the btrace configuration's cpu.
7828 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7829 (btrace_fetch): Add cpu parameter. Update callers.
7830 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7831 Maybe overwrite the btrace configuration's cpu. Skip enabling
7832 errata workarounds if the vendor is unknown.
7833 * python/py-record-btrace.c: Include record-btrace.h.
7834 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7835 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7836 * record-btrace.c (record_btrace_cpu_state_kind): New.
7837 (record_btrace_cpu): New.
7838 (set_record_btrace_cpu_cmdlist): New.
7839 (record_btrace_get_cpu): New.
7840 (require_btrace_thread, record_btrace_info)
7841 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7842 (cmd_set_record_btrace_cpu_none): New.
7843 (cmd_set_record_btrace_cpu_auto): New.
7844 (cmd_set_record_btrace_cpu): New.
7845 (cmd_show_record_btrace_cpu): New.
7846 (_initialize_record_btrace): Initialize set/show record btrace cpu
7848 * record-btrace.h (record_btrace_get_cpu): New.
7850 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7852 * record.c (set_record_command): Fix typo in message.
7854 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7856 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7858 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7860 * infrun.c (process_event_stop_test): Call
7861 gdbarch_in_indirect_branch_thunk.
7862 * gdbarch.sh (in_indirect_branch_thunk): New.
7863 * gdbarch.c: Regenerated.
7864 * gdbarch.h: Regenerated.
7867 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7868 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7869 (ALLDEPFILES): Add x86-tdep.c.
7870 * arch-utils.h (default_in_indirect_branch_thunk): New.
7871 * arch-utils.c (default_in_indirect_branch_thunk): New.
7872 * i386-tdep: Include x86-tdep.h.
7873 (i386_in_indirect_branch_thunk): New.
7874 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7876 * amd64-tdep: Include x86-tdep.h.
7877 (amd64_in_indirect_branch_thunk): New.
7878 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7880 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7883 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7884 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7885 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7888 2018-04-12 Tom Tromey <tom@tromey.com>
7890 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7891 (rust_evaluate_subexp): Likewise.
7893 2018-04-12 Pedro Alves <palves@redhat.com>
7895 * procfs.c (procfs_detach): Make forward declaration's prototype
7896 match definition's protototype.
7897 (proc_get_LDT_entry): Remove stale do_cleanups call.
7899 2018-04-12 Pedro Alves <palves@redhat.com>
7901 * target.h (target_ops::to_has_exited): Delete.
7902 (target_has_exited): Delete.
7903 * target-delegates.c: Regenerate.
7905 2018-04-11 Pedro Alves <palves@redhat.com>
7907 * target.c (fileio_fh_t::t): Add comment.
7908 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7909 (target_fileio_close): Handle a NULL target.
7910 (invalidate_fileio_fh): New.
7911 (target_close): Call it.
7912 * remote.c (remote_hostio_send_command): No longer check whether
7913 remote_desc is open.
7915 2018-04-11 Pedro Alves <palves@redhat.com>
7917 * target.c (fileio_fh_t): Make it a named struct instead of a
7919 (fileio_fh_t::is_closed): New method.
7920 (DEF_VEC_O (fileio_fh_t)): Remove.
7921 (fileio_fhandles): Now a std::vector.
7922 (is_closed_fileio_fh): Delete.
7923 (acquire_fileio_fd): Adjust. Rename parameters.
7924 (release_fileio_fd): Adjust.
7925 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7926 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7927 (target_fileio_close): Adjust.
7929 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7931 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7934 2018-04-10 Pedro Alves <palves@redhat.com>
7936 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7937 (scoped_finish_thread_state): New class.
7938 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7940 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7941 (fetch_inferior_event, normal_stop): Likewise.
7942 * thread.c (finish_thread_state_cleanup): Delete.
7944 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7945 Pedro Alves <palves@redhat.com>
7947 * value.c: Include "selftest.h" and "common/array-view.h".
7948 (struct range) <operator ==>: New.
7949 (test_ranges_contain): New.
7950 (check_ranges_vector): New.
7951 (test_insert_into_bit_range_vector): New.
7952 (_initialize_values): Register selftests.
7953 * common/array-view.h (operator==, operator!=): New.
7955 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7957 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7959 * inline-frame.c: Include <algorithm>.
7960 (struct inline_state): Add constructor.
7961 (inline_state_s): Remove.
7962 (DEF_VEC_O(inline_state_s)): Remove.
7963 (inline_states): Change type to std::vector.
7964 (find_inline_frame_state): Adjust to std::vector.
7965 (allocate_inline_frame_state): Remove.
7966 (clear_inline_frame_state): Adjust to std::vector.
7967 (skip_inline_frames): Adjust to std::vector.
7969 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7971 * tracepoint.h (struct trace_state_variable): Add constructor.
7972 <name>: Change type to std::string.
7973 * tracepoint.c (tsv_s): Remove.
7974 (DEF_VEC_O(tsv_s)): Remove.
7975 (tvariables): Change to std::vector.
7976 (create_trace_state_variable): Adjust to std::vector.
7977 (find_trace_state_variable): Likewise.
7978 (find_trace_state_variable_by_number): Likewise.
7979 (delete_trace_state_variable): Likewise.
7980 (trace_variable_command): Adjust to std::string.
7981 (delete_trace_variable_command): Likewise.
7982 (tvariables_info_1): Adjust to std::vector.
7983 (save_trace_state_variables): Likewise.
7984 (start_tracing): Likewise.
7985 (merge_uploaded_trace_state_variables): Adjust to std::vector
7987 * target.h (struct target_ops)
7988 <to_download_trace_state_variable>: Pass reference to
7989 trace_state_variable.
7990 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7991 * target-delegates.c: Re-generate.
7992 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7993 (mi_tsv_deleted): Likewise.
7994 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7995 * remote.c (remote_download_trace_state_variable): Change
7996 pointer to reference and adjust.
7997 * make-target-delegates (parse_argtypes): Handle references.
7998 (write_function_header): Likewise.
7999 (munge_type): Likewise.
8001 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8003 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8004 string_view-selftests.c.
8005 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8007 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8008 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8009 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8010 * unittests/basic_string_view/element_access/char/1.cc:
8012 * unittests/basic_string_view/element_access/char/empty.cc:
8014 * unittests/basic_string_view/element_access/char/front_back.cc:
8016 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8017 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8019 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8021 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8023 * unittests/basic_string_view/operations/compare/char/1.cc:
8025 * unittests/basic_string_view/operations/compare/char/13650.cc:
8027 * unittests/basic_string_view/operations/copy/char/1.cc:
8029 * unittests/basic_string_view/operations/data/char/1.cc:
8031 * unittests/basic_string_view/operations/find/char/1.cc:
8033 * unittests/basic_string_view/operations/find/char/2.cc:
8035 * unittests/basic_string_view/operations/find/char/3.cc:
8037 * unittests/basic_string_view/operations/find/char/4.cc:
8039 * unittests/basic_string_view/operations/rfind/char/1.cc:
8041 * unittests/basic_string_view/operations/rfind/char/2.cc:
8043 * unittests/basic_string_view/operations/rfind/char/3.cc:
8045 * unittests/basic_string_view/operations/substr/char/1.cc:
8047 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8048 * unittests/string_view-selftests.c: New file.
8050 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8052 * unittests/basic_string_view/capacity/1.cc: New file.
8053 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8054 * unittests/basic_string_view/cons/char/1.cc: New file.
8055 * unittests/basic_string_view/cons/char/2.cc: New file.
8056 * unittests/basic_string_view/cons/char/3.cc: New file.
8057 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8058 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8059 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8060 * unittests/basic_string_view/element_access/char/1.cc: New file.
8061 * unittests/basic_string_view/element_access/char/2.cc: New file.
8062 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8063 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8064 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8065 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8066 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8067 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8068 * unittests/basic_string_view/include.cc: New file.
8069 * unittests/basic_string_view/inserters/char/1.cc: New file.
8070 * unittests/basic_string_view/inserters/char/2.cc: New file.
8071 * unittests/basic_string_view/inserters/char/3.cc: New file.
8072 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8073 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8074 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8075 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8076 * unittests/basic_string_view/literals/types.cc: New file.
8077 * unittests/basic_string_view/literals/values.cc: New file.
8078 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8079 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8080 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8081 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8082 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8083 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8084 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8085 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8086 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8087 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8088 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8089 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8090 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8091 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8092 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8093 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8094 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8095 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8096 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8097 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8098 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8099 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8100 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8101 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8102 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8103 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8104 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8105 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8106 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8107 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8108 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8109 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8110 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8111 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8112 * unittests/basic_string_view/operators/char/2.cc: New file.
8113 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8114 * unittests/basic_string_view/range_access/char/1.cc: New file.
8115 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8116 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8117 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8118 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8119 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8120 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8121 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8122 * unittests/basic_string_view/typedefs.cc: New file.
8123 * unittests/basic_string_view/types/1.cc: New file.
8125 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8127 * common/gdb_string_view.h: Remove libstdc++ implementation
8128 details, adjust to gdb reality.
8129 * common/gdb_string_view.tcc: Likewise.
8130 * cli/cli-script.c (struct string_view): Remove.
8131 (user_args) <m_args>: Change element type to gdb::string_view.
8132 (user_args::insert_args): Adjust.
8134 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8136 * common/gdb_string_view.h: New file.
8137 * common/gdb_string_view.tcc: New file.
8139 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8141 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8142 * configure: Re-generate.
8144 2018-04-09 Pedro Alves <palves@redhat.com>
8146 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8147 (set_target_gdbarch): Call
8148 gdb::observers::architecture_changed.notify instead of
8149 observer_notify_architecture_changed.
8151 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8153 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8154 (do_restore_current_traceframe_cleanup): Remove.
8155 (restore_current_traceframe_cleanup_dtor): Remove.
8156 (make_cleanup_restore_current_traceframe): Remove.
8157 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8159 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8160 * infrun.c (fetch_inferior_event): Use
8161 scoped_restore_current_traceframe.
8163 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8165 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8167 <n_allocated_type_units>: Remove.
8168 <all_type_units>: Change to std::vector.
8169 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8170 to std::vector change.
8171 (dwarf2_per_objfile::get_cutu): Likewise.
8172 (dwarf2_per_objfile::get_tu): Likewise.
8173 (create_signatured_type_table_from_index): Likewise.
8174 (create_signatured_type_table_from_debug_names): Likewise.
8175 (dw2_symtab_iter_next): Likewise.
8176 (dw2_print_stats): Likewise.
8177 (dw2_expand_all_symtabs): Likewise.
8178 (dw2_expand_marked_cus): Likewise.
8179 (dw2_debug_names_iterator::next): Likewise.
8180 (dwarf2_initialize_objfile): Likewise.
8181 (add_signatured_type_cu_to_table): Likewise.
8182 (create_all_type_units): Likewise.
8183 (add_type_unit): Likewise.
8184 (struct tu_abbrev_offset): Add constructor.
8185 (build_type_psymtabs_1): Adjust to std::vector change.
8186 (print_tu_stats): Likewise.
8187 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8188 (write_debug_names): Likewise.
8190 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8192 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8193 Make an std::vector.
8194 <n_comp_units>: Remove.
8195 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8196 to std::vector change.
8197 (dwarf2_per_objfile::get_cutu): Likewise.
8198 (dwarf2_per_objfile::get_cu): Likewise.
8199 (create_cus_from_index): Likewise.
8200 (create_addrmap_from_index): Likewise.
8201 (create_addrmap_from_aranges): Likewise.
8202 (dwarf2_read_index): Likewise.
8203 (dw2_find_last_source_symtab): Likewise.
8204 (dw2_map_symtabs_matching_filename): Likewise.
8205 (dw2_symtab_iter_next): Likewise.
8206 (dw2_print_stats): Likewise.
8207 (dw2_expand_all_symtabs): Likewise.
8208 (dw2_expand_symtabs_with_fullname): Likewise.
8209 (dw2_expand_marked_cus): Likewise.
8210 (dw2_map_symbol_filenames): Likewise.
8211 (create_cus_from_debug_names): Likewise.
8212 (dwarf2_read_debug_names): Likewise.
8213 (dw2_debug_names_iterator::next): Likewise.
8214 (dwarf2_initialize_objfile): Likewise.
8215 (set_partial_user): Likewise.
8216 (dwarf2_build_psymtabs_hard): Likewise.
8217 (read_comp_units_from_section): Remove arguments, adjust to
8219 (create_all_comp_units): Adjust to std::vector and
8220 read_comp_units_from_section changes.
8221 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8223 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8224 (psyms_seen_size): Likewise.
8225 (write_gdbindex): Likewise.
8226 (write_debug_names): Likewise.
8228 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8230 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8231 with dwarf2_per_objfile.
8232 (create_cus_from_index): Likewise.
8233 (create_signatured_type_table_from_index): Likewise.
8234 (dwarf2_read_index): Likewise.
8235 (dwarf2_initialize_objfile): Likewise.
8236 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8237 per_cu rather than get_dwarf2_per_objfile.
8239 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8241 * dwarf2read.h (struct signatured_type): Forward declare.
8242 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8244 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8245 (dw2_get_cutu): ...this.
8246 (dwarf2_per_objfile::get_cu): Rename from...
8247 (dw2_get_cu): ...this.
8248 (dwarf2_per_objfile::get_tu): New.
8249 (create_addrmap_from_index): Adjust.
8250 (create_addrmap_from_aranges): Adjust.
8251 (dw2_find_last_source_symtab): Adjust.
8252 (dw2_map_symtabs_matching_filename): Adjust.
8253 (dw2_symtab_iter_next): Adjust.
8254 (dw2_print_stats): Adjust.
8255 (dw2_expand_all_symtabs): Adjust.
8256 (dw2_expand_symtabs_with_fullname): Adjust.
8257 (dw2_expand_marked_cus): Adjust.
8258 (dw_expand_symtabs_matching_file_matcher): Adjust.
8259 (dw2_map_symbol_filenames): Adjust.
8260 (dw2_debug_names_iterator::next): Adjust.
8261 (dwarf2_initialize_objfile): Adjust.
8262 (set_partial_user): Adjust.
8263 (dwarf2_build_psymtabs_hard): Adjust.
8265 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8267 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8268 Remove unused variables.
8269 (dw2_map_symtabs_matching_filename): Likewise.
8270 (dwarf2_record_block_ranges): Likewise.
8271 (dwarf2_read_addr_index): Likewise.
8272 (follow_die_offset): Likewise.
8274 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8276 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8277 to symbol_file_add_main.
8279 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8282 * mi/mi-console.c (do_fputc_async_safe): New.
8283 (mi_console_file::write_async_safe): New.
8284 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8285 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8287 * ui-file.c (ui_file::putstrn): Adjust call to
8288 fputstrn_unfiltered.
8289 * utils.c (printchar): Replace do_fputs and do_fprintf
8290 parameters by do_fputc.
8291 (fputstr_filtered): Adjust call to printchar.
8292 (fputstr_unfiltered): Likewise.
8293 (fputstrn_filtered): Likewise.
8294 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8296 * utils.h (do_fputc_ftype): New typedef.
8297 (fputstrn_unfiltered): Add do_fputc parameter.
8299 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8301 * regformats/i386/i386-avx.dat: Remove.
8303 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8306 * amd64-tdep.c (amd64_none_init_abi): New function.
8307 (amd64_x32_none_init_abi): New function.
8308 (_initialize_amd64_tdep): Register handlers for x86-64 and
8309 x64_32 with GDB_OSABI_NONE.
8310 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8311 GDB_OSABI_NONE osabi.
8313 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8316 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8318 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8319 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8321 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8323 * common/byte-vector.h (char_vector): New type.
8324 * target.h (target_read_alloc): Return
8325 gdb::optional<byte_vector>.
8326 (target_read_stralloc): Return gdb::optional<char_vector>.
8327 (target_get_osdata): Return gdb::optional<char_vector>.
8328 * target.c (target_read_alloc_1): Templatize. Replacement
8329 manual memory management with vector.
8330 (target_read_alloc): Change return type, adjust.
8331 (target_read_stralloc): Change return type, adjust.
8332 (target_get_osdata): Change return type, adjust.
8333 * auxv.c (struct auxv_info) <length>: Remove.
8334 <data>: Change type to gdb::optional<byte_vector>.
8335 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8336 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8337 (target_auxv_search): Adjust.
8338 (fprint_target_auxv): Adjust.
8339 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8340 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8341 (linux_make_corefile_notes): Adjust.
8342 * osdata.c (get_osdata): Adjust.
8343 * remote.c (remote_get_threads_with_qxfer): Adjust.
8344 (remote_memory_map): Adjust.
8345 (remote_traceframe_info): Adjust.
8346 (btrace_read_config): Adjust.
8347 (remote_read_btrace): Adjust.
8348 (remote_pid_to_exec_file): Adjust.
8349 * solib-aix.c (solib_aix_get_library_list): Adjust.
8350 * solib-dsbt.c (decode_loadmap): Don't free buf.
8351 (dsbt_get_initial_loadmaps): Adjust.
8352 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8353 * solib-target.c (solib_target_current_sos): Adjust.
8354 * tracepoint.c (sdata_make_value): Adjust.
8355 * xml-support.c (xinclude_start_include): Adjust.
8356 (xml_fetch_content_from_file): Adjust.
8357 * xml-support.h (xml_fetch_another): Change return type.
8358 (xml_fetch_content_from_file): Change return type.
8359 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8360 * xml-tdesc.c (file_read_description_xml): Adjust.
8361 (fetch_available_features_from_target): Change return type.
8362 (target_fetch_description_xml): Adjust.
8363 (target_read_description_xml): Adjust.
8365 2018-04-06 Tom Tromey <tom@tromey.com>
8367 * value.c (~value): Update.
8368 (struct value) <contents>: Now unique_xmalloc_ptr.
8369 (value_contents_bits_eq, allocate_value_contents)
8370 (value_contents_raw, value_contents_all_raw)
8371 (value_contents_for_printing, value_contents_for_printing_const)
8372 (set_value_enclosing_type): Update.
8374 2018-04-06 Tom Tromey <tom@tromey.com>
8376 * value.c (range_s): Remove typedef, VEC.
8377 (struct range): Add operator<.
8378 (range_lessthan): Remove.
8379 (ranges_contain): Change type.
8381 (struct value) <unavailable, optimized_out>: Now std::vector.
8382 (value_entirely_available)
8383 (value_entirely_covered_by_range_vector)
8384 (value_entirely_unavailable, value_entirely_optimized_out):
8386 (insert_into_bit_range_vector): Change argument type.
8387 (find_first_range_overlap): Likewise.
8388 (struct ranges_and_idx, value_contents_bits_eq)
8389 (require_not_optimized_out, require_available): Update.
8390 (ranges_copy_adjusted): Change argument types.
8391 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8393 2018-04-06 Tom Tromey <tom@tromey.com>
8395 * value.c (~value): Update.
8396 (struct value) <parent>: Now a value_ref_ptr.
8397 (value_parent, set_value_parent, value_address, value_copy):
8400 2018-04-06 Tom Tromey <tom@tromey.com>
8402 * value.c (struct value): Add constructor, destructor, and member
8404 (allocate_value_lazy, value_decref): Update.
8406 2018-04-06 Tom Tromey <tom@tromey.com>
8408 * value.c (struct value) <released, next>: Remove.
8409 (all_values): Now a std::vector.
8410 (allocate_value_lazy): Update.
8411 (value_next): Remove.
8412 (value_mark, value_free_to_mark, release_value)
8413 (value_release_to_mark): Update.
8415 2018-04-06 Tom Tromey <tom@tromey.com>
8417 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8418 (free_value_chain): Remove.
8419 * value.c (free_value_chain): Remove.
8420 (value_release_to_mark): Return a std::vector.
8421 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8423 (check_condition): Update.
8424 * eval.c (fetch_subexp_value): Change "val_chain" to a
8426 * breakpoint.c (update_watchpoint): Update.
8427 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8429 2018-04-06 Tom Tromey <tom@tromey.com>
8431 * value.h (free_all_values): Remove.
8432 * value.c (free_all_values): Remove.
8434 2018-04-06 Tom Tromey <tom@tromey.com>
8436 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8437 (value_history_chain, value_history_count): Remove.
8438 (value_history): New global.
8439 (record_latest_value, access_value_history, show_values)
8440 (preserve_values): Update.
8442 2018-04-06 Tom Tromey <tom@tromey.com>
8444 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8445 * varobj.c (varobj_set_display_format, varobj_set_value)
8446 (install_default_visualizer, construct_visualizer)
8447 (install_new_value, ~varobj, varobj_get_value_type)
8448 (my_value_of_variable, varobj_editable_p): Update.
8449 * c-varobj.c (c_describe_child, c_value_of_variable)
8450 (cplus_number_of_children, cplus_describe_child): Update.
8451 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8452 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8453 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8455 2018-04-06 Tom Tromey <tom@tromey.com>
8457 * printcmd.c (last_examine_address): Change type to
8459 (do_examine, x_command): Update.
8461 2018-04-06 Tom Tromey <tom@tromey.com>
8463 * value.c (release_value): Update.
8464 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8465 (struct bpstats) <val>: Now a value_ref_ptr.
8466 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8467 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8468 (~watchpoint, print_it_watchpoint, watch_command_1)
8469 (invalidate_bp_value_on_memory_change): Update.
8471 2018-04-06 Tom Tromey <tom@tromey.com>
8473 * varobj.c (varobj_clear_saved_item)
8474 (update_dynamic_varobj_children, install_new_value, ~varobj):
8476 * value.h (value_incref): Move declaration earlier.
8477 (value_decref): Rename from value_free.
8478 (struct value_ref_policy): New.
8479 (value_ref_ptr): New typedef.
8480 (struct value_deleter): Remove.
8481 (gdb_value_up): Remove typedef.
8482 (release_value): Change return type.
8483 (release_value_or_incref): Remove.
8484 * value.c (set_value_parent): Update.
8485 (value_incref): Change return type.
8486 (value_decref): Rename from value_free.
8487 (value_free_to_mark, free_all_values, free_value_chain): Update.
8488 (release_value): Return value_ref_ptr.
8489 (release_value_or_incref): Remove.
8490 (record_latest_value, set_internalvar, clear_internalvar):
8492 * stack.c (info_frame_command): Don't call value_free.
8493 * python/py-value.c (valpy_dealloc, valpy_new)
8494 (value_to_value_object): Update.
8495 * printcmd.c (do_examine): Update.
8496 * opencl-lang.c (lval_func_free_closure): Update.
8497 * mi/mi-main.c (register_changed_p): Don't call value_free.
8498 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8499 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8500 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8502 * guile/scm-value.c (vlscm_free_value_smob)
8503 (vlscm_scm_from_value): Update.
8504 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8505 (frame_unwind_register_unsigned, get_frame_register_bytes)
8506 (put_frame_register_bytes): Don't call value_free.
8507 * findvar.c (address_from_register): Don't call value_free.
8508 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8509 * dwarf2loc.c (entry_data_value_free_closure)
8510 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8511 (dwarf2_evaluate_loc_desc_full): Update.
8512 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8513 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8514 (~watchpoint, watch_command_1)
8515 (invalidate_bp_value_on_memory_change): Update.
8516 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8518 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8521 * warning.m4: Add -Wno-error=deprecated-register.
8522 * configure: Re-generate.
8524 2018-04-05 Tom Tromey <tom@tromey.com>
8526 * linespec.h: Remove include of "vec.h".
8528 2018-04-05 Tom Tromey <tom@tromey.com>
8530 * linespec.c (typep): Remove typedef.
8531 (find_methods, find_superclass_methods): Take a std::vector.
8532 (find_method): Use std::vector.
8534 2018-04-05 Tom Tromey <tom@tromey.com>
8536 * utils.c (compare_strings): Remove.
8537 * utils.h (compare_strings): Remove.
8538 * objc-lang.h (find_imps): Update.
8539 * objc-lang.c (find_methods): Take a std::vector.
8540 (uniquify_strings, find_imps): Likewise.
8541 * linespec.c (find_methods): Take a std::vector.
8542 (decode_objc): Use std::vector.
8543 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8545 (find_method, find_function_symbols): Use std::vector.
8547 2018-04-05 Tom Tromey <tom@tromey.com>
8549 * completer.c (completion_tracker::completion_tracker): Remove
8551 (completion_tracker::discard_completions): Likewise.
8552 * breakpoint.c (ambiguous_names_p): Remove cast.
8553 * ada-lang.c (_initialize_ada_language): Remove cast.
8554 * utils.h (streq): Update.
8555 (streq_hash): Add new declaration.
8556 * utils.c (streq): Return bool.
8557 (streq_hash): New function.
8559 2018-04-05 Tom Tromey <tom@tromey.com>
8561 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8562 Remove a string copy.
8564 2018-04-05 Tom Tromey <tom@tromey.com>
8566 * linespec.c (filter_results): Use std::vector.
8567 (decode_line_2, decode_line_full): Update.
8569 2018-04-05 Tom Tromey <tom@tromey.com>
8571 * linespec.c (canonical_to_fullform): Return std::string.
8572 (filter_results): Update.
8573 (struct decode_line_2_item): Add constructor.
8574 <fullform, displayform>: Now std::string.
8575 (decode_line_2_compare_items): Now a std::sort comparator.
8576 (decode_line_2): Update.
8578 2018-04-05 Tom Tromey <tom@tromey.com>
8580 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8581 (unexpected_linespec_error): Update.
8582 (linespec_parse_basic, parse_linespec): Update.
8584 2018-04-05 Tom Tromey <tom@tromey.com>
8586 * linespec.c (linespec_parse_basic): Reindent.
8588 2018-04-05 Tom Tromey <tom@tromey.com>
8590 * minsyms.h (iterate_over_minimal_symbols): Update.
8591 * minsyms.c (iterate_over_minimal_symbols): Take a
8593 * linespec.c (struct collect_minsyms): Remove.
8594 (compare_msyms): Now a std::sort comparator.
8595 (add_minsym): Add parameters.
8596 (search_minsyms_for_name): Update. Use std::vector.
8598 2018-04-03 Tom Tromey <tom@tromey.com>
8600 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8603 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8605 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8607 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8610 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8611 printing static type.
8613 2018-04-01 Tom Tromey <tom@tromey.com>
8615 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8616 (rs6000_xfer_shared_libraries): Update.
8618 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8620 * common/gdb_vecs.h (char_ptr): Remove.
8621 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8623 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8625 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8627 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8629 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8631 * tracepoint.h (struct uploaded_tp): Initialize fields.
8632 <actions, step_actions, cmd_strings>: Change type to
8633 std::vector<char *>.
8634 * tracepoint.c (get_uploaded_tp): Allocate with new.
8635 (free_uploaded_tps): Free with delete.
8636 (parse_tracepoint_definition): Adjust to std::vector change.
8637 * breakpoint.c (read_uploaded_action): Likewise.
8638 (create_tracepoint_from_upload): Likewise.
8639 * ctf.c (ctf_write_uploaded_tp): Likewise.
8640 (SET_ARRAY_FIELD): Likewise.
8641 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8643 2018-03-30 Tom Tromey <tom@tromey.com>
8645 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8647 (svr4_keep_data_in_core): Update.
8648 (svr4_read_so_list): Update.
8650 2018-03-30 Tom Tromey <tom@tromey.com>
8652 * windows-nat.c (handle_output_debug_string, handle_exception):
8654 * target.h (target_read_string): Update.
8655 * target.c (target_read_string): Change "string" to
8657 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8659 * solib-frv.c (frv_current_sos): Update.
8660 * solib-dsbt.c (dsbt_current_sos): Update.
8661 * solib-darwin.c (darwin_current_sos): Update.
8662 * linux-thread-db.c (inferior_has_bug): Update.
8663 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8664 Update. Remove alloca.
8665 * ada-lang.c (ada_main_name): Update.
8667 2018-03-30 Tom Tromey <tom@tromey.com>
8669 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8670 (struct dwo_file_deleter): New.
8671 (dwo_file_up): New typedef.
8672 (open_and_init_dwo_file): Use dwo_file_up.
8673 (free_dwo_file_cleanup): Remove.
8675 2018-03-30 Tom Tromey <tom@tromey.com>
8677 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8678 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8680 2018-03-30 Tom Tromey <tom@tromey.com>
8682 * dwarf2read.c (class free_cached_comp_units): New class.
8683 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8684 (free_cached_comp_units): Remove function.
8686 2018-03-30 Tom Tromey <tom@tromey.com>
8688 * utils.h (make_cleanup_unpush_target): Remove.
8689 * inf-ptrace.c (struct target_unpusher): New.
8690 (target_unpush_up) New typedef.
8691 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8693 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8695 2018-03-27 Tom Tromey <tom@tromey.com>
8697 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8699 2018-03-27 Pedro Alves <palves@redhat.com>
8700 Tom Tromey <tom@tromey.com>
8702 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8703 destructor. Now a class.
8704 (gdb_readline_wrapper_cleanup): Remove function.
8705 (gdb_readline_wrapper): Remove cleanups.
8707 2018-03-27 Tom Tromey <tom@tromey.com>
8709 * typeprint.h (struct type_print_options) <local_typedefs,
8710 global_typedefs>: Remove "struct" keyword.
8711 (class typedef_hash_table): New class.
8712 (recursively_update_typedef_hash, add_template_parameters)
8713 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8714 (find_typedef_in_hash): Don't declare.
8715 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8716 (typedef_hash_table::recursively_update): Rename from
8717 recursively_update_typedef_hash. Now a member.
8718 (typedef_hash_table::add_template_parameters): Rename from
8719 add_template_parameters. Now a member.
8720 (typedef_hash_table::typedef_hash_table): Now a constructor;
8721 rename from create_typedef_hash.
8722 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8723 rename from free_typedef_hash.
8724 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8725 (do_free_global_table): Remove.
8726 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8727 from copy_type_recursive.
8728 (create_global_typedef_table): Remove.
8729 (typedef_hash_table::find_global_typedef): Now a member of
8731 (typedef_hash_table::find_typedef): Rename from
8732 find_typedef_in_hash; now a member.
8733 (whatis_exp): Update.
8734 * extension.h (struct ext_lang_type_printers): Add constructor and
8736 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8738 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8739 Now a constructor; rename from start_ext_lang_type_printers.
8740 (ext_lang_type_printers): Now a destructor; rename from
8741 free_ext_lang_type_printers.
8742 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8744 (c_type_print_base_struct_union): Update. Remove cleanups.
8746 2018-03-27 Tom Tromey <tom@tromey.com>
8748 * dwarf-index-write.c: Include <cmath>.
8750 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8752 * NEWS: Add entry describing new "set|show varsize-limit" command.
8753 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8755 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8758 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8760 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8762 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8763 * dwarf-index-common.c: New file.
8764 * dwarf-index-common.h: New file.
8765 * dwarf-index-write.c: New file.
8766 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8767 (struct dwarf2_section_info): Move from here.
8768 (dwarf2_section_info_def): Likewise.
8769 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8770 (offset_type): Likewise.
8771 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8772 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8773 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8774 (byte_swap): Likewise.
8775 (MAYBE_SWAP): Likewise.
8776 (dwarf2_per_cu_ptr): Likewise.
8777 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8778 (struct tu_stats): Likewise.
8779 (struct dwarf2_per_objfile): Likewise.
8780 (struct dwarf2_per_cu_data): Likewise.
8781 (struct signatured_type): Likewise.
8782 (sig_type_ptr): Likewise.
8783 (DEF_VEC_P (sig_type_ptr)): Likewise.
8784 (INDEX4_SUFFIX): Likewise.
8785 (INDEX5_SUFFIX): Likewise.
8786 (DEBUG_STR_SUFFIX): Likewise.
8787 (dwarf2_read_section): Make non-static.
8788 (mapped_index_string_hash): Move from here.
8789 (dwarf5_djb_hash): Likewise.
8790 (file_write): Likewise.
8791 (class data_buf): Likewise.
8792 (struct symtab_index_entry): Likewise.
8793 (struct mapped_symtab): Likewise.
8794 (find_slot): Likewise.
8795 (hash_expand): Likewise.
8796 (add_index_entry): Likewise.
8797 (uniquify_cu_indices): Likewise.
8798 (class c_str_view): Likewise.
8799 (class c_str_view_hasher): Likewise.
8800 (class vector_hasher): Likewise.
8801 (write_hash_table): Likewise.
8802 (psym_index_map): Likewise.
8803 (struct addrmap_index_data): Likewise.
8804 (add_address_entry): Likewise.
8805 (add_address_entry_worker): Likewise.
8806 (write_address_map): Likewise.
8807 (symbol_kind): Likewise.
8808 (write_psymbols): Likewise.
8809 (struct signatured_type_index_data): Likewise.
8810 (write_one_signatured_type): Likewise.
8811 (recursively_count_psymbols): Likewise.
8812 (recursively_write_psymbols): Likewise.
8813 (class debug_names): Likewise.
8814 (check_dwarf64_offsets): Likewise.
8815 (psyms_seen_size): Likewise.
8816 (write_gdbindex): Likewise.
8817 (write_debug_names): Likewise.
8818 (assert_file_size): Likewise.
8819 (write_psymtabs_to_index): Likewise.
8820 (save_gdb_index_command): Likewise.
8821 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8823 * dwarf2read.h: New file.
8825 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8828 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8829 symbol name if the CU's language stores symbol names in linkage
8831 * language.h (struct language_defn)
8832 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8833 all instances of this struct.
8835 2018-03-26 Tom Tromey <tom@tromey.com>
8837 * stack.c (backtrace_command_1): Remove verbose code.
8839 2018-03-26 Tom Tromey <tom@tromey.com>
8841 * python/py-framefilter.c (py_print_type): Don't catch
8842 exceptions. Return void.
8843 (py_print_value): Likewise.
8844 (py_print_single_arg): Likewise.
8845 (enumerate_args): Don't catch exceptions.
8846 (py_print_args): Likewise.
8847 (py_print_frame): Likewise.
8848 (gdbpy_apply_frame_filter): Catch exceptions here.
8850 2018-03-26 Tom Tromey <tom@tromey.com>
8852 * stack.c (_initialize_stack): Remove trailing newlines from help
8853 text. Add "Usage" line to "backtrace" help.
8855 2018-03-26 Tom Tromey <tom@tromey.com>
8858 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8860 2018-03-26 Tom Tromey <tom@tromey.com>
8862 * python/py-framefilter.c (py_print_single_arg): Return
8863 EXT_LANG_BT_ERROR from catch.
8865 2018-03-26 Tom Tromey <tom@tromey.com>
8868 * stack.c (backtrace_command_1): Move some code into no-filters
8871 2018-03-26 Tom Tromey <tom@tromey.com>
8873 * python/py-framefilter.c (throw_quit_or_print_exception): New
8875 (gdbpy_apply_frame_filter): Use it.
8877 2018-03-26 Tom Tromey <tom@tromey.com>
8880 * python/py-framefilter.c (py_print_type, py_print_value)
8881 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8884 2018-03-26 Tom Tromey <tom@tromey.com>
8886 * python/py-framefilter.c (enumerate_args): Use
8887 gdb::unique_xmalloc_ptr.
8889 2018-03-26 Tom Tromey <tom@tromey.com>
8891 * python/py-framefilter.c (py_print_frame): Return
8893 (gdbpy_apply_frame_filter): Update comment.
8894 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8896 <EXT_LANG_BT_NO_FILTERS>: Change value.
8898 2018-03-26 Tom Tromey <tom@tromey.com>
8901 * stack.c (backtrace_command): Parse "hide" argument.
8902 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8903 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8906 2018-03-26 Tom Tromey <tom@tromey.com>
8908 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8910 (backtrace_command): Remove "fulltrace", add "flags".
8912 2018-03-26 Tom Tromey <tom@tromey.com>
8914 * stack.c (backtrace_command): Rewrite command line parsing.
8916 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8918 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8920 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8922 * filename-seen-cache.h: Add include guard.
8924 2018-03-26 Keith Seitz <keiths@redhat.com>
8926 * symfile.c (place_section): Remove "struct" from section_addr_info
8928 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8929 "struct" keyword from section_addr_info.
8931 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8933 * regformats/regdef.h (reg): Add constructors.
8935 2018-03-25 Pedro Alves <palves@redhat.com>
8937 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8938 if then/else bodies in var_func_name extraction.
8940 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8942 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8943 lookup_minimal_symbol() to find symbol entry.
8944 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8946 2018-03-23 Keith Seitz <keiths@redhat.com>
8949 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8950 nested type definitions for C++, too.
8952 2018-03-23 Tom Tromey <tom@tromey.com>
8954 * machoread.c (struct oso_el): Add a constructor. Don't define as
8956 (macho_register_oso): Remove.
8957 (macho_symtab_read): Take a std::vector.
8958 (oso_el_compare_name): Now a std::sort comparator.
8959 (macho_symfile_read_all_oso): Take a std::vector.
8960 (macho_symfile_read): Use std::vector. Remove cleanups.
8962 2018-03-22 Tom Tromey <tom@tromey.com>
8964 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8965 (record_full_goto_bookmark): Use std::string.
8967 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8970 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8973 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8975 * rs6000-tdep.c (store_insn_p): New function.
8976 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8977 and cr_reg to their unshifted values. Use store_insn_p to
8978 match LR saves using either R1 or fdata->alloca_reg. Use
8979 store_insn_p to match CR saves. Set alloca_reg_offset
8980 when alloca_reg and framep are set. Remove lr_reg shift
8981 when assigning to fdata->lr_register.
8983 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8985 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8986 command line args instead of emitting a warning.
8988 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8990 * tracepoint.h (struct static_tracepoint_marker): Initialize
8991 fields, define default constructor, move constructor and move
8992 assignment, disable the rest.
8993 <str_id, extra>: Make std::string.
8994 (release_static_tracepoint_marker): Remove.
8995 (free_current_marker): Remove.
8996 * tracepoint.c (free_current_marker): Remove.
8997 (parse_static_tracepoint_marker_definition): Adjust to
8998 std::string, use new hex2str overload.
8999 (release_static_tracepoint_marker): Remove.
9000 (print_one_static_tracepoint_marker): Get marker by reference
9001 and adjust to std::string.
9002 (info_static_tracepoint_markers_command): Adjust to std::vector
9004 * target.h (static_tracepoint_marker_p): Remove typedef.
9005 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9006 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9008 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9010 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9011 (target_debug_print_std_vector_static_tracepoint_marker): New.
9012 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9014 (target_debug_print_static_tracepoint_marker_p): ... this.
9015 * target-delegates.c: Re-generate.
9016 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9018 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9019 (decode_static_tracepoint_spec): Adjust to std::vector.
9020 (tracepoint_print_one_detail): Adjust to std::string.
9021 (strace_marker_decode_location): Adjust to std::string.
9022 (update_static_tracepoint): Adjust to std::string, remove call
9023 to release_static_tracepoint_marker.
9024 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9025 Adjust to std::vector.
9026 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9027 (remote_static_tracepoint_markers_by_strid): Adjust to
9029 * common/rsp-low.h (hex2str): New overload with explicit count
9031 * common/rsp-low.c (hex2str): New overload with explicit count
9033 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9034 (_initialize_rsp_low_selftests): Add test_hex2str test.
9035 * unittests/tracepoint-selftests.c
9036 (test_parse_static_tracepoint_marker_definition): Adjust to
9039 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9041 * tracepoint.c (parse_static_tracepoint_marker_definition):
9042 Consider case where the definition is followed by more
9044 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9045 tracepoint-selftests.c.
9046 * unittests/tracepoint-selftests.c: New.
9048 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9050 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9053 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9055 * symtab.c (find_pc_sect_line): fixed indentation.
9057 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9059 * symtab.c (find_pc_sect_line): now uses binary search.
9061 2018-03-19 Tom Tromey <tom@tromey.com>
9063 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9066 2018-03-19 Pedro Alves <palves@redhat.com>
9067 Tom Tromey <tom@tromey.com>
9069 * unittests/observable-selftests.c: New file.
9070 * common/observable.h: New file.
9071 * observable.h: New file.
9072 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9073 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9074 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9075 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9076 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9077 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9078 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9079 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9080 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9081 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9082 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9083 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9084 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9085 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9086 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9087 tui/tui-interp.c, valops.c: Update all users.
9088 * tui/tui-hooks.c (tui_bp_created_observer)
9089 (tui_bp_deleted_observer, tui_bp_modified_observer)
9090 (tui_inferior_exit_observer, tui_before_prompt_observer)
9091 (tui_normal_stop_observer, tui_register_changed_observer):
9093 (tui_observers_token): New global.
9094 (attach_or_detach, tui_attach_detach_observers): New functions.
9095 (tui_install_hooks, tui_remove_hooks): Use
9096 tui_attach_detach_observers.
9097 * record-btrace.c (record_btrace_thread_observer): Remove.
9098 (record_btrace_thread_observer_token): New global.
9099 * observer.sh: Remove.
9100 * observer.c: Rename to observable.c.
9101 * observable.c (namespace gdb_observers): Define new objects.
9102 (observer_debug): Move into gdb_observers namespace.
9103 (struct observer, struct observer_list, xalloc_observer_list_node)
9104 (xfree_observer_list_node, generic_observer_attach)
9105 (generic_observer_detach, generic_observer_notify): Remove.
9106 (_initialize_observer): Update.
9107 Don't include observer.inc.
9108 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9109 (clean mostlyclean): Likewise.
9110 (observer.h, observer.inc): Remove targets.
9111 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9112 (COMMON_SFILES): Use observable.c, not observer.c.
9113 * .gitignore: Remove observer.h.
9115 2018-03-18 Tom Tromey <tom@tromey.com>
9117 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9119 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9121 2018-03-17 Tom Tromey <tom@tromey.com>
9123 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9125 2018-03-17 Tom Tromey <tom@tromey.com>
9127 * target.c (class scoped_target_fd): New.
9128 (target_fileio_close_cleanup): Remove.
9129 (target_fileio_read_alloc_1): Use scoped_target_fd.
9131 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9133 * silent-rules.mk: New.
9134 * Makefile.in: Include silent-rules.mk
9135 (srcdir, VPATH, top_srcdir): Move up.
9136 (COMPILE): Add ECHO_CXX.
9137 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9138 (init.c): Add ECHO_INIT_C.
9139 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9140 (version.c): Add ECHO_GEN.
9141 (printcmd.o): Add ECHO_CXX.
9142 (target-float.o): Add ECHO_CXX.
9143 (ada-exp.o): Add ECHO_CXX.
9144 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9145 (insight$(EXEEXT)): Add ECHO_CXXLD.
9146 * gnulib/configure.ac: Add AM_SILENT_RULES.
9147 * gnulib/aclocal.m4: Re-generate.
9148 * gnulib/configure: Re-generate.
9149 * gnulib/import/Makefile.in: Re-generate.
9151 2018-03-16 Tom Tromey <tom@tromey.com>
9153 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9154 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9155 * utils.c (do_free_section_addr_info)
9156 (make_cleanup_free_section_addr_info): Remove.
9157 * symfile.h (struct other_sections): Add constructor.
9158 (struct section_addr_info): Remove.
9159 (section_addr_info): New typedef.
9160 (struct sym_fns) <sym_offsets>: Change type of parameter.
9161 (build_section_addr_info_from_objfile)
9162 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9163 (default_symfile_offsets, symbol_file_add)
9164 (symbol_file_add_from_bfd)
9165 (build_section_addr_info_from_section_table): Update.
9166 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9167 * symfile.c (alloc_section_addr_info): Remove.
9168 (build_section_addr_info_from_section_table): Change return type.
9170 (build_section_addr_info_from_bfd)
9171 (build_section_addr_info_from_objfile): Likewise.
9172 (free_section_addr_info): Remove.
9173 (relative_addr_info_to_section_offsets): Change type of "addrs".
9174 (addrs_section_compar): Now a std::sort comparator.
9175 (addrs_section_sort): Change return type.
9176 (addr_info_make_relative): Change type of "addrs". Update.
9177 (default_symfile_offsets, syms_from_objfile_1)
9178 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9179 (symbol_file_add_separate): Update.
9180 (symbol_file_add): Change type of "addrs". Update.
9181 (add_symbol_file_command): Update. Remove cleanups.
9182 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9184 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9185 * solib.c (solib_read_symbols): Update.
9186 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9187 * machoread.c (macho_symfile_offsets): Update.
9188 * jit.c (jit_bfd_try_read_symtab): Update.
9190 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9192 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9193 unittests/utils-selftests.c.
9194 * unittests/utils-selftests.c: New file.
9196 2018-03-14 Tom Tromey <tom@tromey.com>
9199 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9202 2018-03-14 Tom Tromey <tom@tromey.com>
9205 * printcmd.c (printf_pointer): Allow "-" in format.
9207 2018-03-14 Tom Tromey <tom@tromey.com>
9209 * printcmd.c (_initialize_printcmd): Add usage to printf.
9211 2018-03-14 Yao Qi <qiyao@sourceware.org>
9213 * MAINTAINERS: Update my email address.
9215 2018-03-13 Tom Tromey <tom@tromey.com>
9217 * machoread.c (macho_check_dsym): Change filenamep to a
9219 (macho_symfile_read): Update.
9220 * symfile.c (load_command): Use std::string.
9222 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9224 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9225 to error message string.
9226 (riscv_register_name): Use xsnprintf instead of sprintf.
9227 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9229 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9231 (riscv_push_dummy_call): Likewise.
9233 2018-03-12 Tom Tromey <tom@tromey.com>
9235 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9236 Use gdb::byte_vector.
9237 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9239 2018-03-12 Yao Qi <yao.qi@linaro.org>
9241 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9242 parameter type to readable_regcache.
9243 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9246 2018-03-11 Tom Tromey <tom@tromey.com>
9248 * dwarf2read.c (struct nextfield): Add initializers.
9249 (struct nextfnfield): Remove.
9250 (struct fnfieldlist): Add initializers. Remove "length" and
9251 "head", use std::vector.
9252 (struct decl_field_list): Remove.
9253 (struct field_info): Add initializers.
9254 <fields, baseclasses>: Now std::vector.
9255 <nbaseclasses, nfnfields, typedef_field_list_count,
9256 nested_types_list_count>: Remove.
9257 (dwarf2_add_field, dwarf2_add_type_defn)
9258 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9259 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9260 (process_structure_scope): Update.
9262 2018-03-11 Tom Tromey <tom@tromey.com>
9264 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9265 for use by std::sort.
9266 (build_type_psymtabs_1): Use std::vector.
9268 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9270 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9271 and LIBMPFR in the printed configuration.
9273 2018-03-08 Tom Tromey <tom@tromey.com>
9275 * source.c (get_filename_and_charpos): Use scoped_fd.
9276 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9277 (procfs_pidlist): Likewise.
9278 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9279 (iterate_over_mappings): Likewise.
9281 2018-03-08 Tom Tromey <tom@tromey.com>
9283 * infcall.c (struct call_return_meta_info)
9284 <stack_temporaries_enabled>: Remove.
9285 (get_call_return_value, call_function_by_hand_dummy): Update.
9286 * thread.c (disable_thread_stack_temporaries): Remove.
9287 (enable_thread_stack_temporaries): Remove.
9288 (thread_stack_temporaries_enabled_p): Return bool.
9289 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9290 (get_last_thread_stack_temporary): Update.
9291 * eval.c (evaluate_subexp): Update.
9292 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9293 class, not a function.
9294 (value_ptr, value_vec): Remove typedefs.
9295 (class thread_info) <stack_temporaries_enabled>: Now bool.
9296 <stack_temporaries>: Now a std::vector.
9297 (thread_stack_temporaries_enabled_p)
9298 (value_in_thread_stack_temporaries): Return bool.
9300 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9302 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9303 (getpkt_or_notif_sane_1): Likewise.
9305 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9307 * build-id.c (build_id_to_debug_bfd): Use std::string.
9309 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9311 * build-id.c (find_separate_debug_file_by_buildid): Return
9313 * build-id.h (find_separate_debug_file_by_buildid): Return
9315 * coffread.c (coff_symfile_read): Adjust to std::string.
9316 * elfread.c (elf_symfile_read): Adjust to std::string.
9317 * symfile.c (separate_debug_file_exists): Change parameter to
9319 (find_separate_debug_file): Return std::string.
9320 (find_separate_debug_file_by_debuglink): Return std::string.
9321 * symfile.h (find_separate_debug_file_by_debuglink): Return
9324 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9326 * common/xml-utils.c (xml_escape_text): Move code to...
9327 (xml_escape_text_append): ... this new function.
9328 * common/xml-utils.h (xml_escape_text_append): New declaration.
9329 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9331 (_initialize_xml_utils): register test_xml_escape_text_append as
9334 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9336 * defs.h: Remove MAX_REGISTER_SIZE.
9337 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9339 * python/py-unwind.c (pyuw_sniffer): Likewise.
9341 2018-03-07 Tom Tromey <tom@tromey.com>
9343 * linux-tdep.c (linux_info_proc): Update.
9344 * target.h (struct target_ops) <to_fileio_readlink>: Return
9346 (target_fileio_readlink): Return optional<string>.
9347 * remote.c (remote_hostio_readlink): Return optional<string>.
9348 * inf-child.c (inf_child_fileio_readlink): Return
9350 * target.c (target_fileio_readlink): Return optional<string>.
9352 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9354 * regcache.c (cooked_read_test): Add riscv to the list of
9355 architectures that have a save_reggroup.
9357 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9359 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9360 value is not a dynamic class object.
9362 2018-03-06 Tom Tromey <tom@tromey.com>
9364 * rust-exp.y: Formatting fixes.
9366 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9368 * riscv-tdep.c (riscv_register_name): Remove target description
9370 (riscv_gdbarch_init): Remove target description check.
9372 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9374 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9376 * riscv-tdep.h: Likewise.
9378 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9380 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9381 (riscv_pseudo_register_write): Delete.
9382 (riscv_gdbarch_init): Remove all use of pseudo registers.
9384 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9386 * record-btrace.c (btrace_print_lines): Replace cleanup
9387 parameter with RAII equivalents.
9388 (btrace_insn_history): Replace cleanup with RAII equivalents.
9389 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9390 make_cleanup_ui_out_tuple_begin_end): Remove.
9391 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9392 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9393 make_cleanup_ui_out_list_begin_end): Remove.
9395 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9397 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9398 parameter types to std::vector. Use bool.
9399 (record_btrace_wait): Replace VEC(tp_t) with
9400 std::vector<thread_info *>.
9401 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9403 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9405 * record-btrace.c (record_btrace_disable_callback): Remove.
9406 (struct scoped_btrace_disable): New.
9407 (record_btrace_open): Use scoped_btrace_disable.
9409 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9411 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9412 reading values from registers.
9414 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9416 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9419 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9421 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9422 change parameter type. Use GDB's print functions, and use
9423 core_addr_to_string where appropriate.
9424 (riscv_push_dummy_call): Use core_addr_to_string where
9425 appropriate, update call to riscv_print_arg_location, and reindent
9427 (riscv_return_value): Update call to riscv_print_arg_location.
9429 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9430 Tim Newsome <tim@sifive.com>
9431 Albert Ou <a0u@eecs.berkeley.edu>
9432 Darius Rad <darius@bluespec.com>
9434 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9435 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9436 (ALLDEPFILES): Add riscv-tdep.c
9437 * configure.tgt: Add riscv support.
9438 * riscv-tdep.c: New file.
9439 * riscv-tdep.h: New file.
9440 * NEWS: Mention new target.
9441 * MAINTAINERS: Add entry for riscv.
9443 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9445 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9446 fields within aggregates.
9448 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9450 * record-btrace.c (btrace_print_lines): Change type of flags to
9451 gdb_disassembly_flags.
9453 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9455 * fbsd-nat.c: Include "inf-ptrace.h".
9456 (USE_SIGTRAP_SIGINFO): Conditionally define.
9457 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9458 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9459 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9461 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9463 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9465 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9466 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9467 "supports_stopped_by_hw_breakpoint" target methods.
9469 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9471 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9472 * fbsd-nat.c (debug_fbsd_nat): New variable.
9473 (show_fbsd_nat_debug): New function.
9474 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9475 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9477 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9479 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9480 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9482 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9483 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9486 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9488 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9489 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9491 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9493 * charset.c (struct charset_vector): New.
9494 (charsets): Change type to charset_vector.
9495 (find_charset_names): Adjust.
9497 (_initialize_charset): Adjust.
9499 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9501 * progspace.h (struct program_space) <deleted_solibs>: Change
9502 type to std::vector<std::string>.
9503 * progspace.c (clear_program_space_solib_cache): Adjust.
9504 * breakpoint.c (print_solib_event): Adjust.
9505 (check_status_catch_solib): Adjust.
9506 * solib.c (update_solib_list): Adjust.
9507 * ui-out.h (class ui_out) <field_string>: New overload.
9508 * ui-out.c (ui_out::field_string): New overload.
9510 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9512 * progspace.h (struct program_space): Add constructor and
9513 destructor, initialize fields.
9514 (add_program_space): Remove.
9515 * progspace.c (add_program_space): Rename to...
9516 (program_space::program_space): ... this.
9517 (release_program_space): Rename to...
9518 (program_space::~program_space): ... this.
9519 (delete_program_space): Use delete to delete program_space.
9520 (initialize_progspace): Use new to allocate program_space.
9521 * inferior.c (add_inferior_with_spaces): Likewise.
9522 (clone_inferior_command): Likewise.
9523 * infrun.c (follow_fork_inferior): Likewise.
9524 (handle_vfork_child_exec_or_exit): Likewise.
9526 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9528 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9529 (delim_string_to_char_ptr_vec): Return std::vector of
9530 gdb::unique_xmalloc_ptr.
9531 (dirnames_to_char_ptr_vec_append): Take std::vector of
9532 gdb::unique_xmalloc_ptr.
9533 (dirnames_to_char_ptr_vec): Return std::vector of
9534 gdb::unique_xmalloc_ptr.
9535 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9536 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9537 (delim_string_to_char_ptr_vec): Return an std::vector of
9538 gdb::unique_xmalloc_ptr, adjust the code.
9539 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9540 gdb::unique_xmalloc_ptr, adjust the code.
9541 (dirnames_to_char_ptr_vec): Return an std::vector of
9542 gdb::unique_xmalloc_ptr, adjust the code.
9543 * auto-load.c (auto_load_safe_path_vec): Change type to
9544 std::vector of gdb::unique_xmalloc_ptr.
9545 (auto_load_expand_dir_vars): Return an std::vector of
9546 gdb::unique_xmalloc_ptr, adjust the code.
9547 (auto_load_safe_path_vec_update): Adjust.
9548 (filename_is_in_auto_load_safe_path_vec): Adjust.
9549 (auto_load_objfile_script_1): Adjust.
9550 * build-id.c (build_id_to_debug_bfd): Adjust.
9551 * linux-thread-db.c (thread_db_load_search): Adjust.
9552 * source.c (add_path): Adjust.
9554 * symfile.c (find_separate_debug_file): Adjust.
9555 * utils.c (do_free_char_ptr_vec): Remove.
9556 (make_cleanup_free_char_ptr_vec): Remove.
9558 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9561 * common/pathstuff.c: Conditionally include "<windows.h>".
9563 2018-03-01 Georg Sauthoff <mail@georg.so>
9566 * gcore.in: Quote variables and switch interpreter to bash.
9568 2018-03-01 Tom Tromey <tom@tromey.com>
9570 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9571 assertion. Add assertion for discriminant_index.
9572 (quirk_rust_enum): Use correct base type name in univariant case.
9574 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9576 * record.c (get_call_history_modifiers): Return a
9578 (cmd_record_call_history): Adjust.
9579 * record-btrace.c (record_btrace_call_history): Adjust.
9580 (record_btrace_call_history_range): Adjust.
9581 (record_btrace_call_history_from): Adjust.
9582 * target-debug.h (target_debug_print_record_print_flags): New.
9583 * target-delegates.c: Re-generate.
9584 * target.c (target_call_history): Change flags type.
9585 (target_call_history_from): Likewise.
9586 (target_call_history_range): Likewise.
9587 * target.h (struct target_ops) <target_call_history>: Likewise.
9588 (target_call_history_from): Likewise.
9589 (target_call_history_range): Likewise.
9591 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9592 Simon Marchi <simon.marchi@polymtl.ca>
9594 * common/common-utils.c: Include "sys/stat.h".
9595 (is_regular_file): Move here from "source.c"; change return
9597 * common/common-utils.h (is_regular_file): New prototype.
9598 * common/pathstuff.c (contains_dir_separator): New function.
9599 * common/pathstuff.h (contains_dir_separator): New prototype.
9600 * source.c: Don't include "sys/stat.h".
9601 (is_regular_file): Move to "common/common-utils.c".
9603 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9605 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9606 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9607 * auto-load.c: Include "common/pathstuff.h".
9608 * common/common-def.h (current_directory): Move here.
9609 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9611 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9613 * common/pathstuff.c: New file.
9614 * common/pathstuff.h: New file.
9615 * compile/compile.c: Include "common/pathstuff.h".
9616 * defs.h (current_directory): Move to "common/common-defs.h".
9617 * dwarf2read.c: Include "common/pathstuff.h".
9619 * guile/scm-safe-call.c: Likewise.
9620 * linux-thread-db.c: Likewise.
9622 * nto-tdep.c: Likewise.
9623 * objfiles.c: Likewise.
9624 * source.c: Likewise.
9625 * symtab.c: Likewise.
9626 * utils.c: Include "common/pathstuff.h".
9627 (gdb_realpath): Move to "common/pathstuff.c".
9628 (gdb_realpath_keepfile): Likewise.
9629 (gdb_abspath): Likewise.
9630 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9631 (gdb_realpath_keepfile): Likewise.
9632 (gdb_abspath): Likewise.
9634 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9636 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9637 wildcard process pid for super_resume for kernels with a
9640 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9642 * compile/compile.c (get_args): Add additional comments
9643 explaining function.
9645 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9646 Tom Tromey <tom@tromey.com>
9648 * target.h (memory_write_request_s): Remove typedef. Don't define
9650 (target_write_memory_blocks): Change argument to std::vector.
9651 (struct memory_write_request): Add constructor.
9652 * target-memory.c (compare_block_starting_address): Return bool.
9653 Change argument types.
9654 (claim_memory): Change arguments to use std::vector.
9655 (split_regular_and_flash_blocks, blocks_to_erase)
9656 (compute_garbled_blocks): Likewise.
9657 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9658 (target_write_memory_blocks): Change argument to std::vector.
9659 * symfile.c (struct load_section_data): Add constructor and
9660 destructor. Use std::vector for "requests".
9661 (struct load_progress_data): Add initializers.
9662 (load_section_callback): Update. Use "new".
9663 (clear_memory_write_data): Remove.
9664 (generic_load): Update.
9666 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9668 * arch/aarch64.h: Use common/tdesc.h.
9670 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9672 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9673 architecture with a 64-bit ABI.
9675 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9677 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9678 ahead of target description loading.
9680 2018-02-26 Tom Tromey <tom@tromey.com>
9682 * stack.c (backtrace_command_1): Update.
9683 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9685 * python/py-framefilter.c (py_print_frame)
9686 (gdbpy_apply_frame_filter): Change type of "flags".
9687 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9689 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9690 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9691 * extension.h (enum frame_filter_flag): Rename from
9693 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9694 (apply_ext_lang_frame_filter): Change type of "flags".
9695 * extension.c (apply_ext_lang_frame_filter): Change type of
9697 * extension-priv.h (struct extension_language_ops)
9698 <apply_frame_filter>: Change type of "flags".
9700 2018-02-26 Tom Tromey <tom@tromey.com>
9703 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9704 off-by-one in py_end computation.
9705 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9707 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9710 2018-02-26 Tom Tromey <tom@tromey.com>
9712 * dwarf2read.c (struct variant_field): New.
9713 (struct nextfield) <variant>: New field.
9714 (dwarf2_add_field): Handle DW_TAG_variant_part.
9715 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9716 discriminated union.
9717 (read_structure_type): Handle DW_TAG_variant_part.
9718 (handle_struct_member_die): New function, extracted from
9719 process_structure_scope. Handle DW_TAG_variant.
9720 (process_structure_scope): Handle discriminated unions. Call
9721 handle_struct_member_die.
9723 2018-02-26 Tom Tromey <tom@tromey.com>
9725 * rust-lang.h (rust_last_path_segment): Declare.
9726 * rust-lang.c (rust_last_path_segment): Now public. Change
9728 (struct disr_info): Remove.
9729 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9730 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9731 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9732 (rust_enum_p, rust_enum_variant): New function.
9733 (rust_underscore_fields): Remove "offset" parameter.
9734 (rust_print_enum): New function.
9735 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9736 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9737 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9739 (rust_internal_print_type): New function, from rust_print_type.
9741 (rust_print_type): Call rust_internal_print_type.
9742 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9743 Update enum handling.
9744 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9745 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9746 (rust_union_quirks): New functions.
9747 (process_full_comp_unit, process_full_type_unit): Call
9749 (process_structure_scope): Update rust_unions if necessary.
9751 2018-02-26 Tom Tromey <tom@tromey.com>
9753 * value.h (value_union_variant): Declare.
9754 * valops.c (value_union_variant): New function.
9755 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9756 (struct discriminant_info): New.
9757 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9759 (struct main_type) <flag_discriminated_union>: New field.
9761 2018-02-26 Tom Tromey <tom@tromey.com>
9763 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9764 unittests/unpack-selftests.c.
9765 * unittests/unpack-selftests.c: New file.
9766 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9768 2018-02-26 Yao Qi <yao.qi@linaro.org>
9770 * dwarf2read.c (struct partial_die_info) <read>: New method.
9771 (read_partial_die): Remove the declaration.
9772 (load_partial_dies): Update.
9773 (partial_die_info::partial_die_info):
9774 (read_partial_die): Change it to partial_die_info::read.
9776 2018-02-26 Yao Qi <yao.qi@linaro.org>
9778 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9779 (fixup_partial_die): Remove declaration.
9780 (scan_partial_symbols): Update.
9781 (partial_die_parent_scope): Likewise.
9782 (partial_die_full_name): Likewise.
9783 (fixup_partial_die): Change it to partial_die_info::fixup.
9785 2018-02-26 Yao Qi <yao.qi@linaro.org>
9787 * dwarf2read.c (read_partial_die): Update the declaration.
9788 (load_partial_dies): Caller update.
9789 (read_partial_die): Remove one argument abbrev_len.
9791 2018-02-26 Yao Qi <yao.qi@linaro.org>
9793 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9794 assignment operator.
9795 (load_partial_dies): Use ctor and copy ctor.
9796 (read_partial_die): Update.
9797 (dwarf2_cu::find_partial_die): Use ctor.
9799 2018-02-26 Yao Qi <yao.qi@linaro.org>
9801 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9802 (find_partial_die_in_comp_unit): Change it to
9803 dwarf2_cu::find_partial_die.
9804 (find_partial_die): Update.
9806 2018-02-26 Yao Qi <yao.qi@linaro.org>
9808 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9811 2018-02-26 Yao Qi <yao.qi@linaro.org>
9813 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9815 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9817 * arch/amd64.h: Use common/tdesc.h.
9818 * arch/i386.c: Likewise.
9819 * arch/i386.h: Likewise.
9820 * arch/tic6x.c: Likewise.
9821 * arch/tdesc.h: Move file from here...
9822 * common/tdesc.h: ...to here.
9823 * features/aarch64-core.c: Regenerate.
9824 * features/aarch64-fpu.c: Regenerate.
9825 * features/i386/32bit-avx.c: Regenerate.
9826 * features/i386/32bit-avx512.c: Regenerate.
9827 * features/i386/32bit-core.c: Regenerate.
9828 * features/i386/32bit-linux.c: Regenerate.
9829 * features/i386/32bit-mpx.c: Regenerate.
9830 * features/i386/32bit-pkeys.c: Regenerate.
9831 * features/i386/32bit-sse.c: Regenerate.
9832 * features/i386/64bit-avx.c: Regenerate.
9833 * features/i386/64bit-avx512.c: Regenerate.
9834 * features/i386/64bit-core.c: Regenerate.
9835 * features/i386/64bit-linux.c: Regenerate.
9836 * features/i386/64bit-mpx.c: Regenerate.
9837 * features/i386/64bit-pkeys.c: Regenerate.
9838 * features/i386/64bit-segments.c: Regenerate.
9839 * features/i386/64bit-sse.c: Regenerate.
9840 * features/i386/x32-core.c: Regenerate.
9841 * features/tic6x-c6xp.c: Regenerate.
9842 * features/tic6x-core.c: Regenerate.
9843 * features/tic6x-gp.c: Regenerate.
9844 * target-descriptions.c: Use common/tdesc.h.
9845 * target-descriptions.h: Likewise.
9847 2018-02-24 Tom Tromey <tom@tromey.com>
9849 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9850 (try_thread_db_load_from_dir, thread_db_load_search): Use
9852 (info_auto_load_libthread_db_compare): Return bool. Change
9854 (info_auto_load_libthread_db): Use std::vector, std::string.
9857 2018-02-24 Tom Tromey <tom@tromey.com>
9859 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9861 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9863 * gdbarch.c: Rebuild.
9864 * gdbarch.h: Rebuild.
9865 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9866 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9867 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9870 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9872 * gdbtypes.h (sect_offset): Change type to uint64_t.
9873 (sect_offset_str): New function.
9874 * dwarf2read.c (create_addrmap_from_aranges): Use
9876 (error_check_comp_unit_head): Likewise.
9877 (create_debug_type_hash_table): Likewise.
9878 (read_cutu_die_from_dwo): Likewise.
9879 (init_cutu_and_read_dies): Likewise.
9880 (init_cutu_and_read_dies_no_follow): Likewise.
9881 (process_psymtab_comp_unit_reader): Likewise.
9882 (partial_die_parent_scope): Likewise.
9883 (peek_die_abbrev): Likewise.
9884 (process_queue): Likewise.
9885 (dwarf2_physname): Likewise.
9886 (read_namespace_alias): Likewise.
9887 (read_import_statement): Likewise.
9888 (create_dwo_cu_reader): Likewise.
9889 (create_cus_hash_table): Likewise.
9890 (lookup_dwo_cutu): Likewise.
9891 (inherit_abstract_dies): Likewise.
9892 (read_func_scope): Likewise.
9893 (read_call_site_scope): Likewise.
9894 (dwarf2_add_member_fn): Likewise.
9895 (read_common_block): Likewise.
9896 (read_module_type): Likewise.
9897 (read_typedef): Likewise.
9898 (read_subrange_type): Likewise.
9899 (load_partial_dies): Likewise.
9900 (read_partial_die): Likewise.
9901 (find_partial_die): Likewise.
9902 (read_str_index): Likewise.
9903 (dwarf2_string_attr): Likewise.
9904 (build_error_marker_type): Likewise.
9905 (lookup_die_type): Likewise.
9906 (dump_die_shallow): Likewise.
9907 (follow_die_ref): Likewise.
9908 (dwarf2_fetch_die_loc_sect_off): Likewise.
9909 (dwarf2_fetch_constant_bytes): Likewise.
9910 (follow_die_sig): Likewise.
9911 (get_signatured_type): Likewise.
9912 (get_DW_AT_signature_type): Likewise.
9913 (dwarf2_find_containing_comp_unit): Likewise.
9914 (set_die_type): Likewise.
9916 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9918 * arch/aarch64.c: Include "common-defs.h".
9919 * arch/amd64.c: Likewise.
9920 * arch/i386.c: Likewise.
9922 2018-02-21 Tom Tromey <tom@tromey.com>
9924 * value.h: (extract_field_op): Update.
9925 * eval.c (extract_field_op): Return a const char *.
9926 * expression.h (parse_expression_for_completion): Update.
9927 * completer.c (complete_expression): Update.
9928 (add_struct_fields): Make fieldname const.
9929 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9930 (mark_completion_tag, parse_exp_in_context_1): Update.
9931 (parse_expression_for_completion): Change "name" to
9932 unique_xmalloc_ptr*.
9934 2018-02-21 Tom Tromey <tom@tromey.com>
9936 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9938 2018-02-21 Yao Qi <yao.qi@linaro.org>
9940 * avr-tdep.c (avr_read_pc): Change parameter type to
9942 * gdbarch.sh (read_pc): Likewise.
9943 * gdbarch.c: Re-generated.
9944 * gdbarch.h: Re-generated.
9945 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9947 * ia64-tdep.c (ia64_read_pc): Likewise.
9948 * mips-tdep.c (mips_read_pc): Likewise.
9949 * spu-tdep.c (spu_read_pc): Likewise.
9951 2018-02-21 Yao Qi <yao.qi@linaro.org>
9953 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9954 * regcache-dump.c: New file.
9955 * regcache.c: Move register_dump to regcache-dump.c.
9956 (maintenance_print_registers): Likewise.
9957 (maintenance_print_raw_registers): Likewise.
9958 (maintenance_print_cooked_registers): Likewise.
9959 (maintenance_print_register_groups): Likewise.
9960 (maintenance_print_remote_registers): Likewise.
9961 (_initialize_regcache): Likewise.
9962 * regcache.h (register_dump): Moved from regcache.c.
9964 2018-02-21 Yao Qi <yao.qi@linaro.org>
9966 * regcache.c (regcache::regcache): Update.
9967 (regcache::invalidate): Move it to detached_regcache::invalidate.
9968 (get_thread_arch_aspace_regcache): Update.
9969 (regcache::raw_update): Update.
9970 (regcache::cooked_read): Remove some code.
9971 (regcache::cooked_read_value): Likewise.
9972 (regcache::raw_write): Remove assert on m_readonly_p.
9973 (regcache::raw_supply_integer): Move it to
9974 detached_regcache::raw_supply_integer.
9975 (regcache::raw_supply_zeroed): Likewise.
9976 * regcache.h (detached_regcache) <raw_supply_integer>: New
9978 <raw_supply_zeroed, invalidate>: Likewise.
9979 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9980 <invalidate>: Likewise.
9981 <m_readonly_p>: Removed.
9983 2018-02-21 Yao Qi <yao.qi@linaro.org>
9985 * infcmd.c (get_return_value): Let stop_regs point to
9986 get_current_regcache.
9987 * regcache.c (regcache::regcache): Remove.
9988 (register_dump_reg_buffer): New class.
9989 (regcache_print): Adjust.
9990 * regcache.h (regcache): Remove constructors.
9992 2018-02-21 Yao Qi <yao.qi@linaro.org>
9994 * regcache.c (class register_dump): New class.
9995 (register_dump_regcache, register_dump_none): New class.
9996 (register_dump_remote, register_dump_groups): New class.
9997 (regcache_print): Update.
9998 * regcache.h (regcache_dump_what): Move it to regcache.c.
9999 (regcache) <dump>: Remove.
10001 2018-02-21 Yao Qi <yao.qi@linaro.org>
10003 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10005 (jit_unwind_reg_set_impl): Call raw_supply.
10006 (jit_frame_sniffer): Use reg_buffer_rw.
10007 * record-full.c (record_full_core_regbuf): Change its type.
10008 (record_full_core_open_1): Use reg_buffer_rw.
10009 (record_full_close): Likewise.
10010 (record_full_core_fetch_registers): Use regcache->raw_supply.
10011 (record_full_core_store_registers): Likewise.
10012 * regcache.c (regcache::get_register_status): Move it to
10014 (regcache_raw_set_cached_value): Remove.
10015 (regcache::raw_set_cached_value): Remove.
10016 (regcache::raw_write): Call raw_supply.
10017 (regcache::raw_supply): Move it to reg_buffer_rw.
10018 * regcache.h (regcache_raw_set_cached_value): Remove.
10019 (reg_buffer_rw): New class.
10021 2018-02-21 Yao Qi <yao.qi@linaro.org>
10023 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10024 readonly_detached_regcache.
10025 (dummy_frame_prev_register): Use regcache->cooked_read.
10026 * frame.c (frame_save_as_regcache): Change return type.
10027 (frame_pop): Update.
10028 * frame.h (frame_save_as_regcache): Update declaration.
10029 * inferior.h (get_infcall_suspend_state_regcache): Update
10031 * infrun.c (infcall_suspend_state) <registers>: use
10032 readonly_detached_regcache.
10033 (save_infcall_suspend_state): Don't use regcache_dup.
10034 (get_infcall_suspend_state_regcache): Change return type.
10035 * linux-fork.c (struct fork_info) <savedregs>: Change to
10036 readonly_detached_regcache.
10038 (fork_save_infrun_state): Don't use regcache_dup.
10039 (info_checkpoints_command): Adjust.
10040 * mi/mi-main.c (register_changed_p): Update declaration.
10041 (mi_cmd_data_list_changed_registers): Use
10042 readonly_detached_regcache.
10043 (register_changed_p): Change parameter type to
10044 readonly_detached_regcache.
10045 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10046 readonly_detached_regcache.
10047 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10048 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10050 (regcache::save): Move it to reg_buffer.
10051 (regcache::restore): Change parameter type.
10052 (regcache_dup): Remove.
10053 * regcache.h (reg_buffer) <save>: New method.
10054 (readonly_detached_regcache): New class.
10055 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10056 readonly_detached_regcache.
10057 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10059 2018-02-21 Yao Qi <yao.qi@linaro.org>
10061 * frame.c (frame_save_as_regcache): Use regcache method save.
10062 (frame_pop): Use regcache method restore.
10063 * infrun.c (restore_infcall_suspend_state): Likewise.
10064 * linux-fork.c (fork_load_infrun_state): Likewise.
10065 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10067 * regcache.c (regcache_save): Remove.
10068 (regcache::restore): More asserts.
10069 (regcache_cpy): Remove.
10070 * regcache.h (regcache_save): Remove the declaration.
10071 (regcache::restore): Move from private to public.
10072 Remove the friend declaration of regcache_cpy.
10073 (regcache_cpy): Remove declaration.
10075 2018-02-21 Yao Qi <yao.qi@linaro.org>
10077 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10078 parameter type to 'readable_regcache *'.
10079 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10080 * arm-tdep.c (arm_neon_quad_read): Likewise.
10081 (arm_pseudo_read): Likewise.
10082 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10083 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10084 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10085 * gdbarch.c: Re-generated.
10086 * gdbarch.h: Re-generated.
10087 * gdbarch.sh (pseudo_register_read): Change parameter type to
10088 'readable_regcache *'.
10089 (pseudo_register_read_value): Likewise.
10090 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10091 (h8300_pseudo_register_read): Likewise.
10092 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10093 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10094 (i386_pseudo_register_read_into_value): Likewise.
10095 (i386_pseudo_register_read_value): Likewise.
10096 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10098 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10099 * m32c-tdep.c (m32c_raw_read): Likewise.
10100 (m32c_read_flg): Likewise.
10101 (m32c_banked_register): Likewise.
10102 (m32c_banked_read): Likewise.
10103 (m32c_sb_read): Likewise.
10104 (m32c_part_read): Likewise.
10105 (m32c_cat_read): Likewise.
10106 (m32c_r3r2r1r0_read): Likewise.
10107 (m32c_pseudo_register_read): Likewise.
10108 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10109 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10110 (mep_pseudo_cr64_read): Likewise.
10111 (mep_pseudo_register_read): Likewise.
10112 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10113 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10114 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10115 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10116 (regcache::cooked_read): Likewise.
10117 (regcache::cooked_read_value): Likewise.
10118 (regcache_cooked_read_signed):
10119 (regcache::cooked_read): Likewise.
10120 * regcache.h (readable_regcache): New class.
10121 (regcache): Inherit readable_regcache. Move some methods to
10123 * rl78-tdep.c (rl78_pseudo_register_read): Change
10124 parameter type to 'readable_regcache *'.
10125 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10126 (e500_pseudo_register_read): Change parameter type to
10127 'readable_regcache *'.
10128 (dfp_pseudo_register_read): Likewise.
10129 (vsx_pseudo_register_read): Likewise.
10130 (efpr_pseudo_register_read): Likewise.
10131 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10132 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10133 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10134 (sh64_pseudo_register_read): Likewise.
10135 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10136 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10137 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10138 (spu_pseudo_register_read): Likewise.
10139 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10140 (xtensa_pseudo_register_read): Likewise.
10142 2018-02-21 Yao Qi <yao.qi@linaro.org>
10144 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10145 (regcache::arch): Move it to reg_buffer::arch.
10146 (regcache::register_buffer): Likewise.
10147 (regcache::assert_regnum): Likewise.
10148 (regcache::num_raw_registers): Likewise.
10149 * regcache.h (reg_buffer): New class.
10150 (regcache): Inherit reg_buffer.
10152 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10154 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10155 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10157 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10159 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10161 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10163 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10164 (SFILES): Remove common/*.c files.
10165 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10166 * common/common.host: Add common reference.
10167 * configure.ac: Likewise.
10168 * configure: Regenerate.
10170 2018-02-16 Yao Qi <yao.qi@linaro.org>
10172 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10173 (block_initialize_namespace): Use new.
10174 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10175 (dwarf2_free_objfile): Use delete.
10176 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10177 (copy_type_recursive): Use new.
10178 * gdb_obstack.h (allocate_on_obstack): New.
10180 2018-02-15 Yao Qi <yao.qi@linaro.org>
10183 * inferior.c (exit_inferior_1): Reset inf->control.
10185 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10187 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10190 2018-02-14 Pedro Alves <palves@redhat.com>
10192 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10193 frame_cleanup_after_sniffer on exception.
10195 2018-02-14 Tom Tromey <tom@tromey.com>
10197 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10199 (solib_bfd_open): Make pathname const.
10200 * solib.c (solib_bfd_open): Make pathname const.
10201 * solib-spu.c (spu_bfd_fopen): Make name const.
10202 (spu_bfd_open): Make pathname const.
10203 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10204 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10206 2018-02-14 Tom Tromey <tom@tromey.com>
10208 * symfile.c (symfile_bfd_open): Update.
10209 * source.h (openp, source_full_path_of, find_and_open_source):
10210 Change argument type to unique_xmalloc_ptr.
10211 * source.c (openp): Take a unique_xmalloc_ptr.
10212 (source_full_path_of, find_and_open_source): Likewise.
10213 (open_source_file, symtab_to_fullname): Update.
10214 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10215 unique_xmalloc_ptr.
10216 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10217 (exec_file_find): Update.
10218 * psymtab.c (psymtab_to_fullname): Update.
10219 * nto-tdep.h (nto_find_and_open_solib): Update.
10220 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10221 unique_xmalloc_ptr.
10222 * exec.c (exec_file_attach): Update.
10223 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10224 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10226 2018-02-14 Tom Tromey <tom@tromey.com>
10228 * solib.c: Include source.h.
10229 * nto-tdep.c: Include source.h.
10230 * mi/mi-cmd-env.c: Include source.h.
10231 * infcmd.c: Include source.h.
10232 * exec.c: Include source.h.
10233 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10234 (add_path, directory_switch, source_path, init_source_path): Move
10236 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10237 (add_path, directory_switch, source_path, init_source_path):
10240 2018-02-14 Tom Tromey <tom@tromey.com>
10242 * solist.h (exec_file_find, solib_find): Return
10243 unique_xmalloc_ptr.
10244 (solib_bfd_fopen): Take a const char *.
10245 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10246 (exec_file_find, solib_find): Likewise.
10247 (solib_bfd_fopen): Do not take ownership of "pathname".
10248 (solib_bfd_open): Use unique_xmalloc_ptr.
10249 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10250 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10251 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10252 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10254 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10256 * ada-lang.c (name_match_type_from_name): Remove reference to
10257 ada_name_for_lookup in function's documentation.
10258 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10260 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10262 * defs.h (enum openp_flags): New enum.
10263 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10264 Move to enum openp_flags.
10265 (openp_flags): New enum flags.
10266 (openp): Change parameter type to openp_flags.
10267 * source.c (openp): Change parameter type to openp_flags.
10268 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10269 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10271 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10273 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10276 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10278 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10280 (class dwarf2_queue_guard): ...the destructor of this new class.
10281 (dw2_do_instantiate_symtab): Create instance of the new class
10282 dwarf2_queue_guard, remove cleanup.
10284 2018-02-09 Tom Tromey <tom@tromey.com>
10286 * source.c (find_source_lines): Don't reference past the end of
10289 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10291 * remote.c (remote_btrace_maybe_reopen): Change error message.
10292 * btrace.c (btrace_enable): Likewise.
10293 (parse_xml_btrace): Likewise.
10294 (parse_xml_btrace_conf): Likewise.
10296 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10298 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10299 (linux_enable_pt, linux_enable_bts): Call
10300 diagnose_perf_event_open_fail.
10302 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10304 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10305 Remove parameter and change return type. Update callers. Move it.
10306 (linux_enable_bts, linux_enable_pt): Improve error message.
10307 (linux_enable_pt): Remove zero buffer size check.
10308 (linux_enable_btrace): Improve error messages. Remove NULL return
10311 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10313 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10314 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10315 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10316 (linux_supports_pt, linux_supports_btrace): Remove.
10317 (linux_enable_bts): Call cpu_supports_bts.
10318 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10319 * remote.c (remote_supports_btrace): Remove.
10320 (init_remote_ops): Remove remote_supports_btrace.
10321 * target-delegates.c: Regenerated.
10322 * target.c (target_supports_btrace): Remove.
10323 * target.h (target_ops) <to_supports_btrace>: Remove
10324 (target_supports_btrace): Remove.
10325 * x86-linux-nat.c (x86_linux_create_target): Remove
10326 linux_supports_btrace.
10328 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10330 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10332 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10333 exception and use message in own exception.
10335 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10337 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10338 (perf_event_pt_event_type): Use gdb_file_up.
10339 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10340 scoped_fd, and scoped_mmap.
10342 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10344 * common/scoped_mmap.h: New.
10345 * unittests/scoped_mmap-selftest.c: New.
10346 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10347 unittests/scoped_mmap-selftest.c.
10349 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10351 * common/scoped_fd.h: New.
10352 * unittests/scoped_fd-selftest.c: New.
10353 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10354 unittests/scoped_fd-selftest.c.
10356 2018-02-09 Tom Tromey <tom@tromey.com>
10358 * auto-load.c (auto_load_section_scripts): Use
10359 gdb::unique_xmalloc_ptr.
10361 2018-02-09 Tom Tromey <tom@tromey.com>
10363 * auto-load.c (execute_script_contents): Use std::string.
10365 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10367 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10368 Python function, rather than a new command.
10370 2018-02-08 Tom Tromey <tom@tromey.com>
10372 * solib.c (solib_find_1): Use std::string.
10373 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10375 2018-02-08 Tom Tromey <tom@tromey.com>
10377 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10379 2018-02-08 Tom Tromey <tom@tromey.com>
10381 * source.c (find_source_lines): Use gdb::def_vector.
10383 2018-02-08 Tom Tromey <tom@tromey.com>
10385 * macrocmd.c (struct temporary_macro_definition): New.
10386 (macro_define_command): Use temporary_macro_definition. Remove
10388 (free_macro_definition_ptr): Remove.
10390 2018-02-08 Tom Tromey <tom@tromey.com>
10392 * macroexp.c (maybe_expand): Use std::string.
10394 2018-02-08 Tom Tromey <tom@tromey.com>
10396 * macroexp.c (struct macro_buffer): Add initializers for some
10398 (init_buffer, init_shared_buffer, free_buffer)
10399 (free_buffer_return_text): Remove.
10400 (macro_buffer): New constructors.
10401 (~macro_buffer): New destructor.
10402 (macro_buffer::set_shared): New method.
10403 (macro_buffer::resize_buffer, macro_buffer::appendc)
10404 (macro_buffer::appendmem): Now methods, not free functions.
10405 (set_token, append_tokens_without_splicing, stringify)
10406 (macro_stringify): Update.
10407 (gather_arguments): Change return type. Remove argc_p argument,
10408 add args_ptr argument. Use std::vector.
10409 (substitute_args): Remove argc argument. Accept std::vector.
10410 (expand): Update. Use std::vector.
10411 (scan, macro_expand, macro_expand_next): Update.
10413 2018-02-08 Tom Tromey <tom@tromey.com>
10415 * symtab.c (default_collect_symbol_completion_matches_break_on):
10416 Use unique_xmalloc_ptr.
10417 * macroscope.h: (sal_macro_scope, user_macro_scope)
10418 (default_macro_scope): Return unique_xmalloc_ptr.
10419 * macroscope.c (sal_macro_scope, user_macro_scope)
10420 (default_macro_scope): Return unique_xmalloc_ptr.
10421 * macroexp.h (macro_expand, macro_expand_once): Return
10422 unique_xmalloc_ptr.
10423 * macroexp.c (macro_expand, macro_expand_once): Return
10424 unique_xmalloc_ptr.
10425 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10426 (info_macro_command, info_macros_command): Use
10427 unique_xmalloc_ptr.
10428 * compile/compile-c-support.c (write_macro_definitions): Use
10429 unique_xmalloc_ptr.
10430 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10432 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10434 * value.c (value_static_field): Assign field type instead of
10435 containing type when returning an optimized out value.
10437 2018-02-06 Yao Qi <yao.qi@linaro.org>
10439 * ft32-tdep.c (ft32_read_pc): Remove.
10440 (ft32_write_pc): Remove.
10441 (ft32_gdbarch_init): Update.
10442 * m32r-tdep.c (m32r_read_pc): Remove.
10443 (m32r_gdbarch_init): Update.
10444 * mep-tdep.c (mep_read_pc): Remove.
10445 (mep_gdbarch_init): Update.
10446 * microblaze-tdep.c (microblaze_write_pc): Remove.
10447 (microblaze_gdbarch_init): Update.
10448 * mn10300-tdep.c (mn10300_read_pc): Remove.
10449 (mn10300_write_pc): Remove.
10450 (mn10300_gdbarch_init): Update.
10451 * moxie-tdep.c (moxie_read_pc): Remove.
10452 (moxie_write_pc): Remove.
10453 (moxie_gdbarch_init): Update.
10455 2018-02-06 Yao Qi <yao.qi@linaro.org>
10457 * expprint.c (print_subexp_standard): Handle
10458 OP_F77_UNDETERMINED_ARGLIST.
10459 (dump_subexp_body_standard): Likewise.
10461 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10463 * target-descriptions.c (tdesc_element_visitor) Add empty
10465 (tdesc_type): Move make_gdb_type from here.
10466 (tdesc_type_builtin): Likewise.
10467 (tdesc_type_vector): Likewise.
10468 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10469 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10470 (make_gdb_type_union): Likewise.
10471 (make_gdb_type_flags): Likewise.
10472 (make_gdb_type_enum): Likewise.
10473 (make_gdb_type): New function.
10474 (tdesc_register_type): Use static make_gdb_type.
10476 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10478 * infcmd.c (default_print_one_register_info): Align natural-format
10479 column values consistently one under another.
10480 (pad_to_column): New function.
10482 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10484 * dwarf2read.c (dwarf2_physname): Move commment.
10486 2018-02-01 Leszek Swirski <leszeks@google.com>
10488 * varobj.c (varobj_formatted_print_options): Allow recursive
10489 pretty printing if pretty printing is enabled.
10491 2018-02-01 Leszek Swirski <leszeks@google.com>
10493 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10494 names after a structop as a filename.
10496 2018-02-01 Yao Qi <yao.qi@linaro.org>
10498 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10499 (arm_record_coproc_data_proc): Likewise.
10501 2018-02-01 Yao Qi <yao.qi@linaro.org>
10503 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10505 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10507 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10508 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10510 2018-01-31 Pedro Alves <palves@redhat.com>
10512 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10513 * inflow.c (child_terminal_save_inferior): Wrap reference to
10514 tcgetpgrp in HAVE_TERMIOS_H.
10515 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10517 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10518 always iterate over all inferiors.
10519 (gdbsim_cntrl_c): Adjust.
10520 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10522 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10524 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10525 index type is objfile-owned if the element type is as well.
10527 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10531 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10533 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10534 "features/s390x-linux64.c".
10535 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10536 s390_linux32 and s390x_linux64.
10537 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10539 * s390-tdep.c: Include "features/s390-linux32.c" and
10540 "features/s390x-linux64.c".
10541 (s390_tdesc_valid): Add check for tdesc_has_registers.
10542 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10543 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10544 tdesc_s390x_linux64.
10545 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10546 tdesc_s390x_linux64 to...
10547 * s390-tdep.h: ...here.
10549 2018-01-30 Pedro Alves <palves@redhat.com>
10552 * config.in, configure: Regenerate.
10553 * configure.ac: Check for getpgid.
10554 * go32-nat.c (go32_pass_ctrlc): New.
10555 (go32_target): Install it.
10556 * inf-child.c (inf_child_target): Install
10557 child_terminal_save_inferior, child_pass_ctrlc and
10559 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10560 (inf_ptrace_target): No longer install it.
10561 * infcmd.c (interrupt_target_1): Adjust.
10562 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10563 (child_interrupt): Declare.
10564 (inferior::terminal_state): New.
10565 * inflow.c (struct terminal_info): Update comments.
10566 (inferior_process_group): Delete.
10567 (terminal_is_ours): Delete.
10568 (gdb_tty_state): New.
10569 (child_terminal_init): Adjust.
10570 (is_gdb_terminal, sharing_input_terminal_1)
10571 (sharing_input_terminal): New functions.
10572 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10573 Set the process's actual process group in the foreground if
10574 possible. Handle is_ours_for_output/is_ours distinction. Don't
10575 mark terminal as the inferior's if not sharing GDB's terminal.
10576 Don't check attach_flag.
10577 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10578 pass down a target_terminal_state.
10579 (child_terminal_save_inferior): New, factored out from ...
10580 (child_terminal_ours_1): ... this. Handle
10581 target_terminal_state::is_ours_for_output.
10582 (child_interrupt, child_pass_ctrlc): New.
10583 (inflow_inferior_exit): Clear the inferior's terminal_state.
10584 (copy_terminal_info): Copy the inferior's terminal state.
10585 (_initialize_inflow): Remove reference to terminal_is_ours.
10586 * inflow.h (inferior_process_group): Delete.
10587 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10588 * procfs.c (procfs_target): Don't install procfs_interrupt.
10589 (procfs_interrupt): Delete.
10590 * remote.c (remote_serial_quit_handler): Adjust.
10591 (remote_interrupt): Remove ptid parameter. Adjust.
10592 * target-delegates.c: Regenerate.
10593 * target.c: Include "terminal.h".
10594 (target_terminal::terminal_state): Rename to ...
10595 (target_terminal::m_terminal_state): ... this.
10596 (target_terminal::init): Adjust.
10597 (target_terminal::inferior): Adjust to per-inferior
10599 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10600 (target_terminal::ours, target_terminal::ours_for_output): Use
10601 target_terminal_is_ours_kind.
10602 (target_interrupt): Remove ptid parameter. Adjust.
10603 (default_target_pass_ctrlc): Adjust.
10604 * target.h (target_ops::to_terminal_save_inferior): New field.
10605 (target_ops::to_interrupt): Remove ptid_t parameter.
10606 (target_interrupt): Remove ptid_t parameter. Update comment.
10607 (target_pass_ctrlc): Update comment.
10608 * target/target.h (target_terminal_state): New scoped enum,
10609 factored out of ...
10610 (target_terminal::terminal_state): ... here.
10611 (target_terminal::inferior): Update comments.
10612 (target_terminal::restore_inferior): New.
10613 (target_terminal::is_inferior, target_terminal::is_ours)
10614 (target_terminal::is_ours_for_output): Adjust.
10615 (target_terminal::scoped_restore_terminal_state): Adjust to
10616 rename, and call restore_inferior() instead of inferior().
10617 (target_terminal::scoped_restore_terminal_state::m_state): Change
10619 (target_terminal::terminal_state): Rename to ...
10620 (target_terminal::m_terminal_state): ... this and change type.
10622 2018-01-30 Pedro Alves <palves@redhat.com>
10624 * linux-nat.c (wait_for_signal): New function.
10625 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10627 (async_terminal_is_ours)
10628 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10629 (linux_nat_add_target): Don't override
10630 to_terminal_inferior/to_terminal_ours.
10632 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10634 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10636 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10638 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10639 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10640 dwarf2_per_objfile_free here.
10641 (dwarf2_per_objfile_free): Remove.
10642 (_initialize_dwarf2_read): Don't register
10643 dwarf2_per_objfile_free as a registry cleanup.
10645 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10647 Avoid compilation errors in MinGW native builds
10649 The error is triggered by including python-internal.h, and the
10652 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10653 from build-gnulib/import/math.h:27,
10654 from d:/usr/Python26/include/pyport.h:235,
10655 from d:/usr/Python26/include/Python.h:58,
10656 from python/python-internal.h:94,
10657 from python/py-arch.c:24:
10658 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10662 This happens because Python headers define 'hypot' to expand t
10663 '_hypot' in the Windows builds.
10664 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10665 'hypoth'. This avoids a compilation error.
10667 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10669 * MAINTAINERS (Write After Approval): Fix ordering.
10671 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10673 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10675 2018-01-26 Alan Modra <amodra@gmail.com>
10677 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10678 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10679 Remove nop. Make const. Comment.
10680 (powerpc32_plt_stub_so_2): New.
10681 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10682 Correct count. Update uses.
10683 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10684 Move common code reading PLT entry word. Correct
10685 powerpc32_plt_stub PLT address calculation.
10686 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10687 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10688 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10689 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10690 (ppc64_standard_linkage8): Likewise.
10691 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10692 Correct insns description.
10693 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10695 2018-01-24 Pedro Alves <palves@redhat.com>
10697 GCC PR libstdc++/83906
10698 * gdbtypes.c (operator==(const dynamic_prop &,
10699 const dynamic_prop &)): New.
10700 (operator==(const range_bounds &, const range_bounds &)): New.
10701 (check_types_equal): Use them instead of memcmp.
10702 * gdbtypes.h (operator==(const dynamic_prop &,
10703 const dynamic_prop &)): Declare.
10704 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10705 (operator==(const range_bounds &, const range_bounds &)): Declare.
10706 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10708 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10710 * s390-linux-tdep.c (s390_record_address_mask)
10711 (s390_record_calc_disp_common, s390_record_calc_disp)
10712 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10713 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10714 (s390_process_record): Move to s390-tdep.c.
10715 (s390_linux_init_abi_any): Adjust.
10716 * s390-tdep.c (s390_record_address_mask)
10717 (s390_record_calc_disp_common, s390_record_calc_disp)
10718 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10719 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10720 (s390_process_record): Moved from s390-linux-tdep.c
10721 (s390_gdbarch_init): Adjust.
10723 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10725 * s390-linux-nat.c (s390-tdep.h): New include.
10726 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10727 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10728 (ALLDEPFILES): Add s390-tdep.c.
10729 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10730 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10731 * s390-tdep.h: ...this. New file.
10732 * s390-linux-tdep.c (s390-tdep.h): New include.
10733 (_initialize_s390_tdep): Rename to...
10734 (_initialize_s390_linux_tdep): ...this and adjust.
10735 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10736 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10738 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10739 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10740 (s390_is_partial_instruction, s390_software_single_step)
10741 (is_non_branch_ril, s390_displaced_step_copy_insn)
10742 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10743 (s390_prologue_data, s390_addr, s390_store, s390_load)
10744 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10745 (s390_register_call_saved, s390_guess_tracepoint_registers)
10746 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10747 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10748 (s390_pseudo_register_name, s390_pseudo_register_type)
10749 (s390_pseudo_register_read, s390_pseudo_register_write)
10750 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10751 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10752 (s390_addr_bits_remove, s390_address_class_type_flags)
10753 (s390_address_class_type_flags_to_name)
10754 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10755 (s390_function_arg_float, s390_function_arg_vector)
10756 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10757 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10758 (s390_frame_align, s390_register_return_value, s390_return_value)
10759 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10760 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10761 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10762 (s390_trad_frame_prev_register, s390_unwind_cache)
10763 (s390_prologue_frame_unwind_cache)
10764 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10765 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10766 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10767 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10768 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10769 (s390_frame_base_address, s390_local_base_address)
10770 (s390_frame_base, s390_gcc_target_options)
10771 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10772 (s390_validate_reg_range, s390_tdesc_valid)
10773 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10774 * s390-tdep.c: ...this. New file.
10776 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10778 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10779 (s390_process_record, s390_gdbarch_tdep_alloc)
10780 (s390_linux_init_abi_any): Use/set new hook.
10782 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10784 * s390-linux-tdep.c (osabi.h): New include.
10785 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10786 (s390_linux_init_abi_any): New functions.
10787 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10789 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10791 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10792 tdesc_has_registers check
10794 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10796 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10797 (s390_validate_reg_range): New macro.
10798 (s390_gdbarch_init): Adjust.
10800 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10802 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10803 (s390_gdbarch_tdep_alloc): Adjust.
10804 (s390_gdbarch_init): Adjust.
10806 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10808 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10809 <have_tdb>: Change type to bool.
10810 (s390_gdbarch_tdep_alloc): Adjust.
10811 (s390_gdbarch_init): Adjust.
10813 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10815 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10816 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10817 (s390_gdbarch_tdep_alloc): New function.
10818 (s390_gdbarch_init): Allocate tdep at start and use its fields
10819 instead of separate variables.
10821 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10823 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10824 when looking for cached gdbarch and add comment for remaining.
10826 2018-01-22 Pedro Alves <palves@redhat.com>
10827 Sergio Durigan Junior <sergiodj@redhat.com>
10829 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10832 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10834 * MAINTAINERS: Update my company e-mail address.
10836 2018-01-22 Yao Qi <yao.qi@linaro.org>
10838 * regcache.c (cooked_write_test): New function.
10839 (_initialize_regcache): Register the test.
10841 2018-01-22 Yao Qi <yao.qi@linaro.org>
10843 * ia64-tdep.c (ia64_pseudo_register_read): Call
10844 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10845 * m32c-tdep.c (m32c_cat_read): Likewise.
10846 (m32c_r3r2r1r0_read): Likewise.
10847 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10848 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10850 2018-01-22 Yao Qi <yao.qi@linaro.org>
10852 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10853 method raw_read instead of regcache_raw_read.
10854 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10855 * arm-tdep.c (arm_neon_quad_read): Likewise.
10856 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10857 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10858 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10859 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10860 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10861 (i386_pseudo_register_read_into_value): Likewise.
10862 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10863 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10864 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10865 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10866 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10867 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10868 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10869 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10870 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10872 2018-01-22 Yao Qi <yao.qi@linaro.org>
10874 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10875 * configure.tgt: Remove target mt.
10876 * mt-tdep.c: Remove.
10877 * regcache.c (cooked_read_test): Remove the check for mt.
10879 2018-01-22 Yao Qi <yao.qi@linaro.org>
10881 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10882 instead of gdbarch_pseudo_register_read_value.
10884 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10886 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10889 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10891 * linespec.c (create_sals_line_offset): Remove code that preserved
10892 the symtab_and_line's line number.
10894 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10896 * varobj.c (varobj_create): Don't set valid_block when creating a
10899 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10901 * varobj.c (varobj_create): Remove out of date comment.
10903 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10906 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10907 updating innermost block.
10908 * parse.c (innermost_block_tracker::update): Take extra type
10909 parameter, and check types match before updating innermost block.
10910 (write_dollar_variable): Update innermost block for registers.
10911 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10912 (innermost_block_tracker::innermost_block_tracker): Initialise
10914 (innermost_block_tracker::reset): Take type parameter.
10915 (innermost_block_tracker::update): Take type parameter, and pass
10916 type through as needed.
10917 (innermost_block_tracker::m_types): New member.
10918 * varobj.c (varobj_create): Pass type when reseting innermost
10921 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10923 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10924 * ada-lang.c (resolve_subexp): Likewise.
10925 * breakpoint.c (set_breakpoint_condition) Likewise.
10926 (watch_command_1) Likewise.
10927 * c-exp.y (variable): Likewise.
10928 * d-exp.y (PrimaryExpression): Likewise.
10929 * f-exp.y (variable): Likewise.
10930 * go-exp.y (variable): Likewise.
10931 * m2-exp.y (variable): Likewise.
10932 * objfiles.c (objfile::~objfile): Likewise.
10933 * p-exp.y (variable): Likewise.
10934 * parse.c (innermost_block): Change type.
10935 * parser-defs.h (class innermost_block_tracker): New.
10936 (innermost_block): Change to innermost_block_tracker.
10937 * printcmd.c (display_command): Switch to innermost_block API.
10938 (do_one_display): Likewise.
10939 * rust-exp.y (do_one_display): Likewise.
10940 * symfile.c (clear_symtab_users): Likewise.
10941 * varobj.c (varobj_create): Switch to innermost_block API, replace
10942 use of innermost_block with block stored on varobj object.
10944 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10946 * expression.h (innermost_block): Remove declaration.
10947 * varobj.c: Add 'parser-defs.h' include.
10949 2018-01-19 Tom Tromey <tom@tromey.com>
10951 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10952 symbols in the static and global blocks.
10954 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10956 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10957 gdb_ptrace.h, and move including gdb_wait.h ...
10958 * nat/linux-ptrace.h: ... to here.
10960 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10962 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10963 inf_ptrace_detach_success.
10964 (inf_ptrace_detach_success): Add inferior parameter, use it
10965 instead of inferior_ptid, pass it to detach_inferior.
10966 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10968 * inferior.c (detach_inferior): Add overload that takes an
10970 * inferior.h (detach_inferior): Likewise.
10971 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10972 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10973 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10975 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10977 * target.h (struct target_ops) <to_detach>: Add inferior
10979 (target_detach): Likewise.
10980 * target.c (dispose_inferior): Pass inferior down.
10981 (target_detach): Pass inferior down. Assert that it is equal to
10982 the current inferior.
10983 * aix-thread.c (aix_thread_detach): Pass inferior down.
10984 * corefile.c (core_file_command): Pass current_inferior() down.
10985 * corelow.c (core_detach): Add inferior parameter.
10986 * darwin-nat.c (darwin_detach): Likewise.
10987 * gnu-nat.c (gnu_detach): Likewise.
10988 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10989 * infcmd.c (detach_command): Pass current_inferior() down to
10991 * infrun.c (follow_fork_inferior): Pass parent_inf to
10993 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10995 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10996 * linux-thread-db.c (thread_db_detach): Likewise.
10997 * nto-procfs.c (procfs_detach): Likewise.
10998 * procfs.c (procfs_detach): Likewise.
10999 * record.c (record_detach): Likewise.
11000 * record.h (struct inferior): Forward-declare.
11001 (record_detach): Add inferior parameter.
11002 * remote-sim.c (gdbsim_detach): Likewise.
11003 * remote.c (remote_detach_1): Likewise.
11004 (remote_detach): Likewise.
11005 (extended_remote_detach): Likewise.
11006 * sol-thread.c (sol_thread_detach): Likewise.
11007 * target-debug.h (target_debug_print_inferior_p): New macro.
11008 * target-delegates.c: Re-generate.
11009 * top.c (kill_or_detach): Pass inferior down to target_detach.
11010 * windows-nat.c (windows_detach): Add inferior parameter.
11012 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11014 * target.h (struct target_ops) <to_detach>: Remove args
11016 (target_detach): Likewise.
11017 * target.c (dispose_inferior): Adjust.
11018 (target_detach): Remove args parameter, adjust.
11019 * aix-thread.c (aix_thread_detach): Adjust.
11020 * corefile.c (core_file_command): Adjust.
11021 * corelow.c (core_detach): Adjust.
11022 * darwin-nat.c (darwin_detach): Adjust.
11023 * gnu-nat.c (gnu_detach): Adjust.
11024 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11025 * infcmd.c (detach_command): Adjust
11026 * infrun.c (follow_fork_inferior): Adjust.
11027 (handle_vfork_child_exec_or_exit): Adjust.
11028 * linux-fork.c (linux_fork_detach): Remove args parameter.
11029 * linux-fork.h (linux_fork_detach): Likewise.
11030 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11031 * linux-thread-db.c (thread_db_detach): Likewise.
11032 * nto-procfs.c (procfs_detach): Likewise.
11033 * procfs.c (procfs_detach): Likewise.
11034 (do_detach): Remove signo parameter.
11035 * record.c (record_detach): Remove args parameter.
11036 * record.h (record_detach): Likewise.
11037 * remote-sim.c (gdbsim_detach): Likewise.
11038 * remote.c (remote_detach_1): Likewise.
11039 (remote_detach): Likewise.
11040 (extended_remote_detach): Likewise.
11041 * sol-thread.c (sol_thread_detach): Likewise.
11042 * target-delegates.c: Re-generate.
11043 * top.c (struct qt_args) <args>: Remove field.
11044 (kill_or_detach): Don't pass args.
11045 (quit_force): Don't set args.
11046 * windows-nat.c (windows_detach): Remove args parameter.
11048 2018-01-19 Yao Qi <yao.qi@linaro.org>
11050 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11051 (arm_linux_init_abi): Install it.
11053 2018-01-19 Yao Qi <yao.qi@linaro.org>
11055 * osabi.c (gdb_osabi_names): Extend the regexp for
11056 arm-linux-gnueabihf.
11058 2018-01-18 Yao Qi <yao.qi@linaro.org>
11060 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11062 (abbrev_table::add_abbrev): Update.
11063 (abbrev_table::lookup_abbrev): Update.
11065 2018-01-18 Yao Qi <yao.qi@linaro.org>
11067 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11069 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11071 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11074 2018-01-17 Tom Tromey <tom@tromey.com>
11076 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11078 2018-01-17 Tom Tromey <tom@tromey.com>
11080 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11081 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11082 (create_array_type_with_stride): Update.
11083 * dwarf2read.c (set_die_type): Update.
11085 2018-01-17 Tom Tromey <tom@tromey.com>
11087 * dwarf2read.c (delayed_method_info): Remove typedef.
11088 (dwarf2_cu::method_info): Now a std::vector.
11089 (add_to_method_list): Update.
11090 (free_delayed_list): Remove.
11091 (compute_delayed_physnames): Update.
11092 (process_full_comp_unit, process_full_type_unit): Clear the method
11093 list. Remove cleanups.
11094 (psymtab_include_file_name): Add name_holder parameter. Use
11095 unique_xmalloc_ptr.
11096 (dwarf_decode_lines): Update.
11098 2018-01-17 Tom Tromey <tom@tromey.com>
11099 Simon Marchi <simon.marchi@ericsson.com>
11101 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11102 (dwarf2_per_objfile::free_cached_comp_units)
11103 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11104 (init_cutu_and_read_dies_no_follow): Update.
11105 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11106 (dwarf2_cu::~dwarf2_cu): New.
11107 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11108 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11110 2018-01-17 Tom Tromey <tom@tromey.com>
11111 Simon Marchi <simon.marchi@ericsson.com>
11113 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11114 (struct die_reader_specs) <abbrev_table>: New member.
11115 (struct abbrev_table): Add constructor.
11116 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11117 <abbrev_obstack>: Now an auto_obstack.
11118 (abbrev_table_up): New typedef.
11119 (init_cu_die_reader): Add abbrev_table parameter.
11120 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11121 Add result_dwo_abbrev_table.
11122 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11123 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11125 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11127 (skip_children): Update.
11128 (abbrev_table::alloc_abbrev): Rename from
11129 abbrev_table_alloc_abbrev.
11130 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11131 (abbrev_table::lookup_abbrev): Rename from
11132 abbrev_table_lookup_abbrev.
11133 (abbrev_table_read_table): Return abbrev_table_up.
11134 (abbrev_table_free, abbrev_table_free_cleanup)
11135 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11136 (load_partial_dies): Update.
11138 2018-01-17 Tom Tromey <tom@tromey.com>
11140 * dwarf2read.c (dwarf2_compute_name): Update comment.
11141 (read_func_scope, read_variable): Update.
11142 (new_symbol): Remove.
11143 (new_symbol_full): Rename to new_symbol.
11145 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11148 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11149 a warning instead of throwing an error, set section size to 0 and return
11151 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11153 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11155 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11157 (linux_ptrace_attach_fail_reason_string): Likewise.
11158 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11160 (linux_ptrace_attach_fail_reason_string): Likewise.
11161 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11163 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11165 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11167 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11170 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11171 checking for fs_base/gs_base fields in struct user_regs_struct.
11172 * configure: Regenerate.
11174 2018-01-17 Yao Qi <yao.qi@linaro.org>
11176 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11178 (aarch64_linux_init_abi): Install it to gdbarch hook
11179 gcc_target_options.
11181 2018-01-15 Pedro Alves <palves@redhat.com>
11183 * common/signals-state-save-restore.c
11184 (save_original_signals_state): Fix typos.
11186 2017-01-12 Tom Tromey <tom@tromey.com>
11187 Sergio Durigan Junior <sergiodj@redhat.com>
11189 * Makefile.in (install-only): Install gdb-add-index.
11191 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11193 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11195 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11197 * infrun.c (keep_going_pass_signal): Clear step-over info when
11198 insert_breakpoints fails.
11200 2018-01-11 Pedro Alves <palves@redhat.com>
11203 * infrun.c (resume): Rename to ...
11204 (resume_1): ... this.
11205 (resume): Reimplement as wrapper around resume_1.
11207 2018-01-11 Pedro Alves <palves@redhat.com>
11210 * remote.c (remote_parse_stop_reply): Default to the last-set
11211 general thread instead of to 'magic_null_ptid'.
11213 2018-01-10 Pedro Alves <palves@redhat.com>
11215 * language.h (language_get_symbol_name_matcher): Rename ...
11216 (get_symbol_name_matcher): ... this.
11217 * language.c (language_get_symbol_name_matcher): Ditto.
11218 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11221 2018-01-10 Pedro Alves <palves@redhat.com>
11225 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11226 Adjust to use language_get_symbol_name_matcher instead of
11227 language_defn::la_get_symbol_name_matcher.
11228 * language.c (language_get_symbol_name_matcher): If in Ada mode
11229 and the lookup name is a verbatim match, return Ada's matcher.
11230 * language.h (language_get_symbol_name_matcher): Adjust comment.
11231 (ada_lookup_name_info::verbatim_p):: New method.
11233 2018-01-10 Pedro Alves <palves@redhat.com>
11236 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11237 minsym's language is language_auto or language_cplus, pass down
11238 language_ada instead.
11239 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11241 2018-01-10 Pedro Alves <palves@redhat.com>
11244 * minsyms.c (linkage_name_str): New function.
11245 (iterate_over_minimal_symbols): Use it.
11247 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11249 * NEWS: Document that 'info proc' now works on FreeBSD.
11251 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11253 * configure.ac: Check for kinfo_getfile in libutil.
11254 * configure: Regenerate.
11255 * config.in: Regenerate.
11256 * fbsd-nat.c: Include "fbsd-tdep.h".
11257 (fbsd_fetch_cmdline): New.
11258 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11259 rather than calling error.
11260 (fbsd_info_proc): New.
11261 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11262 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11263 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11265 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11267 * fbsd-nat.c (struct free_deleter): Remove.
11268 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11270 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11272 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11273 NULL for an empty pathname.
11275 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11277 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11278 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11279 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11280 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11281 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11282 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11283 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11284 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11285 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11286 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11287 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11288 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11289 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11290 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11291 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11293 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11295 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11296 (gnu_xfer_auxv): New function.
11297 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11298 TARGET_OBJECT_AUXV.
11300 2018-01-08 Yao Qi <yao.qi@linaro.org>
11301 Simon Marchi <simon.marchi@ericsson.com>
11303 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11305 (COMMON_OBS): Remove selftest.o.
11306 * configure.ac: Append selftest-arch.c and common/selftest.c to
11307 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11308 * configure: Re-generated.
11309 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11311 (maintenance_info_selftests): Likewise.
11313 2018-01-08 Xavier Roirand <roirand@adacore.com>
11315 * ada-valprint.c (val_print_packed_array_elements): Use
11316 proper number of elements when printing an array indexed
11317 by an enumeration type.
11319 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11321 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11322 (dw2_get_file_names_reader): Adjust.
11323 (lookup_dwo_signatured_type): Adjust.
11324 (lookup_dwp_signatured_type): Adjust.
11325 (lookup_signatured_type): Adjust.
11326 (create_type_unit_group): Adjust.
11327 (get_type_unit_group): Adjust.
11328 (process_psymtab_comp_unit_reader): Adjust.
11329 (build_type_psymtabs_reader): Adjust.
11330 (scan_partial_symbols): Adjust.
11331 (add_partial_symbol): Adjust.
11332 (add_partial_subprogram): Adjust.
11333 (peek_die_abbrev): Adjust.
11334 (fixup_go_packaging): Adjust.
11335 (process_imported_unit_die): Adjust.
11336 (dwarf2_compute_name): Adjust.
11337 (dwarf2_physname): Adjust.
11338 (read_import_statement): Adjust.
11339 (handle_DW_AT_stmt_list): Adjust.
11340 (read_file_scope): Adjust.
11341 (read_func_scope): Adjust.
11342 (read_lexical_block_scope): Adjust.
11343 (read_call_site_scope): Adjust.
11344 (read_variable): Adjust.
11345 (dwarf2_rnglists_process): Adjust.
11346 (dwarf2_ranges_process): Adjust.
11347 (dwarf2_ranges_read): Adjust.
11348 (dwarf2_get_pc_bounds): Adjust.
11349 (dwarf2_record_block_ranges): Adjust.
11350 (dwarf2_add_field): Adjust.
11351 (dwarf2_add_member_fn): Adjust.
11352 (read_structure_type): Adjust.
11353 (process_structure_scope): Adjust.
11354 (read_enumeration_type): Adjust.
11355 (read_array_type): Adjust.
11356 (mark_common_block_symbol_computed): Adjust.
11357 (read_common_block): Adjust.
11358 (read_namespace_type): Adjust.
11359 (read_namespace): Adjust.
11360 (read_module_type): Adjust.
11361 (read_tag_pointer_type): Adjust.
11362 (read_tag_ptr_to_member_type): Adjust.
11363 (read_tag_string_type): Adjust.
11364 (read_subroutine_type): Adjust.
11365 (read_typedef): Adjust.
11366 (read_base_type): Adjust.
11367 (attr_to_dynamic_prop): Adjust.
11368 (read_subrange_type): Adjust.
11369 (read_unspecified_type): Adjust.
11370 (dwarf2_read_abbrevs): Adjust.
11371 (load_partial_dies): Adjust.
11372 (read_partial_die): Adjust.
11373 (find_partial_die): Adjust.
11374 (guess_partial_die_structure_name): Adjust.
11375 (fixup_partial_die): Adjust.
11376 (read_attribute_value): Adjust.
11377 (read_addr_index): Adjust.
11378 (read_addr_index_from_leb128): Adjust.
11379 (read_str_index): Adjust.
11380 (dwarf2_string_attr): Adjust.
11381 (get_debug_line_section): Adjust.
11382 (dwarf_decode_line_header): Adjust.
11383 (lnp_state_machine::check_line_address): Adjust.
11384 (dwarf_decode_lines_1): Adjust.
11385 (dwarf_decode_lines): Adjust.
11386 (dwarf2_start_symtab): Adjust.
11387 (var_decode_location): Adjust.
11388 (new_symbol_full): Adjust.
11389 (dwarf2_const_value_data): Adjust.
11390 (dwarf2_const_value_attr): Adjust.
11391 (dwarf2_const_value): Adjust.
11392 (die_type): Adjust.
11393 (die_containing_type): Adjust.
11394 (build_error_marker_type): Adjust.
11395 (lookup_die_type): Adjust.
11396 (guess_full_die_structure_name): Adjust.
11397 (anonymous_struct_prefix): Adjust.
11398 (determine_prefix): Adjust.
11399 (dwarf2_name): Adjust.
11400 (follow_die_ref_or_sig): Adjust.
11401 (follow_die_offset): Adjust.
11402 (follow_die_ref): Adjust.
11403 (follow_die_sig_1): Adjust.
11404 (follow_die_sig): Adjust.
11405 (get_signatured_type): Adjust.
11406 (get_DW_AT_signature_type): Adjust.
11407 (decode_locdesc): Adjust.
11408 (dwarf_decode_macros): Adjust.
11409 (cu_debug_loc_section): Adjust.
11410 (fill_in_loclist_baton): Adjust.
11411 (dwarf2_symbol_mark_computed): Adjust.
11412 (init_one_comp_unit): Don't assign
11413 dwarf2_cu::dwarf2_per_objfile.
11414 (set_die_type): Adjust.
11416 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11418 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11419 <dwarf2_per_objfile>: New field.
11420 (dwarf2_per_objfile): Remove global.
11421 (get_dwarf2_per_objfile): New function.
11422 (set_dwarf2_per_objfile): New function.
11423 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11424 dwarf2_per_objfile.
11425 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11426 (read_abbrev_offset): Likewise.
11427 (read_indirect_string): Likewise.
11428 (read_indirect_line_string): Likewise.
11429 (read_indirect_string_at_offset): Likewise.
11430 (read_indirect_string_from_dwz): Likewise.
11431 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11432 dwarf2_per_objfile.
11433 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11434 (create_all_comp_units): Change objfile parameter to
11435 dwarf2_per_objfile.
11436 (create_all_type_units): Likewise.
11437 (process_queue): Add dwarf2_per_objfile parameter.
11438 (read_and_check_comp_unit_head): Likewise.
11439 (lookup_dwo_unit_in_dwp): Likewise.
11440 (get_dwp_file): Likewise.
11441 (process_cu_includes): Likewise.
11442 (struct free_dwo_file_cleanup_data): New struct.
11443 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11444 set_dwarf2_per_objfile.
11445 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11446 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11447 context, adjust calls.
11448 (dw2_instantiate_symtab): Likewise.
11449 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11450 (dw2_get_cu): Likewise.
11451 (create_cu_from_index_list): Change objfile parameter to
11452 dwarf2_per_objfile.
11453 (create_cus_from_index_list): Get dwarf2_per_objfile from
11454 context, adjust calls.
11455 (create_cus_from_index): Likewise.
11456 (create_signatured_type_table_from_index): Change objfile
11457 parameter to dwarf2_per_objfile.
11458 (create_signatured_type_table_from_debug_names): Change objfile
11459 parameter to dwarf2_per_objfile.
11460 (create_addrmap_from_index): Likewise.
11461 (create_addrmap_from_aranges): Likewise.
11462 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11463 (dw2_setup): Remove.
11464 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11466 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11467 get_dwarf2_per_objfile.
11468 (dw2_forget_cached_source_info): Likewise.
11469 (dw2_map_symtabs_matching_filename): Likewise.
11470 (struct dw2_symtab_iterator) <index>: Remove.
11471 <dwarf2_per_objfile>: New field.
11472 (dw2_symtab_iter_init): Replace index parameter with
11473 dwarf2_per_objfile.
11474 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11475 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11476 (dw2_print_stats): Likewise.
11477 (dw2_dump): Likewise.
11478 (dw2_expand_symtabs_for_function): Likewise.
11479 (dw2_expand_all_symtabs): Likewise.
11480 (dw2_expand_symtabs_with_fullname): Likewise.
11481 (dw2_expand_marked_cus): Replace index and objfile parameters
11482 with dwarf2_per_objfile.
11483 (dw_expand_symtabs_matching_file_matcher): Add
11484 dwarf2_per_objfile parameter and adjust calls.
11485 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11487 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11488 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11490 (create_cus_from_debug_names_list): Replace objfile parameter
11491 with dwarf2_per_objfile and adjust calls.
11492 (create_cus_from_debug_names): Likewise.
11493 (dwarf2_read_debug_names): Likewise.
11494 (mapped_debug_names::namei_to_name): Adjust call.
11495 (dw2_debug_names_iterator::next): Likewise.
11496 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11497 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11498 (dw2_debug_names_dump): Likewise.
11499 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11500 (dw2_debug_names_expand_symtabs_matching): Likewise.
11501 (dwarf2_initialize_objfile): Likewise.
11502 (dwarf2_build_psymtabs): Likewise.
11503 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11505 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11506 (read_and_check_comp_unit_head): Likewise.
11507 (read_abbrev_offset): Likewise.
11508 (create_debug_type_hash_table): Likewise.
11509 (create_debug_types_hash_table): Likewise.
11510 (create_all_type_units): Replace objfile parameter with
11511 dwarf2_per_objfile.
11512 (add_type_unit): Add dwarf2_per_objfile parameter.
11513 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11514 with dwarf2_per_objfile.
11515 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11516 (lookup_dwp_signatured_type): Likewise.
11517 (lookup_signatured_type): Likewise.
11518 (read_cutu_die_from_dwo): Likewise.
11519 (init_tu_and_read_dwo_dies): Likewise.
11520 (init_cutu_and_read_dies): Likewise.
11521 (init_cutu_and_read_dies_no_follow): Likewise.
11522 (allocate_type_unit_groups_table): Add objfile parameter.
11523 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11524 (get_type_unit_group): Likewise.
11525 (process_psymtab_comp_unit): Update call.
11526 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11527 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11528 (print_tu_stats): Likewise.
11529 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11530 in void* parameter.
11531 (build_type_psymtabs): Change objfile parameter to
11532 dwarf2_per_objfile.
11533 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11534 passed in void* parameter.
11535 (process_skeletonless_type_units): Change objfile parameter to
11536 dwarf2_per_objfile.
11537 (set_partial_user): Likewise.
11538 (dwarf2_build_psymtabs_hard): Likewise.
11539 (read_comp_units_from_section): Likewise.
11540 (create_all_comp_units): Likewise.
11541 (scan_partial_symbols): Update calls.
11542 (add_partial_symbol): Likewise.
11543 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11544 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11545 (process_queue): Add dwarf2_per_objfile parameter.
11546 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11547 (compute_compunit_symtab_includes): Likewise.
11548 (process_cu_includes): Add dwarf2_per_objfile parameter.
11549 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11550 (process_full_type_unit): Likewise.
11551 (process_imported_unit_die): Update call.
11552 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11553 (read_file_scope): Likewise.
11554 (allocate_dwo_file_hash_table): Add objfile parameter.
11555 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11556 (create_cus_hash_table): Likewise.
11557 (create_dwp_hash_table): Likewise.
11558 (create_dwo_unit_in_dwp_v1): Likewise.
11559 (create_dwp_v2_section): Likewise.
11560 (create_dwo_unit_in_dwp_v2): Likewise.
11561 (lookup_dwo_unit_in_dwp): Likewise.
11562 (try_open_dwop_file): Likewise.
11563 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11564 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11565 cleanup to include a reference to dwarf2_per_objfile.
11566 (open_dwp_file): Add dwarf2_per_objfile parameter.
11567 (open_and_init_dwp_file): Likewise.
11568 (get_dwp_file): Likewise.
11569 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11570 (queue_and_load_all_dwo_tus): Update call.
11571 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11573 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11574 (dwarf2_ranges_process): Likewise.
11575 (dwarf2_get_pc_bounds): Likewise.
11576 (mark_common_block_symbol_computed): Likewise.
11577 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11578 (dwarf2_read_abbrevs): Update call.
11579 (read_partial_die): Use dwarf2_per_objfile from cu.
11580 (find_partial_die): Likewise.
11581 (fixup_partial_die): Likewise.
11582 (read_attribute_value): Likewise.
11583 (read_indirect_string_at_offset_from): Add objfile parameter.
11584 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11586 (read_indirect_string_from_dwz): Add objfile parameter.
11587 (read_indirect_string): Add objfile parameter.
11588 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11589 (read_addr_index): Use dwarf2_per_objfile from cu.
11590 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11592 (read_str_index): Use dwarf2_per_objfile from cu.
11593 (get_debug_line_section): Likewise.
11594 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11595 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11596 (new_symbol_full): Use dwarf2_per_objfile from cu.
11597 (build_error_marker_type): Likewise.
11598 (lookup_die_type): Likewise.
11599 (determine_prefix): Likewise.
11600 (follow_die_offset): Likewise.
11601 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11602 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11603 (dwarf2_fetch_die_type_sect_off): Likewise.
11604 (dwarf2_get_die_type): Likewise.
11605 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11606 (get_signatured_type): Likewise.
11607 (get_DW_AT_signature_type): Likewise.
11608 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11609 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11610 (cu_debug_loc_section): Likewise.
11611 (fill_in_loclist_baton): Likewise.
11612 (dwarf2_symbol_mark_computed): Likewise.
11613 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11614 dwarf2_per_objfile.
11615 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11617 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11618 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11619 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11620 (set_die_type): Use dwarf2_free_objfile from cu.
11621 (get_die_type_at_offset): Likewise.
11622 (dwarf2_per_objfile_free): Don't assign global variable.
11623 (debug_names) <constructor>: Add dwarf2_per_objfile
11624 parameter, update m_debugstrlookup construction.
11625 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11627 <m_dwarf2_per_objfile>: New field.
11628 <lookup>: Use m_dwarf2_per_objfile.
11629 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11630 (psyms_seen_size): Likewise.
11631 (write_gdbindex): Replace objfile parameter with
11632 dwarf2_per_objfile.
11633 (write_debug_names): Likewise.
11634 (write_psymtabs_to_index): Likewise.
11635 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11638 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11640 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11641 <dwarf2_per_objfile>: New field.
11642 (struct dwarf2_per_cu_data) <objfile>: Remove.
11643 <dwarf2_per_objfile>: New field.
11644 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11646 (create_signatured_type_table_from_index): Likewise.
11647 (create_debug_type_hash_table): Likewise.
11648 (fill_in_sig_entry_from_dwo_entry): Likewise.
11649 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11650 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11652 (create_partial_symtab): Access objfile through
11653 dwarf2_per_objfile.
11654 (process_psymtab_comp_unit_reader): Likewise.
11655 (read_comp_units_from_section): Likewise.
11656 (scan_partial_symbols): Likewise.
11657 (add_partial_symbol): Likewise.
11658 (add_partial_subprogram): Likewise.
11659 (peek_die_abbrev): Likewise.
11660 (fixup_go_packaging): Likewise.
11661 (process_full_comp_unit): Likewise.
11662 (process_full_type_unit): Likewise.
11663 (process_imported_unit_die): Likewise.
11664 (dwarf2_compute_name): Likewise.
11665 (dwarf2_physname): Likewise.
11666 (read_import_statement): Likewise.
11667 (create_cus_hash_table): Assign dwarf2_physname instead of
11669 (read_func_scope): Access objfile through dwarf2_per_objfile.
11670 (read_lexical_block_scope): Likewise.
11671 (read_call_site_scope): Likewise.
11672 (read_variable): Likewise.
11673 (dwarf2_rnglists_process): Likewise.
11674 (dwarf2_ranges_process): Likewise.
11675 (dwarf2_ranges_read): Likewise.
11676 (dwarf2_record_block_ranges): Likewise.
11677 (dwarf2_add_field): Likewise.
11678 (dwarf2_add_member_fn): Likewise.
11679 (read_structure_type): Likewise.
11680 (process_structure_scope): Likewise.
11681 (read_enumeration_type): Likewise.
11682 (read_array_type): Likewise.
11683 (read_common_block): Likewise.
11684 (read_namespace_type): Likewise.
11685 (read_namespace): Likewise.
11686 (read_module_type): Likewise.
11687 (read_tag_pointer_type): Likewise.
11688 (read_tag_ptr_to_member_type): Likewise.
11689 (read_tag_string_type): Likewise.
11690 (read_subroutine_type): Likewise.
11691 (read_typedef): Likewise.
11692 (read_base_type): Likewise.
11693 (attr_to_dynamic_prop): Likewise.
11694 (read_subrange_type): Likewise.
11695 (read_unspecified_type): Likewise.
11696 (load_partial_dies): Likewise.
11697 (read_partial_die): Likewise.
11698 (find_partial_die): Likewise.
11699 (guess_partial_die_structure_name): Likewise.
11700 (fixup_partial_die): Likewise.
11701 (read_attribute_value): Likewise.
11702 (read_addr_index_from_leb128): Likewise.
11703 (dwarf2_read_addr_index): Likewise.
11704 (dwarf2_string_attr): Likewise.
11705 (lnp_state_machine::check_line_address): Likewise.
11706 (dwarf_decode_lines_1): Likewise.
11707 (dwarf_decode_lines): Likewise.
11708 (dwarf2_start_symtab): Likewise.
11709 (var_decode_location): Likewise.
11710 (new_symbol_full): Likewise.
11711 (dwarf2_const_value_data): Likewise.
11712 (dwarf2_const_value_attr): Likewise.
11713 (dwarf2_const_value): Likewise.
11714 (die_type): Likewise.
11715 (die_containing_type): Likewise.
11716 (lookup_die_type): Likewise.
11717 (guess_full_die_structure_name): Likewise.
11718 (anonymous_struct_prefix): Likewise.
11719 (dwarf2_name): Likewise.
11720 (follow_die_ref_or_sig): Likewise.
11721 (follow_die_offset): Likewise.
11722 (follow_die_ref): Likewise.
11723 (dwarf2_fetch_die_loc_sect_off): Likewise.
11724 (dwarf2_fetch_constant_bytes): Likewise.
11725 (dwarf2_fetch_die_type_sect_off): Likewise.
11726 (dwarf2_get_die_type): Likewise.
11727 (follow_die_sig): Likewise.
11728 (decode_locdesc): Likewise.
11729 (dwarf2_per_cu_objfile): Likewise.
11730 (dwarf2_per_cu_text_offset): Likewise.
11731 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11733 (set_die_type): Access objfile through
11734 dwarf2_per_objfile.
11736 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11738 * valprint.c (converted_character_d): Remove typedef.
11739 (DEF_VEC_O (converted_character_d)): Remove.
11740 (count_next_character): Use std::vector.
11741 (print_converted_chars_to_obstack): Likewise.
11742 (generic_printstr): Likewise.
11744 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11746 * xml-support.h (struct gdb_xml_value): Add constructor.
11747 <value>: Change type to unique_xmalloc_ptr.
11748 (gdb_xml_value_s): Remove typedef.
11749 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11750 (gdb_xml_element_start_handler): Change parameter type to
11752 (xml_find_attribute): Likewise.
11753 * xml-support.c (xml_find_attribute): Change parameter type to
11754 std::vector and adjust.
11755 (gdb_xml_values_cleanup): Remove.
11756 (gdb_xml_parser::start_element): Adjust to std::vector.
11757 (xinclude_start_include): Change paraeter type to std::vector
11759 * btrace.c (check_xml_btrace_version): Likewise.
11760 (parse_xml_btrace_block): Likewise.
11761 (parse_xml_btrace_pt_config_cpu): Likewise.
11762 (parse_xml_btrace_pt): Likewise.
11763 (parse_xml_btrace_conf_bts): Likewise.
11764 (parse_xml_btrace_conf_pt): Likewise.
11765 * memory-map.c (memory_map_start_memory): Likewise.
11766 (memory_map_start_property): Likewise.
11767 * osdata.c (osdata_start_osdata): Likewise.
11768 (osdata_start_item): Likewise.
11769 (osdata_start_column): Likewise.
11770 * remote.c (start_thread): Likewise.
11771 * solib-aix.c (library_list_start_library): Likewise.
11772 (library_list_start_list): Likewise.
11773 * solib-svr4.c (library_list_start_library): Likewise.
11774 (svr4_library_list_start_list): Likewise.
11775 * solib-target.c (library_list_start_segment): Likewise.
11776 (library_list_start_section): Likewise.
11777 (library_list_start_library): Likewise.
11778 (library_list_start_list): Likewise.
11779 * tracepoint.c (traceframe_info_start_memory): Likewise.
11780 (traceframe_info_start_tvar): Likewise.
11781 * xml-syscall.c (syscall_start_syscall): Likewise.
11782 * xml-tdesc.c (tdesc_start_target): Likewise.
11783 (tdesc_start_feature): Likewise.
11784 (tdesc_start_reg): Likewise.
11785 (tdesc_start_union): Likewise.
11786 (tdesc_start_struct): Likewise.
11787 (tdesc_start_flags): Likewise.
11788 (tdesc_start_enum): Likewise.
11789 (tdesc_start_field): Likewise.
11790 (tdesc_start_enum_value): Likewise.
11791 (tdesc_start_vector): Likewise.
11793 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11795 * extension.h (struct xmethod_worker) <clone>: Remove.
11796 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11798 (python_xmethod_worker::clone): Remove.
11799 * valops.c (find_overload_match): Use std::move instead of
11802 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11804 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11805 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11806 <free_xmethod_worker_data>: Remove.
11807 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11808 <get_xmethod_arg_types>: Remove.
11809 <get_xmethod_result_type>: Remove.
11810 <invoke_xmethod>: Remove.
11811 * extension.c (new_xmethod_worker): Remove.
11812 (clone_xmethod_worker): Remove.
11813 (get_matching_xmethod_workers): Return void, pass std::vector by
11815 (get_xmethod_arg_types): Rename to...
11816 (xmethod_worker::get_arg_types): ... this, and adjust.
11817 (get_xmethod_result_type): Rename to...
11818 (xmethod_worker::get_result_type): ... this, and adjust.
11819 (invoke_xmethod): Remove.
11820 (free_xmethod_worker): Remove.
11821 (free_xmethod_worker_vec): Remove.
11822 * extension.h (enum ext_lang_rc): Move here from
11824 (struct xmethod_worker): Add constructor and destructor.
11827 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11828 virtual pure methods.
11829 <get_arg_types, get_result_type>: New methods.
11830 (xmethod_worker_ptr): Remove typedef.
11831 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11832 (xmethod_worker_vec): Remove typedef.
11833 (xmethod_worker_up): New typedef.
11834 (invoke_xmethod): Remove.
11835 (clone_xmethod_worker): Remove.
11836 (free_xmethod_worker): Remove.
11837 (free_xmethod_worker_vec): Remove.
11838 (get_xmethod_arg_types): Remove.
11839 (get_xmethod_result_type): Remove.
11840 * valops.c (find_method_list): Use std::vector, don't use
11841 intermediate vector.
11842 (value_find_oload_method_list): Use std::vector.
11843 (find_overload_match): Use std::vector.
11844 (find_oload_champ): Use std::vector.
11845 * value.c (value_free): Use operator delete.
11846 (value_of_xmethod): Rename to...
11847 (value_from_xmethod): ... this. Don't assign
11848 xmethod_worker::value, take rvalue-reference.
11849 (result_type_of_xmethod): Adjust.
11850 (call_xmethod): Adjust.
11851 * value.h: Include extension.h.
11852 (struct xmethod_worker): Don't forward-declare.
11853 (value_of_xmethod): Rename to...
11854 (value_from_xmethod): ... this, take rvalue-reference.
11855 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11856 (struct python_xmethod_worker): ... this, add constructor and
11858 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11859 (gdbpy_free_xmethod_worker_data): Rename to...
11860 (python_xmethod_worker::~python_xmethod_worker): ... this and
11862 (gdbpy_clone_xmethod_worker_data): Rename to...
11863 (python_xmethod_worker::clone): ... this and adjust.
11864 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11866 (gdbpy_get_xmethod_arg_types): Rename to...
11867 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11868 (gdbpy_get_xmethod_result_type): Rename to...
11869 (python_xmethod_worker::do_get_result_type): ... this and
11871 (gdbpy_invoke_xmethod): Rename to...
11872 (python_xmethod_worker::invoke): ... this and adjust.
11873 (new_python_xmethod_worker): Rename to...
11874 (python_xmethod_worker::python_xmethod_worker): ... this and
11876 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11878 (gdbpy_free_xmethod_worker_data): Remove.
11879 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11880 (gdbpy_get_xmethod_arg_types): Remove.
11881 (gdbpy_get_xmethod_result_type): Remove.
11882 (gdbpy_invoke_xmethod): Remove.
11883 * python/python.c (python_extension_ops): Remove obsolete
11886 2018-01-05 Pedro Alves <palves@redhat.com>
11889 * common/signals-state-save-restore.c
11890 (save_original_signals_state): New parameter 'quiet'. Warn if we
11891 find a custom handler preinstalled, instead of internal erroring.
11892 But only warn if !quiet.
11893 * common/signals-state-save-restore.h
11894 (save_original_signals_state): New parameter 'quiet'.
11895 * main.c (captured_main_1): Move save_original_signals_state call
11896 after option handling, and pass QUIET.
11898 2018-01-05 Pedro Alves <palves@redhat.com>
11900 * spu-tdep.c (spu_catch_start): Pass
11901 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11903 2018-01-05 Pedro Alves <palves@redhat.com>
11906 * ada-lang.c (literal_symbol_name_matcher): New function.
11907 (ada_get_symbol_name_matcher): Use it for
11908 symbol_name_match_type::SEARCH_NAME.
11909 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11910 it down instead of assuming symbol_name_match_type::FULL.
11911 * block.h (block_lookup_symbol): New parameter 'match_type'.
11912 * c-valprint.c (print_unpacked_pointer): Use
11913 lookup_symbol_search_name instead of lookup_symbol.
11914 * compile/compile-object-load.c (get_out_value_type): Pass down
11915 symbol_name_match_type::SEARCH_NAME.
11916 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11917 symbol_name_match_type::FULL.
11918 * cp-support.c (cp_get_symbol_name_matcher): Handle
11919 symbol_name_match_type::SEARCH_NAME.
11920 * infrun.c (insert_exception_resume_breakpoint): Use
11921 lookup_symbol_search_name.
11922 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11923 * psymtab.c (maintenance_check_psymtabs): Use
11924 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11925 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11926 SYMBOL_SEARCH_NAME.
11927 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11928 if symbol_name_match_type::SEARCH_NAME.
11929 (lookup_symbol_in_language): Pass down
11930 symbol_name_match_type::FULL.
11931 (lookup_symbol_search_name): New.
11932 (lookup_language_this): Pass down
11933 symbol_name_match_type::SEARCH_NAME.
11934 (lookup_symbol_aux, lookup_local_symbol): New parameter
11935 'match_type'. Pass it down.
11936 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11937 (lookup_symbol_search_name): New declaration.
11938 (lookup_symbol_in_block): New 'match_type' parameter.
11940 2018-01-05 Pedro Alves <palves@redhat.com>
11943 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11945 (ada_lookup_symbol): Reimplement in terms of
11946 ada_lookup_symbol_list, bits factored out from
11947 ada_lookup_encoded_symbol.
11949 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11951 * ada-exp.y (write_object_renaming): When subscripting an array
11952 using a symbol as the index, pass the block in call to
11953 ada_lookup_encoded_symbol when looking that symbol up.
11955 2018-01-05 Jerome Guitton <guitton@adacore.com>
11957 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11960 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11962 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11963 the case where VALUE_LVAL (val0) is not lval_memory.
11965 2018-01-05 Xavier Roirand <roirand@adacore.com>
11967 * ada-valprint.c (print_optional_low_bound): Handle
11968 character-indexed array printing like boolean-indexed array
11971 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11973 * NEWS: Create a new section for the next release branch.
11974 Rename the section of the current branch, now that it has
11977 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11979 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11980 * version.in: Bump version to 8.1.50.DATE-git.
11982 2018-01-03 Xavier Roirand <roirand@adacore.com>
11984 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11986 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11988 (default_exception_support_info) <catch_handlers_sym>: Add field.
11989 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11990 (ada_exception_name_addr_1): Add "catch handlers" handling.
11991 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11992 Update all callers.
11993 (create_excep_cond_exprs) <ex>: Add parameter.
11994 (re_set_exception): Update create_excep_cond_exprs call.
11995 (print_it_exception, print_one_exception, print_mention_exception)
11996 (print_recreate_exception): Add "catch handler" handling.
11997 (allocate_location_catch_handlers, re_set_catch_handlers)
11998 (check_status_catch_handlers, print_it_catch_handlers)
11999 (print_one_catch_handlers, print_mention_catch_handlers)
12000 (print_recreate_catch_handlers): New function.
12001 (catch_handlers_breakpoint_ops): New variable.
12002 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12003 Add parameter. Add "catch handler" handling.
12004 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12005 Add "catch handler" handling.
12006 (ada_exception_catchpoint_cond_string): Add "catch handler"
12008 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12010 (catch_ada_handlers_command): New function.
12011 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12012 operations structure.
12013 (_initialize_ada_language): Add "catch handlers" command entry.
12014 * NEWS: Document "catch handlers" feature.
12016 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12018 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12019 account when creating the array type of the slice.
12020 (ada_value_slice): Likewise.
12022 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12024 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12026 (create_array_type_with_stride): Add byte_stride_prop parameter.
12027 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12028 New parameter. Update all callers in this file.
12029 (array_type_has_dynamic_stride): New function.
12030 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12031 of arrays with dynamic byte strides.
12032 * dwarf2read.c (read_array_type): Add support for dynamic
12033 DW_AT_byte_stride attributes.
12035 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12037 * dwarf2read.c (read_unspecified_type): Treat
12038 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12040 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12042 Update copyright year range in all GDB files.
12044 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12046 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12047 and gdb/testsuite/gdb.base/step-line.c.
12049 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12051 * copyright.py (main): Dump the contents of
12052 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12053 even if BY_HAND is empty.
12055 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12057 * top.c (print_gdb_version): Update Copyright year in version
12060 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12062 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12064 For older changes see ChangeLog-2017.
12070 version-control: never