1 2018-08-27 Tom Tromey <tom@tromey.com>
3 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
6 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
8 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
10 * sparc-linux-tdep.c (sparc32_linux_sigframe)
11 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
12 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
14 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
15 (ppc64_linux_sigaction_tramp_frame)
16 (ppc32_linux_sighandler_tramp_frame)
17 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
18 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
19 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
20 * mn10300-linux-tdep.c (am33_linux_sigframe)
21 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
22 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
23 * mips-linux-tdep.c (mips_linux_o32_sigframe)
24 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
25 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
26 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
27 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
28 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
29 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
30 * microblaze-linux-tdep.c
31 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
32 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
33 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
34 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
35 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
36 * common/common-types.h (ULONGEST_MAX): New define.
37 (CORE_ADDR_MAX): Fix formatting.
38 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
39 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
40 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
41 (arm_linux_rt_sigreturn_tramp_frame)
42 (arm_eabi_linux_sigreturn_tramp_frame)
43 (arm_eabi_linux_rt_sigreturn_tramp_frame)
44 (thumb2_eabi_linux_sigreturn_tramp_frame)
45 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
46 (arm_linux_restart_syscall_tramp_frame)
47 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
48 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
49 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
51 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
53 2018-08-27 Tom Tromey <tom@tromey.com>
55 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
57 * mips-tdep.c (mips_deal_with_atomic_sequence)
58 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
59 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
60 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
61 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
63 * aarch64-tdep.c (aarch64_software_single_step): Use
66 2018-08-27 Tom Tromey <tom@tromey.com>
68 * linespec.c (complete_linespec_component): Add cast to "char".
69 * completer.c (completion_tracker::build_completion_result): Add
72 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
74 * solist.h (struct solist, struct target_so_ops): Fix
77 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
79 * ada-tasks.c (ada_task_info_s): Remove typedef.
80 (DEF_VEC_O(ada_task_info_s)): Remove.
81 (struct ada_tasks_inferior_data): Initialize fields.
82 <task_list>: Make an std::vector.
83 (get_ada_tasks_inferior_data): Allocate with new.
84 (ada_get_task_number): Adjust.
85 (get_task_number_from_id): Likewise.
86 (valid_task_id): Likewise.
87 (ada_get_task_info_from_ptid): Likewise.
88 (iterate_over_live_ada_tasks): Likewise.
89 (add_ada_task): Likewise.
90 (read_known_tasks): Likewise.
91 (ada_build_task_list): Likewise.
92 (print_ada_task_info): Likewise.
93 (info_task): Likewise.
94 (task_command_1): Likewise.
96 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
98 * ada-lang.c (add_angle_brackets): Return std::string.
100 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
102 * python/py-threadevent.c (py_get_event_thread): Initialize
105 2018-08-24 Pedro Alves <palves@redhat.com>
107 * python/py-bpevent.c (create_breakpoint_event_object): Use
109 * python/py-continueevent.c (emit_continue_event): Use
111 * python/py-exitedevent.c (create_exited_event_object): Return a
113 (emit_exited_event): Use copy-initialization.
114 * python/py-inferior.c (python_new_inferior)
115 (python_inferior_deleted, add_thread_object): Use
117 * python/py-infevents.c (create_inferior_call_event_object)
118 (create_register_changed_event_object)
119 (create_memory_changed_event_object): Return a gdbpy_ref<>.
120 (emit_inferior_call_event, emit_memory_changed_event)
121 (emit_register_changed_event): Use copy-initialization.
122 * python/py-newobjfileevent.c (create_new_objfile_event_object):
123 Return a gdbpy_ref<>.
124 (emit_new_objfile_event): Use copy-initialization.
125 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
126 (emit_clear_objfiles_event): Use copy-initialization.
127 * python/py-signalevent.c (create_signal_event_object): Use
129 * python/py-threadevent.c (create_thread_event_object): Use
132 2018-08-24 Pedro Alves <palves@redhat.com>
133 Simon Marchi <simon.marchi@ericsson.com>
136 * python/py-continueevent.c: Include "gdbthread.h".
137 (create_continue_event_object): Add intro comment. Add 'ptid'
138 parameter. Use it to find thread to pass to
139 create_thread_event_object.
140 (emit_continue_event): Pass PTID down to
141 create_continue_event_object.
142 * python/py-event.h (py_get_event_thread): Declare.
143 (create_thread_event_object): Remove default from 'thread'
145 * python/py-stopevent.c (create_stop_event_object): Use
147 * python/py-threadevent.c (get_event_thread): Rename to ...
148 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
149 and use it to find the thread.
150 (create_thread_event_object): Assert that THREAD isn't null.
151 Don't find the event thread here.
153 2018-08-23 Kevin Buettner <kevinb@redhat.com>
155 * block.h (blockrange, blockranges): New struct declarations.
156 (struct block): Add new field named `ranges'.
157 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
158 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
159 macros for accessing ranges in struct block.
160 (make_blockranges): New declaration.
161 block.c (make_blockranges): New function.
162 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
164 * symtab.h (find_pc_partial_function): Add new parameter `block'.
165 * blockframe.c (cache_pc_function_block): New static global.
166 (clear_pc_function_cache): Clear cache_pc_function_block.
167 (find_pc_partial_function): Move comment to symtab.h. Add
168 support for non-contiguous blocks.
169 * cli/cli-cmds.c (block.h): Include.
170 (print_disassembly): Handle printing of non-contiguous blocks.
171 (disassemble_current_function): Likewise.
172 (disassemble_command): Likewise.
174 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
176 * blockframe.c (get_pc_function_start): Likewise.
177 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
178 (gcc_symbol_address): Likewise.
179 * compile/compile-object-run.c (compile_object_run): Likewise.
180 * compile/compile.c (get_expr_block_and_pc): Likewise.
181 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
182 (func_addr_to_tail_call_list): Likewise.
183 * findvar.c (default_read_var_value): Likewise.
184 * inline-frame.c (inline_frame_this_id): Likewise.
185 (skip-inline_frames): Likewise.
186 * infcmd.c (until_next_command): Likewise.
187 * linespec.c (convert_linespec_to_sals): Likewise.
188 * parse.c (parse_exp_in_context_1): Likewise.
189 * printcmd.c (build_address_symbolic): likewise.
190 (info_address_command): Likewise.
191 symtab.c (find_function_start_sal): Likewise.
192 (skip_prologue_sal): Likewise.
193 (find_function_alias_target): Likewise.
194 (find_gnu_ifunc): Likewise.
195 * stack.c (find_frame_funname): Likewise.
196 * symtab.c (fixup_symbol_section): Likewise.
197 (find_function_start_sal): Likewise.
198 (skip_prologue_sal): Likewsie.
199 (find_function_alias_target): Likewise.
200 (find_gnu_ifunc): Likewise.
201 * tracepoint.c (info_scope_command): Likewise.
202 * value.c (value_fn_field): Likewise.
204 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
205 in place of find_pc_partial_function.
206 * blockframe.c (find_function_entry_range_from_pc): New function.
207 * symtab.h (find_function_entry_range_from_pc): Declare and document.
208 * objfiles.c (objfile_relocate1): Relocate start and end addresses
209 for each range in a block.
212 2018-08-23 Xavier Roirand <roirand@adacore.com>
214 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
217 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
219 * solib-svr4.c (read_program_headers_from_bfd): Return
220 gdb::optional<gdb::byte_vector>.
221 (svr4_exec_displacement): Adjust.
223 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
225 * solib-svr4.c (read_program_header): Return
226 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
227 (find_program_interpreter): Return
228 gdb::optional<gdb::byte_vector>.
229 (scan_dyntag_auxv): Adjust.
230 (enable_break): Adjust.
231 (svr4_exec_displacement): Adjust.
233 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
235 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
236 * inf-child.c (inf_child_target::terminal_save_inferior): New.
238 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
240 * guile/scm-string.c (gdbscm_scm_from_printf): Use
242 * guile/scm-utils.c (gdbscm_printf): Likewise.
243 * serial.c (serial_printf): Likewise.
244 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
246 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
248 * stack.c (print_frame): Print frame architecture when printing on
250 * NEWS: Mention new "arch" attribute in frame output.
252 2018-08-21 Alan Hayward <alan.hayward@arm.com>
254 * arch/aarch64.h (aarch64_regnum): Update comment.
256 2018-08-21 Alan Hayward <alan.hayward@arm.com>
258 * NEWS: Add SVE to 8.2 section.
260 2018-08-21 Pedro Alves <palves@redhat.com>
262 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
263 out from gdbscm_parse_function_args.
264 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
265 gdbscm_parse_function_args_1.
267 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
270 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
273 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
275 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
277 2018-08-19 Michael Spang <spang@google.com>
280 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
283 2018-08-18 Kevin Buettner <kevinb@redhat.com>
285 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
286 dwarf_variable_value.
287 * dwarf2-frame.c (class dwarf_expr_executor):
288 Add override for dwarf_variable_value.
289 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
290 (class symbol_needs_eval_context): Likewise.
291 (indirect_synthetic_pointer): Add forward declaration.
292 (sect_variable_value): New function.
293 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
294 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
295 for DW_OP_GNU_variable_value.
297 2018-08-16 Tom Tromey <tom@tromey.com>
299 * top.c (read_command_file): Update.
300 (command_line_input): Remove "repeat" argument.
301 * ada-lang.c (get_selections): Update.
302 * linespec.c (decode_line_2): Update.
303 * defs.h (command_line_input): Remove argument.
304 * cli/cli-script.c (read_next_line): Update.
305 * python/py-gdb-readline.c: Update.
307 2018-08-17 Tom Tromey <tom@tromey.com>
309 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
312 2018-08-15 Tom Tromey <tom@tromey.com>
314 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
316 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
318 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
319 If used, use find_pc_partial_function to find address range
321 * mi/mi-main.c (mi_cmd_list_features): Report
322 "data-disassemble-a-option" feature.
323 * NEWS: Mention new -data-disassemble option -a.
325 2018-08-13 Tom Tromey <tom@tromey.com>
327 * common/common-defs.h (_FORTIFY_SOURCE): Define.
329 2018-08-13 Alan Hayward <alan.hayward@arm.com>
331 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
332 (aarch64_linux_collect_sve_regset): Likewise.
333 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
334 * regcache.h (regcache_map_entry_size): New function.
336 2018-08-13 Alan Hayward <alan.hayward@arm.com>
338 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
339 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
340 (SVE_HEADER_VL_LENGTH): Likewise.
341 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
342 (SVE_HEADER_FLAGS_LENGTH): Likewise.
343 (SVE_HEADER_RESERVED_LENGTH): Likewise.
344 (SVE_HEADER_SIZE_OFFSET): Likewise.
345 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
346 (SVE_HEADER_VL_OFFSET): Likewise.
347 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
348 (SVE_HEADER_FLAGS_OFFSET): Likewise.
349 (SVE_HEADER_RESERVED_OFFSET): Likewise.
350 (SVE_HEADER_SIZE): Likewise.
351 (aarch64_linux_core_read_vq): Add function.
352 (aarch64_linux_core_read_description): Check for SVE section.
354 2018-08-13 Alan Hayward <alan.hayward@arm.com>
356 * aarch64-fbsd-tdep.c
357 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
359 * aarch64-linux-tdep.c
360 (aarch64_linux_iterate_over_regset_sections): Likewise.
362 (alpha_linux_iterate_over_regset_sections):
364 (alphanbsd_iterate_over_regset_sections): Likewise.
366 (amd64fbsd_iterate_over_regset_sections): Likewise.
368 (amd64_linux_iterate_over_regset_sections): Likewise.
370 (armbsd_iterate_over_regset_sections): Likewise.
372 (arm_fbsd_iterate_over_regset_sections): Likewise.
374 (arm_linux_iterate_over_regset_sections): Likewise.
375 * corelow.c (get_core_registers_cb): Likewise.
376 (core_target::fetch_registers): Likewise.
377 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
378 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
379 * gdbarch.h (void): Regenerate.
380 * gdbarch.sh: Add supply_size and collect_size.
381 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
382 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
383 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
384 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
385 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
386 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
387 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
388 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
389 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
390 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
391 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
392 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
393 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
394 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
395 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
396 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
397 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
398 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
399 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
400 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
401 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
402 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
403 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
404 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
405 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
406 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
407 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
408 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
409 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
410 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
412 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
414 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
417 2018-08-10 Keith Seitz <keiths@redhat.com>
419 * compile/compile-c-support.c (add_code_header, add_code_footer):
420 Move into policy class.
421 (c_push_user_expression, pop_user_expression_nop)
422 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
423 (compile_program): New host class.
424 (c_compile_program): New typedef.
425 (c_compute_porgram): Use c_compile_program.
427 2018-08-10 Keith Seitz <keiths@redhat.com>
429 * compile/compile-internal.h (compile_instance::~compile_instance):
430 Remove calls to htab_delete.
431 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
432 * compile.c (compile_instance::compile_instance): Initialize
433 htab unique pointers.
434 (compile_instance::get_cached_type, compile_instance::insert_type)
435 (compile_instance::error_symbol_once): Update for unique_ptr.
437 2018-08-10 Keith Seitz <keiths@redhat.com>
439 * compile/compile-c-symbols.c (struct symbol_error)
440 (hash_symbol_error, eq_symbol_error, del_symbol_error)
441 (compile_instance::insert_symbol_error)
442 (compile_instance::error_symbol_once): Move to ...
443 * compile/compile.c: ... here.
445 2018-08-10 Keith Seitz <keiths@redhat.com>
447 * compile/compile-c-support.c (c_get_compile_context): Use `new'
448 instead of `new_compile_instance'.
449 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
451 If the symbol error map is not initialized, create it.
452 (generate_c_for_for_one_symbol): Do not check/initialize
453 the symbol error map.
454 * compile/compile-c-types.c (compile_c_instance): Make a class.
456 (compile_instance::compile_instance): Initialize the type cache.
457 (get_cached_type): New function.
458 (insert_type): Update description.
459 (compile_c_instance::m_default_cflags): Define.
460 (convert_type): Update description. Use get_cached_type.
461 (delete_instance): Moved to destructor.
462 (new_compile_instance): Moved to constructor.
463 * compile/compile-c.h (compile_c_instance): Make class inheriting
464 from compile_instance.
465 <base>: Remove field.
466 <type_map, symbol_err_map>: Move to base class.
467 <c_plugin>: Rename to `m_plugin' and remove pointer type.
468 * compile/compile-internal.h (compile_instance): Make class.
469 <type_map_t, symbol_err_map_t>: Define.
470 <fe>: Rename to `m_gcc_fe'.
471 <scope, block, gcc_target_options>: Add `m_' prefix.
472 <m_type_map, m_symbol_err_map>: New fields, moved from
475 (convert_type, new_compile_instance): Remove.
476 * compile/compile.c (cleanup_compile_instance): Remove.
477 (compile_to_object): Use unique_ptr to eliminate cleanups.
478 (compile_instance::set_print_callback, compile_instance::version)
479 (compile_instance::set_verbose)
480 (compile_instance::set_driver_filename)
481 (compile_instance::set_triplet_regexp)
482 (compile_instance::set_arguments)
483 (compile_instance::set_source_file)
484 (compile_instance::compile): Define.
486 2018-08-10 Keith Seitz <keiths@redhat.com>
488 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
489 * compile/compile-c-types.c: Define GCC_METHODN macros and include
490 gcc-c-fe.def to define C plugin.
491 (delete_instance): Delete `c_plugin'.
492 (new_compile_instance): Initialize `c_plugin'.
493 * compile/compile-c.h: Include gcc_c_plugin.h.
494 (struct compile_c_instance) <c_plugin>: New member.
495 * gcc-c-plugin.h: New file.
496 Update all callers with API change.
498 2018-08-10 Keith Seitz <keiths@redhat.com>
500 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
501 (HFILES_NO_SRCDIR): ... to here.
502 Add compile-internal.h and compile-c.h.
503 * compile/compile-c-support.c: Include compile-c.h.
504 * compile/compile-c-symbols.c: Include compile-c.h.
505 (generate_c_for_variable_locations): Update comment.
506 * compile/compile-c-types.c: Include compile-c.h.
507 * compile/compile-c.h: New file -- moved C language declarations
508 from other files here.
509 * compile/compile-internal.h: Do not include hashtab.h or
511 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
512 (gcc_convert_symbol, gcc_symbol_address)
513 (generate_c_for_variable_locations, c_get_mode_for_size)
514 (c_get_range_decl_name): Definitions moved to compile-c.h.
515 * compile/compile-loc2c.c: Include compile-c.h.
517 2018-08-10 Keith Seitz <keiths@redhat.com>
519 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
520 (c_symbol_substitution_name): ... this.
523 2018-08-10 Keith Seitz <keiths@redhat.com>
525 * compile/compile-c-support.c (c_compute_program): Use
526 unique_xmalloc_ptr to eliminate cleanup.
527 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
528 Return a unique_xmalloc_ptr and eliminate cleanup.
529 * compile/compile-internal.h (generate_c_for_variable_locations):
530 Return unique_xmalloc_ptr and update description.
532 2018-08-10 Alan Hayward <alan.hayward@arm.com>
534 * corelow.c (core_target::get_core_register_section): Rename
535 min_size to section_min_size.
537 2018-08-09 Jim Wilson <jimw@sifive.com>
539 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
540 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
541 * NEWS: Mention new GNU/Linux RISC-V target.
542 * configure.host: Add riscv*-*-linux*.
543 * configure.nat: Add riscv*.
544 * configure.tgt: Add riscv*-*-linux*.
545 * riscv-linux-nat.c: New file.
546 * riscv-linux-tdep.c: New file.
548 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
550 * infrun.c (resume): Make static, add forward declaration.
551 (proceed): Update header comment.
552 * infrun.h (resume): Delete declaration.
554 2018-08-09 Tom Tromey <tom@tromey.com>
556 * riscv-tdep.h: Minor formatting fixes.
558 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
560 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
561 * dwarf-index-cache.c (create_dir_and_check): Likewise.
562 (test_mkdir_recursive): Likewise.
563 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
565 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
567 * valarith.c (value_subscripted_rvalue): If an array is not in
568 memory, and we don't know the upper bound, then we can't know that
569 the requested element exists or not.
571 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
573 * target.c (str_comma_list_concat_elem): Fix typo in comment.
574 (target_options_to_string): Add comment.
576 2018-08-08 Tom Tromey <tom@tromey.com>
578 * unittests/scoped_mmap-selftests.c: Check result of "write".
580 2018-08-08 Jim Wilson <jimw@sifive.com>
582 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
583 (decode_register_index_short): New.
584 (decode_j_type_insn, decode_cj_type_insn): New.
585 (decode_b_type_insn, decode_cb_type_insn): New.
586 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
587 local xlen. Check xlen when decoding ambiguous compressed insns. In
588 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
589 is_c_sw_insn instead of is_sw_insn.
590 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
591 (riscv_software_single_step): New.
592 * riscv-tdep.h (riscv_software_single_step): Declare.
594 * riscv-tdep.c (riscv_isa_xlen): Drop static.
595 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
597 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
600 * target.c (dispose_inferior): Don't dispose of inferiors that are
603 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
605 * remote.c (remote_target::download_tracepoint): Change char* to
608 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
610 * target.h (target_options_to_string): Return an std::string.
611 * target.c (str_comma_list_concat_elem): Return void, use
613 (do_option): Likewise.
614 (target_options_to_string): Return an std::string.
615 * linux-nat.c (linux_nat_target::wait): Adjust.
616 * target-debug.h (target_debug_print_options): Adjust.
618 2018-08-07 Tom Tromey <tom@tromey.com>
620 * Makefile.in (CPPFLAGS): New variable.
621 (INTERNAL_CPPFLAGS): Use it.
623 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
625 * NEWS: Mention the index cache.
627 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
629 * common/pathstuff.h (get_standard_cache_dir): New.
630 * common/pathstuff.c (get_standard_cache_dir): New.
631 * build-id.h (build_id_to_string): New.
632 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
633 DEBUG_STR_SUFFIX): Move to here.
634 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
635 DEBUG_STR_SUFFIX): Move from there.
636 (write_psymtabs_to_index): Make non-static, add basename
637 parameter. Write to temporary files, rename when done.
638 (save_gdb_index_command): Adjust call to
639 write_psymtabs_to_index.
640 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
642 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
643 (get_gdb_index_contents_from_cache): New.
644 (get_gdb_index_contents_from_cache_dwz): New.
645 (dwarf2_initialize_objfile): Read index from cache.
646 (dwarf2_build_psymtabs): Save to index.
647 * dwarf-index-cache.h: New file.
648 * dwarf-index-cache.c: New file.
649 * dwarf-index-write.h: New file.
651 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
653 * gnulib/aclocal.m4: Re-generate.
654 * gnulib/config.in: Re-generate.
655 * gnulib/configure: Re-generate.
656 * gnulib/import/Makefile.am: Re-generate.
657 * gnulib/import/Makefile.in: Re-generate.
658 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
659 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
660 * gnulib/import/m4/mkdir.m4: New file.
661 * gnulib/import/mkdir.c: New file.
662 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
665 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
667 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
668 * common/scoped_mmap.c: New file.
669 * common/scoped_mmap.h (destroy): New method.
670 (~scoped_mmap, reset): Use destroy.
671 (scoped_mmap): New move constructor.
672 (mmap_file): New declaration.
673 * unittests/scoped_mmap-selftests.c (test_normal,
674 test_invalid_filename, run_tests): New functions.
675 (_initialize_scoped_mmap_selftests): Register selftest.
677 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
679 * dwarf2read.c (read_gdb_index_from_section): Rename to...
680 (read_gdb_index_from_buffer): ... this. Remove section
681 parameter, add buffer parameter.
682 (get_gdb_index_contents_ftype,
683 get_gdb_index_contents_dwz_ftype): New typedefs.
684 (dwarf2_read_gdb_index): Add callback parameters to get the
686 (get_gdb_index_contents_from_section): New.
687 (dwarf2_initialize_objfile): Update call to
688 dwarf2_read_gdb_index.
690 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
692 * common/filestuff.h (gdb_fopen_cloexec): New overload.
693 (gdb_open_cloexec): Likewise.
694 * nat/linux-osdata.c (command_from_pid): Use string_printf.
695 (commandline_from_pid): Likewise.
696 (linux_xfer_osdata_threads): Likewise.
697 (linux_xfer_osdata_fds): Likewise.
698 * ada-lang.c (is_package_name): Likewise.
699 * auxv.c (procfs_xfer_auxv): Likewise.
700 * breakpoint.c (print_one_breakpoint_location): Use
702 (print_one_catch_solib): Use string_printf.
703 * coff-pe-read.c (add_pe_exported_sym): Likewise.
704 (add_pe_forwarded_sym): Likewise.
705 * dwarf2read.c (create_type_unit_group): Likewise.
706 (build_error_marker_type): Likewise.
707 * infcall.c (get_function_name): Likewise.
708 * valprint.c (print_converted_chars_to_obstack): Likewise.
709 * xtensa-tdep.c (xtensa_register_type): Likewise.
711 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
713 * remote.c (remote_target::download_tracepoint): Fix format
716 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
718 * tracefile.c: Include common/byte-vector.h.
719 (trace_save): Change type of buf to gdb::byte_vector. Initialize
720 with trace_regblock_size if needed. Update uses of buf.
722 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
724 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
725 std::vector<unsigned char>.
726 * tracepoint.c (collection_list::collection_list): Remove
727 m_regs_mask initializer from initializer list. Resize
728 m_regs_mask using the largest remote register number.
729 (collection_list::add_remote_register): Remove size check on
730 m_regs_mask. Use at to access element.
731 (collection_list::stringify): Change type of temp_buf to
732 gdb::char_vector. Update uses of temp_buf. Resize if needed to
733 stringify the register mask. Use pack_hex_byte for the register
736 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
738 * tracepoint.h (class collection_list) <add_register>: Remove.
739 <add_remote_register, add_ax_registers, add_local_register>:
741 <add_memrange>: Add scope parameter.
742 * tracepoint.c (encode_actions_1): Likewise.
743 (collection_list::add_register): Rename to ...
744 (collection_list::add_remote_register): ... this. Update
746 (collection_list::add_ax_registers, add_local_register): New
748 (collection_list::add_memrange): Add scope parameter. Call
749 add_local_register instead of add_register.
750 (finalize_tracepoint_aexpr): New function.
751 (collection_list::collect_symbol): Update calls to add_memrange.
752 Call add_local_register instead of add_register. Call
753 add_ax_registers. Call finalize_tracepoint_aexpr.
754 (encode_actions_1): Get remote regnos for $reg action. Call
755 add_remote_register, add_ax_registers, and add_local_register.
756 Update call to add_memrange. Call finalize_tracepoint_aexpr.
757 (validate_actionline): Call finalize_tracepoint_aexpr.
759 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
761 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
762 Replace array buf with gdb::char_vector buf, of size
763 get_remote_packet_size (). Replace references to buf and
764 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
765 and xsnprintf with snprintf. Raise errors if the buffer is too
768 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
770 * remote.c (remote_target::download_tracepoint): Fix the has_more
771 predicate in the QTDP action list iteration.
773 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
775 * remote.c (remote_target::download_tracepoint): Fix indentation
778 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
780 * proc-api.c (_initialize_proc_api): Remove c, unused.
781 * procfs.c (procfs_init_inferior): Remove signals, unused.
782 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
785 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
786 Andrew Burgess <andrew.burgess@embecosm.com>
788 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
789 'W_STOPCODE (0)' as this could be ambiguous.
791 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
793 * ser-tcp.c (net_open): Fix thinko when deciding whether to
794 disable TCP's Nagle algorithm (use "ai_protocol" instead of
797 2018-08-02 Tom Tromey <tom@tromey.com>
800 * dwarf2read.c (read_func_scope): Set symtab on template parameter
802 (process_structure_scope): Likewise.
804 2018-08-02 Xavier Roirand <roirand@adacore.com>
807 * darwin-nat.c (darwin_kill_inferior): Fix handling of
810 2018-08-02 Tom Tromey <tom@tromey.com>
812 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
813 (darwin_suspend_inferior, darwin_resume_inferior)
814 (darwin_decode_notify_message, darwin_resume_inferior_threads)
815 (darwin_check_new_threads): Check result of get_darwin_inferior.
817 2018-07-31 Joel Brobecker <brobecker@adacore.com>
821 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
823 * varobj.c (varobj_get_path_expr_parent): Report an error if
824 parent is a dynamic varobj.
826 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
828 * gnulib/aclocal.m4: Re-generate.
829 * gnulib/config.in: Re-generate.
830 * gnulib/configure: Re-generate.
831 * gnulib/import/Makefile.in: Re-generate.
832 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
833 * gnulib/import/m4/onceonly.m4: Re-generate.
835 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
837 * target-descriptions.c (struct xml_test_tdesc): New.
838 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
839 (record_xml_tdesc): Update.
840 (maintenance_check_xml_descriptions): Update.
841 * target-descriptions.h (record_xml_tdesc): Update comment.
843 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
845 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
846 checking array bounds are defined.
848 2018-07-30 Tom Tromey <tom@tromey.com>
850 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
851 irreflexivity violation.
853 2018-07-30 Tom Tromey <tom@tromey.com>
855 * cli/cli-decode.c (lookup_cmd): Remove lint code.
856 * value.c (unpack_long): Remove lint code.
857 * valops.c (value_ind): Remove lint code.
858 * valarith.c (value_x_binop, value_x_unop, value_equal)
859 (value_pos): Remove lint code.
861 2018-07-28 Tom de Vries <tdevries@suse.de>
863 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
864 with undefined upper bound as <optimized out>.
866 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
868 * gcore.in: Rename variable "name" to "prefix". Expand
871 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
873 * windows-nat.c (windows_nat_target::create_inferior): Update to
874 call close() in global namespace.
876 2018-07-26 Tom Tromey <tom@tromey.com>
878 * dwarf-index-write.c (add_address_entry): Don't add objfile
880 * dbxread.c (find_stab_function): Rename from
881 find_stab_function_addr. Return a bound_minimal_symbol.
882 (read_dbx_symtab): Use raw_text_low, raw_text_high.
883 Don't add objfile offsets.
884 (end_psymtab): Use raw_text_low, raw_text_high,
885 MSYMBOL_VALUE_RAW_ADDRESS.
886 (read_ofile_symtab): Update.
887 (process_one_symbol): Update.
888 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
890 (dw2_relocate): Remove.
891 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
893 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
895 (process_psymtab_comp_unit_reader, add_partial_symbol)
896 (add_partial_subprogram, dwarf2_ranges_read): Update.
897 (load_partial_dies): Update.
898 (add_address_entry): Don't add objfile offsets.
899 (dwarf2_build_include_psymtabs): Update.
900 (create_addrmap_from_aranges): Don't add objfile offsets.
901 (dw2_find_pc_sect_compunit_symtab): Update.
902 * mdebugread.c (parse_symbol): Don't add objfile offsets.
903 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
905 (parse_partial_symbols): Don't add objfile offsets. Use
906 raw_text_low, raw_text_high. Update.
907 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
908 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
909 or call 'relocate' quick function. Clear psymbol_map.
910 * psympriv.h (struct partial_symbol) <address>: Add section
912 <set_unrelocated_address>: Rename from set_address.
913 <raw_text_low, raw_text_high>: New methods.
914 <text_low, text_high>: Add objfile parameter.
915 (add_psymbol_to_bcache): Add 'section' parameter. Call
916 set_unrelocated_address.
917 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
918 (find_pc_psymbol): Update.
919 (fixup_psymbol_section, relocate_psymtabs): Remove.
920 (dump_psymtab, psym_functions): Update.
921 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
923 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
924 (start_psymtab_common): Update.
925 * symfile-debug.c (debug_qf_relocate): Remove.
926 (debug_sym_quick_functions): Update.
927 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
928 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
931 2018-07-26 Tom Tromey <tromey@redhat.com>
933 * dbxread.c (end_psymtab): Use text_high_valid and
935 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
936 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
937 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
939 <text_low_valid, text_high_valid>: New fields.
940 <set_text_low, set_text_high>: Update.
941 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
943 2018-07-26 Tom Tromey <tom@tromey.com>
945 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
947 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
948 textlow and texthigh fields.
949 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
951 * mdebugread.c (parse_lines, parse_partial_symbols)
952 (psymtab_to_symtab_1): Update.
953 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
954 Rename fields. Update comment. Now private.
955 <text_low, text_high, set_text_low, set_text_high>: New methods.
956 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
957 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
958 (start_psymtab_common, maintenance_info_psymtabs)
959 (maintenance_check_psymtabs): Update.
960 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
962 (scan_xcoff_symtab): Update.
964 2018-07-26 Tom Tromey <tromey@redhat.com>
966 * psympriv.h (struct partial_symbol) <unrelocated_address,
967 address, set_address>: New methods.
968 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
969 (fixup_psymbol_section, relocate_psymtabs): Update.
970 (print_partial_symbols): Add 'objfile' parameter. Update.
971 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
974 2018-07-26 Tom Tromey <tom@tromey.com>
976 * dwarf-index-write.c (write_psymbols, debug_names::insert)
977 (debug_names::write_psymbols): Update.
978 * psympriv.h (struct partial_symbol): Derive from
980 <obj_section>: New method.
981 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
982 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
983 (find_pc_sect_psymbol, fixup_psymbol_section)
984 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
985 (print_partial_symbols, recursively_search_psymtabs)
986 (compare_psymbols, psymbol_hash, psymbol_compare)
987 (add_psymbol_to_bcache, maintenance_check_psymtabs)
988 (psymbol_name_matches, psym_fill_psymbol_map): Update.
990 2018-07-26 Tom Tromey <tromey@redhat.com>
992 * dbxread.c (end_psymtab): Remove dead code.
994 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
996 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
997 DWARF unwinders are disabled.
998 * dwarf2-frame.c: Add dwarf2read.h include.
999 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1001 (dwarf2_frame_unwinders_enabled_p): Define.
1002 (show_dwarf_unwinders_enabled_p): New function.
1003 (_initialize_dwarf2_frame): Register switch to control DWARF
1005 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1006 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1007 (show_dwarf_cmdlist): Remove static keyword.
1008 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1009 (show_dwarf_cmdlist): Declare.
1010 * NEWS: Document new feature.
1012 2018-07-26 Tom de Vries <tdevries@suse.de>
1014 PR breakpoints/23366
1015 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1017 2018-07-26 Tom de Vries <tdevries@suse.de>
1019 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1020 DW_AT_count can't be translated to a dynamic prop.
1022 2018-07-25 Tom de Vries <tdevries@suse.de>
1024 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1027 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1029 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1031 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1033 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1035 2018-07-24 Keith Seitz <keiths@redhat.comt
1038 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1039 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1040 instead of add_symbol_to_list.
1041 (read_file_scope): Call prepare_one_comp_unit before reading
1044 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1046 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1048 2018-07-24 Tom Tromey <tom@tromey.com>
1050 * utils.c (malloc, realloc, free): Don't declare.
1051 * configure, config.in: Rebuild.
1052 * configure.ac: Don't check for declarations of free, malloc, or
1055 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1057 * aarch64-linux-nat.c
1058 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1060 * arm-linux-nat.c (fetch_regs): Likewise.
1061 (store_regs): Likewise.
1062 (fetch_vfp_regs): Likewise.
1063 (store_vfp_regs): Likewise.
1064 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1065 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1066 (arm_linux_nat_target::insert_watchpoint): Likewise.
1067 (arm_linux_nat_target::remove_watchpoint): Likewise.
1068 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1070 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1072 * ppc-linux-nat.c (fetch_register): Likewise.
1073 (fetch_all_gp_regs): Likewise.
1074 (fetch_ppc_registers): Likewise.
1075 (store_all_gp_regs): Likewise.
1076 (store_ppc_registers): Likewise.
1077 (hwdebug_insert_point): Likewise.
1078 (can_use_watchpoint_cond_accel): Likewise.
1079 * remote-sim.c (gdb_os_write_stdout): Likewise.
1081 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1082 Tom Tromey <tom@tromey.com>
1084 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1086 * configure: Rebuild.
1088 2018-07-22 Tom Tromey <tom@tromey.com>
1090 * regformats/regdat.sh: Define xmltarget_${name} inside
1091 #ifndef IN_PROCESS_AGENT.
1093 2018-07-22 Tom Tromey <tom@tromey.com>
1095 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1097 2018-07-22 Tom Tromey <tom@tromey.com>
1099 * symfile.c (reread_symbols): Notify iter, not objfile.
1101 2018-07-22 Tom Tromey <tom@tromey.com>
1103 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1105 (ravenscar_thread_target::prepare_to_store): Likewise.
1107 2018-07-22 Tom Tromey <tom@tromey.com>
1109 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1110 unused variable. Call value_fetch_lazy when needed.
1111 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1112 Remove unused variable. Call value_fetch_lazy when needed.
1114 2018-07-22 Tom Tromey <tom@tromey.com>
1116 * m32c-tdep.c (mark_dma): Return void.
1117 (make_regs): Remove unused declarations.
1119 2018-07-22 Tom Tromey <tom@tromey.com>
1121 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1122 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1123 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1124 bkscm_get_valid_block_smob_arg_unsafe for effect.
1126 2018-07-22 Tom Tromey <tom@tromey.com>
1128 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1131 2018-07-22 Tom Tromey <tom@tromey.com>
1133 * windows-nat.c (saved_context): Conditionally define.
1134 * remote.c (remote_target::remote_btrace_maybe_reopen):
1135 Conditionally declare "warned".
1136 * inflow.c (sigquit_ours): Conditionally define.
1137 (new_tty): Move "tty" declaration inside #if.
1138 * guile/guile.c (guile_datadir): Conditionally define.
1139 * charset.c (set_be_le_names): Move some declarations inside #if.
1140 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1142 (parse_xml_btrace_conf): Likewise.
1144 2018-07-22 Tom Tromey <tom@tromey.com>
1146 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1148 2018-07-22 Tom Tromey <tom@tromey.com>
1150 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1151 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1152 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1153 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1154 * stack.c (frame_apply_level_command): Remove unused variable.
1155 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1156 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1157 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1159 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1160 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1161 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1163 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1164 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1166 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1167 Remove unused variable.
1168 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1170 * common/tdesc.c (print_xml_feature::visit): Remove unused
1172 * compile/compile-object-load.c (store_regs): Remove unused
1174 * complaints.c (clear_complaints): Remove unused variable.
1175 * corelow.c (core_target_open): Remove unused variable.
1176 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1178 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1180 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1182 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1184 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1186 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1188 * ia64-tdep.c (examine_prologue): Remove unused variable.
1189 * infcall.c (run_inferior_call): Remove unused variable.
1190 * inferior.c (exit_inferior): Remove unused variable.
1191 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1192 * linespec.c (decode_line_2): Remove unused variable.
1193 * linux-nat.c (super_close): Remove.
1194 * linux-tdep.c (linux_info_proc): Remove unused variable.
1195 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1196 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1197 Remove unused variable.
1198 * parse.c (find_minsym_type_and_address): Remove unused variable.
1199 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1201 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1203 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1205 * record-btrace.c (record_btrace_target::store_registers): Remove
1207 (cmd_show_record_btrace_cpu): Remove unused variable.
1208 * riscv-tdep.c (riscv_register_reggroup_p)
1209 (riscv_push_dummy_call, riscv_return_value): Remove unused
1211 * rust-exp.y (literal): Remove unused variable.
1212 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1214 <STRUCTOP_ANONYMOUS>: Likewise.
1215 * s390-linux-tdep.c (s390_linux_init_abi_31)
1216 (s390_linux_init_abi_64): Remove unused variable.
1217 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1218 (file_select_thread, net_windows_open, _initialize_ser_windows):
1219 Remove unused variables.
1220 * symtab.c (find_pc_sect_line): Remove unused variable.
1221 * target-memory.c (compute_garbled_blocks): Remove unused
1223 (target_write_memory_blocks): Remove unused variable.
1224 * target.c (target_stack::unpush): Remove unused variables.
1225 * tracepoint.c (start_tracing, all_tracepoint_actions)
1226 (merge_uploaded_trace_state_variables)
1227 (print_one_static_tracepoint_marker): Remove unused variable.
1228 * unittests/basic_string_view/element_access/char/1.cc (test01):
1229 Remove unused variable.
1230 * windows-nat.c (windows_continue, windows_add_all_dlls)
1231 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1232 Remove unused variables.
1234 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1236 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1237 attr_profile in HAVE_ELF.
1238 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1241 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1243 * frame.c (frame_register_unwind): Change parameter name.
1244 (frame_unwind_register): Likewise.
1245 (frame_unwind_register_value): Likewise.
1246 (frame_unwind_register_signed): Likewise.
1247 (frame_unwind_register_unsigned): Likewise.
1248 * frame.h (frame_register_unwind): Likewise.
1249 (frame_unwind_register): Likewise.
1250 (frame_unwind_register_value): Likewise.
1251 (frame_unwind_register_signed): Likewise.
1252 (frame_unwind_register_unsigned): Likewise.
1253 (frame_unwind_arch): Likewise.
1255 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1257 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1260 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1262 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1263 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1266 2018-07-20 Keith Seitz <keiths@redhat.com>
1268 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1269 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1270 m_compunit_symtab, m_language>: Add "m_" prefix.
1272 * buildsym.c: Update all uses.
1274 2018-07-20 Tom Tromey <tom@tromey.com>
1276 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1277 * buildsym.h (record_line_ftype): Remove typedef.
1279 2018-07-20 Tom Tromey <tom@tromey.com>
1281 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1282 (end_expandable_symtab): Likewise.
1283 (end_symtab_get_static_block): Likewise.
1284 (end_symtab_from_static_block): Likewise.
1285 * buildsym-legacy.c (augment_type_symtab): Remove.
1286 (end_expandable_symtab): Remove.
1287 (end_symtab_get_static_block): Remove.
1288 (end_symtab_from_static_block): Remove.
1290 2018-07-20 Tom Tromey <tom@tromey.com>
1292 * dwarf2read.c: Include buildsym.h.
1293 (struct dwarf2_cu) <builder>: New method.
1294 (fixup_go_packaging): Update.
1295 (process_full_comp_unit, process_full_type_unit): Update. Don't
1296 use scoped_free_pendings.
1297 (using_directives): Add "cu" parameter, remove "language".
1298 (read_import_statement, setup_type_unit_groups, )
1299 (read_func_scope, read_lexical_block_scope)
1300 (dwarf2_record_block_ranges, read_namespace): Update.
1301 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1302 (lnp_state_machine::handle_end_sequence): Update.
1303 (class lnp_state_machine) <m_cu>: New member.
1304 <m_record_line_callback>: Remove.
1305 <m_currently_recording_lines>: New member.
1306 (lnp_state_machine::handle_set_file): Update.
1307 (noop_record_line): Remove.
1308 (dwarf_record_line_p): Add cu parameter.
1309 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1310 (lnp_state_machine::record_line)
1311 (lnp_state_machine::lnp_state_machine)
1312 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1313 (dwarf_decode_lines): Update.
1314 (dwarf2_start_subfile): Add cu parameter.
1315 (dwarf2_start_symtab, new_symbol): Update.
1316 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1317 Remove dwarf2_per_objfile parameter.
1318 (dwarf_decode_macros): Update.
1320 2018-07-20 Tom Tromey <tom@tromey.com>
1322 * stabsread.c (define_symbol): Update.
1323 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1324 * dwarf2read.c (new_symbol): Update.
1325 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1326 * cp-namespace.c: Include buildsym.h.
1327 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1328 * buildsym-legacy.c (get_buildsym_compunit): New function.
1330 2018-07-20 Tom Tromey <tom@tromey.com>
1332 * xcoffread.c: Include buildsym-legacy.h.
1333 * windows-nat.c: Include buildsym-legacy.h.
1334 * stabsread.c: Include buildsym-legacy.h.
1335 * mdebugread.c: Include buildsym-legacy.h.
1336 * buildsym-legacy.h: New file.
1337 * buildsym-legacy.c: New file, from buildsym.c.
1338 * go32-nat.c: Include buildsym-legacy.h.
1339 * dwarf2read.c: Include buildsym-legacy.h.
1340 * dbxread.c: Include buildsym-legacy.h.
1341 * cp-namespace.c: Include buildsym-legacy.h.
1342 * coffread.c: Include buildsym-legacy.h.
1343 * buildsym.h: Move some contents to buildsym-legacy.h.
1344 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1346 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1348 2018-07-20 Tom Tromey <tom@tromey.com>
1350 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1351 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1352 (buildsym_compunit::buildsym_compunit)
1353 (buildsym_compunit::~buildsym_compunit)
1354 (buildsym_compunit::get_macro_table): Define.
1356 2018-07-20 Tom Tromey <tom@tromey.com>
1358 * buildsym.c (reset_symtab_globals): Remove.
1359 (buildsym_compunit::end_symtab_from_static_block): Update.
1360 (buildsym_compunit::augment_type_symtab): Update.
1361 (end_symtab_from_static_block): Call free_buildsym_compunit.
1362 (augment_type_symtab, end_symtab, end_expandable_symtab):
1365 2018-07-20 Tom Tromey <tom@tromey.com>
1367 * arch-utils.c: Do not include buildsym.h.
1368 * mipsread.c: Do not include buildsym.h.
1369 * machoread.c: Do not include buildsym.h.
1370 * elfread.c: Do not include buildsym.h.
1372 2018-07-20 Tom Tromey <tom@tromey.com>
1374 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1376 (buildsym_compunit): Add new constructor.
1377 (struct buildsym_compunit) <get_last_source_file, finish_block,
1378 record_block_range, start_subfile, patch_subfile_names,
1379 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1380 set_last_source_start_addr, get_last_source_start_addr,
1381 get_local_using_directives, set_local_using_directives,
1382 get_global_using_directives, outermost_context_p,
1383 get_current_context_stack, get_context_stack_depth,
1384 get_current_subfile, get_local_symbols, get_file_symbols,
1385 get_global_symbols, record_debugformat, record_producer,
1386 push_context, pop_context, end_symtab_get_static_block,
1387 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1389 <record_pending_block, finish_block_internal, make_blockvector,
1390 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1394 2018-05-22 Tom Tromey <tom@tromey.com>
1396 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1398 (finish_block_internal): Update.
1400 2018-07-20 Tom Tromey <tom@tromey.com>
1402 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1404 (finish_block_internal): Update.
1406 2018-07-20 Tom Tromey <tom@tromey.com>
1408 * buildsym.h (EXTERN): Don't define or undef.
1409 * buildsym.c (EXTERN): Don't define.
1411 2018-07-20 Tom Tromey <tom@tromey.com>
1413 * buildsym.c: Remove TODO comment.
1415 2018-07-20 Tom Tromey <tom@tromey.com>
1417 * coffread.c (coff_symtab_read): Update.
1418 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1419 (xcoff_new_init): Update.
1420 * mipsread.c (mipscoff_new_init): Update.
1421 * mdebugread.c (mdebug_build_psymtabs): Update.
1422 * elfread.c (elf_new_init): Update.
1423 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1425 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1426 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1427 (stabsect_build_psymtabs): Update.
1428 * buildsym.h (buildsym_init): Don't declare.
1429 * buildsym.c: Update comment.
1430 (prepare_for_building): Remove.
1431 (start_symtab, restart_symtab): Update.
1432 (reset_symtab_globals): Update comment.
1433 (buildsym_init): Remove.
1435 2018-07-20 Tom Tromey <tom@tromey.com>
1437 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1438 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1439 (read_enum_type, common_block_start, common_block_end)
1440 (cleanup_undefined_types_1, finish_global_stabs): Update.
1441 * mdebugread.c (psymtab_to_symtab_1): Update.
1442 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1443 (read_lexical_block_scope, new_symbol): Update.
1444 * dbxread.c (process_one_symbol): Update.
1445 * coffread.c (coff_symtab_read, process_coff_symbol)
1446 (coff_read_enum_type): Update.
1447 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1449 (get_local_symbols, get_file_symbols, get_global_symbols): New
1451 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1453 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1454 (~scoped_free_pendings): Update.
1455 (finish_block, prepare_for_building, reset_symtab_globals)
1456 (end_symtab_get_static_block, end_symtab_with_blockvector)
1457 (augment_type_symtab, push_context): Update.
1458 (get_local_symbols, get_file_symbols, get_global_symbols): New
1460 (buildsym_init): Update.
1462 2018-07-20 Tom Tromey <tom@tromey.com>
1464 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1465 (process_full_type_unit): Likewise.
1466 (dwarf2_start_symtab): Set list_in_scope.
1468 2018-07-20 Tom Tromey <tom@tromey.com>
1470 * dwarf2read.c (process_psymtab_comp_unit_reader)
1471 (build_type_psymtabs_reader): Do not set list_in_scope.
1473 2018-07-20 Tom Tromey <tom@tromey.com>
1475 * buildsym.c (free_pendings): Remove.
1476 (add_symbol_to_list, scoped_free_pendings)
1477 (finish_block_internal, buildsym_init): Update.
1479 2018-07-20 Tom Tromey <tom@tromey.com>
1481 * xcoffread.c (read_xcoff_symtab): Update.
1482 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1484 * dbxread.c (process_one_symbol): Update.
1485 * coffread.c (coff_symtab_read): Update.
1486 * buildsym.h (finish_block): Update.
1487 * buildsym.c (finish_block): Remove "listhead" argument.
1488 (end_symtab_get_static_block): Update.
1490 2018-07-20 Tom Tromey <tom@tromey.com>
1492 * buildsym.h (class scoped_free_pendings): Remove constructor.
1493 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1495 <m_pending_block_obstack, m_pending_blocks>: New members.
1496 (pending_block_obstack, pending_blocks): Remove.
1497 (scoped_free_pendings::scoped_free_pendings): Default.
1498 (~scoped_free_pendings): Update.
1499 (free_pending_blocks): Remove.
1500 (finish_block_internal, record_pending_block, make_blockvector)
1501 (end_symtab_get_static_block, augment_type_symtab, push_context)
1502 (buildsym_init): Update.
1504 2018-07-20 Tom Tromey <tom@tromey.com>
1506 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1507 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1509 (pending_addrmap, pending_addrmap_obstack)
1510 (pending_addrmap_interesting): Remove.
1511 (scoped_free_pendings, record_block_range, make_blockvector)
1512 (prepare_for_building, reset_symtab_globals, buildsym_init):
1515 2018-07-20 Tom Tromey <tom@tromey.com>
1517 * xcoffread.c (process_linenos): Update.
1518 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1519 * mdebugread.c (psymtab_to_symtab_1): Update.
1520 * dwarf2read.c (setup_type_unit_groups)
1521 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1522 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1523 * dbxread.c (process_one_symbol): Update.
1524 * coffread.c (coff_symtab_read, enter_linenos)
1525 (process_coff_symbol): Update.
1526 * buildsym.h (current_subfile): Don't declare.
1527 (get_current_subfile): Declare.
1528 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1530 (start_subfile, free_buildsym_compunit, push_subfile)
1531 (prepare_for_building, start_symtab): Update.
1532 (get_current_subfile): New function.
1534 2018-07-20 Tom Tromey <tom@tromey.com>
1536 * coffread.c (coff_symtab_read): Update.
1537 * xcoffread.c (read_xcoff_symtab): Update.
1538 * dwarf2read.c (new_symbol): Update.
1539 (read_func_scope, read_lexical_block_scope): Update.
1540 * dbxread.c (process_one_symbol): Update.
1541 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1542 (outermost_context_p): Remove macro.
1543 (outermost_context_p, get_current_context_stack)
1544 (get_context_stack_depth): Declare.
1545 (pop_context): Return struct context_stack.
1546 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1548 (context_stack_size): Remove.
1549 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1550 (prepare_for_building, end_symtab_get_static_block)
1551 (augment_type_symtab, push_context): Update.
1552 (pop_context): Return struct context_stack.
1553 (outermost_context_p, get_current_context_stack)
1554 (get_context_stack_depth): New functions.
1555 (buildsym_init): Update.
1557 2018-07-20 Tom Tromey <tom@tromey.com>
1559 * rust-exp.y: Now a pure parser. Update all rules.
1560 (%union): Move earlier.
1561 (current_parser, work_obstack): Remove globals.
1562 (rust_parser, ~rust_parser): Update.
1563 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1564 lex_character, lex_number, lex_string, lex_identifier,
1565 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1566 convert_name, convert_params_to_expression,
1567 convert_ast_to_expression, ast_basic_type, ast_operation,
1568 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1569 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1570 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1571 ast_array_type, ast_slice_type, ast_reference_type,
1572 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1573 (rust_parse): Update.
1574 (rustyyerror, rustyylex): Add parser parameter.
1575 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1576 (rust_lex_stringish_test, rust_lex_test_sequence)
1577 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1578 (rust_lex_test_push_back, rust_lex_tests): Update.
1580 2018-07-19 Pedro Alves <palves@redhat.com>
1582 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1583 gdb::unique_xmalloc_ptr.
1584 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1585 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1586 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1587 copy-initialization.
1588 * guile/scm-pretty-print.c (ppscm_print_children): Use
1589 gdb::unique_xmalloc_ptr instead of cleanups.
1590 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1591 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1592 gdb::unique_xmalloc_ptr.
1593 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1594 Adjust to use gdb::unique_xmalloc_ptr.
1595 * guile/scm-utils.c (extract_arg): Adjust.
1596 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1597 gdb::unique_xmalloc_ptr instead of a cleanup.
1599 2018-07-19 Tom Tromey <tom@tromey.com>
1601 * utils.c (do_value_free_to_mark)
1602 (make_cleanup_value_free_to_mark): Remove.
1603 * utils.h (make_cleanup_value_free_to_mark): Remove.
1605 2018-07-19 Pedro Alves <palves@redhat.com>
1607 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1608 forwarding reference.
1610 2018-07-18 Pedro Alves <palves@redhat.com>
1612 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1613 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1616 2018-07-18 Pedro Alves <palves@redhat.com>
1618 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1620 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1622 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1623 directly instead of a cleanup.
1624 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1625 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1626 (vlscm_binop_gdbthrow): New, factored out from ...
1627 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1628 (vlscm_rich_compare): Use gdbscm_wrap.
1629 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1630 instead of a cleanup.
1631 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1633 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1634 Use xfree directly instead of a cleanup.
1635 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1636 Adjust to use gdbscm_wrap and scoped_value_mark.
1637 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1638 (gdbscm_value_address, gdbscm_value_dereference)
1639 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1641 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1642 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1644 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1645 gdbscm_wrap and scoped_value_mark.
1646 (gdbscm_value_to_string): Use xfree directly instead of a
1647 cleanup. Move 'buffer' unique_ptr to TRY scope.
1648 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1649 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1651 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1652 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1654 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1657 2018-07-18 Tom de Vries <tdevries@suse.de>
1659 * findvar.c (default_read_var_value): Also resolve dynamic type for
1660 LOC_OPTIMIZED_OUT vars.
1662 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1664 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1667 2018-07-17 Tom Tromey <tom@tromey.com>
1669 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1670 (compute_enum_list, pascm_set_param_value_x)
1671 (gdbscm_parameter_value): Update.
1672 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1673 (gdbscm_scm_to_host_string): Update.
1674 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1676 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1677 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1678 * guile/scm-string.c (gdbscm_scm_to_string): Return
1680 (gdbscm_scm_to_host_string): Likewise.
1682 2018-07-17 Tom Tromey <tom@tromey.com>
1684 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1685 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1686 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1687 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1690 2018-07-17 Tom Tromey <tom@tromey.com>
1692 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1693 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1695 * guile/scm-cmd.c (cmdscm_function): Update.
1696 * guile/scm-pretty-print.c
1697 (ppscm_print_exception_unless_memory_error): Update.
1698 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1699 Return unique_xmalloc_ptr.
1701 2018-07-17 Tom Tromey <tom@tromey.com>
1703 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1706 2018-07-17 Jim Wilson <jimw@sifive.com>
1708 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1709 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1710 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1711 unecessary braces after EF_RISCV_RVC test. Delete call to
1712 set_gdbarch_decr_pc_after_break.
1714 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1715 RISCV_LAST_FP_REGNUM + 1.
1716 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1718 2018-07-17 Tom Tromey <tom@tromey.com>
1720 * configure.ac: Remove --disable-gdbcli.
1721 * configure: Rebuild.
1722 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1723 (SUBDIR_CLI_CFLAGS): Remove.
1724 (SFILES): Use SUBDIR_CLI_SRCS.
1725 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1727 2018-07-17 Tom Tromey <tom@tromey.com>
1730 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1732 2018-07-16 Jim Wilson <jimw@sifive.com>
1734 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1736 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1738 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1740 (libunwind_frame_sniffer): Likewise.
1741 (libunwind_frame_prev_register): Likewise.
1742 (libunwind_sigtramp_frame_sniffer): Likewise.
1743 * ia64-tdep.c (ia64_access_reg): Likewise.
1744 (ia64_access_rse_reg): Likewise.
1745 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1746 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1748 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1750 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1752 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1754 * remote-sim.c (gdbsim_target::close,
1755 gdbsim_target::mourn_inferior): Remove unused variables.
1757 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1759 * ia64-tdep.c (ktab_buf): New global.
1760 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1761 (get_kernel_table): Adjust.
1763 2018-07-16 Tom Tromey <tom@tromey.com>
1765 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1766 * dwarf2read.c (using_directives, new_symbol): Use
1767 outermost_context_p.
1768 * dbxread.c (process_one_symbol): Use outermost_context_p.
1769 * coffread.c (coff_symtab_read): Use outermost_context_p.
1771 2018-07-16 Tom Tromey <tom@tromey.com>
1773 * dwarf2read.c (using_directives, read_func_scope)
1774 (read_lexical_block_scope): Update.
1775 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1776 * buildsym.h (local_using_directives, global_using_directives):
1778 (get_local_using_directives, set_local_using_directives)
1779 (get_global_using_directives): Declare.
1780 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1781 m_global_using_directives>: New members.
1782 (finish_block_internal, prepare_for_building)
1783 (reset_symtab_globals, end_symtab_get_static_block)
1784 (push_context): Update.
1785 (get_local_using_directives, set_local_using_directives)
1786 (get_global_using_directives): New functions.
1787 (buildsym_init): Update.
1789 2018-07-16 Tom Tromey <tom@tromey.com>
1791 * xcoffread.c (xcoff_initial_scan): Don't call
1792 free_pending_blocks.
1793 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1794 * buildsym.h (class scoped_free_pendings): Add constructor.
1795 (free_pending_blocks): Don't declare.
1796 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1797 (free_pending_blocks): Now static.
1799 2018-07-16 Tom Tromey <tom@tromey.com>
1801 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1802 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1804 (struct subfile_stack): Remove.
1805 (subfile_stack): Remove.
1806 (push_subfile, pop_subfile, buildsym_init): Update.
1808 2018-07-16 Tom Tromey <tom@tromey.com>
1810 * buildsym.c (push_subfile): Use gdb_assert.
1811 (pop_subfile): Use gdb_assert.
1813 2018-07-16 Tom Tromey <tom@tromey.com>
1815 * buildsym.h (merge_symbol_lists): Remove.
1816 * buildsym.c (merge_symbol_lists): Remove.
1818 2018-07-16 Tom Tromey <tom@tromey.com>
1820 * stabsread.c (scan_file_globals): Update comment.
1821 * stabsread.h (scan_file_globals): Move from buildsym.h.
1822 * buildsym.h (scan_file_globals): Move to stabsread.h.
1824 2018-07-16 Tom Tromey <tom@tromey.com>
1826 * xcoffread.c (xcoff_new_init): Update.
1827 * mipsread.c (mipscoff_new_init): Update.
1828 * mdebugread.c (mdebug_build_psymtabs): Update.
1829 * elfread.c (elf_new_init): Update.
1830 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1831 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1832 * buildsym.h (buildsym_new_init): Don't declare.
1833 * buildsym.c (buildsym_new_init): Remove.
1835 2018-07-16 Tom Tromey <tom@tromey.com>
1837 * stabsread.h (within_function): Move from buildsym.h.
1838 * stabsread.c (start_stabs): Clear within_function.
1839 * coffread.c (coff_start_symtab): Clear within_function.
1840 * buildsym.h (within_function): Move to stabsread.h.
1841 * buildsym.c (prepare_for_building): Update.
1843 2018-07-16 Tom Tromey <tom@tromey.com>
1845 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1846 * dwarf2read.c (dwarf2_start_symtab): Don't set
1847 processing_gcc_compilation.
1848 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1850 2018-07-16 Tom Tromey <tom@tromey.com>
1852 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1853 (next_symbol_text_func): Move from buildsym.h.
1854 * stabsread.c (hashname): Move from buildsym.c.
1855 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1856 (next_symbol_text_func, hashname): Move to stabsread.h.
1857 * buildsym.c: Don't include bcache.h
1858 (hashname): Move to stasbread.c.
1860 2018-07-16 Tom Tromey <tom@tromey.com>
1862 * buildsym.h (context_stack_size): Don't declare.
1863 * buildsym.c (context_stack_size): New global.
1865 2018-07-16 Tom Tromey <tom@tromey.com>
1867 * dbxread.c (processing_acc_compilation): New global.
1868 * buildsym.h (processing_acc_compilation): Don't declare.
1870 2018-07-16 Tom Tromey <tom@tromey.com>
1872 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1873 * dbxread.c (read_ofile_symtab): Update.
1874 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1875 * buildsym.h (last_source_start_addr): Remove.
1876 (set_last_source_start_addr, get_last_source_start_addr):
1878 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1880 (struct buildsym_compunit) <m_last_source_start_addr>: New
1882 (prepare_for_building): Remove start_addr parameter.
1883 (start_symtab, restart_symtab, end_symtab_get_static_block)
1884 (end_symtab_with_blockvector): Update.
1885 (set_last_source_start_addr, get_last_source_start_addr): New
1888 2018-07-16 Tom Tromey <tom@tromey.com>
1890 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1892 (have_line_numbers): Remove.
1893 (record_line, prepare_for_building, end_symtab_get_static_block)
1894 (augment_type_symtab): Update.
1896 2018-07-16 Tom Tromey <tom@tromey.com>
1898 * buildsym.c (~buildsym_compunit): Free the macro table.
1899 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1901 <m_pending_macros>: New member.
1902 (pending_macros): Remove.
1903 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1904 (reset_symtab_globals, end_symtab_get_static_block)
1905 (end_symtab_with_blockvector, augment_type_symtab)
1906 (buildsym_init): Update.
1908 2018-07-16 Tom Tromey <tom@tromey.com>
1910 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1912 (buildsym_compunit::set_last_source_file): New method.
1913 <m_last_source_file>: New member.
1914 (prepare_for_building): Remove "name" parameter.
1915 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1916 (last_source_file): Remove.
1917 (set_last_source_file, get_last_source_file): Update.
1919 2018-07-16 Tom Tromey <tom@tromey.com>
1921 * buildsym.c (prepare_for_building): Add assert.
1923 2018-07-16 Tom Tromey <tom@tromey.com>
1925 * buildsym.c (~buildsym_compunit): Update.
1926 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1927 (start_subfile, patch_subfile_names)
1928 (end_symtab_with_blockvector): Update.
1930 2018-07-16 Tom Tromey <tom@tromey.com>
1932 * buildsym.c (struct buildsym_compunit): Add constructor,
1933 destructor, initializers.
1934 (start_buildsym_compunit): Remove.
1935 (free_buildsym_compunit): Use "delete".
1936 (start_symtab, restart_symtab): Use "new".
1938 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1940 * symfile.c (set_objfile_default_section_offset): Remove struct
1943 2018-07-14 Stafford Horne <shorne@gmail.com>
1945 * (Responsible Maintainers): Add myself as or1k maintainer.
1947 2018-07-13 Tom Tromey <tom@tromey.com>
1949 * symfile.c (set_objfile_default_section_offset): Use extra braces
1952 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1954 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1957 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1959 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1960 unittests/cli-utils-selftests.c
1961 * unittests/cli-utils-selftests.c: New file.
1963 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1965 * NEWS: Mention new commands. Mention change to 'thread apply'.
1967 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1969 * thread.c (thr_try_catch_cmd): New function.
1970 (thread_apply_all_command): Handle qcs flags.
1971 (thread_apply_command): Handle qcs flags.
1972 (taas_command): New function.
1973 (tfaas_command): New function.
1974 (_initialize_thread): Update to setup the new commands 'taas
1975 and 'tfaas'. Change doc string for 'thread apply'.
1977 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1979 * stack.c: (trailing_outermost_frame): New function, mostly
1980 extracted from backtrace_command_1.
1981 (leading_innermost_frame): New function.
1982 (backtrace_command_1): Update to call trailing_outermost_frame.
1983 (frame_apply_command_count): New function.
1984 (frame_apply_level_command): New function.
1985 (frame_apply_all_command): New function.
1986 (frame_apply_command): New function.
1987 (faas_command): New function.
1988 (frame_cmd_list): New variable.
1989 (_initialize_stack): Update to setup the new commands 'frame apply'
1992 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1994 * cli-utils.c (number_or_range_parser::get_number): Only handle
1995 numbers or convenience var as numbers.
1996 (parse_flags): New function.
1997 (parse_flags_qcs): New function.
1998 (number_or_range_parser::finished): Ensure parsing end is detected
1999 before end of string.
2000 * cli-utils.h (parse_flags): New function.
2001 (parse_flags_qcs): New function.
2002 (number_or_range_parser): Remove m_finished bool.
2003 (number_or_range_parser::skip_range): Set m_in_range to false.
2005 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2007 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2010 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2011 Jan Kratochvil <jan.kratochvil@redhat.com>
2012 Paul Fertser <fercerpav@gmail.com>
2013 Tsutomu Seki <sekiriki@gmail.com>
2014 Pedro Alves <palves@redhat.com>
2016 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2017 'unittests/parse-connection-spec-selftests.c'.
2018 (COMMON_SFILES): Add 'common/netstuff.c'.
2019 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2020 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2021 * common/netstuff.c: New file.
2022 * common/netstuff.h: New file.
2023 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2024 (wait_for_connect): Update comment. New parameter
2025 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2026 Use 'sock' directly instead of 'scb->fd'.
2027 (try_connect): New function, with code from 'net_open'.
2028 (net_open): Rewrite main loop to deal with multiple
2029 sockets/addresses. Handle IPv6-style hostnames; implement
2030 support for IPv6 connections.
2031 * unittests/parse-connection-spec-selftests.c: New file.
2033 2018-07-11 Pedro Alves <palves@redhat.com>
2036 * remote.c (remote_target::remote_detach_pid): Call
2037 set_current_process.
2039 2018-07-11 Pedro Alves <palves@redhat.com>
2041 * h8300-tdep.c (h8300_gdbarch_init): Remove
2042 set_gdbarch_ecoff_reg_to_regnum calls.
2044 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2047 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2048 offsets/sizes for static members of a class/struct.
2050 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2052 * target-descriptions.c (tdesc_register_bitsize): Rename.
2053 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2054 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2055 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2057 2018-07-10 Tom Tromey <tom@tromey.com>
2059 * breakpoint.c (moribund_locations): Now static and a
2061 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2062 (build_bpstat_chain, update_global_location_list)
2063 (breakpoint_retire_moribund): Update.
2064 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2067 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2069 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2070 (riscv_register_reggroup_p): Use new function, remove unneeded
2072 (riscv_push_dummy_call): Extend assert to compare against xlen or
2073 flen based on register type.
2075 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2077 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2079 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2081 * remote.c (show_hardware_watchpoint_limit): New function.
2082 (show_hardware_watchpoint_length_limit): New function.
2083 (show_hardware_breakpoint_limit): New function.
2084 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2085 where appropriate, update help text.
2087 2018-07-09 Tom Tromey <tom@tromey.com>
2089 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2090 (CLIBS): Don't mention NAT_CLIBS.
2092 2018-07-09 Tom Tromey <tom@tromey.com>
2094 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2095 (LIBGDB_OBS, clean mostlyclean): Update.
2096 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2098 2018-07-09 Tom Tromey <tom@tromey.com>
2100 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2101 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2102 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2104 2018-07-09 Tom Tromey <tom@tromey.com>
2106 * Makefile.in (ALLDEPFILES): Remove exec.c.
2107 (COMMON_OBS): Remove exec.o.
2108 (COMMON_SFILES): Add exec.c.
2110 2018-07-09 Tom Tromey <tom@tromey.com>
2112 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2114 2018-07-09 Tom Tromey <tom@tromey.com>
2116 * Makefile.in (clean mostlyclean): Remove stamp-version.
2117 (version.c): Depend on stamp-version.
2118 (stamp-version): New rule, from version.c rule.
2120 2018-07-09 Tom Tromey <tom@tromey.com>
2122 * Makefile.in (init.c): Depend on stamp-init.
2123 (stamp-init): New rule, from init.c rule.
2124 (clean mostlyclean): Remove stamp-init.
2126 2018-07-09 Tom Tromey <tom@tromey.com>
2128 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2129 SUBDIR_GCC_COMPILE_SRCS.
2131 2018-07-09 Tom Tromey <tom@tromey.com>
2133 * Makefile.in (init.c): Remove some unused sed rules.
2135 2018-07-09 Tom Tromey <tom@tromey.com>
2137 * Makefile.in (TSOBS): Remove.
2138 (INIT_FILES): Update.
2139 (LIBGDB_OBS): Update.
2140 (COMMON_SFILES): Add inflow.c.
2141 (SFILES): Remove inflow.c.
2143 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2145 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2147 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2149 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2150 get_saveloc_name, is_signal_frame_name, step_name,
2151 init_remote_name, create_addr_space_name,
2152 destroy_addr_space_name, search_unwind_table_name,
2153 find_dyn_list_name): Constify.
2155 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2157 * darwin-nat.c (darwin_pthread_kill): New function.
2158 (darwin_resume_thread): Use darwin_pthread_kill.
2160 2018-07-05 Tom de Vries <tdevries@suse.de>
2162 * macroexp.c (macro_buffer) <operator=>: New member function.
2164 2018-07-04 Tom Tromey <tom@tromey.com>
2166 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2168 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2170 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2171 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2172 * maint.c: Likewise.
2175 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2177 * NEWS: Create a new section for the next release branch.
2178 Rename the section of the current branch, now that it has
2181 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2183 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2184 * version.in: Bump version to 8.2.50.DATE-git.
2186 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2187 Pedro Alves <palves@redhat.com>
2189 * linux-nat.c (linux_init_ptrace): Rename to ...
2190 (linux_init_ptrace_procfs): ... this. Call
2191 linux_proc_init_warnings.
2192 (linux_nat_target::post_attach)
2193 (linux_nat_target::post_startup_inferior): Adjust.
2194 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2195 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2197 2018-07-04 Tom de Vries <tdevries@suse.de>
2199 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2201 (read_comp_unit_head): ... here.
2203 2018-07-03 Tom Tromey <tom@tromey.com>
2205 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2206 (stop_tracing, tstatus_command)
2207 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2208 (print_one_static_tracepoint_marker): Update.
2209 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2211 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2213 (all_tracepoints, static_tracepoints_here): Return std::vector.
2215 2018-07-03 Tom Tromey <tom@tromey.com>
2217 * common/ptid.c (ptid_equal): Remove.
2218 * common/ptid.h (ptid_equal): Don't declare.
2219 * ada-tasks.c: Update.
2220 * breakpoint.c: Update.
2221 * common/agent.c: Update.
2222 * corelow.c: Update.
2223 * darwin-nat-info.c: Update.
2224 * darwin-nat.c: Update.
2226 * dtrace-probe.c: Update.
2227 * dummy-frame.c: Update.
2228 * fbsd-nat.c: Update.
2230 * gdbthread.h: Update.
2231 * gnu-nat.c: Update.
2232 * go32-nat.c: Update.
2233 * inf-loop.c: Update.
2234 * inf-ptrace.c: Update.
2235 * infcall.c: Update.
2239 * linux-fork.c: Update.
2240 * linux-nat.c: Update.
2241 * linux-thread-db.c: Update.
2242 * mi/mi-cmd-var.c: Update.
2243 * mi/mi-interp.c: Update.
2244 * mi/mi-main.c: Update.
2245 * nto-procfs.c: Update.
2246 * ppc-linux-tdep.c: Update.
2248 * python/py-inferior.c: Update.
2249 * python/py-record-btrace.c: Update.
2250 * python/py-record.c: Update.
2251 * ravenscar-thread.c: Update.
2252 * regcache.c: Update.
2253 * remote-sim.c: Update.
2255 * sol-thread.c: Update.
2258 * tui/tui-stack.c: Update.
2260 * windows-nat.c: Update.
2261 * windows-tdep.c: Update.
2263 2018-07-03 Tom Tromey <tom@tromey.com>
2265 * common/ptid.c (ptid_match): Remove.
2266 * common/ptid.h (ptid_match): Don't declare.
2267 * fbsd-nat.c: Update.
2270 * linux-nat.c: Update.
2271 * record-btrace.c: Update.
2272 * regcache.c: Update.
2275 2018-07-03 Tom Tromey <tom@tromey.com>
2277 * common/ptid.c (ptid_tid_p): Remove.
2278 * common/ptid.h (ptid_tid_p): Don't declare.
2279 * sol-thread.c: Update.
2281 2018-07-03 Tom Tromey <tom@tromey.com>
2283 * common/ptid.c (ptid_lwp_p): Remove.
2284 * common/ptid.h (ptid_lwp_p): Don't declare.
2285 * fbsd-nat.c: Update.
2286 * linux-nat.c: Update.
2287 * nat/linux-procfs.c: Update.
2288 * nat/x86-linux-dregs.c: Update.
2289 * sol-thread.c: Update.
2291 2018-07-03 Tom Tromey <tom@tromey.com>
2293 * common/ptid.c (ptid_is_pid): Remove.
2294 * common/ptid.h (ptid_is_pid): Don't declare.
2296 * linux-nat.c: Update.
2297 * mi/mi-interp.c: Update.
2301 2018-07-03 Tom Tromey <tom@tromey.com>
2303 * common/ptid.c (ptid_get_tid): Remove.
2304 * common/ptid.h (ptid_get_tid): Don't declare.
2305 * ada-tasks.c: Update.
2306 * aix-thread.c: Update.
2307 * bsd-uthread.c: Update.
2308 * darwin-nat.c: Update.
2309 * fbsd-nat.c: Update.
2310 * i386-darwin-nat.c: Update.
2312 * linux-tdep.c: Update.
2313 * nto-procfs.c: Update.
2314 * ppc-ravenscar-thread.c: Update.
2315 * python/py-infthread.c: Update.
2316 * ravenscar-thread.c: Update.
2317 * sol-thread.c: Update.
2318 * sparc-ravenscar-thread.c: Update.
2319 * windows-nat.c: Update.
2321 2018-07-03 Tom Tromey <tom@tromey.com>
2323 * common/ptid.c (ptid_get_lwp): Remove.
2324 * common/ptid.h (ptid_get_lwp): Don't declare.
2325 * aarch64-linux-nat.c: Update.
2326 * ada-tasks.c: Update.
2327 * aix-thread.c: Update.
2328 * amd64-linux-nat.c: Update.
2329 * arm-linux-nat.c: Update.
2330 * corelow.c: Update.
2331 * fbsd-nat.c: Update.
2332 * fbsd-tdep.c: Update.
2333 * gnu-nat.c: Update.
2334 * i386-cygwin-tdep.c: Update.
2335 * i386-gnu-nat.c: Update.
2336 * i386-linux-nat.c: Update.
2337 * ia64-linux-nat.c: Update.
2338 * inf-ptrace.c: Update.
2340 * linux-fork.c: Update.
2341 * linux-nat.c: Update.
2342 * linux-tdep.c: Update.
2343 * linux-thread-db.c: Update.
2344 * mips-linux-nat.c: Update.
2345 * nat/aarch64-linux-hw-point.c: Update.
2346 * nat/aarch64-linux.c: Update.
2347 * nat/linux-btrace.c: Update.
2348 * nat/linux-osdata.c: Update.
2349 * nat/linux-procfs.c: Update.
2350 * nat/x86-linux-dregs.c: Update.
2351 * obsd-nat.c: Update.
2352 * ppc-fbsd-nat.c: Update.
2353 * ppc-linux-nat.c: Update.
2355 * python/py-infthread.c: Update.
2356 * ravenscar-thread.c: Update.
2358 * s390-linux-nat.c: Update.
2359 * sol-thread.c: Update.
2360 * sol2-tdep.c: Update.
2361 * spu-linux-nat.c: Update.
2362 * x86-linux-nat.c: Update.
2363 * xtensa-linux-nat.c: Update.
2365 2018-07-03 Tom Tromey <tom@tromey.com>
2367 * common/ptid.c (ptid_get_pid): Remove.
2368 * common/ptid.h (ptid_get_pid): Don't declare.
2369 * aarch64-linux-nat.c: Update.
2370 * ada-lang.c: Update.
2371 * aix-thread.c: Update.
2372 * alpha-bsd-nat.c: Update.
2373 * amd64-fbsd-nat.c: Update.
2374 * amd64-linux-nat.c: Update.
2375 * arm-linux-nat.c: Update.
2376 * arm-nbsd-nat.c: Update.
2378 * break-catch-syscall.c: Update.
2379 * breakpoint.c: Update.
2380 * bsd-uthread.c: Update.
2381 * corelow.c: Update.
2383 * darwin-nat.c: Update.
2384 * fbsd-nat.c: Update.
2385 * fbsd-tdep.c: Update.
2387 * gnu-nat.c: Update.
2388 * hppa-nbsd-nat.c: Update.
2389 * hppa-obsd-nat.c: Update.
2390 * i386-fbsd-nat.c: Update.
2391 * ia64-linux-nat.c: Update.
2392 * inf-ptrace.c: Update.
2394 * inferior.c: Update.
2395 * inferior.h: Update.
2398 * linux-fork.c: Update.
2399 * linux-nat.c: Update.
2400 * linux-tdep.c: Update.
2401 * linux-thread-db.c: Update.
2402 * m68k-bsd-nat.c: Update.
2403 * mi/mi-interp.c: Update.
2404 * mi/mi-main.c: Update.
2405 * mips-linux-nat.c: Update.
2406 * mips-nbsd-nat.c: Update.
2407 * mips64-obsd-nat.c: Update.
2408 * nat/aarch64-linux-hw-point.c: Update.
2409 * nat/aarch64-linux.c: Update.
2410 * nat/linux-btrace.c: Update.
2411 * nat/linux-osdata.c: Update.
2412 * nat/linux-procfs.c: Update.
2413 * nat/x86-linux-dregs.c: Update.
2414 * nto-procfs.c: Update.
2415 * obsd-nat.c: Update.
2416 * ppc-linux-nat.c: Update.
2417 * ppc-nbsd-nat.c: Update.
2418 * ppc-obsd-nat.c: Update.
2419 * proc-service.c: Update.
2421 * python/py-inferior.c: Update.
2422 * python/py-infthread.c: Update.
2423 * ravenscar-thread.c: Update.
2425 * remote-sim.c: Update.
2427 * rs6000-nat.c: Update.
2428 * s390-linux-nat.c: Update.
2429 * sh-nbsd-nat.c: Update.
2430 * sol-thread.c: Update.
2431 * sparc-nat.c: Update.
2432 * sparc64-tdep.c: Update.
2433 * spu-linux-nat.c: Update.
2434 * spu-tdep.c: Update.
2435 * target-debug.h: Update.
2438 * tid-parse.c: Update.
2439 * tracefile-tfile.c: Update.
2440 * vax-bsd-nat.c: Update.
2441 * windows-nat.c: Update.
2442 * x86-linux-nat.c: Update.
2443 * x86-nat.c: Update.
2445 2018-07-03 Tom Tromey <tom@tromey.com>
2447 * common/ptid.c (pid_to_ptid): Remove.
2448 * common/ptid.h (pid_to_ptid): Don't declare.
2449 * aix-thread.c: Update.
2450 * arm-linux-nat.c: Update.
2451 * common/ptid.c: Update.
2452 * common/ptid.h: Update.
2453 * corelow.c: Update.
2455 * darwin-nat.c: Update.
2456 * fbsd-nat.c: Update.
2457 * fork-child.c: Update.
2458 * gnu-nat.c: Update.
2459 * go32-nat.c: Update.
2460 * inf-ptrace.c: Update.
2462 * inferior.c: Update.
2464 * linux-fork.c: Update.
2465 * linux-nat.c: Update.
2466 * nat/aarch64-linux-hw-point.c: Update.
2467 * nat/fork-inferior.c: Update.
2468 * nat/x86-linux-dregs.c: Update.
2469 * nto-procfs.c: Update.
2470 * obsd-nat.c: Update.
2472 * progspace.c: Update.
2474 * rs6000-nat.c: Update.
2475 * s390-linux-nat.c: Update.
2476 * sol-thread.c: Update.
2477 * spu-linux-nat.c: Update.
2480 * tracefile-tfile.c: Update.
2481 * windows-nat.c: Update.
2483 2018-07-03 Tom Tromey <tom@tromey.com>
2485 * common/ptid.h (ptid_build): Don't declare.
2486 * common/ptid.c (ptid_build): Remove.
2487 * aix-thread.c: Update.
2488 * bsd-kvm.c: Update.
2489 * bsd-uthread.c: Update.
2490 * common/agent.c: Update.
2491 * common/ptid.c: Update.
2492 * common/ptid.h: Update.
2493 * corelow.c: Update.
2494 * darwin-nat.c: Update.
2495 * fbsd-nat.c: Update.
2496 * gnu-nat.c: Update.
2497 * linux-fork.c: Update.
2498 * linux-nat.c: Update.
2499 * linux-thread-db.c: Update.
2500 * nat/linux-osdata.c: Update.
2501 * nat/linux-procfs.c: Update.
2502 * nto-procfs.c: Update.
2503 * obsd-nat.c: Update.
2504 * proc-service.c: Update.
2506 * ravenscar-thread.c: Update.
2507 * remote-sim.c: Update.
2509 * sol-thread.c: Update.
2511 * windows-nat.c: Update.
2513 2018-07-03 Tom Tromey <tom@tromey.com>
2515 * infrun.c (follow_exec): Use exit_inferior_silent.
2516 * inferior.c (exit_inferior_num_silent): Remove.
2517 * inferior.h (exit_inferior_num_silent): Don't declare.
2519 2018-07-03 Tom Tromey <tom@tromey.com>
2522 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2523 inferior_ptid on error.
2525 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2526 Simon Marchi <simon.marchi@polymtl.ca>
2529 * disasm.h (gdb_disassembler): Add
2530 `m_disassembler_options_holder'. member
2531 * disasm.c (get_all_disassembler_options): New function.
2532 (gdb_disassembler::gdb_disassembler): Use it.
2533 (gdb_buffered_insn_length_init_dis): Likewise.
2534 (gdb_buffered_insn_length): Adjust accordingly.
2535 (set_disassembler_options): Handle options with arguments.
2536 (show_disassembler_options_sfunc): Likewise. Add a leading new
2537 line if showing options with descriptions.
2538 (disassembler_options_completer): Adapt to using the
2539 `disasm_options_and_args_t' structure.
2540 * mips-tdep.c (mips_disassembler_options): New variable.
2541 (mips_disassembler_options_o32): Likewise.
2542 (mips_disassembler_options_n32): Likewise.
2543 (mips_disassembler_options_n64): Likewise.
2544 (gdb_print_insn_mips): Don't set `disassembler_options'.
2545 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2547 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2548 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2549 `gdbarch_disassembler_options_implicit' and
2550 `gdbarch_valid_disassembler_options'.
2551 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2552 `disasm_options_and_args_t' structure.
2553 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2555 (valid_disassembler_options): Switch from `disasm_options_t' to
2556 the `disasm_options_and_args_t' structure.
2557 * NEWS: Document `set disassembler-options' support for the MIPS
2559 * gdbarch.h: Regenerate.
2560 * gdbarch.c: Regenerate.
2562 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2564 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2566 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2568 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2569 parameter in call to amd64_target_description.
2570 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2571 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2572 (amd64fbsd_init_abi): Likewise.
2573 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2574 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2575 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2576 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2578 2018-06-29 Pedro Alves <palves@redhat.com>
2580 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2581 "segments" parameter.
2582 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2583 (_initialize_amd64_tdep): Update call to
2584 amd64_create_target_description.
2585 (amd64_target_description): Add "segments" parameter. Adjust
2586 the implementation to use it.
2587 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2588 call to amd64_create_target_description.
2589 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2590 * gdb/arch/amd64.h (amd64_create_target_description): Add
2591 "segments" register.
2592 * gdb/arch/amd64.c (amd64_create_target_description): Add
2593 "segments" parameter. Call create_feature_i386_64bit_segments
2594 only if SEGMENTS is true.
2595 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2596 call to amd64_create_target_description.
2598 2018-06-29 Pedro Alves <palves@redhat.com>
2600 * thread.c (thread_target_id_str): New, factored out from ...
2601 (print_thread_info_1): ... here. Use it to compute the max
2602 "Target Id" column width.
2604 2018-06-29 Pedro Alves <palves@redhat.com>
2606 * remote.c (remote_target::extra_thread_info): Delete
2607 'display_buf' and 'n' locals. from the cache, regardless of
2608 packet mechanims is in use. Use cache for qThreadExtra and qP
2611 2018-06-29 Pedro Alves <palves@redhat.com>
2613 * blockframe.c (find_pc_sect_containing_function): New function.
2614 * breakpoint.c (print_breakpoint_location): Don't call
2615 find_pc_sect_function.
2616 * linespec.c (create_sals_line_offset): Record the location's
2618 * linespec.c (convert_address_location_to_sals): Fill in sal's
2619 symbol with find_pc_sect_containing_function.
2620 * symtab.c (find_function_start_sal): Rename to ...
2621 (find_function_start_sal_1): ... this.
2622 (find_function_start_sal): Reimplement as wrapper around
2623 find_function_start_sal_1, and use
2624 find_pc_sect_containing_function to fill in the sal's symbol.
2625 (find_function_start_sal(symbol*, bool)): Adjust.
2626 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2628 (find_pc_sect_containing_function): Declare.
2630 2018-06-29 Pedro Alves <palves@redhat.com>
2632 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2633 true if the the location has no symbol.
2635 2018-06-28 Tom Tromey <tom@tromey.com>
2637 * NEWS: Mention --enable-codesign.
2638 * silent-rules.mk (ECHO_SIGN): New variable.
2639 * configure.ac: Add --enable-codesign.
2640 * configure: Rebuild.
2641 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2642 (gdb$(EXEEXT)): Optionally invoke codesign.
2644 2018-06-28 Pedro Alves <palves@redhat.com>
2646 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2648 (switch_to_thread_no_regs): Adjust comment.
2649 * infcmd.c (stop_pc): Delete.
2650 (post_create_inferior, info_program_command): Replace references
2651 to stop_pc with references to thread_info->suspend.stop_pc.
2652 * inferior.h (stop_pc): Delete declaration.
2653 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2654 (handle_inferior_event_1, handle_signal_stop)
2655 (process_event_stop_test, keep_going_stepped_thread)
2656 (handle_step_into_function, handle_step_into_function_backward)
2657 (print_stop_location): Replace references to stop_pc with
2658 references to thread_info->suspend.stop_pc.
2659 (struct infcall_suspend_state) <stop_pc>: Delete field.
2660 (save_infcall_suspend_state, restore_infcall_suspend_state):
2661 Remove references to inf_stat->stop_pc.
2662 * linux-fork.c (fork_load_infrun_state): Likewise.
2663 * record-btrace.c (record_btrace_set_replay): Likewise.
2664 * record-full.c (record_full_goto_entry): Likewise.
2665 * remote.c (print_one_stopped_thread): Likewise.
2666 * target.c (target_resume): Extend comment.
2667 * thread.c (set_executing_thread): New.
2668 (set_executing): Use it.
2669 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2670 Remove references to stop_pc.
2672 2018-06-28 Pedro Alves <palves@redhat.com>
2674 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2675 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2677 2018-06-28 Tom Tromey <tom@tromey.com>
2679 * coffread.c (coff_symfile_finish): Update.
2680 * xcoffread.c (xcoff_symfile_finish): Update.
2681 * elfread.c (elf_symfile_finish): Update.
2682 * symfile.h (dwarf2_free_objfile): Don't declare.
2683 * dwarf2read.c (_initialize_dwarf2_read): Use
2684 register_objfile_data_with_cleanup.
2685 (dwarf2_free_objfile): Now static. Change signature.
2687 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2689 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2690 option "-o" to add-symbol-file-load to add an offset to each
2691 section's load address.
2692 * symfile.c (set_objfile_default_section_offset): New function.
2694 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2696 * symfile.c (add_symbol_file_command): Make sure that sections
2697 with the same name are sorted in the same order.
2699 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2701 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2702 require the second argument. If omitted, load sections at the
2703 addresses specified in the file.
2705 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2707 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2708 (_initialize_symfile): Add option "-o" to symbol-file to add an
2709 offset to each section of the symbol file.
2711 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2713 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2715 2018-06-27 Tom Tromey <tom@tromey.com>
2717 * stack.c (_initialize_stack): Update "func" help text.
2719 2018-06-27 Tom Tromey <tom@tromey.com>
2721 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2723 (unwind_infopy_str, pyuw_create_unwind_info)
2724 (unwind_infopy_add_saved_register, pyuw_sniffer)
2725 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2727 (struct saved_reg): Add constructor.
2728 <value>: Now a gdbpy_ref<>.
2730 2018-06-27 Tom Tromey <tom@tromey.com>
2732 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2734 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2736 * gdb-gdb.py.in: Format using autopep8.
2738 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2740 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2741 (type_lookup_function): Recognize CORE_ADDR values.
2743 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2745 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2748 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2750 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2753 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2755 * gdb-gdb.py: Move to...
2756 * gdb-gdb.py.in: ... here.
2757 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2758 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2760 (distclean): Remove gdb-gdb.py when cleaning.
2761 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2762 * configure: Re-generate.
2764 2018-06-27 Pedro Alves <palves@redhat.com>
2766 * proc-service.c (get_ps_regcache): New.
2767 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2768 (ps_lsetfpregs): Use it.
2770 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2773 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2774 (dwarf_decode_lines_1): Adjust.
2776 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2778 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2780 <info_proc>: Likewise.
2782 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2784 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2785 to windows_fetch_one_register, and only handle the case of
2786 fetching one register. Move the code that reloads the context
2787 and iterates over all registers if R is negative to...
2788 (windows_nat_target::fetch_registers): ... here.
2789 (do_windows_store_inferior_registers): Rename to
2790 windows_store_one_register, and only handle the case of storing
2791 one register. Move the code that handles the case where r is
2793 (windows_nat_target::store_registers) ... here.
2795 2018-06-26 Tom Tromey <tom@tromey.com>
2798 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2799 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2801 (rust_internal_print_type): Add podata parameter.
2802 (rust_print_type): Update.
2804 2018-06-26 Tom Tromey <tom@tromey.com>
2806 * typeprint.h (struct print_offset_data) <update, finish,
2807 maybe_print_hole>: New methods.
2808 <indentation>: New constant.
2809 * typeprint.c (print_offset_data::indentation): Define.
2810 (print_offset_data::maybe_print_hole, print_offset_data::update)
2811 (print_offset_data::finish): Move from c-typeprint.c and rename.
2812 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2813 (print_spaces_filtered_with_print_options): Update.
2814 (c_print_type_union_field_offset, maybe_print_hole)
2815 (c_print_type_struct_field_offset): Move to typeprint.c and
2817 (c_type_print_base_struct_union): Update.
2819 2018-06-25 Pedro Alves <palves@redhat.com>
2821 * gdbthread.h (thread_info_ref, delete_thread)
2822 (delete_thread_silent, first_thread_of_inferior)
2823 (any_thread_of_inferior, switch_to_thread)
2824 (enable_thread_stack_temporaries)
2825 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2826 (get_last_thread_stack_temporary)
2827 (value_in_thread_stack_temporaries, can_access_registers_thread):
2828 Spell out "struct thread_info" instead of just "thread_info".
2829 * inferior.h (notice_new_inferior): Likewise.
2831 2018-06-25 Pedro Alves <palves@redhat.com>
2833 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2834 pass thread_info pointer to delete_thread.
2835 (windows_nat_target::detach): Pass inferior pointer to
2837 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2839 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2840 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2841 and pass a thread_info pointer to delete_thread.
2842 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2843 pass thread_info pointer to delete_thread.
2844 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2845 delete_thread_silent call.
2846 * procfs.c (procfs_target::detach): Pass inferior pointer to
2848 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2849 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2850 delete_thread_silent call.
2851 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2852 pass thread_info pointer to delete_thread.
2853 (windows_nat_target::detach): Pass inferior pointer to
2856 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2858 * regcache.c (readable_regcache::read_part): Fix asserts.
2859 (reg_buffer::raw_collect_part): New function.
2860 (regcache::write_part): Fix asserts.
2861 (reg_buffer::raw_supply_part): New function.
2862 (regcache::transfer_regset_register): New helper function.
2863 (regcache::transfer_regset): Call new functions.
2864 (regcache_supply_regset): Use gdb_byte*.
2865 (regcache::supply_regset): Likewise.
2866 (regcache_collect_regset): Likewise.
2867 (regcache::collect_regset): Likewise.
2868 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2869 (reg_buffer::raw_supply_part): Likewise.
2870 (regcache::transfer_regset_register): Likewise.
2871 (regcache::transfer_regset): Use gdb_byte*.
2873 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2875 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2877 2018-06-21 Pedro Alves <palves@redhat.com>
2879 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2880 instead of a ptid_t. All callers adjusted.
2881 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2883 (print_ada_task_info, display_current_task_id, task_command_1):
2885 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2887 (breakpoint_kind): Adjust.
2888 (remove_breakpoints_pid): Rename to ...
2889 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2890 pointer. All callers adjusted.
2891 (bpstat_clear_actions): Use inferior_thread.
2892 (get_bpstat_thread): New.
2893 (bpstat_do_actions): Use it.
2894 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2895 to take a thread_info pointer. All callers adjusted.
2896 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2897 (breakpoint_re_set_thread): Use inferior_thread.
2898 * breakpoint.h (struct inferior): Forward declare.
2899 (bpstat_stop_status): Update.
2900 (remove_breakpoints_pid): Delete.
2901 (remove_breakpoints_inf): New.
2902 * bsd-uthread.c (bsd_uthread_target::wait)
2903 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2904 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2905 (maint_btrace_packet_history_cmd)
2906 (maint_btrace_clear_packet_history_cmd): Adjust.
2907 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2909 * cli/cli-interp.c: Include "inferior.h".
2910 * common/refcounted-object.h (struct
2911 refcounted_object_ref_policy): New.
2912 * compile/compile-object-load.c: Include gdbthread.h.
2913 (store_regs): Use inferior_thread.
2914 * corelow.c (core_target::close): Use current_inferior.
2915 (core_target_open): Adjust to use first_thread_of_inferior and use
2916 the current inferior.
2917 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2918 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2919 <thread>: ... this new field. All references adjusted.
2920 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2921 Take a thread_info pointer instead of a ptid_t.
2922 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2923 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2924 thread_info pointer instead of a ptid_t.
2925 * elfread.c: Include "inferior.h".
2926 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2927 Use inferior_thread.
2928 * eval.c (evaluate_subexp): Likewise.
2929 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2931 * gdb_proc_service.h (struct thread_info): Forward declare.
2932 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2933 <thread>: ... this new field. All references adjusted.
2934 * gdbarch.h, gdbarch.c: Regenerate.
2935 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2936 'thread' parameter. All implementations and callers adjusted.
2937 * gdbthread.h (thread_info) <set_running>: New method.
2938 (delete_thread, delete_thread_silent): Take a thread_info pointer
2940 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2941 (first_thread_of_process): Delete, replaced by ...
2942 (first_thread_of_inferior): ... this new function. All callers
2944 (any_live_thread_of_process): Delete, replaced by ...
2945 (any_live_thread_of_inferior): ... this new function. All callers
2947 (switch_to_thread, switch_to_no_thread): Declare.
2948 (is_executing): Delete.
2949 (enable_thread_stack_temporaries): Update comment.
2950 <enable_thread_stack_temporaries>: Take a thread_info pointer
2951 instead of a ptid_t. Incref the thread.
2952 <~enable_thread_stack_temporaries>: Decref the thread.
2955 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2956 (get_last_thread_stack_temporary)
2957 (value_in_thread_stack_temporaries, can_access_registers_thread):
2958 Take a thread_info pointer instead of a ptid_t. All callers
2960 * infcall.c (get_call_return_value): Use inferior_thread.
2961 (run_inferior_call): Work with thread pointers instead of ptid_t.
2962 (call_function_by_hand_dummy): Work with thread pointers instead
2963 of ptid_t. Use thread_info_ref.
2964 * infcmd.c (proceed_thread_callback): Access thread's state
2966 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2967 access thread's state directly.
2968 (continue_command): Use inferior_thread.
2969 (info_program_command): Use find_thread_ptid and access thread
2971 (proceed_after_attach_callback): Use thread state directly.
2972 (notice_new_inferior): Take a thread_info pointer instead of a
2973 ptid_t. All callers adjusted.
2974 (exit_inferior): Take an inferior pointer instead of a pid. All
2976 (exit_inferior_silent): New.
2977 (detach_inferior): Delete.
2978 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2979 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2980 (detach_inferior_command, kill_inferior_command): Use
2981 find_inferior_id instead of valid_gdb_inferior_id and
2982 gdb_inferior_id_to_pid.
2983 (inferior_command): Use inferior and thread pointers.
2984 * inferior.h (struct thread_info): Forward declare.
2985 (notice_new_inferior): Take a thread_info pointer instead of a
2986 ptid_t. All callers adjusted.
2987 (detach_inferior): Delete declaration.
2988 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2989 instead of a pid. All callers adjusted.
2990 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2991 (valid_gdb_inferior_id): Delete.
2992 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2993 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2994 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2996 <inf>: ... this new field.
2997 <step_ptid>: Delete, replaced by ...
2998 <step_thread>: ... this new field.
2999 (get_displaced_stepping_state): Take an inferior pointer instead
3000 of a pid. All callers adjusted.
3001 (displaced_step_in_progress_any_inferior): Adjust.
3002 (displaced_step_in_progress_thread): Take a thread pointer instead
3003 of a ptid_t. All callers adjusted.
3004 (displaced_step_in_progress, add_displaced_stepping_state): Take
3005 an inferior pointer instead of a pid. All callers adjusted.
3006 (get_displaced_step_closure_by_addr): Adjust.
3007 (remove_displaced_stepping_state): Take an inferior pointer
3008 instead of a pid. All callers adjusted.
3009 (displaced_step_prepare_throw, displaced_step_prepare)
3010 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3011 All callers adjusted.
3012 (start_step_over): Adjust.
3013 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3014 displaced step queue.
3015 (do_target_resume): Adjust.
3016 (fetch_inferior_event): Use inferior_thread.
3017 (context_switch, get_inferior_stop_soon): Take an
3018 execution_control_state pointer instead of a ptid_t. All callers
3020 (switch_to_thread_cleanup): Delete.
3021 (stop_all_threads): Use scoped_restore_current_thread.
3022 * inline-frame.c: Include "gdbthread.h".
3023 (inline_state) <inline_state>: Take a thread pointer instead of a
3024 ptid_t. All callers adjusted.
3025 <ptid>: Delete, replaced by ...
3026 <thread>: ... this new field.
3027 (find_inline_frame_state): Take a thread pointer instead of a
3028 ptid_t. All callers adjusted.
3029 (skip_inline_frames, step_into_inline_frame)
3030 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3031 pointer instead of a ptid_t. All callers adjusted.
3032 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3033 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3034 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3036 * linux-nat.c (get_detach_signal): Likewise.
3037 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3038 (thread_db_notice_clone): Adjust.
3039 (thread_db_find_new_threads_silently)
3040 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3041 a thread pointer instead of a ptid_t. All callers adjusted.
3042 * mi/mi-cmd-var.c: Include "inferior.h".
3043 (mi_cmd_var_update_iter): Update to use thread pointers.
3044 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3046 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3048 (mi_output_running): ... this new function.
3049 (mi_on_resume_1): Adjust to use it.
3050 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3051 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3053 (interrupt_thread_callback): : Adjust to use thread and inferior
3055 * proc-service.c: Include "gdbthread.h".
3056 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3057 * progspace-and-thread.c: Include "inferior.h".
3058 * progspace.c: Include "inferior.h".
3059 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3060 hold a reference to an inferior_object.
3061 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3063 * python/py-inferior.c (struct inferior_object): Give the type a
3064 tag name instead of a typedef.
3065 (python_on_normal_stop): No need to check if the current thread is
3067 (inferior_to_inferior_object): Change return type to
3068 inferior_object. All callers adjusted.
3069 (find_thread_object): Delete, bits factored out to ...
3070 (thread_to_thread_object): ... this new function.
3071 * python/py-infthread.c (create_thread_object): Use
3072 inferior_to_inferior_object.
3073 (thpy_is_stopped): Use thread pointer directly.
3074 (gdbpy_selected_thread): Use inferior_thread.
3075 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3076 field, replaced with ...
3077 <thread>: ... this new field. All users adjusted.
3078 (btpy_insn_or_gap_new): Drop const.
3079 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3081 * python/py-record.c: Include "gdbthread.h".
3082 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3083 a ptid_t. All callers adjusted.
3084 (gdbpy_current_recording): Use inferior_thread.
3085 * python/py-record.h (recpy_record_object) <ptid>: Delete
3086 field, replaced with ...
3087 <thread>: ... this new field. All users adjusted.
3088 (recpy_element_object) <ptid>: Delete
3089 field, replaced with ...
3090 <thread>: ... this new field. All users adjusted.
3091 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3092 a ptid_t. All callers adjusted.
3093 * python/py-threadevent.c: Include "gdbthread.h".
3094 (get_event_thread): Use thread_to_thread_object.
3095 * python/python-internal.h (struct inferior_object): Forward
3097 (find_thread_object, find_inferior_object): Delete declarations.
3098 (thread_to_thread_object, inferior_to_inferior_object): New
3100 * record-btrace.c: Include "inferior.h".
3101 (require_btrace_thread): Use inferior_thread.
3102 (record_btrace_frame_sniffer)
3103 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3104 (get_thread_current_frame): Use scoped_restore_current_thread and
3106 (get_thread_current_frame): Use thread pointer directly.
3107 (record_btrace_replay_at_breakpoint): Use thread's inferior
3109 * record-full.c: Include "inferior.h".
3110 * regcache.c: Include "gdbthread.h".
3111 (get_thread_arch_regcache): Use the inferior's address space
3113 (get_thread_regcache, registers_changed_thread): New.
3114 * regcache.h (get_thread_regcache(thread_info *thread)): New
3116 (registers_changed_thread): New.
3117 (remote_target) <remote_detach_1>: Swap order of parameters.
3118 (remote_add_thread): <remote_add_thread>: Return the new thread.
3119 (get_remote_thread_info(ptid_t)): New overload.
3120 (remote_target::remote_notice_new_inferior): Use thread pointers
3122 (remote_target::process_initial_stop_replies): Use
3123 thread_info::set_running.
3124 (remote_target::remote_detach_1, remote_target::detach)
3125 (extended_remote_target::detach): Adjust.
3126 * stack.c (frame_show_address): Use inferior_thread.
3127 * target-debug.h (target_debug_print_thread_info_pp): New.
3128 * target-delegates.c: Regenerate.
3129 * target.c (default_thread_address_space): Delete.
3130 (memory_xfer_partial_1): Use current_inferior.
3131 (target_detach): Use current_inferior.
3132 (target_thread_address_space): Delete.
3133 (generic_mourn_inferior): Use current_inferior.
3134 * target.h (struct target_ops) <thread_address_space>: Delete.
3135 (target_thread_address_space): Delete.
3136 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3138 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3139 thread pointer instead of a ptid_t. Adjust all callers.
3140 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3141 (first_thread_of_process): Delete, replaced by ...
3142 (first_thread_of_inferior): ... this new function. All callers
3144 (any_thread_of_process): Rename to ...
3145 (any_thread_of_inferior): ... this, and take an inferior pointer.
3146 (any_live_thread_of_process): Rename to ...
3147 (any_live_thread_of_inferior): ... this, and take an inferior
3149 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3150 (value_in_thread_stack_temporaries)
3151 (get_last_thread_stack_temporary): Take a thread pointer instead
3152 of a ptid_t. Adjust all callers.
3153 (thread_info::set_running): New.
3154 (validate_registers_access): Use inferior_thread.
3155 (can_access_registers_ptid): Rename to ...
3156 (can_access_registers_thread): ... this, and take a thread
3158 (print_thread_info_1): Adjust to compare thread pointers instead
3160 (switch_to_no_thread, switch_to_thread): Make extern.
3161 (scoped_restore_current_thread::~scoped_restore_current_thread):
3162 Use m_thread pointer directly.
3163 (scoped_restore_current_thread::scoped_restore_current_thread):
3164 Use inferior_thread.
3165 (thread_command): Use thread pointer directly.
3166 (thread_num_make_value_helper): Use inferior_thread.
3167 * top.c (execute_command): Use inferior_thread.
3168 * tui/tui-interp.c: Include "inferior.h".
3169 * varobj.c (varobj_create): Use inferior_thread.
3170 (value_of_root_1): Use find_thread_global_id instead of
3171 global_thread_id_to_ptid.
3173 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3175 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3177 (regcache::write_part): Likewise.
3178 (readable_regcache::cooked_read_part): Update comment.
3179 (readable_regcache::cooked_write_part): Likewise.
3180 * regcache.h: (readable_regcache::read_part): Likewise.
3181 (regcache::write_part): Likewise.
3183 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3184 Dirk Schubert <dirk.schubert@arm.com>
3186 * aarch64-linux-nat.c (post_attach): New.
3187 (aarch64_linux_nat_target::post_attach): Override post_attach to
3188 record the number of hardware debug registers.
3190 2018-06-20 Tom Tromey <tom@tromey.com>
3192 * python/py-param.c (add_setshow_generic): Make parameters const.
3193 (parmpy_init): Update.
3195 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3197 * regcache.h (regcache_cooked_read_ftype): Rename to...
3198 (register_read_ftype): ...this, change type to function_view.
3199 (class reg_buffer) <save>: Remove src parameter.
3200 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3201 parameter non-const in first overload. Remove src parameter in
3203 * regcache.c (do_cooked_read): Remove.
3204 (readonly_detached_regcache::readonly_detached_regcache): Make
3205 parameter non-const, adjust call to other constructor.
3206 (reg_buffer::save): Remove src parameter.
3207 * frame.c (do_frame_register_read): Remove.
3208 (frame_save_as_regcache): Use lambda function.
3209 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3210 parameter to ppu2spu_data *.
3211 (ppu2spu_sniffer): Use lambda function.
3213 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3215 * record-full.c (record_full_target::insert_breakpoint): Remove
3216 "struct" keyword, add const.
3218 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3220 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3221 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3222 * configure.ac: Remove AC_PREREQ, add missing quoting.
3223 * gnulib/configure.ac: Modernize usage of
3224 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3225 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3226 (AUTOMAKE_VERSION): Bump to 1.15.1.
3227 * configure: Re-generate.
3228 * config.in: Re-generate.
3229 * aclocal.m4: Re-generate.
3230 * gnulib/aclocal.m4: Re-generate.
3231 * gnulib/config.in: Re-generate.
3232 * gnulib/configure: Re-generate.
3233 * gnulib/import/Makefile.in: Re-generate.
3235 2018-06-19 Pedro Alves <palves@redhat.com>
3237 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3238 (lookup_minimal_symbol_by_pc_section): ... here with
3239 gdb_assert_not_reached added.
3241 2018-06-19 Pedro Alves <palves@redhat.com>
3243 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3244 parameter with a block parameter. Compare location's block symbol
3245 with the frame's block instead of addresses.
3246 (skip_inline_frames): Pass the current block instead of the
3247 frame's address. Break out as soon as we determine the frame
3248 should not be skipped.
3250 2018-06-18 Tom Tromey <tom@tromey.com>
3252 * solib-aix.c (solib_aix_get_section_offsets): Return
3254 (solib_aix_solib_create_inferior_hook): Update.
3256 2018-06-18 Tom Tromey <tom@tromey.com>
3258 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3260 2018-06-18 Tom Tromey <tom@tromey.com>
3262 * solib-frv.c (frv_relocate_main_executable): Use
3264 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3267 2018-06-18 Tom Tromey <tom@tromey.com>
3269 * objfiles.h (inhibit_section_map_updates): Update.
3270 (resume_section_map_updates, resume_section_map_updates_cleanup):
3272 * solib-svr4.c (svr4_handle_solib_event): Update.
3273 * objfiles.c (inhibit_section_map_updates): Return
3274 scoped_restore_tmpl<int>.
3275 (resume_section_map_updates, resume_section_map_updates_cleanup):
3278 2018-06-18 Tom Tromey <tom@tromey.com>
3280 * valprint.h (read_string): Update.
3281 * valprint.c (read_string): Change type of "buffer".
3282 (val_print_string): Update.
3283 * python/py-value.c (valpy_string): Update.
3284 * language.h (struct language_defn) <la_get_string>: Change
3286 (default_get_string, c_get_string): Update.
3287 * language.c (default_get_string): Change type of "buffer".
3288 * guile/scm-value.c (gdbscm_value_to_string): Update.
3289 * c-lang.c (c_get_string): Change type of "buffer".
3291 2018-06-18 Tom Tromey <tom@tromey.com>
3293 * ser-mingw.c (struct pipe_state_destroyer): New.
3294 (pipe_state_up): New typedef.
3295 (cleanup_pipe_state): Remove.
3296 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3298 2018-06-18 Tom Tromey <tom@tromey.com>
3300 * rust-lang.h (rust_yyerror): Don't declare.
3301 * rust-lang.c (rust_language_defn): Update.
3302 * rust-exp.y (yyerror): Now static.
3303 * parse.c (parse_exp_in_context_1): Update.
3304 * p-lang.h (p_yyerror): Don't declare.
3305 * p-lang.c (p_language_defn): Update.
3306 * p-exp.y (yyerror): Now static.
3307 * opencl-lang.c (opencl_language_defn): Update.
3308 * objc-lang.c (objc_language_defn): Update.
3309 * m2-lang.h (m2_yyerror): Don't declare.
3310 * m2-lang.c (m2_language_defn): Update.
3311 * m2-exp.y (yyerror): Now static.
3312 * language.h (struct language_defn) <la_error>: Remove.
3313 * language.c (unk_lang_error): Remove.
3314 (unknown_language_defn, auto_language_defn): Remove.
3315 * go-lang.h (go_yyerror): Don't declare.
3316 * go-lang.c (go_language_defn): Update.
3317 * go-exp.y (yyerror): Now static.
3318 * f-lang.h (f_yyerror): Don't declare.
3319 * f-lang.c (f_language_defn): Update.
3320 * f-exp.y (yyerror): Now static.
3321 * d-lang.h (d_yyerror): Don't declare.
3322 * d-lang.c (d_language_defn): Update.
3323 * d-exp.y (yyerror): Now static.
3324 * c-lang.h (c_yyerror): Don't declare.
3325 * c-lang.c (c_language_defn, cplus_language_defn)
3326 (asm_language_defn, minimal_language_defn): Update.
3327 * c-exp.y (yyerror): Now static.
3328 * ada-lang.h (ada_yyerror): Don't declare.
3329 * ada-lang.c (ada_language_defn): Update.
3330 * ada-exp.y (yyerror): Now static.
3332 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3334 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3335 (store_sveregs_to_thread): Likewise.
3336 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3337 (aarch64_linux_store_inferior_registers): Likewise.
3338 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3340 (aarch64_sve_regs_copy_to_regcache): Likewise.
3341 (aarch64_sve_regs_copy_from_regcache): Likewise.
3342 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3344 (aarch64_sve_regs_copy_to_regcache): Likewise.
3345 (aarch64_sve_regs_copy_from_regcache): Likewise.
3346 (sve_context): Structure from Linux headers.
3347 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3348 (SVE_SIG_ZREG_SIZE): Likewise.
3349 (SVE_SIG_PREG_SIZE): Likewise.
3350 (SVE_SIG_FFR_SIZE): Likewise.
3351 (SVE_SIG_REGS_OFFSET): Likewise.
3352 (SVE_SIG_ZREGS_OFFSET): Likewise.
3353 (SVE_SIG_ZREG_OFFSET): Likewise.
3354 (SVE_SIG_ZREGS_SIZE): Likewise.
3355 (SVE_SIG_PREGS_OFFSET): Likewise.
3356 (SVE_SIG_PREG_OFFSET): Likewise.
3357 (SVE_SIG_PREGS_SIZE): Likewise.
3358 (SVE_SIG_FFR_OFFSET): Likewise.
3359 (SVE_SIG_REGS_SIZE): Likewise.
3360 (SVE_SIG_CONTEXT_SIZE): Likewise.
3361 (SVE_PT_REGS_MASK): Likewise.
3362 (SVE_PT_REGS_FPSIMD): Likewise.
3363 (SVE_PT_REGS_SVE): Likewise.
3364 (SVE_PT_VL_INHERIT): Likewise.
3365 (SVE_PT_VL_ONEXEC): Likewise.
3366 (SVE_PT_REGS_OFFSET): Likewise.
3367 (SVE_PT_FPSIMD_OFFSET): Likewise.
3368 (SVE_PT_FPSIMD_SIZE): Likewise.
3369 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3370 (SVE_PT_SVE_PREG_SIZE): Likewise.
3371 (SVE_PT_SVE_FFR_SIZE): Likewise.
3372 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3373 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3374 (__SVE_SIG_TO_PT): Likewise.
3375 (SVE_PT_SVE_OFFSET): Likewise.
3376 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3377 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3378 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3379 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3380 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3381 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3382 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3383 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3384 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3385 (SVE_PT_SVE_SIZE): Likewise.
3386 (SVE_PT_SIZE): Likewise.
3387 (HAS_SVE_STATE): New define.
3389 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3391 * nat/aarch64-sve-linux-sigcontext.h: New file.
3392 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3394 (SVE_VQ_MIN): Likewise.
3395 (SVE_VQ_MAX): Likewise.
3396 (SVE_VL_MIN): Likewise.
3397 (SVE_VL_MAX): Likewise.
3398 (SVE_NUM_ZREGS): Likewise.
3399 (SVE_NUM_PREGS): Likewise.
3400 (sve_vl_valid): Likewise.
3401 (struct user_sve_header): Likewise.
3403 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3404 Richard Bunt <Richard.Bunt@arm.com>
3406 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3407 was requested by GDB.
3409 2018-06-15 Tom de Vries <tdevries@suse.de>
3411 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3413 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3415 * gnulib/update-gnulib.sh: Print expected versions of
3418 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3420 * arch-utils.c (default_type_align): Use type_length_units.
3421 * gdbtypes.c (type_align): Use type_length_units.
3423 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3425 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3426 of 'define' command.
3428 2018-06-14 Tom de Vries <tdevries@suse.de>
3431 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3432 get_no_prettyformat_print_options.
3434 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3436 * sparc-nat.h: Include target.h.
3437 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3438 <fetch_registers>: Remove this argument in function call.
3439 <store_registers>: Remove this argument in function call, remove
3441 <low_forget_process>: Call sparc64_forget_process instead of
3442 sparc_forget_process.
3444 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3446 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3447 (procfs_target::make_corefile_notes): Adjust to new
3448 target_read_alloc return type.
3450 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3451 Stephen Roberts <stephen.roberts@arm.com>
3454 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3455 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3456 Move should_notify_stop local into more inner scope.
3458 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3459 Stephen Roberts <stephen.roberts@arm.com>
3462 * infrun.c (resume_1): Add call to mark_async_event_handler.
3464 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3466 * infrun.c (do_target_wait): Change old version of $pc printed.
3468 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3470 * dwarf2read.c (read_index_from_section): Rename to...
3471 (read_gdb_index_from_section): ... this, update all callers.
3472 (dwarf2_read_index): Rename to...
3473 (dwarf2_read_gdb_index): ... this, update all callers.
3475 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3477 * gdb/hppa-linux-nat.c
3478 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3479 hppa_linux_nat_target::fetch_registers.
3481 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3483 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3484 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3485 (AARCH64_DWARF_SVE_FFR): Likewise.
3486 (AARCH64_DWARF_SVE_P0): Likewise.
3487 (AARCH64_DWARF_SVE_Z0): Likewise.
3489 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3491 * common/common-regcache.h (raw_compare): New function.
3492 * regcache.c (regcache::raw_compare): Likewise.
3493 * regcache.h (regcache::raw_compare): New declaration.
3495 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3497 * common/common-regcache.h (reg_buffer_common): New structure.
3498 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3499 (reg_buffer::raw_supply): Likewise.
3500 (reg_buffer::raw_supply_integer): Likewise.
3501 (reg_buffer::raw_supply_zeroed): Likewise.
3502 (reg_buffer::raw_collect): Likewise.
3503 (reg_buffer::raw_collect_integer): Likewise.
3504 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3505 (reg_buffer::raw_supply): Likewise.
3506 (reg_buffer::raw_supply_integer): Likewise.
3507 (reg_buffer::raw_supply_zeroed): Likewise.
3508 (reg_buffer::raw_collect): Likewise.
3509 (reg_buffer::raw_collect_integer): Likewise.
3511 2018-06-10 Tom Tromey <tom@tromey.com>
3513 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3514 (class remote_state) <stop_reply_queue>: Now std::vector.
3515 (remote_state::~remote_state)
3516 (remote_target::stop_reply_queue_length): Update.
3517 (struct queue_iter_param, remove_child_of_pending_fork)
3518 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3519 (check_pending_event_prevents_wildcard_vcont_callback)
3520 (remove_stop_reply_for_inferior)
3521 (remove_stop_reply_of_remote_state)
3522 (remote_notif_remove_once_on_match)
3523 (stop_reply_match_ptid_and_ws)
3524 (remote_kill_child_of_pending_fork): Remove.
3525 (remote_target::remove_new_fork_children)
3526 (remote_target::check_pending_events_prevent_wildcard_vcont)
3527 (remote_target::discard_pending_stop_replies)
3528 (remote_target::discard_pending_stop_replies_in_queue)
3529 (remote_target::remote_notif_remove_queued_reply)
3530 (remote_target::queued_stop_reply)
3531 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3532 (remote_target::wait, remote_target::kill_new_fork_children)
3533 (remote_target::async): Update.
3535 2018-06-10 Tom Tromey <tom@tromey.com>
3537 * record-full.c (record_full_arch_list_cleanups): Remove.
3538 (record_full_message): Use try/catch.
3539 (record_full_wait_cleanups): Remove.
3540 (record_full_wait_1): Use try/catch.
3541 (record_full_restore): Likewise.
3543 2018-06-10 Tom Tromey <tom@tromey.com>
3545 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3546 declare VEC. Add constructor.
3547 <in_target_beneath>: Now bool.
3548 (record_full_breakpoints): Now a std::vector, static.
3549 (record_full_sync_record_breakpoints)
3550 (record_full_init_record_breakpoints)
3551 (record_full_target::insert_breakpoint)
3552 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3554 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3556 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3557 * serial.c (serial_interface_lookup): Remove struct keyword.
3559 2018-06-10 Tom Tromey <tom@tromey.com>
3561 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3563 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3565 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3567 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3568 "beneath" as a method.
3569 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3570 Use "beneath" as a method.
3572 2018-06-10 Tom Tromey <tom@tromey.com>
3574 * tracefile.c (struct trace_file_writer_deleter): New.
3575 <operator()>: Rename from trace_file_writer_xfree.
3576 (trace_file_writer_up): New typedef.
3577 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3579 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3581 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3582 <m_registers, m_register_status>: Change type to
3584 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3587 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3589 * common/common-regcache.h (enum register_status): Add
3590 underlying type "signed char".
3591 * regcache.h (reg_buffer) <m_register_status>: Change type to
3593 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3594 register_status instead of signed char.
3595 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3596 (reg_buffer::get_register_status): Remove cast.
3597 (readable_regcache::raw_read): Remove cast.
3598 (readable_regcache::cooked_read): Remove cast.
3600 2018-06-09 Tom Tromey <tom@tromey.com>
3602 * source.c (reverse_search_command, forward_search_command): Use
3605 2018-06-09 Tom Tromey <tom@tromey.com>
3607 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3608 (serial_ops_list): Now static, std::vector.
3609 (serial_interface_lookup, serial_add_interface): Update.
3611 2018-06-09 Tom Tromey <tom@tromey.com>
3613 * dwarf2read.c (process_cu_includes): Update.
3614 (process_full_comp_unit): Update.
3615 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3618 2018-06-08 Paul Koning <paul_koning@dell.com>
3622 * python/python.c (do_start_initialization):
3623 Avoid call to internal Python API.
3624 (init__gdb_module): New function.
3626 2018-06-08 Gary Benson <gbenson@redhat.com>
3628 * linux-thread-db.c (valprint.h): New include.
3629 (struct check_thread_db_info): New structure.
3630 (check_thread_db_on_load, tdb_testinfo): New static globals.
3631 (check_thread_db, check_thread_db_callback): New functions.
3632 (try_thread_db_load_1): Run integrity checks if requested.
3633 (maintenance_check_libthread_db): New function.
3634 (_initialize_thread_db): Register "maint check libthread-db"
3635 and "maint set/show check-libthread-db".
3636 * NEWS: Mention the above new commands.
3638 2018-06-08 Tom Tromey <tom@tromey.com>
3640 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3643 2018-06-08 Tom Tromey <tom@tromey.com>
3645 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3647 2018-06-08 Tom Tromey <tom@tromey.com>
3649 * common/btrace-common.h (struct btrace_data): Add constructor,
3650 destructor, move assignment operator.
3651 <empty, clear, fini>: New methods.
3652 <format>: Initialize.
3653 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3654 (btrace_data_empty): Don't declare.
3655 * common/btrace-common.c (btrace_data_init): Remove.
3656 (btrace_data::fini): Rename from btrace_data_fini.
3657 (btrace_data::empty): Rename from btrace_data_empty.
3658 (btrace_data::clear): Rename from btrace_data_clear. Return
3660 * btrace.h (make_cleanup_btrace_data): Don't declare.
3661 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3662 (parse_xml_btrace): Update.
3663 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3664 (maint_btrace_clear_packet_history_cmd): Update.
3666 2018-06-07 Pedro Alves <palves@redhat.com>
3668 * target.h (target_ops) <beneath>: Now a method. All references
3670 (class target_stack): New.
3671 * target.c (g_target_stack): New.
3672 (g_current_top_target): Delete.
3673 (current_top_target): Get the top target out of g_target_stack.
3674 (target_stack::push, target_stack::unpush): New.
3675 (push_target, unpush_target): Reimplement.
3676 (target_is_pushed): Reimplement in terms of g_target_stack.
3677 (target_ops::beneath, target_stack::find_beneath): New.
3679 2018-06-07 Pedro Alves <palves@redhat.com>
3681 * target.h (find_target_beneath): Delete declaration.
3682 * target.c (find_target_beneath): Delete definition.
3683 * aix-thread.c: All callers of find_target_beneath adjusted to
3684 call target_ops::beneath instead.
3685 * bsd-uthread.c: Likewise.
3686 * linux-thread-db.c: Likewise.
3687 * ravenscar-thread.c: Likewise.
3688 * sol-thread.c: Likewise.
3689 * spu-multiarch.c: Likewise.
3691 2018-06-07 Pedro Alves <palves@redhat.com>
3693 * target.h (target_ops) <beneath>: Now a method. All references
3695 (target_ops) <m_beneath>: New.
3696 * target.c (target_ops::beneath): New.
3697 * corelow.c: Adjust all references to target_ops::beneath.
3698 * linux-thread-db.c: Likewise.
3699 * make-target-delegates: Likewise.
3700 * record-btrace.c: Likewise.
3701 * record-full.c: Likewise.
3702 * remote.c: Likewise.
3703 * target.c: Likewise.
3704 * target-delegates.c: Regenerate.
3706 2018-06-07 Pedro Alves <palves@redhat.com>
3708 * target.h (target_stack): Delete.
3709 (current_top_target): Declare function.
3710 * target.c (target_stack): Delete.
3711 (g_current_top_target): New.
3712 (current_top_target): New function.
3713 * auxv.c: Use current_top_target instead of target_stack
3715 * avr-tdep.c: Likewise.
3716 * breakpoint.c: Likewise.
3717 * corefile.c: Likewise.
3718 * elfread.c: Likewise.
3720 * exceptions.c: Likewise.
3721 * frame.c: Likewise.
3722 * gdbarch-selftests.c: Likewise.
3723 * gnu-v3-abi.c: Likewise.
3724 * ia64-tdep.c: Likewise.
3725 * ia64-vms-tdep.c: Likewise.
3726 * infcall.c: Likewise.
3727 * infcmd.c: Likewise.
3728 * infrun.c: Likewise.
3729 * linespec.c: Likewise.
3730 * linux-tdep.c: Likewise.
3731 * minsyms.c: Likewise.
3732 * ppc-linux-nat.c: Likewise.
3733 * ppc-linux-tdep.c: Likewise.
3734 * procfs.c: Likewise.
3735 * regcache.c: Likewise.
3736 * remote.c: Likewise.
3737 * rs6000-tdep.c: Likewise.
3738 * s390-linux-nat.c: Likewise.
3739 * s390-tdep.c: Likewise.
3740 * solib-aix.c: Likewise.
3741 * solib-darwin.c: Likewise.
3742 * solib-dsbt.c: Likewise.
3743 * solib-spu.c: Likewise.
3744 * solib-svr4.c: Likewise.
3745 * solib-target.c: Likewise.
3746 * sparc-tdep.c: Likewise.
3747 * sparc64-tdep.c: Likewise.
3748 * spu-tdep.c: Likewise.
3749 * symfile.c: Likewise.
3750 * symtab.c: Likewise.
3751 * target-descriptions.c: Likewise.
3752 * target-memory.c: Likewise.
3753 * target.c: Likewise.
3754 * target.h: Likewise.
3755 * tracefile-tfile.c: Likewise.
3756 * tracepoint.c: Likewise.
3757 * valops.c: Likewise.
3758 * valprint.c: Likewise.
3759 * value.c: Likewise.
3760 * windows-tdep.c: Likewise.
3761 * mi/mi-main.c: Likewise.
3763 2018-06-07 Tom Tromey <tom@tromey.com>
3765 * valprint.h (build_address_symbolic): Declare.
3766 * printcmd.c (print_address_symbolic): Update.
3767 (build_address_symbolic): Change "name" and "filename" to
3769 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3771 * defs.h (build_address_symbolic): Remove declaration.
3773 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3775 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3776 (aarch64_vnv_type): Add function.
3777 (aarch64_pseudo_register_name): Add V regs for SVE.
3778 (aarch64_pseudo_register_type): Likewise.
3779 (aarch64_pseudo_register_reggroup_p): Likewise.
3780 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3781 (aarch64_pseudo_read_value): Add V regs for SVE.
3782 (aarch64_pseudo_write_2): Use V0 offset for SVE
3783 (aarch64_pseudo_write): Add V regs for SVE.
3784 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3786 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3788 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3789 (sve_vl_from_vq): Likewise.
3791 2018-06-05 Tom Tromey <tom@tromey.com>
3793 * cli/cli-cmds.c (show_version): Update.
3794 * top.c (print_gdb_version): Add "interactive" parameter.
3796 * main.c (captured_main_1): Update.
3797 * top.h (print_gdb_version): Add "interactive" parameter and a
3800 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3802 * common/enum-flags.h: Add trailing semicolon to example in
3805 2018-06-05 Tom Tromey <tom@tromey.com>
3808 * NEWS: Add entry about pager.
3809 * utils.c (pagination_disabled_for_command): New global.
3810 (prompt_for_continue): Allow "c" response to prompt.
3811 (reinitialize_more_filter): Clear
3812 pagination_disabled_for_command.
3813 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3815 2018-06-04 Tom Tromey <tom@tromey.com>
3817 * ada-lang.h (ada_lookup_symbol_list): Update.
3818 * ada-lang.c (resolve_subexp): Update.
3819 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3821 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3822 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3823 results parameter to std::vector.
3824 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3826 * ada-exp.y (block_lookup): Update.
3827 (select_possible_type_sym): Change type of syms. Remove nsyms
3829 (write_var_or_type, write_name_assoc): Update.
3831 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3833 * windows-nat.c (windows_nat_target::xfer_partial): Return
3834 TARGET_XFER_E_IO if we need to delegate to the target beneath
3835 but BENEATH is NULL.
3837 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3839 * Makefile.in (config.status): Add configure.nat as a
3842 2018-06-04 Tom Tromey <tom@tromey.com>
3844 * cp-name-parser.y (cpname_state): Add method declarations.
3845 (HANDLE_QUAL): Update.
3846 (cpname_state::d_grab, cpname_state::fill_comp)
3847 (cpname_state::make_operator, cpname_state::make_dtor)
3848 (cpname_state::make_builtin_type, cpname_state::make_name)
3849 (cpname_state::d_qualify, cpname_state::d_int_type)
3850 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3851 (%union): Move earlier.
3853 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3855 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3857 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3859 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3860 (aarch64_pseudo_write_1): Likewise.
3861 (aarch64_pseudo_read_value): Use helper.
3862 (aarch64_pseudo_write): Likewise.
3864 2018-06-04 Pedro Alves <palves@redhat.com>
3866 * darwin-nat.c (darwin_ops): Delete.
3867 (darwin_attach_pid): Use get_native_target.
3869 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3871 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3872 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3874 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3876 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3877 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3878 (aarch64_gdbarch_init): Check for SVE.
3879 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3881 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3883 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3884 * aarch64-tdep.h (aarch64_read_description): Likewise.
3885 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3886 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3887 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3888 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3889 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3891 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3893 * value.c (value_fetch_lazy_bitfield): New.
3894 (value_fetch_lazy_memory): New.
3895 (value_fetch_lazy_register): New.
3896 (value_fetch_lazy): Factor out to smaller functions.
3898 2018-06-01 Tom Tromey <tom@tromey.com>
3900 * cp-name-parser.y (backslashable, represented): Now const.
3902 2018-06-01 Tom Tromey <tom@tromey.com>
3904 * cp-name-parser.y: Include parser-defs.h.
3905 (parser_fprintf): Remove declaration.
3907 2018-06-01 Tom Tromey <tom@tromey.com>
3909 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3911 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3912 (global_result): Remove globals.
3913 (struct cpname_state): New.
3914 (yyparse): Don't declare.
3915 (yylex, yyerror): Move declarations after %union.
3916 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3917 (make_name): Add state parameter.
3919 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3921 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3923 (yylex): Add lvalp, state parameters.
3924 (yyerror): Add state parameter.
3925 (cp_demangled_name_to_comp): Update.
3927 2018-06-01 Tom Tromey <tom@tromey.com>
3929 * cp-name-parser.y (parser_fprintf): Declare.
3930 (GDB_YY_REMAP_PREFIX): Define.
3931 Include yy-remap.h. Don't redefine yy* identifiers.
3933 2018-06-01 Tom Tromey <tom@tromey.com>
3935 * python/py-type.c (typy_legacy_template_argument): Update.
3936 * cp-support.h (cp_demangled_name_to_comp): Update.
3937 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3938 parameter to be a "std::string *".
3941 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3943 * ada-lex.l: Include "diagnostics.h" instead of
3944 "common/diagnostics.h".
3945 * unittests/environ-selftests.c: Likewise.
3946 * common/diagnostics.h: Moved to ../include.
3948 2018-06-01 Joel Brobecker <brobecker@adacore.com>
3950 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3951 to language_mode_manual while calling breakpoint_re_set_one.
3953 2018-06-01 Tom Tromey <tom@tromey.com>
3955 * valops.c (value_cast_structs, destructor_name_p): Update.
3956 * symtab.c (gdb_mangle_name): Update.
3957 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3959 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3960 (pascal_object_print_value_fields, pascal_object_print_value):
3962 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3963 * linespec.c (find_methods): Update.
3964 * gdbtypes.h (type_name_no_tag): Remove.
3965 (type_name_or_error): Rename from type_name_no_tag_or_error.
3966 * gdbtypes.c (type_name_no_tag): Remove.
3967 (type_name_or_error): Rename from type_name_no_tag_or_error.
3968 (lookup_struct_elt_type, check_typedef): Update.
3969 * expprint.c (print_subexp_standard): Update.
3970 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3971 * d-namespace.c (d_lookup_nested_symbol): Update.
3972 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3973 (cp_print_class_member): Update.
3974 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3975 * completer.c (add_struct_fields): Update.
3976 * c-typeprint.c (cp_type_print_derivation_info)
3977 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3979 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3980 (ada_prefer_type, ada_is_exception_sym): Update.
3982 2018-06-01 Tom Tromey <tom@tromey.com>
3984 * valops.c (enum_constant_from_type, value_namespace_elt)
3985 (value_maybe_namespace_elt): Update.
3986 * valarith.c (find_size_for_pointer_math): Update.
3987 * target-descriptions.c (make_gdb_type): Update.
3988 * symmisc.c (print_symbol): Update.
3989 * stabsread.c (define_symbol, read_type)
3990 (complain_about_struct_wipeout, add_undefined_type)
3991 (cleanup_undefined_types_1): Update.
3992 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3993 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3994 (rust_internal_print_type, rust_composite_type)
3995 (rust_evaluate_funcall, rust_evaluate_subexp)
3996 (rust_inclusive_range_type_p): Update.
3997 * python/py-type.c (typy_get_tag): Update.
3998 * p-typeprint.c (pascal_type_print_base): Update.
3999 * mdebugread.c (parse_symbol, parse_type): Update.
4000 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4002 * guile/scm-type.c (gdbscm_type_tag): Update.
4003 * go-lang.c (sixg_string_p): Update.
4004 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4006 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4007 (TYPE_TAG_NAME): Remove.
4008 * gdbtypes.c (type_name_no_tag): Simplify.
4009 (check_typedef, check_types_equal, recursive_dump_type)
4010 (copy_type_recursive, arch_composite_type): Update.
4011 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4012 in summary mode when needed.
4013 * eval.c (evaluate_funcall): Update.
4014 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4015 (process_structure_scope, read_enumeration_type)
4016 (read_namespace_type, read_module_type, determine_prefix): Update.
4017 * cp-support.c (inspect_type): Update.
4018 * coffread.c (process_coff_symbol, decode_base_type): Update.
4019 * c-varobj.c (c_is_path_expr_parent): Update.
4020 * c-typeprint.c (c_type_print_base_struct_union): Update.
4021 (c_type_print_base_1): Update. Print struct/class/union/enum in
4022 summary when using C language.
4023 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4024 (gen_maybe_namespace_elt): Update.
4025 * ada-lang.c (ada_type_name): Simplify.
4026 (empty_record, ada_template_to_fixed_record_type_1)
4027 (template_to_static_fixed_type)
4028 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4030 2018-06-01 Tom Tromey <tom@tromey.com>
4032 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4034 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4035 (c_print_type): Update.
4036 (c_print_type): New overload.
4037 (c_type_print_varspec_prefix, c_type_print_args)
4038 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4039 (c_type_print_base_struct_union, c_type_print_base_1)
4040 (cp_type_print_method_args): Add "language" parameter.
4041 (c_type_print_base): Update.
4042 * c-lang.h (c_print_type): Add new overload.
4044 2018-06-01 Tom Tromey <tom@tromey.com>
4046 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4047 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4049 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4051 * aarch64-tdep.c (aarch64_sve_register_names): New const
4053 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4054 (AARCH64_SVE_Z_REGS_NUM): New define.
4055 (AARCH64_SVE_P_REGS_NUM): Likewise.
4056 (AARCH64_SVE_NUM_REGS): Likewise.
4058 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4060 * nat/linux-ptrace.h [__alpha__]
4061 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4064 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4066 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4067 the endianness selected.
4068 * NEWS: Document `set endian auto' mode operation update.
4070 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4072 * Makefile.in: Add new header.
4073 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4074 (sve_vl_from_vg): Likewise.
4075 (sve_vq_from_vl): Likewise.
4076 (sve_vl_from_vq): Likewise.
4077 (sve_vq_from_vg): Likewise.
4078 (sve_vg_from_vq): Likewise.
4079 * configure.nat: Add new c file.
4080 * nat/aarch64-sve-linux-ptrace.c: New file.
4081 * nat/aarch64-sve-linux-ptrace.h: New file.
4083 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4085 * aarch64-linux-nat.c (aarch64_linux_read_description):
4087 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4089 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4090 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4091 (aarch64_gdbarch_init): Add parmeter zero.
4092 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4093 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4094 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4096 * doc/gdb.texinfo: Describe SVE feature
4097 * features/aarch64-sve.c: New file.
4099 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4102 * gdbarch.sh (significant_addr_bit): Default to zero when
4103 not set by target architecture.
4104 * gdbarch.c: Re-generated.
4105 * utils.c (address_significant): Update.
4107 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4109 * stack.c (func_command): Remove trailing newline in call to error.
4111 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4113 * regcache.h (regcache_raw_collect): Remove, update callers to
4114 use regcache::raw_collect.
4115 * regcache.c (regcache_raw_collect): Remove.
4117 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4119 * regcache.h (regcache_raw_supply): Remove, update callers to
4120 use detached_regcache::raw_supply.
4121 * regcache.c (regcache_raw_supply): Remove.
4123 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4125 * regcache.h (regcache_cooked_write_part): Remove, update
4126 callers to use regcache::cooked_write_part.
4127 * regcache.c (regcache_cooked_write_part): Remove.
4129 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4131 * regcache.h (regcache_cooked_read_part): Remove, update callers
4132 to use readable_regcache::cooked_read_part.
4133 * regcache.c (regcache_cooked_read_part): Remove.
4135 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4137 * regcache.h (regcache_cooked_read_value): Remove, update
4138 callers to use readable_regcache::cooked_read_value.
4139 * regcache.c (regcache_cooked_read_value): Remove.
4141 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4143 * regcache.h (regcache_cooked_write): Remove, update callers to
4144 use regcache::cooked_write.
4145 * regcache.c (regcache_cooked_write): Remove.
4147 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4149 * regcache.h (regcache_invalidate): Remove, update callers to
4150 use detached_regcache::invalidate instead.
4151 * regcache.c (regcache_invalidate): Remove.
4153 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4155 * regcache.h (regcache_raw_write_part): Remove, update callers
4156 to use regcache::raw_write_part instead.
4157 * regcache.c (regcache_raw_write_part): Remove.
4159 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4161 * regcache.h (regcache_raw_read_part): Remove, update callers to
4162 use readable_regcache::raw_read_part instead.
4163 * regcache.c (regcache_raw_read_part): Remove.
4165 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4167 * regcache.h (regcache_cooked_read): Remove, update callers to
4168 use readable_regcache::cooked_read instead.
4169 * regcache.c (regcache_cooked_read): Remove.
4171 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4173 * regcache.h (regcache_raw_write): Remove, update callers to use
4174 regcache::raw_write instead.
4175 * regcache.c (regcache_raw_write): Remove.
4177 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4179 * regcache.h (regcache_raw_read): Remove, update callers to use
4180 readable_regcache::raw_read instead.
4181 * regcache.c (regcache_raw_read): Remove.
4183 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4185 * regcache.h (regcache_raw_update): Remove, update callers to
4186 use readable_regcache::raw_update instead.
4187 * regcache.c (regcache_raw_update): Remove.
4189 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4191 * regcache.h (regcache_register_status): Remove, update callers
4192 to use reg_buffer::get_register_status directly instead.
4193 * regcache.c (regcache_register_status): Remove.
4195 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4197 * regcache.h (regcache_get_ptid): Remove, update all callers to
4198 call regcache::ptid instead.
4199 * regcache.c (regcache_get_ptid): Remove.
4201 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4203 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4205 2018-05-30 Pedro Alves <palves@redhat.com>
4207 * common/common-exceptions.h (exception_rethrow): Use
4210 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4212 * breakpoint.c (print_solib_event, check_status_catch_solib):
4213 Remove struct keyword in range-based for loops.
4214 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4215 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4217 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4219 * symfile.c (addr_info_make_relative): Likewise.
4220 * thread.c (value_in_thread_stack_temporaries): Likewise.
4222 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4225 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4226 aggregate type to get its real type before accessing it.
4228 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4230 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4231 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4232 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4233 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4234 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4235 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4236 * printcmd.c (info_address_command): Likewise.
4238 2018-05-29 Tom Tromey <tom@tromey.com>
4240 * windows-nat.c (handle_exception): Update fall-through comment.
4242 2018-05-29 Tom Tromey <tom@tromey.com>
4244 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4245 (struct program_space) <added_solibs>: Now a std::vector.
4246 * breakpoint.c (print_solib_event): Update.
4247 (check_status_catch_solib): Update.
4248 * progspace.c (clear_program_space_solib_cache): Update.
4249 * solib.c (update_solib_list): Update.
4251 2018-05-29 Tom Tromey <tom@tromey.com>
4253 * python/py-type.c (typy_richcompare): Update.
4254 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4255 * gdbtypes.h (types_deeply_equal): Return bool.
4256 (types_equal): Likewise.
4257 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4259 (check_types_equal): Change worklist to std::vector. Return
4261 (struct type_equality_entry): Add constructor.
4262 (compare_maybe_null_strings): Return bool.
4263 (check_types_worklist): Return bool. Change worklist to
4265 (types_deeply_equal): Use std::vector.
4266 (types_equal): Return bool.
4267 (compare_maybe_null_strings): Simplify.
4269 2018-05-29 Tom Tromey <tom@tromey.com>
4271 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4273 2018-05-29 Tom Tromey <tom@tromey.com>
4275 * objc-lang.h: Don't include cp-support.h.
4276 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4279 2018-05-27 Tom Tromey <tom@tromey.com>
4281 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4283 2018-05-25 Tom Tromey <tom@tromey.com>
4285 * value.c (value::location): Initialize.
4287 2018-05-25 Tom Tromey <tom@tromey.com>
4289 * dbxread.c (init_bincl_list): Remove.
4290 (bincl_list): Now a std::vector.
4291 (bincls_allocated, next_bincl): Remove.
4292 (free_bincl_list, do_free_bincl_list_cleanup)
4293 (make_cleanup_free_bincl_list): Remove.
4294 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4296 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4297 (struct header_file_location): Add constructor.
4298 (add_bincl_to_list): Remove.
4300 2018-05-25 Tom Tromey <tom@tromey.com>
4302 * tui/tui.c (tui_enable): Update.
4303 * mi/mi-interp.c (mi_interp::init): Update.
4304 * interps.h (class interp) <name>: New method.
4305 <m_name>: Rename from name.
4306 (~scoped_restore_interp): Update.
4307 * interps.c (interp::interp): Update.
4308 (interp_add, interp_set, interp_lookup_existing)
4309 (current_interp_named_p): Update.
4311 2018-05-25 Tom Tromey <tom@tromey.com>
4313 * interps.c (interp_name): Remove.
4314 * mi/mi-interp.c (mi_interp::init): Update.
4315 * interps.h (interp_name): Remove.
4316 (~scoped_restore_interp): Update.
4317 * tui/tui.c (tui_enable): Update.
4319 2018-05-25 Tom Tromey <tom@tromey.com>
4321 * utils.c (fputs_maybe_filtered): Update.
4322 * linespec.c (decode_line_full): Update.
4323 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4324 (mi_print_breakpoint_for_event, mi_solib_loaded)
4325 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4326 (mi_user_selected_context_changed): Update.
4327 * mi/mi-main.c (mi_execute_command): Update.
4328 * cli/cli-script.c (execute_control_command): Update.
4329 * python/python.c (execute_gdb_command): Update.
4330 * solib.c (info_sharedlibrary_command): Update.
4331 * interps.c (interp_ui_out): Remove.
4332 * interps.h (interp_ui_out): Remove.
4334 2018-05-25 Tom Tromey <tom@tromey.com>
4336 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4337 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4338 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4340 2018-05-25 Tom Tromey <tom@tromey.com>
4342 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4343 * interps.c (interp_exec): Use scoped_restore.
4345 2018-05-25 Tom Tromey <tom@tromey.com>
4347 * remote.c (remote_target::remote_file_get): Use
4349 (remote_target::remote_file_put): Likewise.
4351 2018-05-25 Tom Tromey <tom@tromey.com>
4353 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4355 (get_pe_section_index, add_pe_exported_sym): Update.
4356 (read_pe_exported_syms): Use gdb::def_vector.
4358 2018-05-25 Tom Tromey <tom@tromey.com>
4360 * frame.c (remove_prev_frame): Remove.
4361 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4363 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4365 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4367 * mips-linux-nat.c (supply_fpregset): Always call
4368 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4369 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4370 `mips_fill_fpregset'.
4371 * mips-linux-tdep.c (mips_supply_fpregset)
4372 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4373 (mips_fill_fpregset_wrapper): Remove functions.
4374 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4375 (mips_linux_fpregset): Remove variable.
4376 (mips_linux_iterate_over_regset_sections): Use
4377 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4378 (mips_linux_o32_sigframe_init): Remove comment.
4380 2018-05-25 Pedro Alves <palves@redhat.com>
4382 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4383 (struct readahead_cache, struct packet_reg, struct
4384 remote_arch_state, class remote_state): Move higher up in the
4386 (remote_target::m_remote_state): Now an object instead of a pointer.
4387 (remote_target::get_remote_state): Adjust.
4389 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4391 * stack.c (select_and_print_frame): Delete.
4392 (struct function_bounds): Move struct within function.
4393 (func_command): Most content moved into new function
4394 find_frame_for_function, use new function, print result, add
4396 (find_frame_for_function): New function, now returns a result.
4398 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4400 * stack.c (iterate_over_block_arg_vars): Fix comment.
4401 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4403 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4407 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4409 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4411 * frame.h (class scoped_restore_selected_frame): New class.
4412 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4413 of any exception, use scoped_restore_selected_frame to restore the
4416 2018-05-24 Pedro Alves <palves@redhat.com>
4418 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4421 2018-05-23 Tom Tromey <tom@tromey.com>
4423 * complaints.c (struct complaints): Remove.
4424 (symfile_complaint_book): Remove.
4425 (series): New global.
4426 (complaint_internal): Update.
4427 (clear_complaints): Update.
4429 2018-05-23 Tom Tromey <tom@tromey.com>
4431 * complaints.c (counters): New global.
4432 (struct complain): Remove.
4433 (struct complaints) <root>: Remove.
4434 (complaint_sentinel): Remove.
4435 (symfile_complaint_book): Update.
4436 (find_complaint) Remove.
4437 (complaint_internal, clear_complaints): Update.
4439 2018-05-23 Tom Tromey <tom@tromey.com>
4441 * complaints.c (struct complain) <file, line>: Remove.
4442 (find_complaint): Remove file, line parameters.
4443 (complaint_internal): Update.
4445 2018-05-23 Tom Tromey <tom@tromey.com>
4447 * complaints.c (vcomplaint): Remove.
4448 (complaint_internal) Merge in contents of vcomplaint.
4450 2018-05-23 Tom Tromey <tom@tromey.com>
4452 * complaints.c (struct complaints) <explanation>: Remove.
4453 (symfile_explanations): Remove.
4454 (symfile_complaint_book): Update.
4455 (vcomplaint): Update.
4456 (struct explanation): Remove.
4458 2018-05-23 Tom Tromey <tom@tromey.com>
4460 * complaints.c (symfile_complaints): Remove.
4461 (complaint_internal): Remove "complaints" parameter.
4462 (clear_complaints, vcomplaint): Remove "c" parameter.
4463 (get_complaints): Remove.
4464 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4465 (dwarf2_debug_line_missing_file_complaint)
4466 (dwarf2_debug_line_missing_end_sequence_complaint)
4467 (dwarf2_complex_location_expr_complaint)
4468 (dwarf2_const_value_length_mismatch_complaint)
4469 (dwarf2_section_buffer_overflow_complaint)
4470 (dwarf2_macro_malformed_definition_complaint)
4471 (dwarf2_invalid_attrib_class_complaint)
4472 (create_addrmap_from_index, dw2_symtab_iter_next)
4473 (dw2_expand_marked_cus)
4474 (dw2_debug_names_iterator::find_vec_in_debug_names)
4475 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4476 (create_debug_type_hash_table, init_cutu_and_read_dies)
4477 (partial_die_parent_scope, add_partial_enumeration)
4478 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4479 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4480 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4481 (create_cus_hash_table, create_dwp_hash_table)
4482 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4483 (dwarf2_rnglists_process, dwarf2_ranges_process)
4484 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4485 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4486 (handle_struct_member_die, process_structure_scope)
4487 (read_array_type, read_common_block, read_module_type)
4488 (read_tag_pointer_type, read_typedef, read_base_type)
4489 (read_subrange_type, load_partial_dies, partial_die_info::read)
4490 (partial_die_info::read, partial_die_info::read)
4491 (partial_die_info::read, read_checked_initial_length_and_offset)
4492 (dwarf2_string_attr, read_formatted_entries)
4493 (dwarf_decode_line_header)
4494 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4495 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4496 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4497 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4498 (get_signatured_type, get_DW_AT_signature_type)
4499 (decode_locdesc, file_file_name, consume_improper_spaces)
4500 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4501 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4502 (dwarf2_symbol_mark_computed, set_die_type)
4503 (read_attribute_value): Update.
4504 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4506 * dbxread.c (unknown_symtype_complaint)
4507 (lbrac_mismatch_complaint, repeated_header_complaint)
4508 (set_namestring, function_outside_compilation_unit_complaint)
4509 (read_dbx_symtab, process_one_symbol): Update.
4510 * gdbtypes.c (stub_noname_complaint): Update.
4511 * windows-nat.c (handle_unload_dll): Update.
4512 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4513 (decode_base_type): Update.
4514 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4515 (eb_complaint, record_include_begin, record_include_end)
4516 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4517 (process_xcoff_symbol, read_symbol)
4518 (function_outside_compilation_unit_complaint)
4519 (scan_xcoff_symtab): Update.
4520 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4521 * buildsym.c (finish_block_internal, make_blockvector)
4522 (end_symtab_get_static_block, augment_type_symtab): Update.
4523 * dtrace-probe.c (dtrace_process_dof)
4524 (dtrace_static_probe_ops::get_probes): Update.
4525 * complaints.h (struct complaint): Don't declare.
4526 (symfile_complaints): Remove.
4527 (complaint_internal): Remove "complaints" parameter.
4528 (complaint): Likewise.
4529 (clear_complaints): Likewise.
4530 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4531 (reread_symbols): Update.
4532 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4533 (dwarf2_frame_cache, decode_frame_entry): Update.
4534 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4535 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4536 (info_selectors_command): Update.
4537 * macrotab.c (macro_include, check_for_redefinition)
4538 (macro_undef): Update.
4539 * objfiles.c (filter_overlapping_sections): Update.
4540 * stabsread.c (invalid_cpp_abbrev_complaint)
4541 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4542 (define_symbol, error_type, read_type, rs6000_builtin_type)
4543 (stabs_method_name_from_physname, read_member_functions)
4544 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4545 (attach_fields_to_type, complain_about_struct_wipeout)
4546 (read_range_type, read_args, common_block_start)
4547 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4549 * mdebugread.c (index_complaint, unknown_ext_complaint)
4550 (basic_type_complaint, bad_tag_guess_complaint)
4551 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4552 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4553 (parse_procedure, parse_lines)
4554 (function_outside_compilation_unit_complaint)
4555 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4556 (bad_tag_guess_complaint, reg_value_complaint): Update.
4557 * cp-support.c (demangled_name_complaint): Update.
4558 * macroscope.c (sal_macro_scope): Update.
4559 * dwarf-index-write.c (class debug_names): Update.
4561 2018-05-23 Tom Tromey <tom@tromey.com>
4563 * complaints.c (clear_complaints): Remove "noisy" parameter.
4564 * complaints.h (clear_complaints): Update.
4565 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4566 (reread_symbols): Update.
4568 2018-05-23 Tom Tromey <tom@tromey.com>
4570 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4572 (vcomplaint, clear_complaints): Update.
4573 (symfile_explanations): Remove some messages.
4575 2018-05-23 Tom Tromey <tom@tromey.com>
4577 * complaints.c (internal_complaint): Remove.
4578 * complaints.h (internal_complaint): Remove.
4580 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4582 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4584 2018-05-22 Pedro Alves <palves@redhat.com>
4586 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4587 (remote_fileio_badfd, remote_fileio_return_errno)
4588 (remote_fileio_return_success, remote_fileio_func_open)
4589 (remote_fileio_func_open, remote_fileio_func_close)
4590 (remote_fileio_func_read, remote_fileio_func_write)
4591 (remote_fileio_func_lseek, remote_fileio_func_rename)
4592 (remote_fileio_func_unlink, remote_fileio_func_stat)
4593 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4594 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4595 remote_target parameter.
4596 (remote_fio_func_map) <func>: Add remote_target parameter.
4597 (do_remote_fileio_request, remote_fileio_request):
4598 * remote-fileio.h (remote_fileio_request):
4599 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4600 remote_target parameter.
4601 (remote_notif_process, handle_notification): Adjust to pass down
4603 (remote_notif_state_allocate): Add remote_target parameter. Save
4605 * remote-notif.h (struct remote_target): Forward declare.
4606 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4607 remote_target parameter.
4608 (struct remote_notif_state) <remote>: New field.
4609 (remote_notif_ack, remote_notif_parse): Add remote_target
4611 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4612 remote_target parameter.
4613 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4614 (threads_listing_context, rmt_thread_action, protocol_feature)
4615 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4616 (packet_result, struct threads_listing_context, remote_state):
4617 Move definitions and declarations higher up.
4618 (remote_target) <~remote_target>: Declare.
4619 (remote_download_command_source, remote_file_put, remote_file_get)
4620 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4621 (remote_hostio_pread_vFile, remote_hostio_send_command)
4622 (remote_hostio_set_filesystem, remote_hostio_open)
4623 (remote_hostio_close, remote_hostio_unlink, remote_state)
4624 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4625 (get_memory_write_packet_size, get_memory_read_packet_size)
4626 (append_pending_thread_resumptions, remote_detach_1)
4627 (append_resumption, remote_resume_with_vcont)
4628 (add_current_inferior_and_thread, wait_ns, wait_as)
4629 (process_stop_reply, remote_notice_new_inferior)
4630 (process_initial_stop_replies, remote_add_thread)
4631 (btrace_sync_conf, remote_btrace_maybe_reopen)
4632 (remove_new_fork_children, kill_new_fork_children)
4633 (discard_pending_stop_replies, stop_reply_queue_length)
4634 (check_pending_events_prevent_wildcard_vcont)
4635 (discard_pending_stop_replies_in_queue, stop_reply)
4636 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4637 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4638 (remote_interrupt_as, remote_interrupt_ns)
4639 (remote_get_noisy_reply, remote_query_attached)
4640 (remote_add_inferior, remote_current_thread, get_current_thread)
4641 (set_thread, set_general_thread, set_continue_thread)
4642 (set_general_process, write_ptid)
4643 (remote_unpack_thread_info_response, remote_get_threadinfo)
4644 (parse_threadlist_response, remote_get_threadlist)
4645 (remote_threadlist_iterator, remote_get_threads_with_ql)
4646 (remote_get_threads_with_qxfer)
4647 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4648 (get_offsets, remote_check_symbols, remote_supported_packet)
4649 (remote_query_supported, remote_packet_size)
4650 (remote_serial_quit_handler, remote_detach_pid)
4651 (remote_vcont_probe, remote_resume_with_hc)
4652 (send_interrupt_sequence, interrupt_query)
4653 (remote_notif_get_pending_events, fetch_register_using_p)
4654 (send_g_packet, process_g_packet, fetch_registers_using_g)
4655 (store_register_using_P, store_registers_using_G)
4656 (set_remote_traceframe, check_binary_download)
4657 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4658 (remote_xfer_live_readonly_partial, remote_read_bytes)
4659 (remote_send_printf, remote_flash_write, readchar)
4660 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4661 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4662 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4663 (extended_remote_disable_randomization, extended_remote_run)
4664 (send_environment_packet, extended_remote_environment_support)
4665 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4666 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4667 (packet_command): Now methods of ...
4668 (remote_target): ... this class.
4669 (m_remote_state) <remote_target>: New field.
4670 (struct remote_state) <stop_reply_queue,
4671 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4673 (remote_state::remote_state): Allocate stop_reply_queue.
4674 (remote_state): Delete global.
4675 (get_remote_state_raw): Delete.
4676 (remote_target::get_remote_state): Allocate m_remote_state on
4678 (get_current_remote_target): New.
4679 (remote_ops, extended_remote_ops): Delete.
4680 (wait_forever_enabled_p, remote_async_inferior_event_token):
4681 Delete, moved to struct remote_state.
4682 (remote_target::close): Delete self. Destruction bits split to
4684 (remote_target::~remote_target): ... this.
4685 (show_memory_packet_size): Adjust to use
4686 get_current_remote_target.
4687 (struct protocol_feature) <func>: Add remote_target parameter.
4688 All callers adjusted.
4689 (curr_quit_handler_target): New.
4690 (remote_serial_quit_handler): Reimplement.
4691 (remote_target::open_1): Adjust to use get_current_remote_target.
4692 Heap-allocate remote_target/extended_remote_target instances.
4693 (vcont_builder::vcont_builder): Add remote_target parameter, and
4694 save it in m_remote. All callers adjusted.
4695 (vcont_builder::m_remote): New field.
4696 (vcont_builder::restart, vcont_builder::flush)
4697 (vcont_builder::push_action): Use it.
4698 (remote_target::commit_resume): Use it.
4699 (struct queue_iter_param) <remote>: New field.
4700 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4701 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4702 (check_pending_event_prevents_wildcard_vcont_callback)
4703 (remote_target::check_pending_events_prevent_wildcard_vcont)
4704 (remote_target::discard_pending_stop_replies)
4705 (remote_target::discard_pending_stop_replies_in_queue)
4706 (remote_target::remote_notif_remove_queued_reply): Fill in
4708 (remote_notif_get_pending_events): New.
4709 (remote_target::readchar, remote_target::remote_serial_write):
4710 Save/restore curr_quit_handler_target.
4712 (kill_new_fork_children): Fill in 'remote' field.
4713 (packet_command): Use get_current_remote_target, defer to
4714 remote_target method of same name.
4715 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4716 parameter, and save it in m_remote. All callers adjusted.
4717 (scoped_remote_fd::release): Use m_remote.
4718 (scoped_remote_fd::m_remote): New field.
4719 (remote_file_put, remote_file_get, remote_file_delete): Use
4720 get_current_remote_target, defer to remote_target method of same
4722 (remote_btrace_reset): Add remote_state paremeter. Update all
4724 (remote_async_inferior_event_handler). Pass down 'data'.
4725 (remote_new_objfile): Use get_current_remote_target.
4726 (remote_target::vcont_r_supported): New.
4727 (set_range_stepping): Use get_current_remote_target and
4728 remote_target::vcont_r_supported.
4729 (_initialize_remote): Don't allocate 'remote_state' and
4730 'stop_reply_queue' globals.
4731 * remote.h (struct remote_target): Forward declare.
4732 (getpkt, putpkt, remote_notif_get_pending_events): Add
4733 'remote_target' parameter.
4735 2018-05-22 Pedro Alves <palves@redhat.com>
4737 * remote.c (vcont_builder): Now a class. Make all data members
4739 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4741 (vcont_builder_restart): Rename to ...
4742 (vcont_builder::restart): ... this.
4743 (vcont_builder_flush): Rename to ...
4744 (vcont_builder::flush): ... this.
4745 (vcont_builder_push_action): Rename to ...
4746 (vcont_builder::push_action): ... this.
4747 (remote_target::commit_resume): Adjust.
4749 2018-05-22 Pedro Alves <palves@redhat.com>
4751 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4752 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4753 (get_fixed_memory_packet_size): New.
4754 (get_memory_packet_size): Use it.
4755 (set_memory_packet_size): Don't override the config size with
4756 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4757 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4758 Don't refer to get_memory_packet_size if not connected to a remote
4759 target. Show "(default)" if configured size is 0.
4761 2018-05-22 Pedro Alves <palves@redhat.com>
4763 * remote.c (remote_target::mourn_inferior): Move
4764 discard_pending_stop_replies call here from ...
4765 (_initialize_remote): ... here.
4767 2018-05-22 Pedro Alves <palves@redhat.com>
4769 * remote.c (compare_section_command): Remove set_general_process
4772 2018-05-22 Pedro Alves <palves@redhat.com>
4774 * remote.c (struct packet_reg, struct remote_arch_state):
4775 Move higher up in the file.
4776 (remote_state) <m_arch_states>: Store remote_arch_state values
4777 instead of remote_arch_state pointers.
4778 (remote_state::get_remote_arch_state): Adjust.
4780 2018-05-22 Pedro Alves <palves@redhat.com>
4782 * remote.c: Include <unordered_map>.
4783 (remote_state): Now a class.
4784 (remote_state) <get_remote_arch_state>: Declare method.
4785 <get_remote_arch_state>: New field.
4786 (remote_arch_state) <remote_arch_state>: Declare ctor.
4787 <regs>: Now a unique_ptr.
4788 (remote_gdbarch_data_handle): Delete.
4789 (get_remote_arch_state): Delete.
4790 (remote_state::get_remote_arch_state): New.
4791 (get_remote_state): Adjust to call remote_state's
4792 get_remote_arch_state method.
4793 (init_remote_state): Delete, bits factored out to ...
4794 (remote_arch_state::remote_arch_state): ... this new method.
4795 (get_remote_packet_size, get_memory_packet_size)
4796 (process_g_packet, remote_target::fetch_registers)
4797 (remote_target::prepare_to_store, store_registers_using_G)
4798 (remote_target::store_registers, remote_target::get_trace_status):
4799 Adjust to call remote_state's method.
4800 (_initialize_remote): Remove reference to
4801 remote_gdbarch_data_handle.
4803 2018-05-22 Pedro Alves <palves@redhat.com>
4805 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4806 pread>: New method declarations.
4807 (remote_target::open_1): Adjust.
4808 (readahead_cache_invalidate): Rename to ...
4809 (readahead_cache::invalidate): ... this, and adjust to be a class
4811 (readahead_cache_invalidate_fd): Rename to ...
4812 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4814 (remote_hostio_pwrite): Adjust.
4815 (remote_hostio_pread_from_cache): Rename to ...
4816 (readahead_cache::pread): ... this, and adjust to be a class
4818 (remote_hostio_close): Adjust.
4820 2018-05-22 Pedro Alves <palves@redhat.com>
4822 * remote.c (remote_hostio_close_cleanup): Delete.
4823 (class scoped_remote_fd): New.
4824 (remote_file_put, remote_file_get): Use it.
4826 2018-05-22 Pedro Alves <palves@redhat.com>
4828 (struct vCont_action_support): Use bool and initialize all fields.
4829 (struct readahead_cache): Initialize all fields.
4830 (remote_state): Use bool and initialize all fields.
4831 (remote_state::remote_state, remote_state::~remote_state): New.
4832 (new_remote_state): Delete.
4833 (_initialize_remote): Use new to allocate remote_state.
4835 2018-05-22 Pedro Alves <palves@redhat.com>
4839 * c-exp.y: Include "c-support.h".
4840 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4841 of tolower. Use c_ident_is_alpha to scan names.
4842 * c-lang.c: Include "c-support.h".
4843 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4844 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4845 * c-support.h: New file, with bits factored out from ...
4846 * cp-name-parser.y: ... this file.
4847 Include "c-support.h".
4848 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4849 c-support.h and renamed.
4850 (symbol_end, yylex): Adjust.
4852 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4854 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4855 parameter type to CORE_ADDR.
4856 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4857 parameter type in declaration to CORE_ADDR.
4858 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4859 target_auxv_search to get AT_HWCAP and use the result to get the
4861 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4862 to CORE_ADDR. Remove the cast of the return value to unsigned
4863 long. Fix error predicate of target_auxv_search.
4864 (ppc_linux_nat_target::read_description): Change the type of the
4865 hwcap variable to CORE_ADDR.
4867 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4869 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4870 if the size of fpscr is larger than 32 bits.
4872 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4874 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4875 (ppc32_linux_vsxregmap): New global.
4876 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4877 regcache_supply_regset, and regcache_collect_regset.
4878 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4879 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4880 (fetch_vsx_register, store_vsx_register): Remove.
4881 (fetch_vsx_registers): Add regno parameter. Get regset using
4882 ppc_linux_vsxregset. Use regset to supply registers.
4883 (store_vsx_registers): Add regno parameter. Get regset using
4884 ppc_linux_vsxregset. Use regset to collect registers.
4885 (fetch_register): Call fetch_vsx_registers instead of
4887 (store_register): Call store_vsx_registers instead of
4889 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4890 new regno parameter.
4891 (store_ppc_registers): Call store_vsx_registers with -1 for the
4892 new regno parameter.
4893 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4894 (ppc_collect_vsxregset): Remove.
4896 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4898 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4900 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4901 for vector register offset fields.
4902 (ppc64_fbsd_reg_offsets): Likewise.
4903 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4904 to vector register offset fields.
4905 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4906 to vector register offset fields.
4907 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4908 vector register offset fields.
4909 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4910 initializers for vector register offset fields.
4911 (rs6000_aix64_reg_offsets): Likewise.
4912 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4913 (ppc_supply_vrregset): Remove.
4914 (ppc_collect_vrregset): Remove.
4915 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4916 (ppc_linux_vrregset) : New function.
4917 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4918 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4919 (ppc32_linux_vrregset): Remove.
4920 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4921 and use result instead of ppc32_linux_vrregset.
4922 (ppc32_linux_reg_offsets): Remove initializers for vector register
4924 (ppc64_linux_reg_offsets): Likewise.
4925 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4926 * ppc-linux-nat.c: Include regset.h.
4927 (gdb_vrregset_t): Adjust comment to account for little-endian
4929 (supply_vrregset, fill_vrregset): Remove.
4930 (fetch_altivec_register, store_altivec_register): Remove.
4931 (fetch_altivec_registers): Add regno parameter. Get regset using
4932 ppc_linux_vrregset. Use regset to supply registers.
4933 (store_altivec_registers): Add regno parameter. Get regset using
4934 ppc_linux_vrregset. Use regset to collect registers.
4935 (fetch_register): Call fetch_altivec_registers instead of
4936 fetch_altivec_register.
4937 (store_register): Call store_altivec_registers instead of
4938 store_altivec_register.
4939 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4940 the new regno parameter.
4941 (store_ppc_registers): Call store_altivec_registers with -1 for
4942 the new regno parameter.
4944 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4946 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4947 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4948 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4949 (gdb_vrregset_t): Change array type size to
4950 PPC_LINUX_SIZEOF_VRREGSET.
4951 (gdb_vsxregset_t): Change array type size to
4952 PPC_LINUX_SIZEOF_VSXREGSET.
4953 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4954 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4955 PPC_LINUX_SIZEOF_VSXREGSET.
4957 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4959 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4960 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4962 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4963 ppc_linux_target_wordsize with tid.
4964 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4966 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4967 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4968 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4969 tid parameter. Remove static specifier.
4970 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4971 (ppc_linux_target_wordsize): New declaration.
4973 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4975 * arch/ppc-linux-common.c: New file.
4976 * arch/ppc-linux-common.h: New file.
4977 * arch/ppc-linux-tdesc.h: New file.
4978 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4979 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4980 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4981 arch/ppc-linux-tdesc.h.
4982 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4983 arch/ppc-linux-tdesc.h.
4984 (ppc_linux_nat_target::read_description): Remove target
4985 description matching code. Fill a ppc_linux_features struct and
4986 call ppc_linux_match_description with it. Move comment about ISA
4987 2.05 to ppc-linux-common.c.
4988 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4989 arch/ppc-linux-tdesc.h.
4990 (ppc_linux_core_read_description): Remove target description
4991 matching code. Fill a ppc_linux_features struct and call
4992 ppc_linux_match_description with it.
4993 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4994 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4995 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4996 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4997 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4998 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4999 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5000 (tdesc_powerpc_e500l): Remove.
5002 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5004 * ada-lang.c (catch_assert_command): Pass empty string instead
5005 of NULL for excep_string argument.
5007 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5009 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5010 the width of the requested register exceeds the width of the
5013 2018-05-21 Tom Tromey <tom@tromey.com>
5015 * printcmd.c (output_command): Remove.
5016 (output_command_const): Rename to output_command.
5017 * valprint.h (output_command): Rename from output_command_const.
5018 * tracepoint.c (trace_dump_actions): Call output_command.
5020 2018-05-21 Tom Tromey <tom@tromey.com>
5022 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5023 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5024 * ada-lang.h (create_ada_exception_catchpoint): Update.
5025 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5027 (create_excep_cond_exprs, ~ada_catchpoint)
5028 (should_stop_exception, print_one_exception)
5029 (print_mention_exception, print_recreate_exception): Update.
5030 (ada_get_next_arg): Remove.
5031 (catch_ada_exception_command_split): Use std::string. Change type
5032 of "excep_string", "cond_string".
5033 (catch_ada_exception_command): Update.
5034 (create_ada_exception_catchpoint): Change type of excep_string.
5035 (ada_exception_sal): Remove excep_string parameter.
5036 (~ada_catchpoint): Remove.
5038 2018-05-21 Tom Tromey <tom@tromey.com>
5040 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5043 2018-05-21 Tom Tromey <tom@tromey.com>
5045 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5046 Return unique_xmalloc_ptr.
5047 (print_it_exception): Update.
5049 2018-05-21 Tom Tromey <tom@tromey.com>
5051 * tracepoint.c (trace_dump_actions): Use std::string.
5053 2018-05-21 Tom Tromey <tom@tromey.com>
5055 * symfile.c (reread_symbols): Use std::string for original_name.
5057 2018-05-21 Tom Tromey <tom@tromey.com>
5059 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5060 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5063 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5065 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5067 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5068 * objfiles.c (get_objfile_bfd_data): Allocate
5069 objfile_per_bfd_storage with obstack_new when allocating on
5072 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5074 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5076 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5077 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5078 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5079 (add_pending): Likewise.
5080 (parse_symbol): Likewise.
5081 (parse_partial_symbols): Likewise.
5082 (psymtab_to_symtab_1): Likewise.
5083 (new_psymtab): Likewise.
5084 (elfmdebug_build_psymtabs): Likewise.
5085 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5086 * objfiles.c (get_objfile_bfd_data): Likewise.
5087 (objfile_register_static_link): Likewise.
5088 * psymtab.c (allocate_psymtab): Likewise.
5089 * stabsread.c (read_member_functions): Likewise.
5090 * xcoffread.c (xcoff_end_psymtab): Likewise.
5092 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5094 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5095 compiler supports std::is_trivially_constructible.
5096 * common/poison.h: Include obstack.h.
5097 (IsMallocable): Define to is_trivially_constructible if the
5098 compiler supports it, define to true_type otherwise.
5102 (XOBNEWVEC): Redefine.
5103 * gdb_obstack.h (obstack_zalloc): New.
5104 (OBSTACK_ZALLOC): Redefine.
5105 (obstack_calloc): New.
5106 (OBSTACK_CALLOC): Redefine.
5108 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5109 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5111 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5112 obstack_calloc/obstack_zalloc.
5113 (gdbarch_obstack_zalloc): Remove.
5114 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5116 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5118 * stack.c (backtrace_command_1): Remove useless variable int i.
5120 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5122 * stack.c (print_frame_info): Fix comment.
5124 2018-05-18 Tom Tromey <tom@tromey.com>
5126 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5127 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5128 (~dwarf2_per_objfile): Update
5129 (dwarf2_get_dwz_file): Use new.
5130 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5133 2018-05-18 Tom Tromey <tom@tromey.com>
5135 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5137 * dwarf2read.c (struct dwp_file): Add constructor and
5139 (open_and_init_dwp_file): Return a unique_ptr.
5140 (dwarf2_per_objfile, create_dwp_hash_table)
5141 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5142 (lookup_dwo_unit_in_dwp): Update.
5143 (open_and_init_dwp_file, get_dwp_file): Update.
5145 2018-05-18 Tom Tromey <tom@tromey.com>
5147 * dwarf2read.c (dwarf2_per_objfile): Update.
5148 (struct mapped_index): Add initializers.
5149 (dwarf2_read_index): Use new.
5150 (dw2_symtab_iter_init): Update.
5151 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5154 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5156 * dwarf2read.c (mapped_index) <total_size>: Remove.
5158 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5160 * unittests/format_pieces-selftests.c (test_format_specifier):
5163 2018-05-18 Tom Tromey <tom@tromey.com>
5165 * c-typeprint.c (maybe_print_hole): New function.
5166 (c_print_type_struct_field_offset): Update.
5167 (c_type_print_base_struct_union): Call maybe_print_hole.
5169 2018-05-17 Keith Seitz <keiths@redhat.com>
5171 * breakpoint.c (build_bpstat_chain): New function, moved from
5173 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5174 If no stop chain is passed, call build_bpstat_chain to build it.
5175 * breakpoint.h (build_bpstat_chain): Declare.
5176 (bpstat_stop_status): Move documentation here from breakpoint.c.
5177 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5178 build the stop chain and pass it to skip_inline_frames.
5179 Pass this stop chain to bpstat_stop_status.
5180 * inline-frame.c: Include breakpoint.h.
5181 (stopped_by_user_bp_inline_frame): New function.
5182 (skip_inline_frames): Add parameter `stop_chain'.
5183 Move documention to inline-frame.h.
5184 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5185 whether the frame should be elided.
5186 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5187 Add moved documentation and update for new parameter.
5189 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5192 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5193 unittests/format_pieces-selftests.c.
5194 * common/format.h (format_piece) <operator==>: New.
5195 (format_pieces) <operator[]>: Remove.
5196 * common/format.c (format_pieces::format_pieces): Handle \e.
5197 * unittests/format_pieces-selftests.c: New.
5199 2018-05-17 Tom Tromey <tom@tromey.com>
5202 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5203 (dw2_instantiate_symtab): Add skip_partial parameter.
5204 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5205 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5206 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5207 (dw2_expand_symtabs_matching_one)
5208 (dw2_find_pc_sect_compunit_symtab)
5209 (dw2_debug_names_lookup_symbol)
5210 (dw2_debug_names_expand_symtabs_for_function): Update.
5211 (init_cutu_and_read_dies): Add skip_partial parameter.
5212 (process_psymtab_comp_unit, build_type_psymtabs_1)
5213 (process_skeletonless_type_unit, load_partial_comp_unit)
5214 (psymtab_to_symtab_1): Update.
5215 (load_full_comp_unit): Add skip_partial parameter.
5216 (process_imported_unit_die, dwarf2_read_addr_index)
5217 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5218 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5219 (read_signatured_type): Update.
5221 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5223 * value.c (release_value): Remove unused variable.
5224 (record_latest_value): Likewise.
5225 (access_value_history): Likewise.
5226 (preserve_values): Likewise.
5228 2018-05-17 Tom Tromey <tom@tromey.com>
5230 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5233 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5236 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5237 Also handle registers whose width is not a multiple of
5239 (linux_nat_trad_target::store_register): Likewise.
5241 2018-05-16 Tom Tromey <tom@tromey.com>
5243 * gdbcore.h (core_bfd): Redefine.
5244 * corelow.c (core_target::close): Update.
5245 (core_target_open): Update.
5246 * progspace.h (struct program_space) <cbfd>: Now a
5249 2018-05-16 Tom Tromey <tom@tromey.com>
5252 * symfile-add-flags.h (enum symfile_add_flags)
5253 <SYMFILE_NOT_FILENAME>: New constant.
5254 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5255 objfile name from BFD.
5256 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5257 * minidebug.c (find_separate_debug_file_in_section): Put
5258 ".gnu_debugdata" into BFD's file name.
5260 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5262 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5265 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5268 * aarch64-tdep.c (aarch64_analyze_prologue,
5269 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5270 Indicate not interested in errors.
5272 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5274 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5275 Supply the MIPS_ZERO_REGNUM register.
5277 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5279 * mips-tdep.c (mask_address_var): Make variable static.
5281 2018-05-14 Tom Tromey <tom@tromey.com>
5283 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5285 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5287 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5288 FXSAVE_ADDR for the mxcsr register.
5290 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5292 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5294 2018-05-11 Pedro Alves <palves@redhat.com>
5296 * corelow.c (core_target) <core_target>: No longer inline.
5297 Initialize m_core_gdbarch, m_core_vec and build the section table
5299 <~core_target>: New.
5300 <core_gdbarch, get_core_register_section>: New methods.
5301 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5302 factored out from ...
5303 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5305 (sniff_core_bfd): Add gdbarch parameter.
5306 (core_close): Delete, merged into ...
5307 (core_target::close): ... here. Delete self.
5308 (core_close_cleanup): Delete.
5309 (core_target_open): Allocate a core_target on the heap. Use a
5310 unique_ptr instead of a cleanup. Bits moved into the core_target
5311 ctor. Adjust to use core_target methods instead of globals.
5312 (get_core_register_section): Rename to ...
5313 (core_target::get_core_register_section): ... this and adjust.
5314 (struct get_core_registers_cb_data): New.
5315 (get_core_registers_cb): Use it. Use bool.
5316 (core_target::fetch_registers, core_target::files_info)
5317 (core_target::xfer_partial, core_target::read_description)
5318 (core_target::pid_to, core_target::thread_name): Adjust to
5319 reference class fields instead of globals.
5320 * target.h (struct target_ops_deleter, target_ops_up): New.
5322 2018-05-11 Pedro Alves <palves@redhat.com>
5324 * corefile.c (core_file_command): Move to corelow.c.
5325 * corelow.c (the_core_target): Delete.
5326 (core_file_command): Moved from corefile.c. Check exec_bfd
5327 instead of the_core_target. Use target_detach instead of calling
5328 into the_core_target directly.
5329 (maybe_say_no_core_file_now): New.
5330 (core_target::detach): Use it.
5331 (_initialize_corelow): Remove references to the_core_target.
5332 * gdbcore.h (the_core_target): Delete.
5334 2018-05-11 Tom Tromey <tromey@redhat.com>
5335 Pedro Alves <palves@redhat.com>
5337 * corefile.c (core_bfd): Remove.
5338 * gdbcore.h (core_bfd): Now a macro.
5339 * progspace.h (struct program_space) <cbfd>: New field.
5341 2018-05-11 Tom Tromey <tom@tromey.com>
5343 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5346 2018-05-10 Tom Tromey <tom@tromey.com>
5348 * configure: Rebuild.
5349 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5351 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5354 * regformats/regdat.sh: Adjust script, following the addition
5355 of the new expedite_regs parameter to init_target_desc.
5357 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5360 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5361 set_gdbarch_significant_addr_bit.
5362 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5363 set_gdbarch_significant_addr_bit.
5364 * utils.c (address_significant): Update to sign extend addr.
5366 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5368 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5369 (xtensa_linux_init_abi): Limit tdep->num_regs by
5370 tdep->num_nopriv_regs.
5371 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5372 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5375 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5377 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5379 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5381 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5382 (I387_MXCSR_INIT_VAL): New constant.
5383 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5384 buffer if it was supplied by the inferior.
5385 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5386 (i387_xsave_get_clear_bv): New function.
5387 (i387_supply_xsave): Only read x87 control registers from the
5388 xsave buffer if the feature is enabled, and the state will have
5389 been written, otherwise, provide a suitable default.
5390 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5391 including x87 control registers. Update control registers if they
5392 have changed from the default value, and mark features as enabled
5394 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5396 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5398 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5400 2018-05-07 Tom Tromey <tom@tromey.com>
5402 * configure: Rebuild.
5403 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5405 2018-05-07 Tom Tromey <tom@tromey.com>
5408 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5409 bit. Use correct value for VDIV.
5411 2018-05-04 Tom Tromey <tom@tromey.com>
5413 * configure: Rebuild.
5414 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5416 2018-05-04 Tom Tromey <tom@tromey.com>
5418 * linux-record.c (record_linux_system_call) <case
5419 RECORD_SYS_RECVFROM>: Add "break".
5421 2018-05-04 Tom Tromey <tom@tromey.com>
5423 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5424 Add missing "break".
5425 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5426 Add missing "break".
5428 2018-05-04 Tom Tromey <tom@tromey.com>
5430 * rs6000-tdep.c (ppc_process_record_op4)
5431 (ppc_process_record_op63): Add fall-through comment.
5433 2018-05-04 Tom Tromey <tom@tromey.com>
5435 * i386-tdep.c (i386_process_record): Add fall-through comment.
5437 2018-05-04 Tom Tromey <tom@tromey.com>
5439 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5442 2018-05-04 Tom Tromey <tom@tromey.com>
5444 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5445 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5446 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5448 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5450 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5453 2018-05-04 Tom Tromey <tom@tromey.com>
5455 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5457 2018-05-04 Tom Tromey <tom@tromey.com>
5459 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5460 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5461 * symfile.c (section_is_mapped): Fix fall-through comment.
5462 * stabsread.c (define_symbol, read_member_functions): Fix
5463 fall-through comment.
5464 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5466 * remote.c (remote_wait_as): Fix fall-through comment.
5467 * p-exp.y (yylex): Fix fall-through comment.
5468 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5470 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5471 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5472 * jv-exp.y (yylex): Fix fall-through comment.
5473 * go-exp.y (lex_one_token): Fix fall-through comment.
5474 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5475 fall-through comment.
5476 * f-exp.y (yylex): Fix fall-through comment.
5477 * dwarf2read.c (process_die): Fix fall-through comments.
5478 * dbxread.c (process_one_symbol): Fix fall-through comment.
5479 * d-exp.y (lex_one_token): Fix fall-through comment.
5480 * cp-name-parser.y (yylex): Fix fall-through comment.
5481 * coffread.c (coff_symtab_read): Fix fall-through comment.
5482 * c-exp.y (lex_one_token): Fix fall-through comment.
5483 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5485 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5488 2018-05-04 Tom Tromey <tom@tromey.com>
5491 * NEWS: Mention gdb.execute change.
5492 * gdbcmd.h (execute_control_command): Don't declare.
5493 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5494 execute_control_commands, execute_control_commands_to_string.
5495 * cli/cli-script.h (execute_control_commands)
5496 (execute_control_commands_to_string): Declare.
5497 (execute_control_command): Add from_tty parameter.
5498 * cli/cli-script.c (execute_control_commands)
5499 (execute_control_commands_to_string): New functions.
5500 (execute_user_command): Use execute_control_commands.
5501 (execute_control_command_1): Add "from_tty" parameter. Update.
5502 (execute_control_command): Likewise.
5504 2018-05-04 Tom Tromey <tom@tromey.com>
5507 * NEWS: Mention that breakpoint commands are writable.
5508 * python/py-breakpoint.c (bppy_set_commands): New function.
5509 (breakpoint_object_getset) <"commands">: Use it.
5511 2018-05-04 Tom Tromey <tom@tromey.com>
5513 * tracepoint.c (actions_command): Update.
5514 * mi/mi-cmd-break.c (mi_command_line_array)
5515 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5516 (mi_read_next_line): Remove.
5517 (mi_cmd_break_commands): Update.
5518 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5520 * cli/cli-script.c (get_command_line): Update.
5521 (process_next_line): Use function_view. Constify.
5522 (recurse_read_control_structure, read_command_lines)
5523 (read_command_lines_1): Change argument types to function_view.
5524 (do_define_command, document_command): Update.
5525 * breakpoint.h (check_tracepoint_command): Don't declare.
5526 * breakpoint.c (check_tracepoint_command): Remove.
5527 (commands_command_1, create_tracepoint_from_upload): Update.
5529 2018-05-04 Tom Tromey <tom@tromey.com>
5532 * cli/cli-script.h (enum command_control_type) <define_control>:
5534 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5535 (build_command_line, execute_control_command_1)
5536 (process_next_line): Likewise.
5537 (do_define_command): New function, extracted from define_command.
5538 (define_command): Use it.
5540 2018-05-04 Tom Tromey <tom@tromey.com>
5542 * tracepoint.c (actions_command): Update.
5543 * cli/cli-script.h (read_command_lines): Update.
5544 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5545 (MAX_TMPBUF): Remove define.
5546 (define_command): Use string_printf.
5547 (document_command): Likewise.
5548 * breakpoint.c (commands_command_1): Update.
5550 2018-05-04 Tom Tromey <tom@tromey.com>
5552 * top.c (execute_command): Update.
5553 * cli/cli-script.h (print_command_lines): Now varargs.
5554 * cli/cli-script.c (print_command_lines): Now varargs.
5555 (execute_control_command_1) <case while_control, case if_control>:
5558 2018-05-04 Tom Tromey <tom@tromey.com>
5560 * tracepoint.c (all_tracepoint_actions): Rename from
5561 all_tracepoint_actions_and_cleanup. Change return type.
5562 (actions_command, encode_actions_1, encode_actions)
5563 (trace_dump_actions, tdump_command): Update.
5564 * remote.c (remote_download_command_source): Update.
5565 * python/python.c (gdbpy_eval_from_control_command)
5566 (python_command, python_interactive_command): Update.
5567 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5568 * guile/guile.c (guile_command)
5569 (gdbscm_eval_from_control_command, guile_command): Update.
5570 * compile/compile.c (compile_code_command)
5571 (compile_print_command, compile_to_object): Update.
5572 * cli/cli-script.h (struct command_lines_deleter): New.
5573 (counted_command_line): New typedef.
5574 (struct command_line): Add constructor, destructor.
5575 <body_list>: Remove.
5576 <body_list_0, body_list_1>: New members.
5577 (command_line_up): Remove typedef.
5578 (read_command_lines, read_command_lines_1, get_command_line):
5580 (copy_command_lines): Don't declare.
5581 * cli/cli-script.c (build_command_line): Use "new".
5582 (get_command_line): Return counted_command_line.
5583 (print_command_lines, execute_user_command)
5584 (execute_control_command_1, while_command, if_command): Update.
5585 (realloc_body_list): Remove.
5586 (process_next_line, recurse_read_control_structure): Update.
5587 (read_command_lines, read_command_lines_1): Return counted_command_line.
5588 (free_command_lines): Use "delete".
5589 (copy_command_lines): Remove.
5590 (define_command, document_command, show_user_1): Update.
5591 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5592 a counted_command_line.
5593 * breakpoint.h (counted_command_line): Remove typedef.
5594 (breakpoint_set_commands): Update.
5595 * breakpoint.c (check_no_tracepoint_commands)
5596 (validate_commands_for_breakpoint): Update.
5597 (breakpoint_set_commands): Change commands to be a
5598 counted_command_line.
5599 (commands_command_1, update_dprintf_command_list)
5600 (create_tracepoint_from_upload): Update.
5602 2018-05-04 Tom Tromey <tom@tromey.com>
5604 * cli/cli-decode.h (cmd_list_element): New constructor.
5605 (~cmd_list_element): New destructor.
5606 (struct cmd_list_element): Add initializers.
5607 * cli/cli-decode.c (do_add_cmd): Use "new".
5608 (delete_cmd): Use "delete".
5610 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5611 Pedro Alves <palves@redhat.com>
5613 PR breakpoints/19806 and support for PR external/20207.
5614 * NEWS: Mention Aarch64 watchpoint improvements.
5615 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5616 watchpoints and PR external/20207 watchpoints.
5617 * nat/aarch64-linux-hw-point.c
5618 (kernel_supports_any_contiguous_range): New.
5619 (aarch64_watchpoint_offset): New.
5620 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5621 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5622 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5623 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5624 next_addr_orig_p. Support PR external/20207 watchpoints.
5625 (aarch64_downgrade_regs): New.
5626 (aarch64_dr_state_insert_one_point): New parameters offset and
5628 (aarch64_dr_state_remove_one_point): Likewise.
5629 (aarch64_handle_breakpoint): Update caller.
5630 (aarch64_handle_aligned_watchpoint): Likewise.
5631 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5633 (aarch64_linux_set_debug_regs): Remove const from state. Call
5634 aarch64_downgrade_regs.
5635 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5636 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5637 (DR_CONTROL_MASK): ... this.
5638 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5639 (unsigned int aarch64_watchpoint_offset): New prototype.
5640 (aarch64_linux_set_debug_regs): Remove const from state.
5641 * utils.c (align_up, align_down): Move to ...
5642 * common/common-utils.c (align_up, align_down): ... here.
5643 * utils.h (align_up, align_down): Move to ...
5644 * common/common-utils.h (align_up, align_down): ... here.
5646 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5648 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5649 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5650 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5651 Re-implement to match the ABI as summarized in GCC's
5652 gcc/config/sparc/sparc.c. All callers updated.
5653 (sparc32_store_arguments): Remove assertion.
5655 2018-05-04 Tom Tromey <tom@tromey.com>
5657 * printcmd.c: Don't include tui.h.
5658 (decode_format): Use skip_spaces.
5660 2018-05-04 Tom Tromey <tom@tromey.com>
5663 * printcmd.c (last_count): New global.
5664 (x_command): Use saved count when repeating.
5666 2018-05-04 Tom Tromey <tom@tromey.com>
5668 * nto-procfs.c (do_closedir_cleanup): Remove.
5669 (procfs_pidlist): Use gdb_dir_up.
5670 * procfs.c (do_closedir_cleanup): Remove.
5671 (proc_update_threads): Use gdb_dir_up.
5672 * common/filestuff.h (struct gdb_dir_deleter): New.
5673 (gdb_dir_up): New typedef.
5675 2018-05-04 Tom Tromey <tom@tromey.com>
5677 * ada-lang.c (print_mention_exception): Use std::string.
5679 2018-05-04 Tom Tromey <tom@tromey.com>
5681 * ada-lang.c (create_excep_cond_exprs): Update.
5682 (ada_exception_catchpoint_cond_string): Use std::string.
5684 2018-05-04 Tom Tromey <tom@tromey.com>
5686 * ada-lang.c (xget_renaming_scope): Return std::string.
5687 (old_renaming_is_invisible): Update.
5689 2018-05-04 Tom Tromey <tom@tromey.com>
5691 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5692 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5694 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5696 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5698 2018-05-04 Tom Tromey <tom@tromey.com>
5700 * remote.c (remote_query_supported_append): Change type.
5701 (remote_check_symbols): Update.
5703 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5706 * configure.ac: Prepend libpython.
5707 * python/python-config.py: Likewise.
5708 * configure: Regenerate.
5710 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5712 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5714 2018-05-03 Pedro Alves <palves@redhat.com>
5717 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5718 override. Write 'true' instead of '1'.
5719 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5722 2018-05-02 Pedro Alves <palves@redhat.com>
5724 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5725 add_inf_child_target.
5726 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5727 add_inf_child_target.
5728 * aix-thread.c (aix_thread_target_info): New.
5729 (aix_thread_target) <shortname, longname, doc>: Delete.
5731 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5732 add_inf_child_target.
5733 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5734 add_inf_child_target.
5735 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5736 add_inf_child_target.
5737 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5738 add_inf_child_target.
5739 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5740 add_inf_child_target.
5741 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5742 add_inf_child_target.
5743 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5744 add_inf_child_target.
5745 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5746 add_inf_child_target.
5747 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5748 add_inf_child_target.
5749 * bfd-target.c (target_bfd_target_info): New.
5750 (target_bfd) <shortname, longname, doc>: Delete.
5752 * bsd-kvm.c (bsd_kvm_target_info): New.
5753 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5755 (bsd_kvm_target::open): Rename to ...
5756 (bsd_kvm_target_open): ... this. Adjust.
5757 * bsd-uthread.c (bsd_uthread_target_info): New.
5758 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5760 * corefile.c (core_file_command): Adjust.
5761 * corelow.c (core_target_info): New.
5762 (core_target) <shortname, longname, doc>: Delete.
5764 (core_target::open): Rename to ...
5765 (core_target_open): ... this. Adjust.
5766 * ctf.c (ctf_target_info): New.
5767 (ctf_target) <shortname, longname, doc>: Delete.
5769 (ctf_target::open): Rename to ...
5770 (ctf_target_open): ... this.
5771 (_initialize_ctf): Adjust.
5772 * exec.c (exec_target_info): New.
5773 (exec_target) <shortname, longname, doc>: Delete.
5775 (exec_target::open): Rename to ...
5776 (exec_target_open): ... this.
5777 * gdbcore.h (core_target_open): Declare.
5778 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5779 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5780 add_inf_child_target.
5781 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5782 add_inf_child_target.
5783 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5784 add_inf_child_target.
5785 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5786 add_inf_child_target.
5787 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5788 add_inf_child_target.
5789 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5790 add_inf_child_target.
5791 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5792 add_inf_child_target.
5793 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5794 add_inf_child_target.
5795 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5796 add_inf_child_target.
5797 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5798 add_inf_child_target.
5799 * inf-child.c (inf_child_target_info): New.
5800 (inf_child_target::info): New.
5801 (inf_child_open_target): Remove 'target' parameter. Use
5802 get_native_target instead.
5803 (inf_child_target::open): Delete.
5804 (add_inf_child_target): New.
5805 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5808 (add_inf_child_target): Declare.
5809 (inf_child_open_target): Declare.
5810 * linux-thread-db.c (thread_db_target_info): New.
5811 (thread_db_target) <shortname, longname, doc>: Delete.
5813 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5814 add_inf_child_target.
5815 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5816 add_inf_child_target.
5817 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5818 add_inf_child_target.
5819 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5820 add_inf_child_target.
5821 * make-target-delegates (print_class): Adjust.
5822 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5823 add_inf_child_target.
5824 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5825 add_inf_child_target.
5826 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5827 add_inf_child_target.
5828 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5829 add_inf_child_target.
5830 * nto-procfs.c (nto_native_target_info): New.
5831 (nto_procfs_target_native) <shortname, longname, doc>:
5834 (nto_procfs_target_info): New.
5835 (nto_procfs_target_procfs) <shortname, longname, doc>:
5838 (init_procfs_targets): Adjust.
5839 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5840 add_inf_child_target.
5841 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5842 add_inf_child_target.
5843 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5844 add_inf_child_target.
5845 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5846 add_inf_child_target.
5847 * ravenscar-thread.c (ravenscar_target_info): New.
5848 (ravenscar_thread_target) <shortname, longname, doc>:
5851 * record-btrace.c (record_btrace_target_info):
5852 (record_btrace_target) <shortname, longname, doc>: Delete.
5854 (record_btrace_target::open): Rename to ...
5855 (record_btrace_target_open): ... this. Adjust.
5856 * record-full.c (record_longname, record_doc): New.
5857 (record_full_base_target) <shortname, longname, doc>: Delete.
5859 (record_full_target_info): New.
5860 (record_full_target): <shortname>: Delete.
5862 (record_full_core_open_1, record_full_open_1): Update comments.
5863 (record_full_base_target::open): Rename to ...
5864 (record_full_open): ... this.
5865 (cmd_record_full_restore): Update.
5866 (_initialize_record_full): Update.
5867 * remote-sim.c (remote_sim_target_info): New.
5868 (gdbsim_target) <shortname, longname, doc>: Delete.
5870 (gdbsim_target::open): Rename to ...
5871 (gdbsim_target_open): ... this.
5872 (_initialize_remote_sim): Adjust.
5873 * remote.c (remote_doc): New.
5874 (remote_target_info): New.
5875 (remote_target) <shortname, longname, doc>: Delete.
5877 (extended_remote_target_info): New.
5878 (extended_remote_target) <shortname, longname, doc>: Delete.
5880 (remote_target::open_1): Make static. Adjust.
5881 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5882 * s390-linux-nat.c (_initialize_s390_nat): Use
5883 add_inf_child_target.
5884 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5885 add_inf_child_target.
5886 * sol-thread.c (thread_db_target_info): New.
5887 (sol_thread_target) <shortname, longname, doc>: Delete.
5889 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5890 add_inf_child_target.
5891 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5892 add_inf_child_target.
5893 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5894 add_inf_child_target.
5895 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5896 add_inf_child_target.
5897 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5898 add_inf_child_target.
5899 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5900 add_inf_child_target.
5901 * spu-linux-nat.c (_initialize_spu_nat): Use
5902 add_inf_child_target.
5903 * spu-multiarch.c (spu_multiarch_target_info): New.
5904 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5906 * target-delegates.c: Regenerate.
5907 * target.c: Include <unordered_map>.
5908 (target_ops_p): Delete.
5909 (DEF_VEC_P(target_ops_p)): Delete.
5910 (target_factories): New.
5911 (test_target_info): New.
5912 (test_target_ops::info): New.
5913 (open_target): Adjust to use target_factories.
5914 (add_target_with_completer): Rename to ...
5915 (add_target): ... this. Change prototype. Register target_info
5916 and open callback in target_factories. Register target_info in
5917 command context instead of target_ops.
5918 (add_target): Delete old implementation.
5919 (add_deprecated_target_alias): Change prototype. Adjust.
5920 (the_native_target): New.
5921 (set_native_target, get_native_target): New.
5922 (find_default_run_target): Use the_native_target.
5923 (find_attach_target, find_run_target): Simplify.
5924 (target_ops::open): Delete.
5925 (dummy_target_info): New.
5926 (dummy_target::shortname, dummy_target::longname)
5927 (dummy_target::doc): Delete.
5928 (dummy_target::info): New.
5929 (debug_target::shortname, debug_target::longname)
5930 (debug_target::doc): Delete.
5931 (debug_target::info): New.
5932 * target.h (struct target_info): New.
5933 (target_ops::~target_ops): Add comment.
5934 (target_ops::info): New.
5935 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5936 longer virtual. Implement in terms of target_info.
5937 (set_native_target, get_native_target): Declare.
5938 (target_open_ftype): New.
5939 (add_target, add_target_with_completer)
5940 (add_deprecated_target_alias): Change prototype.
5941 (test_target) <shortname, longname, doc>: Delete.
5943 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5944 add_inf_child_target.
5945 * tracefile-tfile.c (tfile_target_info): New.
5946 (tfile_target) <shortname, longname, doc>: Delete.
5948 (tfile_target::open): Rename to ...
5949 (tfile_target_open): ... this.
5950 (_initialize_tracefile_tfile): Adjust.
5951 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5952 add_inf_child_target.
5953 * windows-nat.c (_initialize_windows_nat): Use
5954 add_inf_child_target.
5955 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5956 add_inf_child_target.
5958 2018-05-02 Pedro Alves <palves@redhat.com>
5960 * linux-nat.h (linux_nat_target) <low_new_thread,
5961 low_delete_thread, low_new_fork, low_forget_process,
5962 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5963 New virtual methods.
5964 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5965 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5966 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5967 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5968 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5970 * linux-fork.c (delete_fork): Adjust to call low method.
5971 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5972 (linux_nat_new_fork, linux_nat_forget_process_hook)
5973 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5974 (linux_nat_status_is_event):
5975 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5976 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5978 (sigtrap_is_event): Rename to ...
5979 (linux_nat_target::low_status_is_event): ... this.
5980 (linux_nat_set_status_is_event): Delete.
5981 (save_stop_reason, linux_nat_wait_1)
5982 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5984 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5985 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5986 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5987 (linux_nat_set_prepare_to_resume): Delete.
5988 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5989 low virtual methods.
5990 * amd64-linux-nat.c: Likewise.
5991 * arm-linux-nat.c: Likewise.
5992 * i386-linux-nat.c: Likewise.
5993 * ia64-linux-nat.c: Likewise.
5994 * mips-linux-nat.c: Likewise.
5995 * ppc-linux-nat.c: Likewise.
5996 * s390-linux-nat.c: Likewise.
5997 * sparc64-linux-nat.c: Likewise.
5998 * x86-linux-nat.c: Likewise.
5999 * x86-linux-nat.h: Include "nat/x86-linux.h".
6000 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6001 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6004 2018-05-02 Pedro Alves <palves@redhat.com>
6006 * target.h (target_ops)
6007 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6008 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6009 stopped_by_watchpoint, have_continuable_watchpoint,
6010 stopped_data_address, watchpoint_addr_within_range,
6011 can_accel_watchpoint_condition, can_run, thread_alive,
6012 has_all_memory, has_memory, has_stack, has_registers,
6013 has_execution, can_async_p, is_async_p, supports_non_stop,
6014 always_non_stop_p, can_execute_reverse, supports_multi_process,
6015 supports_enable_disable_tracepoint,
6016 supports_disable_randomization, supports_string_tracing,
6017 supports_evaluation_of_breakpoint_conditions,
6018 can_run_breakpoint_commands, filesystem_is_local,
6019 can_download_tracepoint, get_trace_state_variable_value,
6020 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6021 record_is_replaying, record_will_replay,
6022 augmented_libraries_svr4_read>: Adjust to return bool.
6023 * aarch64-linux-nat.c: All implementations adjusted.
6024 * aix-thread.c: All implementations adjusted.
6025 * arm-linux-nat.c: All implementations adjusted.
6026 * breakpoint.c: All implementations adjusted.
6027 * bsd-kvm.c: All implementations adjusted.
6028 * bsd-uthread.c: All implementations adjusted.
6029 * corelow.c: All implementations adjusted.
6030 * ctf.c: All implementations adjusted.
6031 * darwin-nat.c: All implementations adjusted.
6032 * darwin-nat.h: All implementations adjusted.
6033 * exec.c: All implementations adjusted.
6034 * fbsd-nat.c: All implementations adjusted.
6035 * fbsd-nat.h: All implementations adjusted.
6036 * gnu-nat.c: All implementations adjusted.
6037 * gnu-nat.h: All implementations adjusted.
6038 * go32-nat.c: All implementations adjusted.
6039 * ia64-linux-nat.c: All implementations adjusted.
6040 * inf-child.c: All implementations adjusted.
6041 * inf-child.h: All implementations adjusted.
6042 * inf-ptrace.c: All implementations adjusted.
6043 * inf-ptrace.h: All implementations adjusted.
6044 * linux-nat.c: All implementations adjusted.
6045 * linux-nat.h: All implementations adjusted.
6046 * mips-linux-nat.c: All implementations adjusted.
6047 * nto-procfs.c: All implementations adjusted.
6048 * ppc-linux-nat.c: All implementations adjusted.
6049 * procfs.c: All implementations adjusted.
6050 * ravenscar-thread.c: All implementations adjusted.
6051 * record-btrace.c: All implementations adjusted.
6052 * record-full.c: All implementations adjusted.
6053 * remote-sim.c: All implementations adjusted.
6054 * remote.c: All implementations adjusted.
6055 * s390-linux-nat.c: All implementations adjusted.
6056 * sol-thread.c: All implementations adjusted.
6057 * spu-multiarch.c: All implementations adjusted.
6058 * target-delegates.c: All implementations adjusted.
6059 * target.c: All implementations adjusted.
6060 * target.h: All implementations adjusted.
6061 * tracefile-tfile.c: All implementations adjusted.
6062 * tracefile.c: All implementations adjusted.
6063 * tracefile.h: All implementations adjusted.
6064 * windows-nat.c: All implementations adjusted.
6065 * x86-linux-nat.h: All implementations adjusted.
6066 * x86-nat.h: All implementations adjusted.
6068 2018-05-02 Pedro Alves <palves@redhat.com>
6070 * make-target-delegates (scan_target_h): Don't trim lines here.
6071 Replace sequences of tabs and/or whitespace with a single
6073 (top level, parsing methods): Trim each line before processing it
6076 2018-05-02 Pedro Alves <palves@redhat.com>
6077 John Baldwin <jhb@freebsd.org>
6079 * target.h (enum strata) <debug_stratum>: New.
6080 (struct target_ops) <all delegation methods>: Replace by C++
6081 virtual methods, and drop "to_" prefix. All references updated
6083 <to_shortname, to_longname, to_doc, to_data,
6084 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6085 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6086 virtual methods. All references updated throughout.
6087 <can_attach, supports_terminal_ours, can_create_inferior,
6088 get_thread_control_capabilities, attach_no_wait>: New
6090 <insert_breakpoint, remove_breakpoint>: Now
6091 TARGET_DEFAULT_NORETURN methods.
6092 <info_proc>: Now returns bool.
6094 (OPS_MAGIC): Delete.
6095 (current_target): Delete. All references replaced by references
6097 (target_stack): ... this. New.
6098 (target_shortname, target_longname): Adjust.
6099 (target_can_run): Now a function declaration.
6100 (default_child_has_all_memory, default_child_has_memory)
6101 (default_child_has_stack, default_child_has_registers)
6102 (default_child_has_execution): Remove target_ops parameter.
6103 (complete_target_initialization): Delete.
6104 (memory_breakpoint_target): New template class.
6105 (test_target_ops): Refactor as a C++ class with virtual methods.
6106 * make-target-delegates (NAME_PART): Tighten.
6107 (POINTER_PART, CP_SYMBOL): New.
6108 (SIMPLE_RETURN_PART): Reimplement.
6109 (VEC_RETURN_PART): Expect less.
6110 (RETURN_PART, VIRTUAL_PART): New.
6111 (METHOD): Adjust to C++ virtual methods.
6112 (scan_target_h): Remove reference to C99.
6113 (dname): Output "target_ops::" prefix.
6114 (write_function_header): Adjust to output a C++ class method.
6115 (write_declaration): New.
6116 (write_delegator): Adjust to output a C++ class method.
6117 (tdname): Output "dummy_target::" prefix.
6118 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6120 (tdefault_names, debug_names): Delete.
6121 (return_types, tdefaults, styles, argtypes_array): New.
6122 (top level): All methods are delegators.
6124 (top level): Print dummy_target and debug_target classes.
6125 * target-delegates.c: Regenerate.
6126 * target-debug.h (target_debug_print_enum_info_proc_what)
6127 (target_debug_print_thread_control_capabilities)
6128 (target_debug_print_thread_info_p): New.
6129 * target.c (dummy_target): Delete.
6130 (the_dummy_target, the_debug_target): New.
6131 (target_stack): Now extern.
6132 (set_targetdebug): Push/unpush debug target.
6133 (default_child_has_all_memory, default_child_has_memory)
6134 (default_child_has_stack, default_child_has_registers)
6135 (default_child_has_execution): Remove target_ops parameter.
6136 (complete_target_initialization): Delete.
6137 (add_target_with_completer): No longer call
6138 complete_target_initialization.
6139 (target_supports_terminal_ours): Use regular delegation.
6140 (update_current_target): Delete.
6141 (push_target): No longer check magic number. Don't call
6142 update_current_target.
6143 (unpush_target): Don't call update_current_target.
6144 (target_is_pushed): No longer check magic number.
6145 (target_require_runnable): Skip for all stratums over
6147 (target_ops::info_proc): New.
6148 (target_info_proc): Use find_target_at and
6149 find_default_run_target.
6150 (target_supports_disable_randomization): Use regular delegation.
6151 (target_get_osdata): Use find_target_at.
6152 (target_ops::open, target_ops::close, target_ops::can_attach)
6153 (target_ops::attach, target_ops::can_create_inferior)
6154 (target_ops::create_inferior, target_ops::can_run)
6155 (target_can_run): New.
6156 (default_fileio_target): Use regular delegation.
6157 (target_ops::fileio_open, target_ops::fileio_pwrite)
6158 (target_ops::fileio_pread, target_ops::fileio_fstat)
6159 (target_ops::fileio_close, target_ops::fileio_unlink)
6160 (target_ops::fileio_readlink): New.
6161 (target_fileio_open_1, target_fileio_unlink)
6162 (target_fileio_readlink): Always call the target method. Handle
6164 (return_zero, return_zero_has_execution): Delete.
6165 (init_dummy_target): Delete.
6166 (dummy_target::dummy_target, dummy_target::shortname)
6167 (dummy_target::longname, dummy_target::doc)
6168 (debug_target::debug_target, debug_target::shortname)
6169 (debug_target::longname, debug_target::doc): New.
6170 (target_supports_delete_record): Use regular delegation.
6171 (setup_target_debug): Delete.
6172 (maintenance_print_target_stack): Skip debug_stratum.
6173 (initialize_targets): Instantiate the_dummy_target and
6175 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6177 (target_auxv_search, fprint_target_auxv): Adjust.
6178 (info_auxv_command): Adjust to use target_stack.
6179 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6180 * exceptions.c (print_flush): Handle a NULL target_stack.
6181 * regcache.c (target_ops_no_register): Refactor as class with
6184 * exec.c (exec_target): New class.
6185 (exec_ops): Now an exec_target.
6186 (exec_open, exec_close_1, exec_get_section_table)
6187 (exec_xfer_partial, exec_files_info, exec_has_memory)
6188 (exec_make_note_section): Refactor as exec_target methods.
6189 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6191 (exec_target::find_memory_regions): New.
6192 (_initialize_exec): Don't call init_exec_ops.
6193 * gdbcore.h (exec_file_clear): Delete.
6195 * corefile.c (core_target): Delete.
6196 (core_file_command): Adjust.
6197 * corelow.c (core_target): New class.
6198 (the_core_target): New.
6199 (core_close): Remove target_ops parameter.
6200 (core_close_cleanup): Adjust.
6201 (core_target::close): New.
6202 (core_open, core_detach, get_core_registers, core_files_info)
6203 (core_xfer_partial, core_thread_alive, core_read_description)
6204 (core_pid_to_str, core_thread_name, core_has_memory)
6205 (core_has_stack, core_has_registers, core_info_proc): Rework as
6206 core_target methods.
6207 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6208 (_initialize_corelow): Initialize the_core_target.
6209 * gdbcore.h (core_target): Delete.
6210 (the_core_target): New.
6212 * ctf.c: (ctf_target): New class.
6213 (ctf_ops): Now a ctf_target.
6214 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6215 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6216 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6218 (init_ctf_ops): Delete.
6219 (_initialize_ctf): Don't call it.
6220 * tracefile-tfile.c (tfile_target): New class.
6221 (tfile_ops): Now a tfile_target.
6222 (tfile_open, tfile_close, tfile_files_info)
6223 (tfile_get_tracepoint_status, tfile_trace_find)
6224 (tfile_fetch_registers, tfile_xfer_partial)
6225 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6226 Refactor as tfile_target methods.
6227 (tfile_xfer_partial_features): Remove target_ops parameter.
6228 (init_tfile_ops): Delete.
6229 (_initialize_tracefile_tfile): Don't call it.
6230 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6231 (tracefile_has_stack, tracefile_has_registers)
6232 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6233 tracefile_target methods.
6234 (init_tracefile_ops): Delete.
6235 (tracefile_target::tracefile_target): New.
6236 * tracefile.h: Include "target.h".
6237 (tracefile_target): New class.
6238 (init_tracefile_ops): Delete.
6240 * spu-multiarch.c (spu_multiarch_target): New class.
6241 (spu_ops): Now a spu_multiarch_target.
6242 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6243 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6244 (spu_search_memory, spu_mourn_inferior): Refactor as
6245 spu_multiarch_target methods.
6246 (init_spu_ops): Delete.
6247 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6248 complete_target_initialization.
6250 * ravenscar-thread.c (ravenscar_thread_target): New class.
6251 (ravenscar_ops): Now a ravenscar_thread_target.
6252 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6253 (ravenscar_thread_alive, ravenscar_pid_to_str)
6254 (ravenscar_fetch_registers, ravenscar_store_registers)
6255 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6256 (ravenscar_stopped_by_hw_breakpoint)
6257 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6258 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6259 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6261 (init_ravenscar_thread_ops): Delete.
6262 (_initialize_ravenscar): Remove references to
6263 init_ravenscar_thread_ops and complete_target_initialization.
6265 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6266 (bsd_uthread_target): New class.
6267 (bsd_uthread_ops): Now a bsd_uthread_target.
6268 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6269 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6270 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6271 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6272 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6273 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6274 (bsd_uthread_target): Delete function.
6275 (_initialize_bsd_uthread): Remove reference to
6276 complete_target_initialization.
6278 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6279 (target_bfd): ... this new class.
6280 (target_bfd_xfer_partial, target_bfd_get_section_table)
6281 (target_bfd_close): Refactor as target_bfd methods.
6282 (target_bfd::~target_bfd): New.
6283 (target_bfd_reopen): Adjust.
6284 (target_bfd::close): New.
6286 * record-btrace.c (record_btrace_target): New class.
6287 (record_btrace_ops): Now a record_btrace_target.
6288 (record_btrace_open, record_btrace_stop_recording)
6289 (record_btrace_disconnect, record_btrace_close)
6290 (record_btrace_async, record_btrace_info)
6291 (record_btrace_insn_history, record_btrace_insn_history_range)
6292 (record_btrace_insn_history_from, record_btrace_call_history)
6293 (record_btrace_call_history_range)
6294 (record_btrace_call_history_from, record_btrace_record_method)
6295 (record_btrace_is_replaying, record_btrace_will_replay)
6296 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6297 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6298 (record_btrace_store_registers, record_btrace_prepare_to_store)
6299 (record_btrace_to_get_unwinder)
6300 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6301 (record_btrace_commit_resume, record_btrace_wait)
6302 (record_btrace_stop, record_btrace_can_execute_reverse)
6303 (record_btrace_stopped_by_sw_breakpoint)
6304 (record_btrace_supports_stopped_by_sw_breakpoint)
6305 (record_btrace_stopped_by_hw_breakpoint)
6306 (record_btrace_supports_stopped_by_hw_breakpoint)
6307 (record_btrace_update_thread_list, record_btrace_thread_alive)
6308 (record_btrace_goto_begin, record_btrace_goto_end)
6309 (record_btrace_goto, record_btrace_stop_replaying_all)
6310 (record_btrace_execution_direction)
6311 (record_btrace_prepare_to_generate_core)
6312 (record_btrace_done_generating_core): Refactor as
6313 record_btrace_target methods.
6314 (init_record_btrace_ops): Delete.
6315 (_initialize_record_btrace): Remove reference to
6316 init_record_btrace_ops.
6317 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6318 the execution_direction global.
6319 (record_full_base_target, record_full_target)
6320 (record_full_core_target): New classes.
6321 (record_full_ops): Now a record_full_target.
6322 (record_full_core_ops): Now a record_full_core_target.
6323 (record_full_target::detach, record_full_target::disconnect)
6324 (record_full_core_target::disconnect)
6325 (record_full_target::mourn_inferior, record_full_target::kill):
6327 (record_full_open, record_full_close, record_full_async): Refactor
6328 as methods of the record_full_base_target class.
6329 (record_full_resume, record_full_commit_resume): Refactor
6330 as methods of the record_full_target class.
6331 (record_full_wait, record_full_stopped_by_watchpoint)
6332 (record_full_stopped_data_address)
6333 (record_full_stopped_by_sw_breakpoint)
6334 (record_full_supports_stopped_by_sw_breakpoint)
6335 (record_full_stopped_by_hw_breakpoint)
6336 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6337 methods of the record_full_base_target class.
6338 (record_full_store_registers, record_full_xfer_partial)
6339 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6340 Refactor as methods of the record_full_target class.
6341 (record_full_can_execute_reverse, record_full_get_bookmark)
6342 (record_full_goto_bookmark, record_full_execution_direction)
6343 (record_full_record_method, record_full_info, record_full_delete)
6344 (record_full_is_replaying, record_full_will_replay)
6345 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6346 (record_full_stop_replaying): Refactor as methods of the
6347 record_full_base_target class.
6348 (record_full_core_resume, record_full_core_kill)
6349 (record_full_core_fetch_registers)
6350 (record_full_core_prepare_to_store)
6351 (record_full_core_store_registers, record_full_core_xfer_partial)
6352 (record_full_core_insert_breakpoint)
6353 (record_full_core_remove_breakpoint)
6354 (record_full_core_has_execution): Refactor
6355 as methods of the record_full_core_target class.
6356 (record_full_base_target::supports_delete_record): New.
6357 (init_record_full_ops): Delete.
6358 (init_record_full_core_ops): Delete.
6359 (record_full_save): Refactor as method of the
6360 record_full_base_target class.
6361 (_initialize_record_full): Remove references to
6362 init_record_full_ops and init_record_full_core_ops.
6364 * remote.c (remote_target, extended_remote_target): New classes.
6365 (remote_ops): Now a remote_target.
6366 (extended_remote_ops): Now an extended_remote_target.
6367 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6368 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6369 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6370 (remote_pass_signals, remote_set_syscall_catchpoint)
6371 (remote_program_signals, )
6372 (remote_thread_always_alive): Remove target_ops parameter.
6373 (remote_thread_alive, remote_thread_name)
6374 (remote_update_thread_list, remote_threads_extra_info)
6375 (remote_static_tracepoint_marker_at)
6376 (remote_static_tracepoint_markers_by_strid)
6377 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6378 (remote_open): Refactor as methods of remote_target.
6379 (extended_remote_open, extended_remote_detach)
6380 (extended_remote_attach, extended_remote_post_attach):
6381 (extended_remote_supports_disable_randomization)
6382 (extended_remote_create_inferior): : Refactor as method of
6383 extended_remote_target.
6384 (remote_set_permissions, remote_open_1, remote_detach)
6385 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6386 (remote_resume, remote_commit_resume, remote_stop)
6387 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6388 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6389 (remote_prepare_to_store, remote_store_registers)
6390 (remote_flash_erase, remote_flash_done, remote_files_info)
6391 (remote_kill, remote_mourn, remote_insert_breakpoint)
6392 (remote_remove_breakpoint, remote_insert_watchpoint)
6393 (remote_watchpoint_addr_within_range)
6394 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6395 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6396 (remote_supports_stopped_by_sw_breakpoint)
6397 (remote_stopped_by_hw_breakpoint)
6398 (remote_supports_stopped_by_hw_breakpoint)
6399 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6400 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6401 (remote_verify_memory): Refactor as methods of remote_target.
6402 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6404 (remote_xfer_partial, remote_get_memory_xfer_limit)
6405 (remote_search_memory, remote_rcmd, remote_memory_map)
6406 (remote_pid_to_str, remote_get_thread_local_address)
6407 (remote_get_tib_address, remote_read_description): Refactor as
6408 methods of remote_target.
6409 (remote_target::fileio_open, remote_target::fileio_pwrite)
6410 (remote_target::fileio_pread, remote_target::fileio_close): New.
6411 (remote_hostio_readlink, remote_hostio_fstat)
6412 (remote_filesystem_is_local, remote_can_execute_reverse)
6413 (remote_supports_non_stop, remote_supports_disable_randomization)
6414 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6415 (remote_supports_enable_disable_tracepoint)
6416 (remote_supports_string_tracing)
6417 (remote_can_run_breakpoint_commands, remote_trace_init)
6418 (remote_download_tracepoint, remote_can_download_tracepoint)
6419 (remote_download_trace_state_variable, remote_enable_tracepoint)
6420 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6421 (remote_trace_start, remote_get_trace_status)
6422 (remote_get_tracepoint_status, remote_trace_stop)
6423 (remote_trace_find, remote_get_trace_state_variable_value)
6424 (remote_save_trace_data, remote_get_raw_trace_data)
6425 (remote_set_disconnected_tracing, remote_core_of_thread)
6426 (remote_set_circular_trace_buffer, remote_traceframe_info)
6427 (remote_get_min_fast_tracepoint_insn_len)
6428 (remote_set_trace_buffer_size, remote_set_trace_notes)
6429 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6430 (remote_disable_btrace, remote_teardown_btrace)
6431 (remote_read_btrace, remote_btrace_conf)
6432 (remote_augmented_libraries_svr4_read, remote_load)
6433 (remote_pid_to_exec_file, remote_can_do_single_step)
6434 (remote_execution_direction, remote_thread_handle_to_thread_info):
6435 Refactor as methods of remote_target.
6436 (init_remote_ops, init_extended_remote_ops): Delete.
6437 (remote_can_async_p, remote_is_async_p, remote_async)
6438 (remote_thread_events, remote_upload_tracepoints)
6439 (remote_upload_trace_state_variables): Refactor as methods of
6441 (_initialize_remote): Remove references to init_remote_ops and
6442 init_extended_remote_ops.
6444 * remote-sim.c (gdbsim_target): New class.
6445 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6446 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6447 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6448 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6449 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6450 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6451 Refactor as methods of gdbsim_target.
6452 (gdbsim_ops): Now a gdbsim_target.
6453 (init_gdbsim_ops): Delete.
6454 (gdbsim_cntrl_c): Adjust.
6455 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6457 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6458 (the_amd64_linux_nat_target): New.
6459 (amd64_linux_fetch_inferior_registers)
6460 (amd64_linux_store_inferior_registers): Refactor as methods of
6461 amd64_linux_nat_target.
6462 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6463 * i386-linux-nat.c: Don't include "linux-nat.h".
6464 (i386_linux_nat_target): New class.
6465 (the_i386_linux_nat_target): New.
6466 (i386_linux_fetch_inferior_registers)
6467 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6468 as methods of i386_linux_nat_target.
6469 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6470 * inf-child.c (inf_child_ops): Delete.
6471 (inf_child_fetch_inferior_registers)
6472 (inf_child_store_inferior_registers): Delete.
6473 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6474 methods of inf_child_target.
6475 (inf_child_target::supports_terminal_ours)
6476 (inf_child_target::terminal_init)
6477 (inf_child_target::terminal_inferior)
6478 (inf_child_target::terminal_ours_for_output)
6479 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6480 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6482 (inf_child_open, inf_child_disconnect, inf_child_close)
6483 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6484 (inf_child_post_startup_inferior, inf_child_can_run)
6485 (inf_child_pid_to_exec_file): Refactor as methods of
6487 (inf_child_follow_fork): Delete.
6488 (inf_child_target::can_create_inferior)
6489 (inf_child_target::can_attach): New.
6490 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6491 (inf_child_target::has_stack, inf_child_target::has_registers)
6492 (inf_child_target::has_execution): New.
6493 (inf_child_fileio_open, inf_child_fileio_pwrite)
6494 (inf_child_fileio_pread, inf_child_fileio_fstat)
6495 (inf_child_fileio_close, inf_child_fileio_unlink)
6496 (inf_child_fileio_readlink, inf_child_use_agent)
6497 (inf_child_can_use_agent): Refactor as methods of
6499 (return_zero, inf_child_target): Delete.
6500 (inf_child_target::inf_child_target): New.
6501 * inf-child.h: Include "target.h".
6502 (inf_child_target): Delete function prototype.
6503 (inf_child_target): New class.
6504 (inf_child_open_target, inf_child_mourn_inferior)
6505 (inf_child_maybe_unpush_target): Delete.
6506 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6507 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6508 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6509 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6510 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6511 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6512 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6513 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6514 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6515 methods of inf_ptrace_target.
6516 (inf_ptrace_target): Delete function.
6517 * inf-ptrace.h: Include "inf-child.h".
6518 (inf_ptrace_target): Delete function declaration.
6519 (inf_ptrace_target): New class.
6520 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6521 * linux-nat.c (linux_target): New.
6522 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6523 (linux_nat_target::~linux_nat_target): New.
6524 (linux_child_post_attach, linux_child_post_startup_inferior)
6525 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6526 (linux_child_remove_fork_catchpoint)
6527 (linux_child_insert_vfork_catchpoint)
6528 (linux_child_remove_vfork_catchpoint)
6529 (linux_child_insert_exec_catchpoint)
6530 (linux_child_remove_exec_catchpoint)
6531 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6532 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6533 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6534 (linux_nat_stopped_data_address)
6535 (linux_nat_stopped_by_sw_breakpoint)
6536 (linux_nat_supports_stopped_by_sw_breakpoint)
6537 (linux_nat_stopped_by_hw_breakpoint)
6538 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6539 (linux_nat_kill, linux_nat_mourn_inferior)
6540 (linux_nat_xfer_partial, linux_nat_thread_alive)
6541 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6542 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6543 (linux_child_static_tracepoint_markers_by_strid)
6544 (linux_nat_is_async_p, linux_nat_can_async_p)
6545 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6546 (linux_nat_supports_multi_process)
6547 (linux_nat_supports_disable_randomization, linux_nat_async)
6548 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6549 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6550 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6551 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6552 methods of linux_nat_target.
6553 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6554 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6556 (check_stopped_by_watchpoint): Adjust.
6557 (linux_xfer_partial): Delete.
6558 (linux_target_install_ops, linux_target, linux_nat_add_target):
6560 (linux_nat_target::linux_nat_target): New.
6561 * linux-nat.h: Include "inf-ptrace.h".
6562 (linux_nat_target): New.
6563 (linux_target, linux_target_install_ops, linux_nat_add_target):
6564 Delete function declarations.
6565 (linux_target): Declare global.
6566 * linux-thread-db.c (thread_db_target): New.
6567 (thread_db_target::thread_db_target): New.
6568 (thread_db_ops): Delete.
6569 (the_thread_db_target): New.
6570 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6571 (thread_db_update_thread_list, thread_db_pid_to_str)
6572 (thread_db_extra_thread_info)
6573 (thread_db_thread_handle_to_thread_info)
6574 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6575 (thread_db_resume): Refactor as methods of thread_db_target.
6576 (init_thread_db_ops): Delete.
6577 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6578 * x86-linux-nat.c: Don't include "linux-nat.h".
6579 (super_post_startup_inferior): Delete.
6580 (x86_linux_nat_target::~x86_linux_nat_target): New.
6581 (x86_linux_child_post_startup_inferior)
6582 (x86_linux_read_description, x86_linux_enable_btrace)
6583 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6584 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6585 methods of x86_linux_nat_target.
6586 (x86_linux_create_target): Delete. Bits folded ...
6587 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6589 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6590 (x86_linux_nat_target): New class.
6591 (x86_linux_create_target): Delete.
6592 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6593 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6594 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6595 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6596 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6597 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6599 (x86_use_watchpoints): Delete.
6600 * x86-nat.h: Include "breakpoint.h" and "target.h".
6601 (x86_use_watchpoints): Delete.
6602 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6603 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6604 (x86_insert_watchpoint, x86_remove_watchpoint)
6605 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6606 (x86_stopped_by_hw_breakpoint): New declarations.
6607 (x86_nat_target): New template class.
6609 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6610 (the_ppc_linux_nat_target): New.
6611 (ppc_linux_fetch_inferior_registers)
6612 (ppc_linux_can_use_hw_breakpoint)
6613 (ppc_linux_region_ok_for_hw_watchpoint)
6614 (ppc_linux_ranged_break_num_registers)
6615 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6616 (ppc_linux_insert_mask_watchpoint)
6617 (ppc_linux_remove_mask_watchpoint)
6618 (ppc_linux_can_accel_watchpoint_condition)
6619 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6620 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6621 (ppc_linux_watchpoint_addr_within_range)
6622 (ppc_linux_masked_watch_num_registers)
6623 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6624 (ppc_linux_read_description): Refactor as methods of
6625 ppc_linux_nat_target.
6626 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6628 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6629 (procfs_target): New class.
6630 (the_procfs_target): New.
6631 (procfs_target): Delete function.
6632 (procfs_auxv_parse, procfs_attach, procfs_detach)
6633 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6634 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6635 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6636 (procfs_create_inferior, procfs_update_thread_list)
6637 (procfs_thread_alive, procfs_pid_to_str)
6638 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6639 (procfs_stopped_data_address, procfs_insert_watchpoint)
6640 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6641 (proc_find_memory_regions, procfs_info_proc)
6642 (procfs_make_note_section): Refactor as methods of procfs_target.
6643 (_initialize_procfs): Adjust.
6644 * sol-thread.c (sol_thread_target): New class.
6645 (sol_thread_ops): Now a sol_thread_target.
6646 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6647 (sol_thread_fetch_registers, sol_thread_store_registers)
6648 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6649 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6650 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6651 (init_sol_thread_ops): Delete.
6652 (_initialize_sol_thread): Adjust. Remove references to
6653 init_sol_thread_ops and complete_target_initialization.
6655 * windows-nat.c (windows_nat_target): New class.
6656 (windows_fetch_inferior_registers)
6657 (windows_store_inferior_registers, windows_resume, windows_wait)
6658 (windows_attach, windows_detach, windows_pid_to_exec_file)
6659 (windows_files_info, windows_create_inferior)
6660 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6661 (windows_close, windows_pid_to_str, windows_xfer_partial)
6662 (windows_get_tib_address, windows_get_ada_task_ptid)
6663 (windows_thread_name, windows_thread_alive): Refactor as
6664 windows_nat_target methods.
6665 (do_initial_windows_stuff): Adjust.
6666 (windows_target): Delete function.
6667 (_initialize_windows_nat): Adjust.
6669 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6670 (darwin_mourn_inferior, darwin_kill_inferior)
6671 (darwin_create_inferior, darwin_attach, darwin_detach)
6672 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6673 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6674 (darwin_supports_multi_process): Refactor as darwin_nat_target
6676 (darwin_resume_to, darwin_files_info): Delete.
6677 (_initialize_darwin_inferior): Rename to ...
6678 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6679 * darwin-nat.h: Include "inf-child.h".
6680 (darwin_nat_target): New class.
6681 (darwin_complete_target): Delete.
6682 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6683 (darwin_target): New.
6684 (i386_darwin_fetch_inferior_registers)
6685 (i386_darwin_store_inferior_registers): Refactor as methods of
6687 (darwin_complete_target): Delete, with ...
6688 (_initialize_i386_darwin_nat): ... bits factored out here.
6690 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6691 (the_alpha_linux_nat_target): New.
6692 (alpha_linux_register_u_offset): Refactor as
6693 alpha_linux_nat_target method.
6694 (_initialize_alpha_linux_nat): Adjust.
6695 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6696 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6697 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6698 methods of linux_nat_trad_target.
6699 (linux_trad_target): Delete.
6700 * linux-nat-trad.h (linux_trad_target): Delete function.
6701 (linux_nat_trad_target): New class.
6702 * mips-linux-nat.c (mips_linux_nat_target): New class.
6703 (super_fetch_registers, super_store_registers, super_close):
6705 (the_mips_linux_nat_target): New.
6706 (mips64_linux_regsets_fetch_registers)
6707 (mips64_linux_regsets_store_registers)
6708 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6709 (mips_linux_register_u_offset, mips_linux_read_description)
6710 (mips_linux_can_use_hw_breakpoint)
6711 (mips_linux_stopped_by_watchpoint)
6712 (mips_linux_stopped_data_address)
6713 (mips_linux_region_ok_for_hw_watchpoint)
6714 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6715 (mips_linux_close): Refactor as methods of mips_linux_nat.
6716 (_initialize_mips_linux_nat): Adjust to C++ification.
6718 * aix-thread.c (aix_thread_target): New class.
6719 (aix_thread_ops): Now an aix_thread_target.
6720 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6721 (aix_thread_fetch_registers, aix_thread_store_registers)
6722 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6723 (aix_thread_thread_alive, aix_thread_pid_to_str)
6724 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6725 Refactor as methods of aix_thread_target.
6726 (init_aix_thread_ops): Delete.
6727 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6728 and complete_target_initialization.
6729 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6730 (rs6000_nat_target): New class.
6731 (the_rs6000_nat_target): New.
6732 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6733 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6734 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6735 (super_create_inferior): Delete.
6736 (_initialize_rs6000_nat): Adjust to C++ification.
6738 * arm-linux-nat.c (arm_linux_nat_target): New class.
6739 (the_arm_linux_nat_target): New.
6740 (arm_linux_fetch_inferior_registers)
6741 (arm_linux_store_inferior_registers, arm_linux_read_description)
6742 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6743 (arm_linux_remove_hw_breakpoint)
6744 (arm_linux_region_ok_for_hw_watchpoint)
6745 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6746 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6747 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6748 arm_linux_nat_target.
6749 (_initialize_arm_linux_nat): Adjust to C++ification.
6751 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6752 (the_aarch64_linux_nat_target): New.
6753 (aarch64_linux_fetch_inferior_registers)
6754 (aarch64_linux_store_inferior_registers)
6755 (aarch64_linux_child_post_startup_inferior)
6756 (aarch64_linux_read_description)
6757 (aarch64_linux_can_use_hw_breakpoint)
6758 (aarch64_linux_insert_hw_breakpoint)
6759 (aarch64_linux_remove_hw_breakpoint)
6760 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6761 (aarch64_linux_region_ok_for_hw_watchpoint)
6762 (aarch64_linux_stopped_data_address)
6763 (aarch64_linux_stopped_by_watchpoint)
6764 (aarch64_linux_watchpoint_addr_within_range)
6765 (aarch64_linux_can_do_single_step): Refactor as methods of
6766 aarch64_linux_nat_target.
6767 (super_post_startup_inferior): Delete.
6768 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6770 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6771 (the_hppa_linux_nat_target): New.
6772 (hppa_linux_fetch_inferior_registers)
6773 (hppa_linux_store_inferior_registers): Refactor as methods of
6774 hppa_linux_nat_target.
6775 (_initialize_hppa_linux_nat): Adjust to C++ification.
6777 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6778 (the_ia64_linux_nat_target): New.
6779 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6780 (ia64_linux_stopped_data_address)
6781 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6782 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6783 ia64_linux_nat_target methods.
6784 (super_xfer_partial): Delete.
6785 (_initialize_ia64_linux_nat): Adjust to C++ification.
6787 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6788 (the_m32r_linux_nat_target): New.
6789 (m32r_linux_fetch_inferior_registers)
6790 (m32r_linux_store_inferior_registers): Refactor as
6791 m32r_linux_nat_target methods.
6792 (_initialize_m32r_linux_nat): Adjust to C++ification.
6794 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6795 (the_m68k_linux_nat_target): New.
6796 (m68k_linux_fetch_inferior_registers)
6797 (m68k_linux_store_inferior_registers): Refactor as
6798 m68k_linux_nat_target methods.
6799 (_initialize_m68k_linux_nat): Adjust to C++ification.
6801 * s390-linux-nat.c (s390_linux_nat_target): New class.
6802 (the_s390_linux_nat_target): New.
6803 (s390_linux_fetch_inferior_registers)
6804 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6805 (s390_insert_watchpoint, s390_remove_watchpoint)
6806 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6807 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6808 (s390_auxv_parse, s390_read_description): Refactor as methods of
6809 s390_linux_nat_target.
6810 (_initialize_s390_nat): Adjust to C++ification.
6812 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6813 (the_sparc_linux_nat_target): New.
6814 (_initialize_sparc_linux_nat): Adjust to C++ification.
6815 * sparc-nat.c (sparc_fetch_inferior_registers)
6816 (sparc_store_inferior_registers): Remove target_ops parameter.
6817 * sparc-nat.h (sparc_fetch_inferior_registers)
6818 (sparc_store_inferior_registers): Remove target_ops parameter.
6819 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6820 (the_sparc64_linux_nat_target): New.
6821 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6823 * spu-linux-nat.c (spu_linux_nat_target): New class.
6824 (the_spu_linux_nat_target): New.
6825 (spu_child_post_startup_inferior, spu_child_post_attach)
6826 (spu_child_wait, spu_fetch_inferior_registers)
6827 (spu_store_inferior_registers, spu_xfer_partial)
6828 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6830 (_initialize_spu_nat): Adjust to C++ification.
6832 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6833 (the_tilegx_linux_nat_target): New.
6834 (fetch_inferior_registers, store_inferior_registers):
6835 Refactor as methods.
6836 (_initialize_tile_linux_nat): Adjust to C++ification.
6838 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6839 (the_xtensa_linux_nat_target): New.
6840 (xtensa_linux_fetch_inferior_registers)
6841 (xtensa_linux_store_inferior_registers): Refactor as
6842 xtensa_linux_nat_target methods.
6843 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6845 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6846 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6847 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6848 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6849 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6850 (fbsd_stopped_by_sw_breakpoint)
6851 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6852 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6853 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6854 (fbsd_post_startup_inferior, fbsd_post_attach)
6855 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6856 (fbsd_set_syscall_catchpoint)
6857 (super_xfer_partial, super_resume, super_wait)
6858 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6859 (fbsd_handle_debug_trap): Remove target_ops parameter.
6860 (fbsd_nat_add_target): Delete.
6861 * fbsd-nat.h: Include "inf-ptrace.h".
6862 (fbsd_nat_add_target): Delete.
6863 (USE_SIGTRAP_SIGINFO): Define.
6864 (fbsd_nat_target): New class.
6866 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6867 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6868 (amd64bsd_target): Delete.
6869 * amd64-bsd-nat.h: New file.
6870 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6872 (amd64_fbsd_nat_target): New class.
6873 (the_amd64_fbsd_nat_target): New.
6874 (amd64fbsd_read_description): Refactor as method of
6875 amd64_fbsd_nat_target.
6876 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6877 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6878 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6879 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6880 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6881 (i386bsd_target): Delete.
6882 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6883 (i386bsd_fetch_inferior_registers)
6884 (i386bsd_store_inferior_registers): Declare.
6885 (i386_bsd_nat_target): New class.
6886 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6887 (the_i386_fbsd_nat_target): New.
6888 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6889 i386_fbsd_nat_target methods.
6890 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6891 (_initialize_i386fbsd_nat): Adjust to C++ification.
6892 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6893 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6894 (_initialize_x86_bsd_nat): Adjust to C++ification.
6895 * x86-bsd-nat.h: Include "x86-nat.h".
6896 (x86bsd_target): Delete declaration.
6897 (x86bsd_nat_target): New class.
6899 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6900 (the_aarch64_fbsd_nat_target): New.
6901 (aarch64_fbsd_fetch_inferior_registers)
6902 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6903 aarch64_fbsd_nat_target.
6904 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6905 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6906 (the_alpha_bsd_nat_target): New.
6907 (alphabsd_fetch_inferior_registers)
6908 (alphabsd_store_inferior_registers): Refactor as
6909 alpha_bsd_nat_target methods.
6910 (_initialize_alphabsd_nat): Refactor as methods of
6911 alpha_bsd_nat_target.
6912 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6913 (the_amd64_nbsd_nat_target): New.
6914 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6915 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6916 (the_amd64_obsd_nat_target): New.
6917 (_initialize_amd64obsd_nat): Adjust to C++ification.
6918 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6919 (the_arm_fbsd_nat_target): New.
6920 (arm_fbsd_fetch_inferior_registers)
6921 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6922 (_initialize_arm_fbsd_nat): Refactor as methods of
6923 arm_fbsd_nat_target.
6924 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6925 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6926 (the_arm_netbsd_nat_target): New.
6927 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6928 arm_netbsd_nat_target.
6929 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6930 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6931 (the_hppa_nbsd_nat_target): New.
6932 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6933 hppa_nbsd_nat_target methods.
6934 (_initialize_hppanbsd_nat): Adjust to C++ification.
6935 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6936 (the_hppa_obsd_nat_target): New.
6937 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6938 methods of hppa_obsd_nat_target.
6939 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6941 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6942 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6944 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6945 (_initialize_i386obsd_nat): Use add_target.
6946 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6947 (the_m68k_bsd_nat_target): New.
6948 (m68kbsd_fetch_inferior_registers)
6949 (m68kbsd_store_inferior_registers): Refactor as methods of
6950 m68k_bsd_nat_target.
6951 (_initialize_m68kbsd_nat): Adjust to C++ification.
6952 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6953 (the_mips_fbsd_nat_target): New.
6954 (mips_fbsd_fetch_inferior_registers)
6955 (mips_fbsd_store_inferior_registers): Refactor as methods of
6956 mips_fbsd_nat_target.
6957 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6959 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6960 (the_mips_nbsd_nat_target): New.
6961 (mipsnbsd_fetch_inferior_registers)
6962 (mipsnbsd_store_inferior_registers): Refactor as methods of
6963 mips_nbsd_nat_target.
6964 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6965 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6966 (the_mips64_obsd_nat_target): New.
6967 (mips64obsd_fetch_inferior_registers)
6968 (mips64obsd_store_inferior_registers): Refactor as methods of
6969 mips64_obsd_nat_target.
6970 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6972 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6974 * nbsd-nat.h: Include "inf-ptrace.h".
6975 (nbsd_nat_target): New class.
6976 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6977 (obsd_wait): Refactor as methods of obsd_nat_target.
6978 (obsd_add_target): Delete.
6979 * obsd-nat.h: Include "inf-ptrace.h".
6980 (obsd_nat_target): New class.
6981 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6982 (the_ppc_fbsd_nat_target): New.
6983 (ppcfbsd_fetch_inferior_registers)
6984 (ppcfbsd_store_inferior_registers): Refactor as methods of
6985 ppc_fbsd_nat_target.
6986 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6988 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6989 (the_ppc_nbsd_nat_target): New.
6990 (ppcnbsd_fetch_inferior_registers)
6991 (ppcnbsd_store_inferior_registers): Refactor as methods of
6992 ppc_nbsd_nat_target.
6993 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6994 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6995 (the_ppc_obsd_nat_target): New.
6996 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6997 methods of ppc_obsd_nat_target.
6998 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7000 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7001 (the_sh_nbsd_nat_target): New.
7002 (shnbsd_fetch_inferior_registers)
7003 (shnbsd_store_inferior_registers): Refactor as methods of
7005 (_initialize_shnbsd_nat): Adjust to C++ification.
7006 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7007 (inf_ptrace_xfer_partial): Delete.
7008 (sparc_xfer_partial, sparc_target): Delete.
7009 * sparc-nat.h (sparc_fetch_inferior_registers)
7010 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7011 (sparc_target): Delete function declaration.
7012 (sparc_target): New template class.
7013 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7014 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7015 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7016 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7018 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7019 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7020 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7021 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7023 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7024 (the_vax_bsd_nat_target): New.
7025 (vaxbsd_fetch_inferior_registers)
7026 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7028 (_initialize_vaxbsd_nat): Adjust to C++ification.
7030 * bsd-kvm.c (bsd_kvm_target): New class.
7031 (bsd_kvm_ops): Now a bsd_kvm_target.
7032 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7033 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7034 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7036 (bsd_kvm_return_one): Delete.
7037 (bsd_kvm_add_target): Adjust to C++ification.
7039 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7040 (nto_procfs_target_procfs): New classes.
7041 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7042 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7043 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7044 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7045 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7046 (procfs_remove_hw_breakpoint, procfs_resume)
7047 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7048 (procfs_kill_inferior, procfs_store_registers)
7049 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7050 as methods of nto_procfs_target.
7051 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7052 (nto_native_ops): Delete.
7053 (procfs_open, procfs_native_open): Delete.
7054 (nto_native_ops): Now an nto_procfs_target_native.
7055 (init_procfs_targets): Adjust to C++ification.
7056 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7057 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7058 Refactor as methods of nto_procfs_target.
7060 * go32-nat.c (go32_nat_target): New class.
7061 (the_go32_nat_target): New.
7062 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7063 (go32_store_registers, go32_xfer_partial, go32_files_info)
7064 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7065 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7066 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7067 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7068 (go32_target): Delete.
7069 (_initialize_go32_nat): Adjust to C++ification.
7071 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7072 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7073 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7074 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7076 (gnu_target): Delete.
7077 * gnu-nat.h (gnu_target): Delete.
7078 (gnu_nat_target): New class.
7079 * i386-gnu-nat.c (gnu_base_target): New.
7080 (i386_gnu_nat_target): New class.
7081 (the_i386_gnu_nat_target): New.
7082 (_initialize_i386gnu_nat): Adjust to C++ification.
7084 2018-05-02 Pedro Alves <palves@redhat.com>
7086 * bfd-target.c (target_bfd_xclose): Rename to ...
7087 (target_bfd_close): ... this.
7088 (target_bfd_reopen): Adjust.
7089 * target.c (target_close): Remove references to to_xclose.
7090 * target.h (target_ops::to_xclose): Delete.
7091 (target_ops::to_close): Update comments.
7093 2018-05-02 Pedro Alves <palves@redhat.com>
7095 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7097 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7098 * inf-ptrace.c (inf_ptrace_register_u_offset)
7099 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7100 (inf_ptrace_store_register, inf_ptrace_store_registers)
7101 (inf_ptrace_trad_target): Move to ...
7102 * linux-nat-trad.c: ... this new file.
7103 * linux-nat-trad.h: New file.
7104 * linux-nat.c (linux_target_install_ops): Make extern.
7105 (linux_trad_target): Delete.
7106 * linux-nat.h (linux_trad_target): Delete declaration.
7107 (linux_target_install_ops): Declare.
7108 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7111 2018-05-02 Pedro Alves <palves@redhat.com>
7113 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7114 procfs_target/add_target here.
7115 * procfs.c (procfs_target): Make static.
7116 (_initialize_procfs): Call add_target here.
7117 * procfs.h (struct target_ops): Remove forward declaration.
7118 (procfs_target): Remove declaration.
7119 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7121 2018-05-02 Pedro Alves <palves@redhat.com>
7123 * procfs.c (procfs_stopped_by_watchpoint)
7124 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7125 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7127 (procfs_use_watchpoints): Delete, move contents...
7128 (procfs_target): ... here.
7129 * procfs.h (procfs_use_watchpoints): Delete declaration.
7130 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7131 procfs_use_watchpoints.
7132 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7133 procfs_use_watchpoints.
7135 2018-05-02 Tom Tromey <tom@tromey.com>
7138 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7139 and var_zuinteger_unlimited.
7140 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7141 and PARAM_ZUINTEGER_UNLIMITED.
7142 (set_parameter_value): Handle var_zuinteger and
7143 var_zuinteger_unlimited.
7144 (add_setshow_generic): Likewise.
7145 (parmpy_init): Likewise.
7147 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7150 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7151 pointer is not null before dereferencing it.
7153 2018-04-30 Tom Tromey <tom@tromey.com>
7155 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7158 2018-04-30 Tom Tromey <tom@tromey.com>
7160 * breakpoint.c (mention): Remove use of is_mi_like_p.
7161 (print_mention_ranged_breakpoint): Likewise.
7162 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7165 2018-04-30 Tom Tromey <tom@tromey.com>
7167 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7169 2018-04-30 Tom Tromey <tom@tromey.com>
7171 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7172 (info_spu_event_command): Remove some uses of is_mi_like_p.
7174 2018-04-30 Tom Tromey <tom@tromey.com>
7176 * python/py-framefilter.c (py_print_single_arg)
7177 (enumerate_locals, py_print_args, py_print_frame): Remove some
7178 uses of is_mi_like_p.
7180 2018-04-30 Tom Tromey <tom@tromey.com>
7183 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7184 * ui-out.h (ui_out::is_mi_like_p): Now const.
7185 (ui_out::do_is_mi_like_p): Now const.
7186 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7188 2018-04-30 Tom Tromey <tom@tromey.com>
7190 * varobj.c (varobj_set_visualizer): Use new_reference.
7191 * python/python.c (gdbpy_decode_line): Use new_reference.
7192 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7195 2018-04-30 Tom Tromey <tom@tromey.com>
7197 * varobj.c (install_new_value): Use new_reference.
7198 * value.h (value_incref): Return void. Swap intro comment with
7200 * value.c (set_value_parent): Use new_reference.
7201 (value_incref): Return void. Update intro comment.
7202 (release_value): Use new_reference.
7203 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7205 2018-04-30 Tom Tromey <tom@tromey.com>
7207 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7208 * gdb_bfd.h (new_bfd_ref): Remove.
7209 (gdb_bfd_open): Update comment.
7210 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7211 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7212 (gdb_bfd_fdopenr): Use new_reference.
7213 * exec.c (exec_file_attach): Use new_reference.
7215 2018-04-30 Tom Tromey <tom@tromey.com>
7217 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7220 2018-04-30 Tom Tromey <tom@tromey.com>
7222 * jit.c (jit_read_code_entry): Use type_align.
7223 * i386-tdep.c (i386_gdbarch_init): Don't call
7224 set_gdbarch_long_long_align_bit.
7225 * gdbarch.sh: Remove long_long_align_bit.
7226 * gdbarch.c, gdbarch.h: Rebuild.
7227 * arc-tdep.c (arc_type_align): New function.
7228 (arc_gdbarch_init): Use arc_type_align. Don't call
7229 set_gdbarch_long_long_align_bit.
7231 2018-04-30 Tom Tromey <tom@tromey.com>
7233 * rust-lang.c (rust_type_alignment): Remove.
7234 (rust_composite_type): Use type_align.
7236 2018-04-30 Tom Tromey <tom@tromey.com>
7238 * NEWS: Mention Type.align.
7239 * python/py-type.c (typy_get_alignof): New function.
7240 (type_object_getset): Add "alignof".
7242 2018-04-30 Tom Tromey <tom@tromey.com>
7246 * std-operator.def (UNOP_ALIGNOF): New operator.
7247 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7249 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7250 * c-lang.c (c_op_print_tab): Add alignof.
7251 * c-exp.y (ALIGNOF): New token.
7252 (exp): Add "ALIGNOF" production.
7253 (ident_tokens): Add _Alignof and alignof.
7255 2018-04-30 Tom Tromey <tom@tromey.com>
7257 * i386-tdep.c (i386_type_align): New function.
7258 (i386_gdbarch_init): Update.
7259 * gdbarch.sh (type_align): New method.
7260 * gdbarch.c, gdbarch.h: Rebuild.
7261 * arch-utils.h (default_type_align): Declare.
7262 * arch-utils.c (default_type_align): New function.
7263 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7264 (struct type) <align_log2>: New field.
7265 <instance_flags>: Now a bitfield.
7266 (TYPE_RAW_ALIGN): New macro.
7267 (type_align, type_raw_align, set_type_align): Declare.
7268 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7270 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7271 (get_alignment, maybe_set_alignment): New functions.
7272 (read_structure_type, read_enumeration_type, read_array_type)
7273 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7274 (read_subrange_type, read_base_type): Set type alignment.
7276 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7278 * dwarf2read.c (read_index_from_section): Use bool.
7280 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7283 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7286 2018-04-29 John Reiser <jreiser@BitWagon.com>
7289 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7290 last step, and do it atomically.
7292 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7294 * compile/compile-c-types.c (convert_int, convert_float):
7297 2018-04-27 Tom Tromey <tom@tromey.com>
7300 * rust-lang.c (rust_inclusive_range_type_p): New function.
7301 (rust_range): Handle inclusive ranges.
7302 (rust_compute_range): Likewise.
7303 * rust-exp.y (struct rust_op) <inclusive>: New field.
7304 (DOTDOTEQ): New constant.
7305 (range_expr): Add "..=" productions.
7306 (operator_tokens): Add "..=" token.
7307 (ast_range): Add "inclusive" parameter.
7308 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7310 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7312 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7313 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7315 * expprint.c (print_subexp_standard): Handle new bounds values.
7316 (dump_subexp_body_standard): Likewise.
7318 2018-04-27 Tom Tromey <tom@tromey.com>
7320 * configure: Rebuild.
7321 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7322 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7324 (class symbol_needs_eval_context): Likewise.
7325 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7326 (mock_mapped_index::symbol_name_at): Use "override". Remove
7328 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7330 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7331 * aarch64-tdep.c (instruction_reader::read): Use "override".
7332 (instruction_reader_test::read): Likewise.
7333 * arm-tdep.c (instruction_reader::read): Use "override".
7334 (instruction_reader_thumb::read): Likewise.
7336 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7339 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7340 instead of remote_send.
7341 (remote_send): Remove.
7343 2018-04-26 Pedro Alves <palves@redhat.com>
7345 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7346 find_function_start_sal instead of find_pc_line.
7348 2018-04-26 Pedro Alves <palves@redhat.com>
7350 * breakpoint.c (set_breakpoint_location_function): Handle
7352 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7353 * elfread.c (elf_symtab_read): Give data symbols with
7354 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7355 (elf_rel_plt_read): Update comment.
7356 * linespec.c (convert_linespec_to_sals): Handle
7358 (minsym_found): Handle mst_data_gnu_ifunc.
7359 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7360 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7361 * parse.c (find_minsym_type_and_address): Handle
7363 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7364 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7365 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7367 <mst_data_gnu_ifunc>: New enumerator.
7369 2018-04-26 Pedro Alves <palves@redhat.com>
7371 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7372 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7373 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7375 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7376 (lookup_minimal_symbol_by_pc): Adjust.
7377 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7378 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7379 * minsyms.h (lookup_msym_prefer): New enum.
7380 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7381 parameter by a lookup_msym_prefer parameter.
7383 2018-04-26 Pedro Alves <palves@redhat.com>
7385 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7386 ends in "@plt" instead of looking at the symbol's section.
7388 2018-04-26 Pedro Alves <palves@redhat.com>
7390 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7392 (find_pc_partial_function_gnu_ifunc): Rename to ...
7393 (find_pc_partial_function): ... this, and remove references to
7395 (find_pc_partial_function): Delete old implementation.
7396 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7398 2018-04-26 Pedro Alves <palves@redhat.com>
7400 * linespec.c (struct bound_minimal_symbol_search_key): New.
7401 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7402 skip first line if we found a GNU ifunc minimal symbol by name.
7403 (compare_msymbols): Change parameters to work with a destructured
7405 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7408 2018-04-26 Pedro Alves <palves@redhat.com>
7410 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7411 ifunc targets here. Instead, if we have an ifunc minsym, use its
7413 (add_location_to_breakpoint): Store the minsym and the objfile in
7414 the breakpoint location.
7415 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7416 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7417 Record the minsym in the sal.
7418 * symtab.h (symtab_and_line) <msymbol>: New field.
7420 2018-04-26 Pedro Alves <palves@redhat.com>
7422 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7423 unless we actually resolved the ifunc.
7425 2018-04-26 Pedro Alves <palves@redhat.com>
7427 * c-exp.y (variable production): Prefer ifunc minsyms over
7428 regular function symbols.
7429 * symtab.c (find_gnu_ifunc): New function.
7430 * minsyms.h (lookup_msym_prefer): New enum.
7431 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7432 parameter by a lookup_msym_prefer parameter.
7433 * symtab.h (find_gnu_ifunc): New declaration.
7435 2018-04-26 Pedro Alves <palves@redhat.com>
7437 * blockframe.c (find_gnu_ifunc_target_type): New function.
7438 (find_function_type): New.
7439 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7440 return a value with a memory address.
7441 (eval_call): For calls to GNU ifunc functions, try to find the
7442 type of the target function from the type that the resolver
7444 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7446 * infcall.c (find_function_return_type): Delete.
7447 (find_function_addr): Add 'function_type' parameter. For calls to
7448 GNU ifunc functions, try to find the type of the target function
7449 from the type that the resolver returns, and return it via
7451 (call_function_by_hand_dummy): Adjust to use the function type
7452 returned by find_function_addr.
7453 (find_function_addr): Add 'function_type' parameter and move
7455 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7458 2018-04-26 Pedro Alves <palves@redhat.com>
7460 * c-exp.y (variable production): Skip finding an alias for ifunc
7463 2018-04-26 Pedro Alves <palves@redhat.com>
7465 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7467 2018-04-25 Pedro Alves <palves@redhat.com>
7469 * infcmd.c (kill_command): Print the pid as string, not the whole
7470 thread's ptid. Add comment. s/has been killed/killed/ in output
7472 * remote.c (remote_detach_1): Print the pid as string, not the
7473 whole thread's ptid.
7475 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7476 Sergio Durigan Junior <sergiodj@redhat.com>
7477 Pedro Alves <palves@redhat.com>
7479 * infcmd.c (kill_command): Print message when inferior has
7481 * inferior.c (print_inferior_events): Remove 'static'. Set as
7483 (add_inferior): Improve message printed when
7484 'print_inferior_events' is on.
7485 (exit_inferior): Remove message printed when
7486 'print_inferior_events' is on.
7487 (detach_inferior): Improve message printed when
7488 'print_inferior_events' is on.
7489 (initialize_inferiors): Use 'add_inferior_silent' to set
7490 'current_inferior_'.
7491 * inferior.h (print_inferior_events): Declare here as
7493 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7494 '[Detaching...]' messages when 'print_inferior_events' is on.
7495 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7496 as prefix/suffix for messages. Remove periods. Fix erroneous
7497 'Detaching after fork from child...', replace it by '... from
7499 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7500 prefix/suffix when printing 'Detaching...' messages. Print
7501 them when 'print_inferior_events' is on.
7502 * remote.c (remote_detach_1): Print message when detaching
7503 from inferior and '!is_fork_parent'.
7505 2018-04-24 Tom Tromey <tom@tromey.com>
7507 * cli-out.h: Reindent.
7509 2018-04-24 Tom Tromey <tom@tromey.com>
7511 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7512 (cli_ui_out::do_field_string): Use fputs_filtered.
7513 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7515 2018-04-23 Tom Tromey <tom@tromey.com>
7517 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7518 gdb::unique_xmalloc_ptr.
7520 2018-04-23 Tom Tromey <tom@tromey.com>
7522 * configure: Rebuild.
7524 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7527 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7528 prepare_for_testing. Set normal_bp to r_debug_state if target
7531 2018-04-21 Pedro Alves <palves@redhat.com>
7532 Rajendra SY <rajendra.sy@gmail.com>
7534 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7535 * remote.c (extended_remote_attach): In all-stop mode, mark the
7536 thread as executing.
7538 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7540 * thread.c (thread_apply_all_command): Fix comment.
7541 (thread_command): Fix comment.
7543 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7545 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7547 * features/aarch64-core.c (create_feature_aarch64_core):
7549 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7551 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7553 * features/i386/32bit-avx512.c
7554 (create_feature_i386_32bit_avx512): Likewise.
7555 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7557 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7559 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7561 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7563 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7565 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7567 * features/i386/64bit-avx512.c
7568 (create_feature_i386_64bit_avx512): Likewise.
7569 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7571 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7573 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7575 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7577 * features/i386/64bit-segments.c
7578 (create_feature_i386_64bit_segments): Likewise.
7579 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7581 * features/i386/x32-core.c
7582 (create_feature_i386_x32_core): Likewise.
7583 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7584 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7585 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7586 * target-descriptions.c: In generated code, don't pass xml
7589 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7591 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7592 (print_xml_feature::visit_post): Likewise.
7593 (print_xml_feature::visit): Likewise.
7594 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7595 (print_xml_feature): Add new class.
7596 * regformats/regdat.sh: Null xmltarget on feature targets.
7597 * target-descriptions.c (struct target_desc): Add xmltarget.
7598 (maintenance_check_tdesc_xml_convert): Add unittest function.
7599 (tdesc_get_features_xml): Add function to get xml.
7600 (maintenance_check_xml_descriptions): Test xml generation.
7601 * xml-tdesc.c (string_read_description_xml): Add function.
7602 * xml-tdesc.h (string_read_description_xml): Add declaration.
7604 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7606 * features/Makefile: Add feature marker to targets with new style
7607 target descriptions.
7608 * regformats/aarch64.dat: Regenerate.
7609 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7610 * regformats/i386/amd64-avx-linux.dat: Likewise.
7611 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7612 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7613 * regformats/i386/amd64-linux.dat: Likewise.
7614 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7615 * regformats/i386/amd64.dat: Likewise.
7616 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7617 * regformats/i386/i386-avx-linux.dat: Likewise.
7618 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7619 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7620 * regformats/i386/i386-linux.dat: Likewise.
7621 * regformats/i386/i386-mmx-linux.dat: Likewise.
7622 * regformats/i386/i386-mpx-linux.dat: Likewise.
7623 * regformats/i386/i386.dat: Likewise.
7624 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7625 * regformats/i386/x32-avx-linux.dat: Likewise.
7626 * regformats/i386/x32-linux.dat: Likewise.
7627 * regformats/tic6x-c62x-linux.dat: Likewise.
7628 * regformats/tic6x-c64x-linux.dat: Likewise.
7629 * regformats/tic6x-c64xp-linux.dat: Likewise.
7630 * regformats/regdat.sh: Parse feature marker.
7632 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7634 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7635 (tdesc_osabi_name): Likewise.
7636 * target-descriptions.c (tdesc_architecture_name): Add new
7638 (tdesc_osabi_name): Likewise.
7640 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7642 * common/tdesc.c (tdesc_predefined_type): Move to here.
7643 (tdesc_named_type): Likewise.
7644 (tdesc_create_vector): Likewise.
7645 (tdesc_create_struct): Likewise.
7646 (tdesc_set_struct_size): Likewise.
7647 (tdesc_create_union): Likewise.
7648 (tdesc_create_flags): Likewise.
7649 (tdesc_create_enum): Likewise.
7650 (tdesc_add_field): Likewise.
7651 (tdesc_add_typed_bitfield): Likewise.
7652 (tdesc_add_bitfield): Likewise.
7653 (tdesc_add_flag): Likewise.
7654 (tdesc_add_enum_value): Likewise.
7655 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7656 (struct tdesc_type_vector): Likewise.
7657 (struct tdesc_type_field): Likewise.
7658 (struct tdesc_type_with_fields): Likewise.
7659 (tdesc_create_enum): Add declaration.
7660 (tdesc_add_typed_bitfield): Likewise.
7661 (tdesc_add_enum_value): Likewise.
7662 * target-descriptions.c (tdesc_type_field): Move from here.
7663 (tdesc_type_builtin): Likewise.
7664 (tdesc_type_vector): Likewise.
7665 (tdesc_type_with_fields): Likewise.
7666 (tdesc_predefined_types): Likewise.
7667 (tdesc_named_type): Likewise.
7668 (tdesc_create_vector): Likewise.
7669 (tdesc_create_struct): Likewise.
7670 (tdesc_set_struct_size): Likewise.
7671 (tdesc_create_union): Likewise.
7672 (tdesc_create_flags): Likewise.
7673 (tdesc_create_enum): Likewise.
7674 (tdesc_add_field): Likewise.
7675 (tdesc_add_typed_bitfield): Likewise.
7676 (tdesc_add_bitfield): Likewise.
7677 (tdesc_add_flag): Likewise.
7678 (tdesc_add_enum_value): Likewise.
7679 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7680 (tdesc_add_typed_bitfield): Likewise.
7681 (tdesc_add_enum_value): Likewise.
7683 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7685 * common/tdesc.c (tdesc_feature::accept): Move to here.
7686 (tdesc_feature::operator==): Likewise.
7687 (tdesc_create_reg): Likewise.
7688 * common/tdesc.h (tdesc_type_kind): Likewise.
7689 (struct tdesc_type): Likewise.
7690 (struct tdesc_feature): Likewise.
7691 * regformats/regdat.sh: Create a feature.
7692 * target-descriptions.c (tdesc_type_kind): Move from here.
7693 (tdesc_type): Likewise.
7694 (tdesc_type_up): Likewise.
7695 (tdesc_feature): Likewise.
7696 (tdesc_create_reg): Likewise.
7698 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7700 * Makefile.in: Add arch/tdesc.c
7701 * common/tdesc.c: New file.
7702 * common/tdesc.h (tdesc_element_visitor): Move to here.
7703 (tdesc_element): Likewise.
7704 (tdesc_reg): Likewise.
7705 (tdesc_reg_up): Likewise.
7706 * regformats/regdef.h (reg): Add offset to constructors.
7707 * target-descriptions.c (tdesc_element_visitor): Move from here.
7708 (tdesc_element): Likewise.
7709 (tdesc_reg): Likewise.
7710 (tdesc_reg_up): Likewise.
7712 2018-04-17 Tom Tromey <tom@tromey.com>
7714 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7717 2018-04-17 Tom Tromey <tom@tromey.com>
7719 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7721 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7723 * symtab.c (print_symbol_info): Skip printing filename and line
7724 number when `last' is NULL.
7725 (symtab_symbol_info): Use empty string instead of NULL for first
7726 invocation of print_symbol_info.
7727 (rbreak_command): Pass NULL to `last' parameter of
7730 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7732 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7735 2018-04-16 Pedro Alves <palves@redhat.com>
7737 * MAINTAINERS (sh): Remove.
7738 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7739 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7740 (ALLDEPFILES): Remove sh64-tdep.c.
7741 * NEWS: Mentions that support for SH-5/SH64 is removed.
7742 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7743 (sh*-*-openbsd*): Ditto.
7744 (sh64-*-elf*): Remove.
7746 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7747 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7748 * sh-tdep.c: No longer include "sh64-tdep.h".
7749 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7750 * sh64-tdep.c, sh64-tdep.h: Remove files.
7752 2018-04-16 Pedro Alves <palves@redhat.com>
7754 * MAINTAINERS: Remove m88k.
7755 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7756 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7757 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7758 * NEWS: Mention that support for m88k was removed.
7759 * configure.host (m88*-*-*): Remove support.
7760 * configure.nat (m88k-*-*): Remove support.
7761 * configure.tgt (m88*-*-openbsd*): Remove.
7762 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7764 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7766 * configure.tgt (x86_tobjs): New variable.
7767 (amd64_tobjs, i386_tobjs): Use it.
7769 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7771 * symtab.c (print_symbol_info): Precede the symbol definition by
7772 the line number when available.
7773 * NEWS: Advertise this enhancement.
7775 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7777 * NEWS (New options): announce set/show record btrace cpu.
7778 * btrace.c: Include record-btrace.h.
7779 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7780 the vendor is unknown.
7781 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7782 Maybe overwrite the btrace configuration's cpu.
7783 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7784 (btrace_fetch): Add cpu parameter. Update callers.
7785 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7786 Maybe overwrite the btrace configuration's cpu. Skip enabling
7787 errata workarounds if the vendor is unknown.
7788 * python/py-record-btrace.c: Include record-btrace.h.
7789 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7790 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7791 * record-btrace.c (record_btrace_cpu_state_kind): New.
7792 (record_btrace_cpu): New.
7793 (set_record_btrace_cpu_cmdlist): New.
7794 (record_btrace_get_cpu): New.
7795 (require_btrace_thread, record_btrace_info)
7796 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7797 (cmd_set_record_btrace_cpu_none): New.
7798 (cmd_set_record_btrace_cpu_auto): New.
7799 (cmd_set_record_btrace_cpu): New.
7800 (cmd_show_record_btrace_cpu): New.
7801 (_initialize_record_btrace): Initialize set/show record btrace cpu
7803 * record-btrace.h (record_btrace_get_cpu): New.
7805 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7807 * record.c (set_record_command): Fix typo in message.
7809 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7811 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7813 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7815 * infrun.c (process_event_stop_test): Call
7816 gdbarch_in_indirect_branch_thunk.
7817 * gdbarch.sh (in_indirect_branch_thunk): New.
7818 * gdbarch.c: Regenerated.
7819 * gdbarch.h: Regenerated.
7822 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7823 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7824 (ALLDEPFILES): Add x86-tdep.c.
7825 * arch-utils.h (default_in_indirect_branch_thunk): New.
7826 * arch-utils.c (default_in_indirect_branch_thunk): New.
7827 * i386-tdep: Include x86-tdep.h.
7828 (i386_in_indirect_branch_thunk): New.
7829 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7831 * amd64-tdep: Include x86-tdep.h.
7832 (amd64_in_indirect_branch_thunk): New.
7833 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7835 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7838 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7839 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7840 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7843 2018-04-12 Tom Tromey <tom@tromey.com>
7845 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7846 (rust_evaluate_subexp): Likewise.
7848 2018-04-12 Pedro Alves <palves@redhat.com>
7850 * procfs.c (procfs_detach): Make forward declaration's prototype
7851 match definition's protototype.
7852 (proc_get_LDT_entry): Remove stale do_cleanups call.
7854 2018-04-12 Pedro Alves <palves@redhat.com>
7856 * target.h (target_ops::to_has_exited): Delete.
7857 (target_has_exited): Delete.
7858 * target-delegates.c: Regenerate.
7860 2018-04-11 Pedro Alves <palves@redhat.com>
7862 * target.c (fileio_fh_t::t): Add comment.
7863 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7864 (target_fileio_close): Handle a NULL target.
7865 (invalidate_fileio_fh): New.
7866 (target_close): Call it.
7867 * remote.c (remote_hostio_send_command): No longer check whether
7868 remote_desc is open.
7870 2018-04-11 Pedro Alves <palves@redhat.com>
7872 * target.c (fileio_fh_t): Make it a named struct instead of a
7874 (fileio_fh_t::is_closed): New method.
7875 (DEF_VEC_O (fileio_fh_t)): Remove.
7876 (fileio_fhandles): Now a std::vector.
7877 (is_closed_fileio_fh): Delete.
7878 (acquire_fileio_fd): Adjust. Rename parameters.
7879 (release_fileio_fd): Adjust.
7880 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7881 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7882 (target_fileio_close): Adjust.
7884 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7886 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7889 2018-04-10 Pedro Alves <palves@redhat.com>
7891 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7892 (scoped_finish_thread_state): New class.
7893 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7895 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7896 (fetch_inferior_event, normal_stop): Likewise.
7897 * thread.c (finish_thread_state_cleanup): Delete.
7899 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7900 Pedro Alves <palves@redhat.com>
7902 * value.c: Include "selftest.h" and "common/array-view.h".
7903 (struct range) <operator ==>: New.
7904 (test_ranges_contain): New.
7905 (check_ranges_vector): New.
7906 (test_insert_into_bit_range_vector): New.
7907 (_initialize_values): Register selftests.
7908 * common/array-view.h (operator==, operator!=): New.
7910 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7912 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7914 * inline-frame.c: Include <algorithm>.
7915 (struct inline_state): Add constructor.
7916 (inline_state_s): Remove.
7917 (DEF_VEC_O(inline_state_s)): Remove.
7918 (inline_states): Change type to std::vector.
7919 (find_inline_frame_state): Adjust to std::vector.
7920 (allocate_inline_frame_state): Remove.
7921 (clear_inline_frame_state): Adjust to std::vector.
7922 (skip_inline_frames): Adjust to std::vector.
7924 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7926 * tracepoint.h (struct trace_state_variable): Add constructor.
7927 <name>: Change type to std::string.
7928 * tracepoint.c (tsv_s): Remove.
7929 (DEF_VEC_O(tsv_s)): Remove.
7930 (tvariables): Change to std::vector.
7931 (create_trace_state_variable): Adjust to std::vector.
7932 (find_trace_state_variable): Likewise.
7933 (find_trace_state_variable_by_number): Likewise.
7934 (delete_trace_state_variable): Likewise.
7935 (trace_variable_command): Adjust to std::string.
7936 (delete_trace_variable_command): Likewise.
7937 (tvariables_info_1): Adjust to std::vector.
7938 (save_trace_state_variables): Likewise.
7939 (start_tracing): Likewise.
7940 (merge_uploaded_trace_state_variables): Adjust to std::vector
7942 * target.h (struct target_ops)
7943 <to_download_trace_state_variable>: Pass reference to
7944 trace_state_variable.
7945 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7946 * target-delegates.c: Re-generate.
7947 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7948 (mi_tsv_deleted): Likewise.
7949 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7950 * remote.c (remote_download_trace_state_variable): Change
7951 pointer to reference and adjust.
7952 * make-target-delegates (parse_argtypes): Handle references.
7953 (write_function_header): Likewise.
7954 (munge_type): Likewise.
7956 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7958 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7959 string_view-selftests.c.
7960 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7962 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7963 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7964 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7965 * unittests/basic_string_view/element_access/char/1.cc:
7967 * unittests/basic_string_view/element_access/char/empty.cc:
7969 * unittests/basic_string_view/element_access/char/front_back.cc:
7971 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7972 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7974 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7976 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7978 * unittests/basic_string_view/operations/compare/char/1.cc:
7980 * unittests/basic_string_view/operations/compare/char/13650.cc:
7982 * unittests/basic_string_view/operations/copy/char/1.cc:
7984 * unittests/basic_string_view/operations/data/char/1.cc:
7986 * unittests/basic_string_view/operations/find/char/1.cc:
7988 * unittests/basic_string_view/operations/find/char/2.cc:
7990 * unittests/basic_string_view/operations/find/char/3.cc:
7992 * unittests/basic_string_view/operations/find/char/4.cc:
7994 * unittests/basic_string_view/operations/rfind/char/1.cc:
7996 * unittests/basic_string_view/operations/rfind/char/2.cc:
7998 * unittests/basic_string_view/operations/rfind/char/3.cc:
8000 * unittests/basic_string_view/operations/substr/char/1.cc:
8002 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8003 * unittests/string_view-selftests.c: New file.
8005 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8007 * unittests/basic_string_view/capacity/1.cc: New file.
8008 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8009 * unittests/basic_string_view/cons/char/1.cc: New file.
8010 * unittests/basic_string_view/cons/char/2.cc: New file.
8011 * unittests/basic_string_view/cons/char/3.cc: New file.
8012 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8013 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8014 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8015 * unittests/basic_string_view/element_access/char/1.cc: New file.
8016 * unittests/basic_string_view/element_access/char/2.cc: New file.
8017 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8018 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8019 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8020 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8021 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8022 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8023 * unittests/basic_string_view/include.cc: New file.
8024 * unittests/basic_string_view/inserters/char/1.cc: New file.
8025 * unittests/basic_string_view/inserters/char/2.cc: New file.
8026 * unittests/basic_string_view/inserters/char/3.cc: New file.
8027 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8028 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8029 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8030 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8031 * unittests/basic_string_view/literals/types.cc: New file.
8032 * unittests/basic_string_view/literals/values.cc: New file.
8033 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8034 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8035 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8036 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8037 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8038 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8039 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8040 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8041 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8042 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8043 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8044 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8045 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8046 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8047 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8048 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8049 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8050 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8051 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8052 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8053 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8054 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8055 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8056 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8057 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8058 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8059 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8060 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8061 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8062 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8063 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8064 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8065 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8066 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8067 * unittests/basic_string_view/operators/char/2.cc: New file.
8068 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8069 * unittests/basic_string_view/range_access/char/1.cc: New file.
8070 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8071 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8072 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8073 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8074 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8075 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8076 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8077 * unittests/basic_string_view/typedefs.cc: New file.
8078 * unittests/basic_string_view/types/1.cc: New file.
8080 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8082 * common/gdb_string_view.h: Remove libstdc++ implementation
8083 details, adjust to gdb reality.
8084 * common/gdb_string_view.tcc: Likewise.
8085 * cli/cli-script.c (struct string_view): Remove.
8086 (user_args) <m_args>: Change element type to gdb::string_view.
8087 (user_args::insert_args): Adjust.
8089 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8091 * common/gdb_string_view.h: New file.
8092 * common/gdb_string_view.tcc: New file.
8094 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8096 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8097 * configure: Re-generate.
8099 2018-04-09 Pedro Alves <palves@redhat.com>
8101 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8102 (set_target_gdbarch): Call
8103 gdb::observers::architecture_changed.notify instead of
8104 observer_notify_architecture_changed.
8106 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8108 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8109 (do_restore_current_traceframe_cleanup): Remove.
8110 (restore_current_traceframe_cleanup_dtor): Remove.
8111 (make_cleanup_restore_current_traceframe): Remove.
8112 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8114 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8115 * infrun.c (fetch_inferior_event): Use
8116 scoped_restore_current_traceframe.
8118 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8120 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8122 <n_allocated_type_units>: Remove.
8123 <all_type_units>: Change to std::vector.
8124 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8125 to std::vector change.
8126 (dwarf2_per_objfile::get_cutu): Likewise.
8127 (dwarf2_per_objfile::get_tu): Likewise.
8128 (create_signatured_type_table_from_index): Likewise.
8129 (create_signatured_type_table_from_debug_names): Likewise.
8130 (dw2_symtab_iter_next): Likewise.
8131 (dw2_print_stats): Likewise.
8132 (dw2_expand_all_symtabs): Likewise.
8133 (dw2_expand_marked_cus): Likewise.
8134 (dw2_debug_names_iterator::next): Likewise.
8135 (dwarf2_initialize_objfile): Likewise.
8136 (add_signatured_type_cu_to_table): Likewise.
8137 (create_all_type_units): Likewise.
8138 (add_type_unit): Likewise.
8139 (struct tu_abbrev_offset): Add constructor.
8140 (build_type_psymtabs_1): Adjust to std::vector change.
8141 (print_tu_stats): Likewise.
8142 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8143 (write_debug_names): Likewise.
8145 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8147 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8148 Make an std::vector.
8149 <n_comp_units>: Remove.
8150 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8151 to std::vector change.
8152 (dwarf2_per_objfile::get_cutu): Likewise.
8153 (dwarf2_per_objfile::get_cu): Likewise.
8154 (create_cus_from_index): Likewise.
8155 (create_addrmap_from_index): Likewise.
8156 (create_addrmap_from_aranges): Likewise.
8157 (dwarf2_read_index): Likewise.
8158 (dw2_find_last_source_symtab): Likewise.
8159 (dw2_map_symtabs_matching_filename): Likewise.
8160 (dw2_symtab_iter_next): Likewise.
8161 (dw2_print_stats): Likewise.
8162 (dw2_expand_all_symtabs): Likewise.
8163 (dw2_expand_symtabs_with_fullname): Likewise.
8164 (dw2_expand_marked_cus): Likewise.
8165 (dw2_map_symbol_filenames): Likewise.
8166 (create_cus_from_debug_names): Likewise.
8167 (dwarf2_read_debug_names): Likewise.
8168 (dw2_debug_names_iterator::next): Likewise.
8169 (dwarf2_initialize_objfile): Likewise.
8170 (set_partial_user): Likewise.
8171 (dwarf2_build_psymtabs_hard): Likewise.
8172 (read_comp_units_from_section): Remove arguments, adjust to
8174 (create_all_comp_units): Adjust to std::vector and
8175 read_comp_units_from_section changes.
8176 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8178 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8179 (psyms_seen_size): Likewise.
8180 (write_gdbindex): Likewise.
8181 (write_debug_names): Likewise.
8183 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8185 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8186 with dwarf2_per_objfile.
8187 (create_cus_from_index): Likewise.
8188 (create_signatured_type_table_from_index): Likewise.
8189 (dwarf2_read_index): Likewise.
8190 (dwarf2_initialize_objfile): Likewise.
8191 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8192 per_cu rather than get_dwarf2_per_objfile.
8194 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8196 * dwarf2read.h (struct signatured_type): Forward declare.
8197 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8199 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8200 (dw2_get_cutu): ...this.
8201 (dwarf2_per_objfile::get_cu): Rename from...
8202 (dw2_get_cu): ...this.
8203 (dwarf2_per_objfile::get_tu): New.
8204 (create_addrmap_from_index): Adjust.
8205 (create_addrmap_from_aranges): Adjust.
8206 (dw2_find_last_source_symtab): Adjust.
8207 (dw2_map_symtabs_matching_filename): Adjust.
8208 (dw2_symtab_iter_next): Adjust.
8209 (dw2_print_stats): Adjust.
8210 (dw2_expand_all_symtabs): Adjust.
8211 (dw2_expand_symtabs_with_fullname): Adjust.
8212 (dw2_expand_marked_cus): Adjust.
8213 (dw_expand_symtabs_matching_file_matcher): Adjust.
8214 (dw2_map_symbol_filenames): Adjust.
8215 (dw2_debug_names_iterator::next): Adjust.
8216 (dwarf2_initialize_objfile): Adjust.
8217 (set_partial_user): Adjust.
8218 (dwarf2_build_psymtabs_hard): Adjust.
8220 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8222 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8223 Remove unused variables.
8224 (dw2_map_symtabs_matching_filename): Likewise.
8225 (dwarf2_record_block_ranges): Likewise.
8226 (dwarf2_read_addr_index): Likewise.
8227 (follow_die_offset): Likewise.
8229 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8231 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8232 to symbol_file_add_main.
8234 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8237 * mi/mi-console.c (do_fputc_async_safe): New.
8238 (mi_console_file::write_async_safe): New.
8239 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8240 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8242 * ui-file.c (ui_file::putstrn): Adjust call to
8243 fputstrn_unfiltered.
8244 * utils.c (printchar): Replace do_fputs and do_fprintf
8245 parameters by do_fputc.
8246 (fputstr_filtered): Adjust call to printchar.
8247 (fputstr_unfiltered): Likewise.
8248 (fputstrn_filtered): Likewise.
8249 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8251 * utils.h (do_fputc_ftype): New typedef.
8252 (fputstrn_unfiltered): Add do_fputc parameter.
8254 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8256 * regformats/i386/i386-avx.dat: Remove.
8258 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8261 * amd64-tdep.c (amd64_none_init_abi): New function.
8262 (amd64_x32_none_init_abi): New function.
8263 (_initialize_amd64_tdep): Register handlers for x86-64 and
8264 x64_32 with GDB_OSABI_NONE.
8265 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8266 GDB_OSABI_NONE osabi.
8268 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8271 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8273 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8274 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8276 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8278 * common/byte-vector.h (char_vector): New type.
8279 * target.h (target_read_alloc): Return
8280 gdb::optional<byte_vector>.
8281 (target_read_stralloc): Return gdb::optional<char_vector>.
8282 (target_get_osdata): Return gdb::optional<char_vector>.
8283 * target.c (target_read_alloc_1): Templatize. Replacement
8284 manual memory management with vector.
8285 (target_read_alloc): Change return type, adjust.
8286 (target_read_stralloc): Change return type, adjust.
8287 (target_get_osdata): Change return type, adjust.
8288 * auxv.c (struct auxv_info) <length>: Remove.
8289 <data>: Change type to gdb::optional<byte_vector>.
8290 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8291 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8292 (target_auxv_search): Adjust.
8293 (fprint_target_auxv): Adjust.
8294 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8295 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8296 (linux_make_corefile_notes): Adjust.
8297 * osdata.c (get_osdata): Adjust.
8298 * remote.c (remote_get_threads_with_qxfer): Adjust.
8299 (remote_memory_map): Adjust.
8300 (remote_traceframe_info): Adjust.
8301 (btrace_read_config): Adjust.
8302 (remote_read_btrace): Adjust.
8303 (remote_pid_to_exec_file): Adjust.
8304 * solib-aix.c (solib_aix_get_library_list): Adjust.
8305 * solib-dsbt.c (decode_loadmap): Don't free buf.
8306 (dsbt_get_initial_loadmaps): Adjust.
8307 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8308 * solib-target.c (solib_target_current_sos): Adjust.
8309 * tracepoint.c (sdata_make_value): Adjust.
8310 * xml-support.c (xinclude_start_include): Adjust.
8311 (xml_fetch_content_from_file): Adjust.
8312 * xml-support.h (xml_fetch_another): Change return type.
8313 (xml_fetch_content_from_file): Change return type.
8314 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8315 * xml-tdesc.c (file_read_description_xml): Adjust.
8316 (fetch_available_features_from_target): Change return type.
8317 (target_fetch_description_xml): Adjust.
8318 (target_read_description_xml): Adjust.
8320 2018-04-06 Tom Tromey <tom@tromey.com>
8322 * value.c (~value): Update.
8323 (struct value) <contents>: Now unique_xmalloc_ptr.
8324 (value_contents_bits_eq, allocate_value_contents)
8325 (value_contents_raw, value_contents_all_raw)
8326 (value_contents_for_printing, value_contents_for_printing_const)
8327 (set_value_enclosing_type): Update.
8329 2018-04-06 Tom Tromey <tom@tromey.com>
8331 * value.c (range_s): Remove typedef, VEC.
8332 (struct range): Add operator<.
8333 (range_lessthan): Remove.
8334 (ranges_contain): Change type.
8336 (struct value) <unavailable, optimized_out>: Now std::vector.
8337 (value_entirely_available)
8338 (value_entirely_covered_by_range_vector)
8339 (value_entirely_unavailable, value_entirely_optimized_out):
8341 (insert_into_bit_range_vector): Change argument type.
8342 (find_first_range_overlap): Likewise.
8343 (struct ranges_and_idx, value_contents_bits_eq)
8344 (require_not_optimized_out, require_available): Update.
8345 (ranges_copy_adjusted): Change argument types.
8346 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8348 2018-04-06 Tom Tromey <tom@tromey.com>
8350 * value.c (~value): Update.
8351 (struct value) <parent>: Now a value_ref_ptr.
8352 (value_parent, set_value_parent, value_address, value_copy):
8355 2018-04-06 Tom Tromey <tom@tromey.com>
8357 * value.c (struct value): Add constructor, destructor, and member
8359 (allocate_value_lazy, value_decref): Update.
8361 2018-04-06 Tom Tromey <tom@tromey.com>
8363 * value.c (struct value) <released, next>: Remove.
8364 (all_values): Now a std::vector.
8365 (allocate_value_lazy): Update.
8366 (value_next): Remove.
8367 (value_mark, value_free_to_mark, release_value)
8368 (value_release_to_mark): Update.
8370 2018-04-06 Tom Tromey <tom@tromey.com>
8372 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8373 (free_value_chain): Remove.
8374 * value.c (free_value_chain): Remove.
8375 (value_release_to_mark): Return a std::vector.
8376 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8378 (check_condition): Update.
8379 * eval.c (fetch_subexp_value): Change "val_chain" to a
8381 * breakpoint.c (update_watchpoint): Update.
8382 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8384 2018-04-06 Tom Tromey <tom@tromey.com>
8386 * value.h (free_all_values): Remove.
8387 * value.c (free_all_values): Remove.
8389 2018-04-06 Tom Tromey <tom@tromey.com>
8391 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8392 (value_history_chain, value_history_count): Remove.
8393 (value_history): New global.
8394 (record_latest_value, access_value_history, show_values)
8395 (preserve_values): Update.
8397 2018-04-06 Tom Tromey <tom@tromey.com>
8399 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8400 * varobj.c (varobj_set_display_format, varobj_set_value)
8401 (install_default_visualizer, construct_visualizer)
8402 (install_new_value, ~varobj, varobj_get_value_type)
8403 (my_value_of_variable, varobj_editable_p): Update.
8404 * c-varobj.c (c_describe_child, c_value_of_variable)
8405 (cplus_number_of_children, cplus_describe_child): Update.
8406 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8407 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8408 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8410 2018-04-06 Tom Tromey <tom@tromey.com>
8412 * printcmd.c (last_examine_address): Change type to
8414 (do_examine, x_command): Update.
8416 2018-04-06 Tom Tromey <tom@tromey.com>
8418 * value.c (release_value): Update.
8419 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8420 (struct bpstats) <val>: Now a value_ref_ptr.
8421 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8422 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8423 (~watchpoint, print_it_watchpoint, watch_command_1)
8424 (invalidate_bp_value_on_memory_change): Update.
8426 2018-04-06 Tom Tromey <tom@tromey.com>
8428 * varobj.c (varobj_clear_saved_item)
8429 (update_dynamic_varobj_children, install_new_value, ~varobj):
8431 * value.h (value_incref): Move declaration earlier.
8432 (value_decref): Rename from value_free.
8433 (struct value_ref_policy): New.
8434 (value_ref_ptr): New typedef.
8435 (struct value_deleter): Remove.
8436 (gdb_value_up): Remove typedef.
8437 (release_value): Change return type.
8438 (release_value_or_incref): Remove.
8439 * value.c (set_value_parent): Update.
8440 (value_incref): Change return type.
8441 (value_decref): Rename from value_free.
8442 (value_free_to_mark, free_all_values, free_value_chain): Update.
8443 (release_value): Return value_ref_ptr.
8444 (release_value_or_incref): Remove.
8445 (record_latest_value, set_internalvar, clear_internalvar):
8447 * stack.c (info_frame_command): Don't call value_free.
8448 * python/py-value.c (valpy_dealloc, valpy_new)
8449 (value_to_value_object): Update.
8450 * printcmd.c (do_examine): Update.
8451 * opencl-lang.c (lval_func_free_closure): Update.
8452 * mi/mi-main.c (register_changed_p): Don't call value_free.
8453 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8454 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8455 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8457 * guile/scm-value.c (vlscm_free_value_smob)
8458 (vlscm_scm_from_value): Update.
8459 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8460 (frame_unwind_register_unsigned, get_frame_register_bytes)
8461 (put_frame_register_bytes): Don't call value_free.
8462 * findvar.c (address_from_register): Don't call value_free.
8463 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8464 * dwarf2loc.c (entry_data_value_free_closure)
8465 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8466 (dwarf2_evaluate_loc_desc_full): Update.
8467 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8468 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8469 (~watchpoint, watch_command_1)
8470 (invalidate_bp_value_on_memory_change): Update.
8471 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8473 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8476 * warning.m4: Add -Wno-error=deprecated-register.
8477 * configure: Re-generate.
8479 2018-04-05 Tom Tromey <tom@tromey.com>
8481 * linespec.h: Remove include of "vec.h".
8483 2018-04-05 Tom Tromey <tom@tromey.com>
8485 * linespec.c (typep): Remove typedef.
8486 (find_methods, find_superclass_methods): Take a std::vector.
8487 (find_method): Use std::vector.
8489 2018-04-05 Tom Tromey <tom@tromey.com>
8491 * utils.c (compare_strings): Remove.
8492 * utils.h (compare_strings): Remove.
8493 * objc-lang.h (find_imps): Update.
8494 * objc-lang.c (find_methods): Take a std::vector.
8495 (uniquify_strings, find_imps): Likewise.
8496 * linespec.c (find_methods): Take a std::vector.
8497 (decode_objc): Use std::vector.
8498 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8500 (find_method, find_function_symbols): Use std::vector.
8502 2018-04-05 Tom Tromey <tom@tromey.com>
8504 * completer.c (completion_tracker::completion_tracker): Remove
8506 (completion_tracker::discard_completions): Likewise.
8507 * breakpoint.c (ambiguous_names_p): Remove cast.
8508 * ada-lang.c (_initialize_ada_language): Remove cast.
8509 * utils.h (streq): Update.
8510 (streq_hash): Add new declaration.
8511 * utils.c (streq): Return bool.
8512 (streq_hash): New function.
8514 2018-04-05 Tom Tromey <tom@tromey.com>
8516 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8517 Remove a string copy.
8519 2018-04-05 Tom Tromey <tom@tromey.com>
8521 * linespec.c (filter_results): Use std::vector.
8522 (decode_line_2, decode_line_full): Update.
8524 2018-04-05 Tom Tromey <tom@tromey.com>
8526 * linespec.c (canonical_to_fullform): Return std::string.
8527 (filter_results): Update.
8528 (struct decode_line_2_item): Add constructor.
8529 <fullform, displayform>: Now std::string.
8530 (decode_line_2_compare_items): Now a std::sort comparator.
8531 (decode_line_2): Update.
8533 2018-04-05 Tom Tromey <tom@tromey.com>
8535 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8536 (unexpected_linespec_error): Update.
8537 (linespec_parse_basic, parse_linespec): Update.
8539 2018-04-05 Tom Tromey <tom@tromey.com>
8541 * linespec.c (linespec_parse_basic): Reindent.
8543 2018-04-05 Tom Tromey <tom@tromey.com>
8545 * minsyms.h (iterate_over_minimal_symbols): Update.
8546 * minsyms.c (iterate_over_minimal_symbols): Take a
8548 * linespec.c (struct collect_minsyms): Remove.
8549 (compare_msyms): Now a std::sort comparator.
8550 (add_minsym): Add parameters.
8551 (search_minsyms_for_name): Update. Use std::vector.
8553 2018-04-03 Tom Tromey <tom@tromey.com>
8555 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8558 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8560 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8562 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8565 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8566 printing static type.
8568 2018-04-01 Tom Tromey <tom@tromey.com>
8570 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8571 (rs6000_xfer_shared_libraries): Update.
8573 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8575 * common/gdb_vecs.h (char_ptr): Remove.
8576 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8578 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8580 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8582 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8584 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8586 * tracepoint.h (struct uploaded_tp): Initialize fields.
8587 <actions, step_actions, cmd_strings>: Change type to
8588 std::vector<char *>.
8589 * tracepoint.c (get_uploaded_tp): Allocate with new.
8590 (free_uploaded_tps): Free with delete.
8591 (parse_tracepoint_definition): Adjust to std::vector change.
8592 * breakpoint.c (read_uploaded_action): Likewise.
8593 (create_tracepoint_from_upload): Likewise.
8594 * ctf.c (ctf_write_uploaded_tp): Likewise.
8595 (SET_ARRAY_FIELD): Likewise.
8596 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8598 2018-03-30 Tom Tromey <tom@tromey.com>
8600 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8602 (svr4_keep_data_in_core): Update.
8603 (svr4_read_so_list): Update.
8605 2018-03-30 Tom Tromey <tom@tromey.com>
8607 * windows-nat.c (handle_output_debug_string, handle_exception):
8609 * target.h (target_read_string): Update.
8610 * target.c (target_read_string): Change "string" to
8612 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8614 * solib-frv.c (frv_current_sos): Update.
8615 * solib-dsbt.c (dsbt_current_sos): Update.
8616 * solib-darwin.c (darwin_current_sos): Update.
8617 * linux-thread-db.c (inferior_has_bug): Update.
8618 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8619 Update. Remove alloca.
8620 * ada-lang.c (ada_main_name): Update.
8622 2018-03-30 Tom Tromey <tom@tromey.com>
8624 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8625 (struct dwo_file_deleter): New.
8626 (dwo_file_up): New typedef.
8627 (open_and_init_dwo_file): Use dwo_file_up.
8628 (free_dwo_file_cleanup): Remove.
8630 2018-03-30 Tom Tromey <tom@tromey.com>
8632 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8633 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8635 2018-03-30 Tom Tromey <tom@tromey.com>
8637 * dwarf2read.c (class free_cached_comp_units): New class.
8638 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8639 (free_cached_comp_units): Remove function.
8641 2018-03-30 Tom Tromey <tom@tromey.com>
8643 * utils.h (make_cleanup_unpush_target): Remove.
8644 * inf-ptrace.c (struct target_unpusher): New.
8645 (target_unpush_up) New typedef.
8646 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8648 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8650 2018-03-27 Tom Tromey <tom@tromey.com>
8652 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8654 2018-03-27 Pedro Alves <palves@redhat.com>
8655 Tom Tromey <tom@tromey.com>
8657 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8658 destructor. Now a class.
8659 (gdb_readline_wrapper_cleanup): Remove function.
8660 (gdb_readline_wrapper): Remove cleanups.
8662 2018-03-27 Tom Tromey <tom@tromey.com>
8664 * typeprint.h (struct type_print_options) <local_typedefs,
8665 global_typedefs>: Remove "struct" keyword.
8666 (class typedef_hash_table): New class.
8667 (recursively_update_typedef_hash, add_template_parameters)
8668 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8669 (find_typedef_in_hash): Don't declare.
8670 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8671 (typedef_hash_table::recursively_update): Rename from
8672 recursively_update_typedef_hash. Now a member.
8673 (typedef_hash_table::add_template_parameters): Rename from
8674 add_template_parameters. Now a member.
8675 (typedef_hash_table::typedef_hash_table): Now a constructor;
8676 rename from create_typedef_hash.
8677 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8678 rename from free_typedef_hash.
8679 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8680 (do_free_global_table): Remove.
8681 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8682 from copy_type_recursive.
8683 (create_global_typedef_table): Remove.
8684 (typedef_hash_table::find_global_typedef): Now a member of
8686 (typedef_hash_table::find_typedef): Rename from
8687 find_typedef_in_hash; now a member.
8688 (whatis_exp): Update.
8689 * extension.h (struct ext_lang_type_printers): Add constructor and
8691 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8693 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8694 Now a constructor; rename from start_ext_lang_type_printers.
8695 (ext_lang_type_printers): Now a destructor; rename from
8696 free_ext_lang_type_printers.
8697 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8699 (c_type_print_base_struct_union): Update. Remove cleanups.
8701 2018-03-27 Tom Tromey <tom@tromey.com>
8703 * dwarf-index-write.c: Include <cmath>.
8705 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8707 * NEWS: Add entry describing new "set|show varsize-limit" command.
8708 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8710 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8713 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8715 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8717 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8718 * dwarf-index-common.c: New file.
8719 * dwarf-index-common.h: New file.
8720 * dwarf-index-write.c: New file.
8721 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8722 (struct dwarf2_section_info): Move from here.
8723 (dwarf2_section_info_def): Likewise.
8724 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8725 (offset_type): Likewise.
8726 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8727 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8728 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8729 (byte_swap): Likewise.
8730 (MAYBE_SWAP): Likewise.
8731 (dwarf2_per_cu_ptr): Likewise.
8732 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8733 (struct tu_stats): Likewise.
8734 (struct dwarf2_per_objfile): Likewise.
8735 (struct dwarf2_per_cu_data): Likewise.
8736 (struct signatured_type): Likewise.
8737 (sig_type_ptr): Likewise.
8738 (DEF_VEC_P (sig_type_ptr)): Likewise.
8739 (INDEX4_SUFFIX): Likewise.
8740 (INDEX5_SUFFIX): Likewise.
8741 (DEBUG_STR_SUFFIX): Likewise.
8742 (dwarf2_read_section): Make non-static.
8743 (mapped_index_string_hash): Move from here.
8744 (dwarf5_djb_hash): Likewise.
8745 (file_write): Likewise.
8746 (class data_buf): Likewise.
8747 (struct symtab_index_entry): Likewise.
8748 (struct mapped_symtab): Likewise.
8749 (find_slot): Likewise.
8750 (hash_expand): Likewise.
8751 (add_index_entry): Likewise.
8752 (uniquify_cu_indices): Likewise.
8753 (class c_str_view): Likewise.
8754 (class c_str_view_hasher): Likewise.
8755 (class vector_hasher): Likewise.
8756 (write_hash_table): Likewise.
8757 (psym_index_map): Likewise.
8758 (struct addrmap_index_data): Likewise.
8759 (add_address_entry): Likewise.
8760 (add_address_entry_worker): Likewise.
8761 (write_address_map): Likewise.
8762 (symbol_kind): Likewise.
8763 (write_psymbols): Likewise.
8764 (struct signatured_type_index_data): Likewise.
8765 (write_one_signatured_type): Likewise.
8766 (recursively_count_psymbols): Likewise.
8767 (recursively_write_psymbols): Likewise.
8768 (class debug_names): Likewise.
8769 (check_dwarf64_offsets): Likewise.
8770 (psyms_seen_size): Likewise.
8771 (write_gdbindex): Likewise.
8772 (write_debug_names): Likewise.
8773 (assert_file_size): Likewise.
8774 (write_psymtabs_to_index): Likewise.
8775 (save_gdb_index_command): Likewise.
8776 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8778 * dwarf2read.h: New file.
8780 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8783 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8784 symbol name if the CU's language stores symbol names in linkage
8786 * language.h (struct language_defn)
8787 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8788 all instances of this struct.
8790 2018-03-26 Tom Tromey <tom@tromey.com>
8792 * stack.c (backtrace_command_1): Remove verbose code.
8794 2018-03-26 Tom Tromey <tom@tromey.com>
8796 * python/py-framefilter.c (py_print_type): Don't catch
8797 exceptions. Return void.
8798 (py_print_value): Likewise.
8799 (py_print_single_arg): Likewise.
8800 (enumerate_args): Don't catch exceptions.
8801 (py_print_args): Likewise.
8802 (py_print_frame): Likewise.
8803 (gdbpy_apply_frame_filter): Catch exceptions here.
8805 2018-03-26 Tom Tromey <tom@tromey.com>
8807 * stack.c (_initialize_stack): Remove trailing newlines from help
8808 text. Add "Usage" line to "backtrace" help.
8810 2018-03-26 Tom Tromey <tom@tromey.com>
8813 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8815 2018-03-26 Tom Tromey <tom@tromey.com>
8817 * python/py-framefilter.c (py_print_single_arg): Return
8818 EXT_LANG_BT_ERROR from catch.
8820 2018-03-26 Tom Tromey <tom@tromey.com>
8823 * stack.c (backtrace_command_1): Move some code into no-filters
8826 2018-03-26 Tom Tromey <tom@tromey.com>
8828 * python/py-framefilter.c (throw_quit_or_print_exception): New
8830 (gdbpy_apply_frame_filter): Use it.
8832 2018-03-26 Tom Tromey <tom@tromey.com>
8835 * python/py-framefilter.c (py_print_type, py_print_value)
8836 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8839 2018-03-26 Tom Tromey <tom@tromey.com>
8841 * python/py-framefilter.c (enumerate_args): Use
8842 gdb::unique_xmalloc_ptr.
8844 2018-03-26 Tom Tromey <tom@tromey.com>
8846 * python/py-framefilter.c (py_print_frame): Return
8848 (gdbpy_apply_frame_filter): Update comment.
8849 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8851 <EXT_LANG_BT_NO_FILTERS>: Change value.
8853 2018-03-26 Tom Tromey <tom@tromey.com>
8856 * stack.c (backtrace_command): Parse "hide" argument.
8857 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8858 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8861 2018-03-26 Tom Tromey <tom@tromey.com>
8863 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8865 (backtrace_command): Remove "fulltrace", add "flags".
8867 2018-03-26 Tom Tromey <tom@tromey.com>
8869 * stack.c (backtrace_command): Rewrite command line parsing.
8871 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8873 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8875 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8877 * filename-seen-cache.h: Add include guard.
8879 2018-03-26 Keith Seitz <keiths@redhat.com>
8881 * symfile.c (place_section): Remove "struct" from section_addr_info
8883 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8884 "struct" keyword from section_addr_info.
8886 2018-03-26 Alan Hayward <alan.hayward@arm.com>
8888 * regformats/regdef.h (reg): Add constructors.
8890 2018-03-25 Pedro Alves <palves@redhat.com>
8892 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8893 if then/else bodies in var_func_name extraction.
8895 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
8897 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8898 lookup_minimal_symbol() to find symbol entry.
8899 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8901 2018-03-23 Keith Seitz <keiths@redhat.com>
8904 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8905 nested type definitions for C++, too.
8907 2018-03-23 Tom Tromey <tom@tromey.com>
8909 * machoread.c (struct oso_el): Add a constructor. Don't define as
8911 (macho_register_oso): Remove.
8912 (macho_symtab_read): Take a std::vector.
8913 (oso_el_compare_name): Now a std::sort comparator.
8914 (macho_symfile_read_all_oso): Take a std::vector.
8915 (macho_symfile_read): Use std::vector. Remove cleanups.
8917 2018-03-22 Tom Tromey <tom@tromey.com>
8919 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8920 (record_full_goto_bookmark): Use std::string.
8922 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8925 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8928 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8930 * rs6000-tdep.c (store_insn_p): New function.
8931 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8932 and cr_reg to their unshifted values. Use store_insn_p to
8933 match LR saves using either R1 or fdata->alloca_reg. Use
8934 store_insn_p to match CR saves. Set alloca_reg_offset
8935 when alloca_reg and framep are set. Remove lr_reg shift
8936 when assigning to fdata->lr_register.
8938 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8940 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8941 command line args instead of emitting a warning.
8943 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8945 * tracepoint.h (struct static_tracepoint_marker): Initialize
8946 fields, define default constructor, move constructor and move
8947 assignment, disable the rest.
8948 <str_id, extra>: Make std::string.
8949 (release_static_tracepoint_marker): Remove.
8950 (free_current_marker): Remove.
8951 * tracepoint.c (free_current_marker): Remove.
8952 (parse_static_tracepoint_marker_definition): Adjust to
8953 std::string, use new hex2str overload.
8954 (release_static_tracepoint_marker): Remove.
8955 (print_one_static_tracepoint_marker): Get marker by reference
8956 and adjust to std::string.
8957 (info_static_tracepoint_markers_command): Adjust to std::vector
8959 * target.h (static_tracepoint_marker_p): Remove typedef.
8960 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8961 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8963 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8965 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8966 (target_debug_print_std_vector_static_tracepoint_marker): New.
8967 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8969 (target_debug_print_static_tracepoint_marker_p): ... this.
8970 * target-delegates.c: Re-generate.
8971 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8973 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8974 (decode_static_tracepoint_spec): Adjust to std::vector.
8975 (tracepoint_print_one_detail): Adjust to std::string.
8976 (strace_marker_decode_location): Adjust to std::string.
8977 (update_static_tracepoint): Adjust to std::string, remove call
8978 to release_static_tracepoint_marker.
8979 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8980 Adjust to std::vector.
8981 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8982 (remote_static_tracepoint_markers_by_strid): Adjust to
8984 * common/rsp-low.h (hex2str): New overload with explicit count
8986 * common/rsp-low.c (hex2str): New overload with explicit count
8988 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8989 (_initialize_rsp_low_selftests): Add test_hex2str test.
8990 * unittests/tracepoint-selftests.c
8991 (test_parse_static_tracepoint_marker_definition): Adjust to
8994 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8996 * tracepoint.c (parse_static_tracepoint_marker_definition):
8997 Consider case where the definition is followed by more
8999 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9000 tracepoint-selftests.c.
9001 * unittests/tracepoint-selftests.c: New.
9003 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9005 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9008 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9010 * symtab.c (find_pc_sect_line): fixed indentation.
9012 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9014 * symtab.c (find_pc_sect_line): now uses binary search.
9016 2018-03-19 Tom Tromey <tom@tromey.com>
9018 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9021 2018-03-19 Pedro Alves <palves@redhat.com>
9022 Tom Tromey <tom@tromey.com>
9024 * unittests/observable-selftests.c: New file.
9025 * common/observable.h: New file.
9026 * observable.h: New file.
9027 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9028 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9029 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9030 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9031 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9032 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9033 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9034 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9035 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9036 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9037 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9038 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9039 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9040 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9041 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9042 tui/tui-interp.c, valops.c: Update all users.
9043 * tui/tui-hooks.c (tui_bp_created_observer)
9044 (tui_bp_deleted_observer, tui_bp_modified_observer)
9045 (tui_inferior_exit_observer, tui_before_prompt_observer)
9046 (tui_normal_stop_observer, tui_register_changed_observer):
9048 (tui_observers_token): New global.
9049 (attach_or_detach, tui_attach_detach_observers): New functions.
9050 (tui_install_hooks, tui_remove_hooks): Use
9051 tui_attach_detach_observers.
9052 * record-btrace.c (record_btrace_thread_observer): Remove.
9053 (record_btrace_thread_observer_token): New global.
9054 * observer.sh: Remove.
9055 * observer.c: Rename to observable.c.
9056 * observable.c (namespace gdb_observers): Define new objects.
9057 (observer_debug): Move into gdb_observers namespace.
9058 (struct observer, struct observer_list, xalloc_observer_list_node)
9059 (xfree_observer_list_node, generic_observer_attach)
9060 (generic_observer_detach, generic_observer_notify): Remove.
9061 (_initialize_observer): Update.
9062 Don't include observer.inc.
9063 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9064 (clean mostlyclean): Likewise.
9065 (observer.h, observer.inc): Remove targets.
9066 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9067 (COMMON_SFILES): Use observable.c, not observer.c.
9068 * .gitignore: Remove observer.h.
9070 2018-03-18 Tom Tromey <tom@tromey.com>
9072 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9074 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9076 2018-03-17 Tom Tromey <tom@tromey.com>
9078 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9080 2018-03-17 Tom Tromey <tom@tromey.com>
9082 * target.c (class scoped_target_fd): New.
9083 (target_fileio_close_cleanup): Remove.
9084 (target_fileio_read_alloc_1): Use scoped_target_fd.
9086 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9088 * silent-rules.mk: New.
9089 * Makefile.in: Include silent-rules.mk
9090 (srcdir, VPATH, top_srcdir): Move up.
9091 (COMPILE): Add ECHO_CXX.
9092 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9093 (init.c): Add ECHO_INIT_C.
9094 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9095 (version.c): Add ECHO_GEN.
9096 (printcmd.o): Add ECHO_CXX.
9097 (target-float.o): Add ECHO_CXX.
9098 (ada-exp.o): Add ECHO_CXX.
9099 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9100 (insight$(EXEEXT)): Add ECHO_CXXLD.
9101 * gnulib/configure.ac: Add AM_SILENT_RULES.
9102 * gnulib/aclocal.m4: Re-generate.
9103 * gnulib/configure: Re-generate.
9104 * gnulib/import/Makefile.in: Re-generate.
9106 2018-03-16 Tom Tromey <tom@tromey.com>
9108 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9109 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9110 * utils.c (do_free_section_addr_info)
9111 (make_cleanup_free_section_addr_info): Remove.
9112 * symfile.h (struct other_sections): Add constructor.
9113 (struct section_addr_info): Remove.
9114 (section_addr_info): New typedef.
9115 (struct sym_fns) <sym_offsets>: Change type of parameter.
9116 (build_section_addr_info_from_objfile)
9117 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9118 (default_symfile_offsets, symbol_file_add)
9119 (symbol_file_add_from_bfd)
9120 (build_section_addr_info_from_section_table): Update.
9121 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9122 * symfile.c (alloc_section_addr_info): Remove.
9123 (build_section_addr_info_from_section_table): Change return type.
9125 (build_section_addr_info_from_bfd)
9126 (build_section_addr_info_from_objfile): Likewise.
9127 (free_section_addr_info): Remove.
9128 (relative_addr_info_to_section_offsets): Change type of "addrs".
9129 (addrs_section_compar): Now a std::sort comparator.
9130 (addrs_section_sort): Change return type.
9131 (addr_info_make_relative): Change type of "addrs". Update.
9132 (default_symfile_offsets, syms_from_objfile_1)
9133 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9134 (symbol_file_add_separate): Update.
9135 (symbol_file_add): Change type of "addrs". Update.
9136 (add_symbol_file_command): Update. Remove cleanups.
9137 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9139 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9140 * solib.c (solib_read_symbols): Update.
9141 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9142 * machoread.c (macho_symfile_offsets): Update.
9143 * jit.c (jit_bfd_try_read_symtab): Update.
9145 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9147 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9148 unittests/utils-selftests.c.
9149 * unittests/utils-selftests.c: New file.
9151 2018-03-14 Tom Tromey <tom@tromey.com>
9154 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9157 2018-03-14 Tom Tromey <tom@tromey.com>
9160 * printcmd.c (printf_pointer): Allow "-" in format.
9162 2018-03-14 Tom Tromey <tom@tromey.com>
9164 * printcmd.c (_initialize_printcmd): Add usage to printf.
9166 2018-03-14 Yao Qi <qiyao@sourceware.org>
9168 * MAINTAINERS: Update my email address.
9170 2018-03-13 Tom Tromey <tom@tromey.com>
9172 * machoread.c (macho_check_dsym): Change filenamep to a
9174 (macho_symfile_read): Update.
9175 * symfile.c (load_command): Use std::string.
9177 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9179 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9180 to error message string.
9181 (riscv_register_name): Use xsnprintf instead of sprintf.
9182 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9184 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9186 (riscv_push_dummy_call): Likewise.
9188 2018-03-12 Tom Tromey <tom@tromey.com>
9190 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9191 Use gdb::byte_vector.
9192 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9194 2018-03-12 Yao Qi <yao.qi@linaro.org>
9196 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9197 parameter type to readable_regcache.
9198 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9201 2018-03-11 Tom Tromey <tom@tromey.com>
9203 * dwarf2read.c (struct nextfield): Add initializers.
9204 (struct nextfnfield): Remove.
9205 (struct fnfieldlist): Add initializers. Remove "length" and
9206 "head", use std::vector.
9207 (struct decl_field_list): Remove.
9208 (struct field_info): Add initializers.
9209 <fields, baseclasses>: Now std::vector.
9210 <nbaseclasses, nfnfields, typedef_field_list_count,
9211 nested_types_list_count>: Remove.
9212 (dwarf2_add_field, dwarf2_add_type_defn)
9213 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9214 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9215 (process_structure_scope): Update.
9217 2018-03-11 Tom Tromey <tom@tromey.com>
9219 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9220 for use by std::sort.
9221 (build_type_psymtabs_1): Use std::vector.
9223 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9225 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9226 and LIBMPFR in the printed configuration.
9228 2018-03-08 Tom Tromey <tom@tromey.com>
9230 * source.c (get_filename_and_charpos): Use scoped_fd.
9231 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9232 (procfs_pidlist): Likewise.
9233 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9234 (iterate_over_mappings): Likewise.
9236 2018-03-08 Tom Tromey <tom@tromey.com>
9238 * infcall.c (struct call_return_meta_info)
9239 <stack_temporaries_enabled>: Remove.
9240 (get_call_return_value, call_function_by_hand_dummy): Update.
9241 * thread.c (disable_thread_stack_temporaries): Remove.
9242 (enable_thread_stack_temporaries): Remove.
9243 (thread_stack_temporaries_enabled_p): Return bool.
9244 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9245 (get_last_thread_stack_temporary): Update.
9246 * eval.c (evaluate_subexp): Update.
9247 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9248 class, not a function.
9249 (value_ptr, value_vec): Remove typedefs.
9250 (class thread_info) <stack_temporaries_enabled>: Now bool.
9251 <stack_temporaries>: Now a std::vector.
9252 (thread_stack_temporaries_enabled_p)
9253 (value_in_thread_stack_temporaries): Return bool.
9255 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9257 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9258 (getpkt_or_notif_sane_1): Likewise.
9260 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9262 * build-id.c (build_id_to_debug_bfd): Use std::string.
9264 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9266 * build-id.c (find_separate_debug_file_by_buildid): Return
9268 * build-id.h (find_separate_debug_file_by_buildid): Return
9270 * coffread.c (coff_symfile_read): Adjust to std::string.
9271 * elfread.c (elf_symfile_read): Adjust to std::string.
9272 * symfile.c (separate_debug_file_exists): Change parameter to
9274 (find_separate_debug_file): Return std::string.
9275 (find_separate_debug_file_by_debuglink): Return std::string.
9276 * symfile.h (find_separate_debug_file_by_debuglink): Return
9279 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9281 * common/xml-utils.c (xml_escape_text): Move code to...
9282 (xml_escape_text_append): ... this new function.
9283 * common/xml-utils.h (xml_escape_text_append): New declaration.
9284 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9286 (_initialize_xml_utils): register test_xml_escape_text_append as
9289 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9291 * defs.h: Remove MAX_REGISTER_SIZE.
9292 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9294 * python/py-unwind.c (pyuw_sniffer): Likewise.
9296 2018-03-07 Tom Tromey <tom@tromey.com>
9298 * linux-tdep.c (linux_info_proc): Update.
9299 * target.h (struct target_ops) <to_fileio_readlink>: Return
9301 (target_fileio_readlink): Return optional<string>.
9302 * remote.c (remote_hostio_readlink): Return optional<string>.
9303 * inf-child.c (inf_child_fileio_readlink): Return
9305 * target.c (target_fileio_readlink): Return optional<string>.
9307 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9309 * regcache.c (cooked_read_test): Add riscv to the list of
9310 architectures that have a save_reggroup.
9312 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9314 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9315 value is not a dynamic class object.
9317 2018-03-06 Tom Tromey <tom@tromey.com>
9319 * rust-exp.y: Formatting fixes.
9321 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9323 * riscv-tdep.c (riscv_register_name): Remove target description
9325 (riscv_gdbarch_init): Remove target description check.
9327 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9329 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9331 * riscv-tdep.h: Likewise.
9333 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9335 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9336 (riscv_pseudo_register_write): Delete.
9337 (riscv_gdbarch_init): Remove all use of pseudo registers.
9339 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9341 * record-btrace.c (btrace_print_lines): Replace cleanup
9342 parameter with RAII equivalents.
9343 (btrace_insn_history): Replace cleanup with RAII equivalents.
9344 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9345 make_cleanup_ui_out_tuple_begin_end): Remove.
9346 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9347 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9348 make_cleanup_ui_out_list_begin_end): Remove.
9350 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9352 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9353 parameter types to std::vector. Use bool.
9354 (record_btrace_wait): Replace VEC(tp_t) with
9355 std::vector<thread_info *>.
9356 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9358 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9360 * record-btrace.c (record_btrace_disable_callback): Remove.
9361 (struct scoped_btrace_disable): New.
9362 (record_btrace_open): Use scoped_btrace_disable.
9364 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9366 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9367 reading values from registers.
9369 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9371 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9374 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9376 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9377 change parameter type. Use GDB's print functions, and use
9378 core_addr_to_string where appropriate.
9379 (riscv_push_dummy_call): Use core_addr_to_string where
9380 appropriate, update call to riscv_print_arg_location, and reindent
9382 (riscv_return_value): Update call to riscv_print_arg_location.
9384 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9385 Tim Newsome <tim@sifive.com>
9386 Albert Ou <a0u@eecs.berkeley.edu>
9387 Darius Rad <darius@bluespec.com>
9389 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9390 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9391 (ALLDEPFILES): Add riscv-tdep.c
9392 * configure.tgt: Add riscv support.
9393 * riscv-tdep.c: New file.
9394 * riscv-tdep.h: New file.
9395 * NEWS: Mention new target.
9396 * MAINTAINERS: Add entry for riscv.
9398 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9400 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9401 fields within aggregates.
9403 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9405 * record-btrace.c (btrace_print_lines): Change type of flags to
9406 gdb_disassembly_flags.
9408 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9410 * fbsd-nat.c: Include "inf-ptrace.h".
9411 (USE_SIGTRAP_SIGINFO): Conditionally define.
9412 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9413 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9414 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9416 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9418 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9420 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9421 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9422 "supports_stopped_by_hw_breakpoint" target methods.
9424 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9426 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9427 * fbsd-nat.c (debug_fbsd_nat): New variable.
9428 (show_fbsd_nat_debug): New function.
9429 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9430 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9432 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9434 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9435 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9437 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9438 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9441 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9443 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9444 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9446 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9448 * charset.c (struct charset_vector): New.
9449 (charsets): Change type to charset_vector.
9450 (find_charset_names): Adjust.
9452 (_initialize_charset): Adjust.
9454 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9456 * progspace.h (struct program_space) <deleted_solibs>: Change
9457 type to std::vector<std::string>.
9458 * progspace.c (clear_program_space_solib_cache): Adjust.
9459 * breakpoint.c (print_solib_event): Adjust.
9460 (check_status_catch_solib): Adjust.
9461 * solib.c (update_solib_list): Adjust.
9462 * ui-out.h (class ui_out) <field_string>: New overload.
9463 * ui-out.c (ui_out::field_string): New overload.
9465 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9467 * progspace.h (struct program_space): Add constructor and
9468 destructor, initialize fields.
9469 (add_program_space): Remove.
9470 * progspace.c (add_program_space): Rename to...
9471 (program_space::program_space): ... this.
9472 (release_program_space): Rename to...
9473 (program_space::~program_space): ... this.
9474 (delete_program_space): Use delete to delete program_space.
9475 (initialize_progspace): Use new to allocate program_space.
9476 * inferior.c (add_inferior_with_spaces): Likewise.
9477 (clone_inferior_command): Likewise.
9478 * infrun.c (follow_fork_inferior): Likewise.
9479 (handle_vfork_child_exec_or_exit): Likewise.
9481 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9483 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9484 (delim_string_to_char_ptr_vec): Return std::vector of
9485 gdb::unique_xmalloc_ptr.
9486 (dirnames_to_char_ptr_vec_append): Take std::vector of
9487 gdb::unique_xmalloc_ptr.
9488 (dirnames_to_char_ptr_vec): Return std::vector of
9489 gdb::unique_xmalloc_ptr.
9490 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9491 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9492 (delim_string_to_char_ptr_vec): Return an std::vector of
9493 gdb::unique_xmalloc_ptr, adjust the code.
9494 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9495 gdb::unique_xmalloc_ptr, adjust the code.
9496 (dirnames_to_char_ptr_vec): Return an std::vector of
9497 gdb::unique_xmalloc_ptr, adjust the code.
9498 * auto-load.c (auto_load_safe_path_vec): Change type to
9499 std::vector of gdb::unique_xmalloc_ptr.
9500 (auto_load_expand_dir_vars): Return an std::vector of
9501 gdb::unique_xmalloc_ptr, adjust the code.
9502 (auto_load_safe_path_vec_update): Adjust.
9503 (filename_is_in_auto_load_safe_path_vec): Adjust.
9504 (auto_load_objfile_script_1): Adjust.
9505 * build-id.c (build_id_to_debug_bfd): Adjust.
9506 * linux-thread-db.c (thread_db_load_search): Adjust.
9507 * source.c (add_path): Adjust.
9509 * symfile.c (find_separate_debug_file): Adjust.
9510 * utils.c (do_free_char_ptr_vec): Remove.
9511 (make_cleanup_free_char_ptr_vec): Remove.
9513 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9516 * common/pathstuff.c: Conditionally include "<windows.h>".
9518 2018-03-01 Georg Sauthoff <mail@georg.so>
9521 * gcore.in: Quote variables and switch interpreter to bash.
9523 2018-03-01 Tom Tromey <tom@tromey.com>
9525 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9526 assertion. Add assertion for discriminant_index.
9527 (quirk_rust_enum): Use correct base type name in univariant case.
9529 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9531 * record.c (get_call_history_modifiers): Return a
9533 (cmd_record_call_history): Adjust.
9534 * record-btrace.c (record_btrace_call_history): Adjust.
9535 (record_btrace_call_history_range): Adjust.
9536 (record_btrace_call_history_from): Adjust.
9537 * target-debug.h (target_debug_print_record_print_flags): New.
9538 * target-delegates.c: Re-generate.
9539 * target.c (target_call_history): Change flags type.
9540 (target_call_history_from): Likewise.
9541 (target_call_history_range): Likewise.
9542 * target.h (struct target_ops) <target_call_history>: Likewise.
9543 (target_call_history_from): Likewise.
9544 (target_call_history_range): Likewise.
9546 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9547 Simon Marchi <simon.marchi@polymtl.ca>
9549 * common/common-utils.c: Include "sys/stat.h".
9550 (is_regular_file): Move here from "source.c"; change return
9552 * common/common-utils.h (is_regular_file): New prototype.
9553 * common/pathstuff.c (contains_dir_separator): New function.
9554 * common/pathstuff.h (contains_dir_separator): New prototype.
9555 * source.c: Don't include "sys/stat.h".
9556 (is_regular_file): Move to "common/common-utils.c".
9558 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9560 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9561 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9562 * auto-load.c: Include "common/pathstuff.h".
9563 * common/common-def.h (current_directory): Move here.
9564 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9566 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9568 * common/pathstuff.c: New file.
9569 * common/pathstuff.h: New file.
9570 * compile/compile.c: Include "common/pathstuff.h".
9571 * defs.h (current_directory): Move to "common/common-defs.h".
9572 * dwarf2read.c: Include "common/pathstuff.h".
9574 * guile/scm-safe-call.c: Likewise.
9575 * linux-thread-db.c: Likewise.
9577 * nto-tdep.c: Likewise.
9578 * objfiles.c: Likewise.
9579 * source.c: Likewise.
9580 * symtab.c: Likewise.
9581 * utils.c: Include "common/pathstuff.h".
9582 (gdb_realpath): Move to "common/pathstuff.c".
9583 (gdb_realpath_keepfile): Likewise.
9584 (gdb_abspath): Likewise.
9585 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9586 (gdb_realpath_keepfile): Likewise.
9587 (gdb_abspath): Likewise.
9589 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9591 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9592 wildcard process pid for super_resume for kernels with a
9595 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9597 * compile/compile.c (get_args): Add additional comments
9598 explaining function.
9600 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9601 Tom Tromey <tom@tromey.com>
9603 * target.h (memory_write_request_s): Remove typedef. Don't define
9605 (target_write_memory_blocks): Change argument to std::vector.
9606 (struct memory_write_request): Add constructor.
9607 * target-memory.c (compare_block_starting_address): Return bool.
9608 Change argument types.
9609 (claim_memory): Change arguments to use std::vector.
9610 (split_regular_and_flash_blocks, blocks_to_erase)
9611 (compute_garbled_blocks): Likewise.
9612 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9613 (target_write_memory_blocks): Change argument to std::vector.
9614 * symfile.c (struct load_section_data): Add constructor and
9615 destructor. Use std::vector for "requests".
9616 (struct load_progress_data): Add initializers.
9617 (load_section_callback): Update. Use "new".
9618 (clear_memory_write_data): Remove.
9619 (generic_load): Update.
9621 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9623 * arch/aarch64.h: Use common/tdesc.h.
9625 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9627 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9628 architecture with a 64-bit ABI.
9630 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9632 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9633 ahead of target description loading.
9635 2018-02-26 Tom Tromey <tom@tromey.com>
9637 * stack.c (backtrace_command_1): Update.
9638 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9640 * python/py-framefilter.c (py_print_frame)
9641 (gdbpy_apply_frame_filter): Change type of "flags".
9642 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9644 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9645 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9646 * extension.h (enum frame_filter_flag): Rename from
9648 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9649 (apply_ext_lang_frame_filter): Change type of "flags".
9650 * extension.c (apply_ext_lang_frame_filter): Change type of
9652 * extension-priv.h (struct extension_language_ops)
9653 <apply_frame_filter>: Change type of "flags".
9655 2018-02-26 Tom Tromey <tom@tromey.com>
9658 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9659 off-by-one in py_end computation.
9660 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9662 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9665 2018-02-26 Tom Tromey <tom@tromey.com>
9667 * dwarf2read.c (struct variant_field): New.
9668 (struct nextfield) <variant>: New field.
9669 (dwarf2_add_field): Handle DW_TAG_variant_part.
9670 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9671 discriminated union.
9672 (read_structure_type): Handle DW_TAG_variant_part.
9673 (handle_struct_member_die): New function, extracted from
9674 process_structure_scope. Handle DW_TAG_variant.
9675 (process_structure_scope): Handle discriminated unions. Call
9676 handle_struct_member_die.
9678 2018-02-26 Tom Tromey <tom@tromey.com>
9680 * rust-lang.h (rust_last_path_segment): Declare.
9681 * rust-lang.c (rust_last_path_segment): Now public. Change
9683 (struct disr_info): Remove.
9684 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9685 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9686 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9687 (rust_enum_p, rust_enum_variant): New function.
9688 (rust_underscore_fields): Remove "offset" parameter.
9689 (rust_print_enum): New function.
9690 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9691 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9692 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9694 (rust_internal_print_type): New function, from rust_print_type.
9696 (rust_print_type): Call rust_internal_print_type.
9697 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9698 Update enum handling.
9699 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9700 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9701 (rust_union_quirks): New functions.
9702 (process_full_comp_unit, process_full_type_unit): Call
9704 (process_structure_scope): Update rust_unions if necessary.
9706 2018-02-26 Tom Tromey <tom@tromey.com>
9708 * value.h (value_union_variant): Declare.
9709 * valops.c (value_union_variant): New function.
9710 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9711 (struct discriminant_info): New.
9712 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9714 (struct main_type) <flag_discriminated_union>: New field.
9716 2018-02-26 Tom Tromey <tom@tromey.com>
9718 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9719 unittests/unpack-selftests.c.
9720 * unittests/unpack-selftests.c: New file.
9721 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9723 2018-02-26 Yao Qi <yao.qi@linaro.org>
9725 * dwarf2read.c (struct partial_die_info) <read>: New method.
9726 (read_partial_die): Remove the declaration.
9727 (load_partial_dies): Update.
9728 (partial_die_info::partial_die_info):
9729 (read_partial_die): Change it to partial_die_info::read.
9731 2018-02-26 Yao Qi <yao.qi@linaro.org>
9733 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9734 (fixup_partial_die): Remove declaration.
9735 (scan_partial_symbols): Update.
9736 (partial_die_parent_scope): Likewise.
9737 (partial_die_full_name): Likewise.
9738 (fixup_partial_die): Change it to partial_die_info::fixup.
9740 2018-02-26 Yao Qi <yao.qi@linaro.org>
9742 * dwarf2read.c (read_partial_die): Update the declaration.
9743 (load_partial_dies): Caller update.
9744 (read_partial_die): Remove one argument abbrev_len.
9746 2018-02-26 Yao Qi <yao.qi@linaro.org>
9748 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9749 assignment operator.
9750 (load_partial_dies): Use ctor and copy ctor.
9751 (read_partial_die): Update.
9752 (dwarf2_cu::find_partial_die): Use ctor.
9754 2018-02-26 Yao Qi <yao.qi@linaro.org>
9756 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9757 (find_partial_die_in_comp_unit): Change it to
9758 dwarf2_cu::find_partial_die.
9759 (find_partial_die): Update.
9761 2018-02-26 Yao Qi <yao.qi@linaro.org>
9763 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9766 2018-02-26 Yao Qi <yao.qi@linaro.org>
9768 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9770 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9772 * arch/amd64.h: Use common/tdesc.h.
9773 * arch/i386.c: Likewise.
9774 * arch/i386.h: Likewise.
9775 * arch/tic6x.c: Likewise.
9776 * arch/tdesc.h: Move file from here...
9777 * common/tdesc.h: ...to here.
9778 * features/aarch64-core.c: Regenerate.
9779 * features/aarch64-fpu.c: Regenerate.
9780 * features/i386/32bit-avx.c: Regenerate.
9781 * features/i386/32bit-avx512.c: Regenerate.
9782 * features/i386/32bit-core.c: Regenerate.
9783 * features/i386/32bit-linux.c: Regenerate.
9784 * features/i386/32bit-mpx.c: Regenerate.
9785 * features/i386/32bit-pkeys.c: Regenerate.
9786 * features/i386/32bit-sse.c: Regenerate.
9787 * features/i386/64bit-avx.c: Regenerate.
9788 * features/i386/64bit-avx512.c: Regenerate.
9789 * features/i386/64bit-core.c: Regenerate.
9790 * features/i386/64bit-linux.c: Regenerate.
9791 * features/i386/64bit-mpx.c: Regenerate.
9792 * features/i386/64bit-pkeys.c: Regenerate.
9793 * features/i386/64bit-segments.c: Regenerate.
9794 * features/i386/64bit-sse.c: Regenerate.
9795 * features/i386/x32-core.c: Regenerate.
9796 * features/tic6x-c6xp.c: Regenerate.
9797 * features/tic6x-core.c: Regenerate.
9798 * features/tic6x-gp.c: Regenerate.
9799 * target-descriptions.c: Use common/tdesc.h.
9800 * target-descriptions.h: Likewise.
9802 2018-02-24 Tom Tromey <tom@tromey.com>
9804 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9805 (try_thread_db_load_from_dir, thread_db_load_search): Use
9807 (info_auto_load_libthread_db_compare): Return bool. Change
9809 (info_auto_load_libthread_db): Use std::vector, std::string.
9812 2018-02-24 Tom Tromey <tom@tromey.com>
9814 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9816 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9818 * gdbarch.c: Rebuild.
9819 * gdbarch.h: Rebuild.
9820 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9821 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9822 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9825 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9827 * gdbtypes.h (sect_offset): Change type to uint64_t.
9828 (sect_offset_str): New function.
9829 * dwarf2read.c (create_addrmap_from_aranges): Use
9831 (error_check_comp_unit_head): Likewise.
9832 (create_debug_type_hash_table): Likewise.
9833 (read_cutu_die_from_dwo): Likewise.
9834 (init_cutu_and_read_dies): Likewise.
9835 (init_cutu_and_read_dies_no_follow): Likewise.
9836 (process_psymtab_comp_unit_reader): Likewise.
9837 (partial_die_parent_scope): Likewise.
9838 (peek_die_abbrev): Likewise.
9839 (process_queue): Likewise.
9840 (dwarf2_physname): Likewise.
9841 (read_namespace_alias): Likewise.
9842 (read_import_statement): Likewise.
9843 (create_dwo_cu_reader): Likewise.
9844 (create_cus_hash_table): Likewise.
9845 (lookup_dwo_cutu): Likewise.
9846 (inherit_abstract_dies): Likewise.
9847 (read_func_scope): Likewise.
9848 (read_call_site_scope): Likewise.
9849 (dwarf2_add_member_fn): Likewise.
9850 (read_common_block): Likewise.
9851 (read_module_type): Likewise.
9852 (read_typedef): Likewise.
9853 (read_subrange_type): Likewise.
9854 (load_partial_dies): Likewise.
9855 (read_partial_die): Likewise.
9856 (find_partial_die): Likewise.
9857 (read_str_index): Likewise.
9858 (dwarf2_string_attr): Likewise.
9859 (build_error_marker_type): Likewise.
9860 (lookup_die_type): Likewise.
9861 (dump_die_shallow): Likewise.
9862 (follow_die_ref): Likewise.
9863 (dwarf2_fetch_die_loc_sect_off): Likewise.
9864 (dwarf2_fetch_constant_bytes): Likewise.
9865 (follow_die_sig): Likewise.
9866 (get_signatured_type): Likewise.
9867 (get_DW_AT_signature_type): Likewise.
9868 (dwarf2_find_containing_comp_unit): Likewise.
9869 (set_die_type): Likewise.
9871 2018-02-21 John Baldwin <jhb@FreeBSD.org>
9873 * arch/aarch64.c: Include "common-defs.h".
9874 * arch/amd64.c: Likewise.
9875 * arch/i386.c: Likewise.
9877 2018-02-21 Tom Tromey <tom@tromey.com>
9879 * value.h: (extract_field_op): Update.
9880 * eval.c (extract_field_op): Return a const char *.
9881 * expression.h (parse_expression_for_completion): Update.
9882 * completer.c (complete_expression): Update.
9883 (add_struct_fields): Make fieldname const.
9884 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9885 (mark_completion_tag, parse_exp_in_context_1): Update.
9886 (parse_expression_for_completion): Change "name" to
9887 unique_xmalloc_ptr*.
9889 2018-02-21 Tom Tromey <tom@tromey.com>
9891 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9893 2018-02-21 Yao Qi <yao.qi@linaro.org>
9895 * avr-tdep.c (avr_read_pc): Change parameter type to
9897 * gdbarch.sh (read_pc): Likewise.
9898 * gdbarch.c: Re-generated.
9899 * gdbarch.h: Re-generated.
9900 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9902 * ia64-tdep.c (ia64_read_pc): Likewise.
9903 * mips-tdep.c (mips_read_pc): Likewise.
9904 * spu-tdep.c (spu_read_pc): Likewise.
9906 2018-02-21 Yao Qi <yao.qi@linaro.org>
9908 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9909 * regcache-dump.c: New file.
9910 * regcache.c: Move register_dump to regcache-dump.c.
9911 (maintenance_print_registers): Likewise.
9912 (maintenance_print_raw_registers): Likewise.
9913 (maintenance_print_cooked_registers): Likewise.
9914 (maintenance_print_register_groups): Likewise.
9915 (maintenance_print_remote_registers): Likewise.
9916 (_initialize_regcache): Likewise.
9917 * regcache.h (register_dump): Moved from regcache.c.
9919 2018-02-21 Yao Qi <yao.qi@linaro.org>
9921 * regcache.c (regcache::regcache): Update.
9922 (regcache::invalidate): Move it to detached_regcache::invalidate.
9923 (get_thread_arch_aspace_regcache): Update.
9924 (regcache::raw_update): Update.
9925 (regcache::cooked_read): Remove some code.
9926 (regcache::cooked_read_value): Likewise.
9927 (regcache::raw_write): Remove assert on m_readonly_p.
9928 (regcache::raw_supply_integer): Move it to
9929 detached_regcache::raw_supply_integer.
9930 (regcache::raw_supply_zeroed): Likewise.
9931 * regcache.h (detached_regcache) <raw_supply_integer>: New
9933 <raw_supply_zeroed, invalidate>: Likewise.
9934 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9935 <invalidate>: Likewise.
9936 <m_readonly_p>: Removed.
9938 2018-02-21 Yao Qi <yao.qi@linaro.org>
9940 * infcmd.c (get_return_value): Let stop_regs point to
9941 get_current_regcache.
9942 * regcache.c (regcache::regcache): Remove.
9943 (register_dump_reg_buffer): New class.
9944 (regcache_print): Adjust.
9945 * regcache.h (regcache): Remove constructors.
9947 2018-02-21 Yao Qi <yao.qi@linaro.org>
9949 * regcache.c (class register_dump): New class.
9950 (register_dump_regcache, register_dump_none): New class.
9951 (register_dump_remote, register_dump_groups): New class.
9952 (regcache_print): Update.
9953 * regcache.h (regcache_dump_what): Move it to regcache.c.
9954 (regcache) <dump>: Remove.
9956 2018-02-21 Yao Qi <yao.qi@linaro.org>
9958 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9960 (jit_unwind_reg_set_impl): Call raw_supply.
9961 (jit_frame_sniffer): Use reg_buffer_rw.
9962 * record-full.c (record_full_core_regbuf): Change its type.
9963 (record_full_core_open_1): Use reg_buffer_rw.
9964 (record_full_close): Likewise.
9965 (record_full_core_fetch_registers): Use regcache->raw_supply.
9966 (record_full_core_store_registers): Likewise.
9967 * regcache.c (regcache::get_register_status): Move it to
9969 (regcache_raw_set_cached_value): Remove.
9970 (regcache::raw_set_cached_value): Remove.
9971 (regcache::raw_write): Call raw_supply.
9972 (regcache::raw_supply): Move it to reg_buffer_rw.
9973 * regcache.h (regcache_raw_set_cached_value): Remove.
9974 (reg_buffer_rw): New class.
9976 2018-02-21 Yao Qi <yao.qi@linaro.org>
9978 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9979 readonly_detached_regcache.
9980 (dummy_frame_prev_register): Use regcache->cooked_read.
9981 * frame.c (frame_save_as_regcache): Change return type.
9982 (frame_pop): Update.
9983 * frame.h (frame_save_as_regcache): Update declaration.
9984 * inferior.h (get_infcall_suspend_state_regcache): Update
9986 * infrun.c (infcall_suspend_state) <registers>: use
9987 readonly_detached_regcache.
9988 (save_infcall_suspend_state): Don't use regcache_dup.
9989 (get_infcall_suspend_state_regcache): Change return type.
9990 * linux-fork.c (struct fork_info) <savedregs>: Change to
9991 readonly_detached_regcache.
9993 (fork_save_infrun_state): Don't use regcache_dup.
9994 (info_checkpoints_command): Adjust.
9995 * mi/mi-main.c (register_changed_p): Update declaration.
9996 (mi_cmd_data_list_changed_registers): Use
9997 readonly_detached_regcache.
9998 (register_changed_p): Change parameter type to
9999 readonly_detached_regcache.
10000 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10001 readonly_detached_regcache.
10002 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10003 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10005 (regcache::save): Move it to reg_buffer.
10006 (regcache::restore): Change parameter type.
10007 (regcache_dup): Remove.
10008 * regcache.h (reg_buffer) <save>: New method.
10009 (readonly_detached_regcache): New class.
10010 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10011 readonly_detached_regcache.
10012 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10014 2018-02-21 Yao Qi <yao.qi@linaro.org>
10016 * frame.c (frame_save_as_regcache): Use regcache method save.
10017 (frame_pop): Use regcache method restore.
10018 * infrun.c (restore_infcall_suspend_state): Likewise.
10019 * linux-fork.c (fork_load_infrun_state): Likewise.
10020 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10022 * regcache.c (regcache_save): Remove.
10023 (regcache::restore): More asserts.
10024 (regcache_cpy): Remove.
10025 * regcache.h (regcache_save): Remove the declaration.
10026 (regcache::restore): Move from private to public.
10027 Remove the friend declaration of regcache_cpy.
10028 (regcache_cpy): Remove declaration.
10030 2018-02-21 Yao Qi <yao.qi@linaro.org>
10032 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10033 parameter type to 'readable_regcache *'.
10034 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10035 * arm-tdep.c (arm_neon_quad_read): Likewise.
10036 (arm_pseudo_read): Likewise.
10037 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10038 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10039 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10040 * gdbarch.c: Re-generated.
10041 * gdbarch.h: Re-generated.
10042 * gdbarch.sh (pseudo_register_read): Change parameter type to
10043 'readable_regcache *'.
10044 (pseudo_register_read_value): Likewise.
10045 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10046 (h8300_pseudo_register_read): Likewise.
10047 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10048 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10049 (i386_pseudo_register_read_into_value): Likewise.
10050 (i386_pseudo_register_read_value): Likewise.
10051 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10053 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10054 * m32c-tdep.c (m32c_raw_read): Likewise.
10055 (m32c_read_flg): Likewise.
10056 (m32c_banked_register): Likewise.
10057 (m32c_banked_read): Likewise.
10058 (m32c_sb_read): Likewise.
10059 (m32c_part_read): Likewise.
10060 (m32c_cat_read): Likewise.
10061 (m32c_r3r2r1r0_read): Likewise.
10062 (m32c_pseudo_register_read): Likewise.
10063 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10064 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10065 (mep_pseudo_cr64_read): Likewise.
10066 (mep_pseudo_register_read): Likewise.
10067 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10068 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10069 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10070 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10071 (regcache::cooked_read): Likewise.
10072 (regcache::cooked_read_value): Likewise.
10073 (regcache_cooked_read_signed):
10074 (regcache::cooked_read): Likewise.
10075 * regcache.h (readable_regcache): New class.
10076 (regcache): Inherit readable_regcache. Move some methods to
10078 * rl78-tdep.c (rl78_pseudo_register_read): Change
10079 parameter type to 'readable_regcache *'.
10080 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10081 (e500_pseudo_register_read): Change parameter type to
10082 'readable_regcache *'.
10083 (dfp_pseudo_register_read): Likewise.
10084 (vsx_pseudo_register_read): Likewise.
10085 (efpr_pseudo_register_read): Likewise.
10086 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10087 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10088 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10089 (sh64_pseudo_register_read): Likewise.
10090 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10091 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10092 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10093 (spu_pseudo_register_read): Likewise.
10094 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10095 (xtensa_pseudo_register_read): Likewise.
10097 2018-02-21 Yao Qi <yao.qi@linaro.org>
10099 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10100 (regcache::arch): Move it to reg_buffer::arch.
10101 (regcache::register_buffer): Likewise.
10102 (regcache::assert_regnum): Likewise.
10103 (regcache::num_raw_registers): Likewise.
10104 * regcache.h (reg_buffer): New class.
10105 (regcache): Inherit reg_buffer.
10107 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10109 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10110 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10112 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10114 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10116 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10118 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10119 (SFILES): Remove common/*.c files.
10120 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10121 * common/common.host: Add common reference.
10122 * configure.ac: Likewise.
10123 * configure: Regenerate.
10125 2018-02-16 Yao Qi <yao.qi@linaro.org>
10127 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10128 (block_initialize_namespace): Use new.
10129 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10130 (dwarf2_free_objfile): Use delete.
10131 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10132 (copy_type_recursive): Use new.
10133 * gdb_obstack.h (allocate_on_obstack): New.
10135 2018-02-15 Yao Qi <yao.qi@linaro.org>
10138 * inferior.c (exit_inferior_1): Reset inf->control.
10140 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10142 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10145 2018-02-14 Pedro Alves <palves@redhat.com>
10147 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10148 frame_cleanup_after_sniffer on exception.
10150 2018-02-14 Tom Tromey <tom@tromey.com>
10152 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10154 (solib_bfd_open): Make pathname const.
10155 * solib.c (solib_bfd_open): Make pathname const.
10156 * solib-spu.c (spu_bfd_fopen): Make name const.
10157 (spu_bfd_open): Make pathname const.
10158 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10159 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10161 2018-02-14 Tom Tromey <tom@tromey.com>
10163 * symfile.c (symfile_bfd_open): Update.
10164 * source.h (openp, source_full_path_of, find_and_open_source):
10165 Change argument type to unique_xmalloc_ptr.
10166 * source.c (openp): Take a unique_xmalloc_ptr.
10167 (source_full_path_of, find_and_open_source): Likewise.
10168 (open_source_file, symtab_to_fullname): Update.
10169 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10170 unique_xmalloc_ptr.
10171 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10172 (exec_file_find): Update.
10173 * psymtab.c (psymtab_to_fullname): Update.
10174 * nto-tdep.h (nto_find_and_open_solib): Update.
10175 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10176 unique_xmalloc_ptr.
10177 * exec.c (exec_file_attach): Update.
10178 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10179 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10181 2018-02-14 Tom Tromey <tom@tromey.com>
10183 * solib.c: Include source.h.
10184 * nto-tdep.c: Include source.h.
10185 * mi/mi-cmd-env.c: Include source.h.
10186 * infcmd.c: Include source.h.
10187 * exec.c: Include source.h.
10188 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10189 (add_path, directory_switch, source_path, init_source_path): Move
10191 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10192 (add_path, directory_switch, source_path, init_source_path):
10195 2018-02-14 Tom Tromey <tom@tromey.com>
10197 * solist.h (exec_file_find, solib_find): Return
10198 unique_xmalloc_ptr.
10199 (solib_bfd_fopen): Take a const char *.
10200 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10201 (exec_file_find, solib_find): Likewise.
10202 (solib_bfd_fopen): Do not take ownership of "pathname".
10203 (solib_bfd_open): Use unique_xmalloc_ptr.
10204 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10205 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10206 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10207 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10209 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10211 * ada-lang.c (name_match_type_from_name): Remove reference to
10212 ada_name_for_lookup in function's documentation.
10213 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10215 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10217 * defs.h (enum openp_flags): New enum.
10218 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10219 Move to enum openp_flags.
10220 (openp_flags): New enum flags.
10221 (openp): Change parameter type to openp_flags.
10222 * source.c (openp): Change parameter type to openp_flags.
10223 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10224 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10226 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10228 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10231 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10233 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10235 (class dwarf2_queue_guard): ...the destructor of this new class.
10236 (dw2_do_instantiate_symtab): Create instance of the new class
10237 dwarf2_queue_guard, remove cleanup.
10239 2018-02-09 Tom Tromey <tom@tromey.com>
10241 * source.c (find_source_lines): Don't reference past the end of
10244 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10246 * remote.c (remote_btrace_maybe_reopen): Change error message.
10247 * btrace.c (btrace_enable): Likewise.
10248 (parse_xml_btrace): Likewise.
10249 (parse_xml_btrace_conf): Likewise.
10251 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10253 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10254 (linux_enable_pt, linux_enable_bts): Call
10255 diagnose_perf_event_open_fail.
10257 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10259 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10260 Remove parameter and change return type. Update callers. Move it.
10261 (linux_enable_bts, linux_enable_pt): Improve error message.
10262 (linux_enable_pt): Remove zero buffer size check.
10263 (linux_enable_btrace): Improve error messages. Remove NULL return
10266 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10268 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10269 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10270 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10271 (linux_supports_pt, linux_supports_btrace): Remove.
10272 (linux_enable_bts): Call cpu_supports_bts.
10273 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10274 * remote.c (remote_supports_btrace): Remove.
10275 (init_remote_ops): Remove remote_supports_btrace.
10276 * target-delegates.c: Regenerated.
10277 * target.c (target_supports_btrace): Remove.
10278 * target.h (target_ops) <to_supports_btrace>: Remove
10279 (target_supports_btrace): Remove.
10280 * x86-linux-nat.c (x86_linux_create_target): Remove
10281 linux_supports_btrace.
10283 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10285 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10287 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10288 exception and use message in own exception.
10290 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10292 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10293 (perf_event_pt_event_type): Use gdb_file_up.
10294 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10295 scoped_fd, and scoped_mmap.
10297 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10299 * common/scoped_mmap.h: New.
10300 * unittests/scoped_mmap-selftest.c: New.
10301 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10302 unittests/scoped_mmap-selftest.c.
10304 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10306 * common/scoped_fd.h: New.
10307 * unittests/scoped_fd-selftest.c: New.
10308 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10309 unittests/scoped_fd-selftest.c.
10311 2018-02-09 Tom Tromey <tom@tromey.com>
10313 * auto-load.c (auto_load_section_scripts): Use
10314 gdb::unique_xmalloc_ptr.
10316 2018-02-09 Tom Tromey <tom@tromey.com>
10318 * auto-load.c (execute_script_contents): Use std::string.
10320 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10322 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10323 Python function, rather than a new command.
10325 2018-02-08 Tom Tromey <tom@tromey.com>
10327 * solib.c (solib_find_1): Use std::string.
10328 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10330 2018-02-08 Tom Tromey <tom@tromey.com>
10332 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10334 2018-02-08 Tom Tromey <tom@tromey.com>
10336 * source.c (find_source_lines): Use gdb::def_vector.
10338 2018-02-08 Tom Tromey <tom@tromey.com>
10340 * macrocmd.c (struct temporary_macro_definition): New.
10341 (macro_define_command): Use temporary_macro_definition. Remove
10343 (free_macro_definition_ptr): Remove.
10345 2018-02-08 Tom Tromey <tom@tromey.com>
10347 * macroexp.c (maybe_expand): Use std::string.
10349 2018-02-08 Tom Tromey <tom@tromey.com>
10351 * macroexp.c (struct macro_buffer): Add initializers for some
10353 (init_buffer, init_shared_buffer, free_buffer)
10354 (free_buffer_return_text): Remove.
10355 (macro_buffer): New constructors.
10356 (~macro_buffer): New destructor.
10357 (macro_buffer::set_shared): New method.
10358 (macro_buffer::resize_buffer, macro_buffer::appendc)
10359 (macro_buffer::appendmem): Now methods, not free functions.
10360 (set_token, append_tokens_without_splicing, stringify)
10361 (macro_stringify): Update.
10362 (gather_arguments): Change return type. Remove argc_p argument,
10363 add args_ptr argument. Use std::vector.
10364 (substitute_args): Remove argc argument. Accept std::vector.
10365 (expand): Update. Use std::vector.
10366 (scan, macro_expand, macro_expand_next): Update.
10368 2018-02-08 Tom Tromey <tom@tromey.com>
10370 * symtab.c (default_collect_symbol_completion_matches_break_on):
10371 Use unique_xmalloc_ptr.
10372 * macroscope.h: (sal_macro_scope, user_macro_scope)
10373 (default_macro_scope): Return unique_xmalloc_ptr.
10374 * macroscope.c (sal_macro_scope, user_macro_scope)
10375 (default_macro_scope): Return unique_xmalloc_ptr.
10376 * macroexp.h (macro_expand, macro_expand_once): Return
10377 unique_xmalloc_ptr.
10378 * macroexp.c (macro_expand, macro_expand_once): Return
10379 unique_xmalloc_ptr.
10380 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10381 (info_macro_command, info_macros_command): Use
10382 unique_xmalloc_ptr.
10383 * compile/compile-c-support.c (write_macro_definitions): Use
10384 unique_xmalloc_ptr.
10385 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10387 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10389 * value.c (value_static_field): Assign field type instead of
10390 containing type when returning an optimized out value.
10392 2018-02-06 Yao Qi <yao.qi@linaro.org>
10394 * ft32-tdep.c (ft32_read_pc): Remove.
10395 (ft32_write_pc): Remove.
10396 (ft32_gdbarch_init): Update.
10397 * m32r-tdep.c (m32r_read_pc): Remove.
10398 (m32r_gdbarch_init): Update.
10399 * mep-tdep.c (mep_read_pc): Remove.
10400 (mep_gdbarch_init): Update.
10401 * microblaze-tdep.c (microblaze_write_pc): Remove.
10402 (microblaze_gdbarch_init): Update.
10403 * mn10300-tdep.c (mn10300_read_pc): Remove.
10404 (mn10300_write_pc): Remove.
10405 (mn10300_gdbarch_init): Update.
10406 * moxie-tdep.c (moxie_read_pc): Remove.
10407 (moxie_write_pc): Remove.
10408 (moxie_gdbarch_init): Update.
10410 2018-02-06 Yao Qi <yao.qi@linaro.org>
10412 * expprint.c (print_subexp_standard): Handle
10413 OP_F77_UNDETERMINED_ARGLIST.
10414 (dump_subexp_body_standard): Likewise.
10416 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10418 * target-descriptions.c (tdesc_element_visitor) Add empty
10420 (tdesc_type): Move make_gdb_type from here.
10421 (tdesc_type_builtin): Likewise.
10422 (tdesc_type_vector): Likewise.
10423 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10424 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10425 (make_gdb_type_union): Likewise.
10426 (make_gdb_type_flags): Likewise.
10427 (make_gdb_type_enum): Likewise.
10428 (make_gdb_type): New function.
10429 (tdesc_register_type): Use static make_gdb_type.
10431 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10433 * infcmd.c (default_print_one_register_info): Align natural-format
10434 column values consistently one under another.
10435 (pad_to_column): New function.
10437 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10439 * dwarf2read.c (dwarf2_physname): Move commment.
10441 2018-02-01 Leszek Swirski <leszeks@google.com>
10443 * varobj.c (varobj_formatted_print_options): Allow recursive
10444 pretty printing if pretty printing is enabled.
10446 2018-02-01 Leszek Swirski <leszeks@google.com>
10448 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10449 names after a structop as a filename.
10451 2018-02-01 Yao Qi <yao.qi@linaro.org>
10453 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10454 (arm_record_coproc_data_proc): Likewise.
10456 2018-02-01 Yao Qi <yao.qi@linaro.org>
10458 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10460 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10462 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10463 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10465 2018-01-31 Pedro Alves <palves@redhat.com>
10467 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10468 * inflow.c (child_terminal_save_inferior): Wrap reference to
10469 tcgetpgrp in HAVE_TERMIOS_H.
10470 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10472 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10473 always iterate over all inferiors.
10474 (gdbsim_cntrl_c): Adjust.
10475 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10477 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10479 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10480 index type is objfile-owned if the element type is as well.
10482 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10486 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10488 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10489 "features/s390x-linux64.c".
10490 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10491 s390_linux32 and s390x_linux64.
10492 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10494 * s390-tdep.c: Include "features/s390-linux32.c" and
10495 "features/s390x-linux64.c".
10496 (s390_tdesc_valid): Add check for tdesc_has_registers.
10497 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10498 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10499 tdesc_s390x_linux64.
10500 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10501 tdesc_s390x_linux64 to...
10502 * s390-tdep.h: ...here.
10504 2018-01-30 Pedro Alves <palves@redhat.com>
10507 * config.in, configure: Regenerate.
10508 * configure.ac: Check for getpgid.
10509 * go32-nat.c (go32_pass_ctrlc): New.
10510 (go32_target): Install it.
10511 * inf-child.c (inf_child_target): Install
10512 child_terminal_save_inferior, child_pass_ctrlc and
10514 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10515 (inf_ptrace_target): No longer install it.
10516 * infcmd.c (interrupt_target_1): Adjust.
10517 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10518 (child_interrupt): Declare.
10519 (inferior::terminal_state): New.
10520 * inflow.c (struct terminal_info): Update comments.
10521 (inferior_process_group): Delete.
10522 (terminal_is_ours): Delete.
10523 (gdb_tty_state): New.
10524 (child_terminal_init): Adjust.
10525 (is_gdb_terminal, sharing_input_terminal_1)
10526 (sharing_input_terminal): New functions.
10527 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10528 Set the process's actual process group in the foreground if
10529 possible. Handle is_ours_for_output/is_ours distinction. Don't
10530 mark terminal as the inferior's if not sharing GDB's terminal.
10531 Don't check attach_flag.
10532 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10533 pass down a target_terminal_state.
10534 (child_terminal_save_inferior): New, factored out from ...
10535 (child_terminal_ours_1): ... this. Handle
10536 target_terminal_state::is_ours_for_output.
10537 (child_interrupt, child_pass_ctrlc): New.
10538 (inflow_inferior_exit): Clear the inferior's terminal_state.
10539 (copy_terminal_info): Copy the inferior's terminal state.
10540 (_initialize_inflow): Remove reference to terminal_is_ours.
10541 * inflow.h (inferior_process_group): Delete.
10542 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10543 * procfs.c (procfs_target): Don't install procfs_interrupt.
10544 (procfs_interrupt): Delete.
10545 * remote.c (remote_serial_quit_handler): Adjust.
10546 (remote_interrupt): Remove ptid parameter. Adjust.
10547 * target-delegates.c: Regenerate.
10548 * target.c: Include "terminal.h".
10549 (target_terminal::terminal_state): Rename to ...
10550 (target_terminal::m_terminal_state): ... this.
10551 (target_terminal::init): Adjust.
10552 (target_terminal::inferior): Adjust to per-inferior
10554 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10555 (target_terminal::ours, target_terminal::ours_for_output): Use
10556 target_terminal_is_ours_kind.
10557 (target_interrupt): Remove ptid parameter. Adjust.
10558 (default_target_pass_ctrlc): Adjust.
10559 * target.h (target_ops::to_terminal_save_inferior): New field.
10560 (target_ops::to_interrupt): Remove ptid_t parameter.
10561 (target_interrupt): Remove ptid_t parameter. Update comment.
10562 (target_pass_ctrlc): Update comment.
10563 * target/target.h (target_terminal_state): New scoped enum,
10564 factored out of ...
10565 (target_terminal::terminal_state): ... here.
10566 (target_terminal::inferior): Update comments.
10567 (target_terminal::restore_inferior): New.
10568 (target_terminal::is_inferior, target_terminal::is_ours)
10569 (target_terminal::is_ours_for_output): Adjust.
10570 (target_terminal::scoped_restore_terminal_state): Adjust to
10571 rename, and call restore_inferior() instead of inferior().
10572 (target_terminal::scoped_restore_terminal_state::m_state): Change
10574 (target_terminal::terminal_state): Rename to ...
10575 (target_terminal::m_terminal_state): ... this and change type.
10577 2018-01-30 Pedro Alves <palves@redhat.com>
10579 * linux-nat.c (wait_for_signal): New function.
10580 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10582 (async_terminal_is_ours)
10583 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10584 (linux_nat_add_target): Don't override
10585 to_terminal_inferior/to_terminal_ours.
10587 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10589 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10591 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10593 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10594 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10595 dwarf2_per_objfile_free here.
10596 (dwarf2_per_objfile_free): Remove.
10597 (_initialize_dwarf2_read): Don't register
10598 dwarf2_per_objfile_free as a registry cleanup.
10600 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10602 Avoid compilation errors in MinGW native builds
10604 The error is triggered by including python-internal.h, and the
10607 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10608 from build-gnulib/import/math.h:27,
10609 from d:/usr/Python26/include/pyport.h:235,
10610 from d:/usr/Python26/include/Python.h:58,
10611 from python/python-internal.h:94,
10612 from python/py-arch.c:24:
10613 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10617 This happens because Python headers define 'hypot' to expand t
10618 '_hypot' in the Windows builds.
10619 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10620 'hypoth'. This avoids a compilation error.
10622 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10624 * MAINTAINERS (Write After Approval): Fix ordering.
10626 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10628 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10630 2018-01-26 Alan Modra <amodra@gmail.com>
10632 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10633 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10634 Remove nop. Make const. Comment.
10635 (powerpc32_plt_stub_so_2): New.
10636 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10637 Correct count. Update uses.
10638 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10639 Move common code reading PLT entry word. Correct
10640 powerpc32_plt_stub PLT address calculation.
10641 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10642 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10643 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10644 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10645 (ppc64_standard_linkage8): Likewise.
10646 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10647 Correct insns description.
10648 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10650 2018-01-24 Pedro Alves <palves@redhat.com>
10652 GCC PR libstdc++/83906
10653 * gdbtypes.c (operator==(const dynamic_prop &,
10654 const dynamic_prop &)): New.
10655 (operator==(const range_bounds &, const range_bounds &)): New.
10656 (check_types_equal): Use them instead of memcmp.
10657 * gdbtypes.h (operator==(const dynamic_prop &,
10658 const dynamic_prop &)): Declare.
10659 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10660 (operator==(const range_bounds &, const range_bounds &)): Declare.
10661 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10663 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10665 * s390-linux-tdep.c (s390_record_address_mask)
10666 (s390_record_calc_disp_common, s390_record_calc_disp)
10667 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10668 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10669 (s390_process_record): Move to s390-tdep.c.
10670 (s390_linux_init_abi_any): Adjust.
10671 * s390-tdep.c (s390_record_address_mask)
10672 (s390_record_calc_disp_common, s390_record_calc_disp)
10673 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10674 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10675 (s390_process_record): Moved from s390-linux-tdep.c
10676 (s390_gdbarch_init): Adjust.
10678 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10680 * s390-linux-nat.c (s390-tdep.h): New include.
10681 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10682 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10683 (ALLDEPFILES): Add s390-tdep.c.
10684 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10685 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10686 * s390-tdep.h: ...this. New file.
10687 * s390-linux-tdep.c (s390-tdep.h): New include.
10688 (_initialize_s390_tdep): Rename to...
10689 (_initialize_s390_linux_tdep): ...this and adjust.
10690 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10691 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10693 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10694 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10695 (s390_is_partial_instruction, s390_software_single_step)
10696 (is_non_branch_ril, s390_displaced_step_copy_insn)
10697 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10698 (s390_prologue_data, s390_addr, s390_store, s390_load)
10699 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10700 (s390_register_call_saved, s390_guess_tracepoint_registers)
10701 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10702 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10703 (s390_pseudo_register_name, s390_pseudo_register_type)
10704 (s390_pseudo_register_read, s390_pseudo_register_write)
10705 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10706 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10707 (s390_addr_bits_remove, s390_address_class_type_flags)
10708 (s390_address_class_type_flags_to_name)
10709 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10710 (s390_function_arg_float, s390_function_arg_vector)
10711 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10712 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10713 (s390_frame_align, s390_register_return_value, s390_return_value)
10714 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10715 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10716 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10717 (s390_trad_frame_prev_register, s390_unwind_cache)
10718 (s390_prologue_frame_unwind_cache)
10719 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10720 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10721 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10722 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10723 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10724 (s390_frame_base_address, s390_local_base_address)
10725 (s390_frame_base, s390_gcc_target_options)
10726 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10727 (s390_validate_reg_range, s390_tdesc_valid)
10728 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10729 * s390-tdep.c: ...this. New file.
10731 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10733 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10734 (s390_process_record, s390_gdbarch_tdep_alloc)
10735 (s390_linux_init_abi_any): Use/set new hook.
10737 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10739 * s390-linux-tdep.c (osabi.h): New include.
10740 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10741 (s390_linux_init_abi_any): New functions.
10742 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10744 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10746 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10747 tdesc_has_registers check
10749 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10751 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10752 (s390_validate_reg_range): New macro.
10753 (s390_gdbarch_init): Adjust.
10755 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10757 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10758 (s390_gdbarch_tdep_alloc): Adjust.
10759 (s390_gdbarch_init): Adjust.
10761 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10763 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10764 <have_tdb>: Change type to bool.
10765 (s390_gdbarch_tdep_alloc): Adjust.
10766 (s390_gdbarch_init): Adjust.
10768 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10770 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10771 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10772 (s390_gdbarch_tdep_alloc): New function.
10773 (s390_gdbarch_init): Allocate tdep at start and use its fields
10774 instead of separate variables.
10776 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10778 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10779 when looking for cached gdbarch and add comment for remaining.
10781 2018-01-22 Pedro Alves <palves@redhat.com>
10782 Sergio Durigan Junior <sergiodj@redhat.com>
10784 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10787 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10789 * MAINTAINERS: Update my company e-mail address.
10791 2018-01-22 Yao Qi <yao.qi@linaro.org>
10793 * regcache.c (cooked_write_test): New function.
10794 (_initialize_regcache): Register the test.
10796 2018-01-22 Yao Qi <yao.qi@linaro.org>
10798 * ia64-tdep.c (ia64_pseudo_register_read): Call
10799 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10800 * m32c-tdep.c (m32c_cat_read): Likewise.
10801 (m32c_r3r2r1r0_read): Likewise.
10802 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10803 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10805 2018-01-22 Yao Qi <yao.qi@linaro.org>
10807 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10808 method raw_read instead of regcache_raw_read.
10809 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10810 * arm-tdep.c (arm_neon_quad_read): Likewise.
10811 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10812 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10813 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10814 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10815 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10816 (i386_pseudo_register_read_into_value): Likewise.
10817 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10818 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10819 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10820 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10821 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10822 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10823 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10824 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10825 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10827 2018-01-22 Yao Qi <yao.qi@linaro.org>
10829 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10830 * configure.tgt: Remove target mt.
10831 * mt-tdep.c: Remove.
10832 * regcache.c (cooked_read_test): Remove the check for mt.
10834 2018-01-22 Yao Qi <yao.qi@linaro.org>
10836 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10837 instead of gdbarch_pseudo_register_read_value.
10839 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10841 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10844 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10846 * linespec.c (create_sals_line_offset): Remove code that preserved
10847 the symtab_and_line's line number.
10849 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10851 * varobj.c (varobj_create): Don't set valid_block when creating a
10854 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10856 * varobj.c (varobj_create): Remove out of date comment.
10858 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10861 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10862 updating innermost block.
10863 * parse.c (innermost_block_tracker::update): Take extra type
10864 parameter, and check types match before updating innermost block.
10865 (write_dollar_variable): Update innermost block for registers.
10866 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10867 (innermost_block_tracker::innermost_block_tracker): Initialise
10869 (innermost_block_tracker::reset): Take type parameter.
10870 (innermost_block_tracker::update): Take type parameter, and pass
10871 type through as needed.
10872 (innermost_block_tracker::m_types): New member.
10873 * varobj.c (varobj_create): Pass type when reseting innermost
10876 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10878 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10879 * ada-lang.c (resolve_subexp): Likewise.
10880 * breakpoint.c (set_breakpoint_condition) Likewise.
10881 (watch_command_1) Likewise.
10882 * c-exp.y (variable): Likewise.
10883 * d-exp.y (PrimaryExpression): Likewise.
10884 * f-exp.y (variable): Likewise.
10885 * go-exp.y (variable): Likewise.
10886 * m2-exp.y (variable): Likewise.
10887 * objfiles.c (objfile::~objfile): Likewise.
10888 * p-exp.y (variable): Likewise.
10889 * parse.c (innermost_block): Change type.
10890 * parser-defs.h (class innermost_block_tracker): New.
10891 (innermost_block): Change to innermost_block_tracker.
10892 * printcmd.c (display_command): Switch to innermost_block API.
10893 (do_one_display): Likewise.
10894 * rust-exp.y (do_one_display): Likewise.
10895 * symfile.c (clear_symtab_users): Likewise.
10896 * varobj.c (varobj_create): Switch to innermost_block API, replace
10897 use of innermost_block with block stored on varobj object.
10899 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10901 * expression.h (innermost_block): Remove declaration.
10902 * varobj.c: Add 'parser-defs.h' include.
10904 2018-01-19 Tom Tromey <tom@tromey.com>
10906 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10907 symbols in the static and global blocks.
10909 2018-01-19 James Clarke <jrtc27@jrtc27.com>
10911 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10912 gdb_ptrace.h, and move including gdb_wait.h ...
10913 * nat/linux-ptrace.h: ... to here.
10915 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10917 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10918 inf_ptrace_detach_success.
10919 (inf_ptrace_detach_success): Add inferior parameter, use it
10920 instead of inferior_ptid, pass it to detach_inferior.
10921 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10923 * inferior.c (detach_inferior): Add overload that takes an
10925 * inferior.h (detach_inferior): Likewise.
10926 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10927 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10928 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10930 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10932 * target.h (struct target_ops) <to_detach>: Add inferior
10934 (target_detach): Likewise.
10935 * target.c (dispose_inferior): Pass inferior down.
10936 (target_detach): Pass inferior down. Assert that it is equal to
10937 the current inferior.
10938 * aix-thread.c (aix_thread_detach): Pass inferior down.
10939 * corefile.c (core_file_command): Pass current_inferior() down.
10940 * corelow.c (core_detach): Add inferior parameter.
10941 * darwin-nat.c (darwin_detach): Likewise.
10942 * gnu-nat.c (gnu_detach): Likewise.
10943 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10944 * infcmd.c (detach_command): Pass current_inferior() down to
10946 * infrun.c (follow_fork_inferior): Pass parent_inf to
10948 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10950 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10951 * linux-thread-db.c (thread_db_detach): Likewise.
10952 * nto-procfs.c (procfs_detach): Likewise.
10953 * procfs.c (procfs_detach): Likewise.
10954 * record.c (record_detach): Likewise.
10955 * record.h (struct inferior): Forward-declare.
10956 (record_detach): Add inferior parameter.
10957 * remote-sim.c (gdbsim_detach): Likewise.
10958 * remote.c (remote_detach_1): Likewise.
10959 (remote_detach): Likewise.
10960 (extended_remote_detach): Likewise.
10961 * sol-thread.c (sol_thread_detach): Likewise.
10962 * target-debug.h (target_debug_print_inferior_p): New macro.
10963 * target-delegates.c: Re-generate.
10964 * top.c (kill_or_detach): Pass inferior down to target_detach.
10965 * windows-nat.c (windows_detach): Add inferior parameter.
10967 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10969 * target.h (struct target_ops) <to_detach>: Remove args
10971 (target_detach): Likewise.
10972 * target.c (dispose_inferior): Adjust.
10973 (target_detach): Remove args parameter, adjust.
10974 * aix-thread.c (aix_thread_detach): Adjust.
10975 * corefile.c (core_file_command): Adjust.
10976 * corelow.c (core_detach): Adjust.
10977 * darwin-nat.c (darwin_detach): Adjust.
10978 * gnu-nat.c (gnu_detach): Adjust.
10979 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10980 * infcmd.c (detach_command): Adjust
10981 * infrun.c (follow_fork_inferior): Adjust.
10982 (handle_vfork_child_exec_or_exit): Adjust.
10983 * linux-fork.c (linux_fork_detach): Remove args parameter.
10984 * linux-fork.h (linux_fork_detach): Likewise.
10985 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10986 * linux-thread-db.c (thread_db_detach): Likewise.
10987 * nto-procfs.c (procfs_detach): Likewise.
10988 * procfs.c (procfs_detach): Likewise.
10989 (do_detach): Remove signo parameter.
10990 * record.c (record_detach): Remove args parameter.
10991 * record.h (record_detach): Likewise.
10992 * remote-sim.c (gdbsim_detach): Likewise.
10993 * remote.c (remote_detach_1): Likewise.
10994 (remote_detach): Likewise.
10995 (extended_remote_detach): Likewise.
10996 * sol-thread.c (sol_thread_detach): Likewise.
10997 * target-delegates.c: Re-generate.
10998 * top.c (struct qt_args) <args>: Remove field.
10999 (kill_or_detach): Don't pass args.
11000 (quit_force): Don't set args.
11001 * windows-nat.c (windows_detach): Remove args parameter.
11003 2018-01-19 Yao Qi <yao.qi@linaro.org>
11005 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11006 (arm_linux_init_abi): Install it.
11008 2018-01-19 Yao Qi <yao.qi@linaro.org>
11010 * osabi.c (gdb_osabi_names): Extend the regexp for
11011 arm-linux-gnueabihf.
11013 2018-01-18 Yao Qi <yao.qi@linaro.org>
11015 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11017 (abbrev_table::add_abbrev): Update.
11018 (abbrev_table::lookup_abbrev): Update.
11020 2018-01-18 Yao Qi <yao.qi@linaro.org>
11022 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11024 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11026 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11029 2018-01-17 Tom Tromey <tom@tromey.com>
11031 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11033 2018-01-17 Tom Tromey <tom@tromey.com>
11035 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11036 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11037 (create_array_type_with_stride): Update.
11038 * dwarf2read.c (set_die_type): Update.
11040 2018-01-17 Tom Tromey <tom@tromey.com>
11042 * dwarf2read.c (delayed_method_info): Remove typedef.
11043 (dwarf2_cu::method_info): Now a std::vector.
11044 (add_to_method_list): Update.
11045 (free_delayed_list): Remove.
11046 (compute_delayed_physnames): Update.
11047 (process_full_comp_unit, process_full_type_unit): Clear the method
11048 list. Remove cleanups.
11049 (psymtab_include_file_name): Add name_holder parameter. Use
11050 unique_xmalloc_ptr.
11051 (dwarf_decode_lines): Update.
11053 2018-01-17 Tom Tromey <tom@tromey.com>
11054 Simon Marchi <simon.marchi@ericsson.com>
11056 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11057 (dwarf2_per_objfile::free_cached_comp_units)
11058 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11059 (init_cutu_and_read_dies_no_follow): Update.
11060 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11061 (dwarf2_cu::~dwarf2_cu): New.
11062 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11063 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11065 2018-01-17 Tom Tromey <tom@tromey.com>
11066 Simon Marchi <simon.marchi@ericsson.com>
11068 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11069 (struct die_reader_specs) <abbrev_table>: New member.
11070 (struct abbrev_table): Add constructor.
11071 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11072 <abbrev_obstack>: Now an auto_obstack.
11073 (abbrev_table_up): New typedef.
11074 (init_cu_die_reader): Add abbrev_table parameter.
11075 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11076 Add result_dwo_abbrev_table.
11077 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11078 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11080 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11082 (skip_children): Update.
11083 (abbrev_table::alloc_abbrev): Rename from
11084 abbrev_table_alloc_abbrev.
11085 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11086 (abbrev_table::lookup_abbrev): Rename from
11087 abbrev_table_lookup_abbrev.
11088 (abbrev_table_read_table): Return abbrev_table_up.
11089 (abbrev_table_free, abbrev_table_free_cleanup)
11090 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11091 (load_partial_dies): Update.
11093 2018-01-17 Tom Tromey <tom@tromey.com>
11095 * dwarf2read.c (dwarf2_compute_name): Update comment.
11096 (read_func_scope, read_variable): Update.
11097 (new_symbol): Remove.
11098 (new_symbol_full): Rename to new_symbol.
11100 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11103 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11104 a warning instead of throwing an error, set section size to 0 and return
11106 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11108 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11110 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11112 (linux_ptrace_attach_fail_reason_string): Likewise.
11113 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11115 (linux_ptrace_attach_fail_reason_string): Likewise.
11116 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11118 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11120 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11122 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11125 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11126 checking for fs_base/gs_base fields in struct user_regs_struct.
11127 * configure: Regenerate.
11129 2018-01-17 Yao Qi <yao.qi@linaro.org>
11131 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11133 (aarch64_linux_init_abi): Install it to gdbarch hook
11134 gcc_target_options.
11136 2018-01-15 Pedro Alves <palves@redhat.com>
11138 * common/signals-state-save-restore.c
11139 (save_original_signals_state): Fix typos.
11141 2017-01-12 Tom Tromey <tom@tromey.com>
11142 Sergio Durigan Junior <sergiodj@redhat.com>
11144 * Makefile.in (install-only): Install gdb-add-index.
11146 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11148 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11150 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11152 * infrun.c (keep_going_pass_signal): Clear step-over info when
11153 insert_breakpoints fails.
11155 2018-01-11 Pedro Alves <palves@redhat.com>
11158 * infrun.c (resume): Rename to ...
11159 (resume_1): ... this.
11160 (resume): Reimplement as wrapper around resume_1.
11162 2018-01-11 Pedro Alves <palves@redhat.com>
11165 * remote.c (remote_parse_stop_reply): Default to the last-set
11166 general thread instead of to 'magic_null_ptid'.
11168 2018-01-10 Pedro Alves <palves@redhat.com>
11170 * language.h (language_get_symbol_name_matcher): Rename ...
11171 (get_symbol_name_matcher): ... this.
11172 * language.c (language_get_symbol_name_matcher): Ditto.
11173 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11176 2018-01-10 Pedro Alves <palves@redhat.com>
11180 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11181 Adjust to use language_get_symbol_name_matcher instead of
11182 language_defn::la_get_symbol_name_matcher.
11183 * language.c (language_get_symbol_name_matcher): If in Ada mode
11184 and the lookup name is a verbatim match, return Ada's matcher.
11185 * language.h (language_get_symbol_name_matcher): Adjust comment.
11186 (ada_lookup_name_info::verbatim_p):: New method.
11188 2018-01-10 Pedro Alves <palves@redhat.com>
11191 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11192 minsym's language is language_auto or language_cplus, pass down
11193 language_ada instead.
11194 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11196 2018-01-10 Pedro Alves <palves@redhat.com>
11199 * minsyms.c (linkage_name_str): New function.
11200 (iterate_over_minimal_symbols): Use it.
11202 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11204 * NEWS: Document that 'info proc' now works on FreeBSD.
11206 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11208 * configure.ac: Check for kinfo_getfile in libutil.
11209 * configure: Regenerate.
11210 * config.in: Regenerate.
11211 * fbsd-nat.c: Include "fbsd-tdep.h".
11212 (fbsd_fetch_cmdline): New.
11213 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11214 rather than calling error.
11215 (fbsd_info_proc): New.
11216 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11217 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11218 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11220 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11222 * fbsd-nat.c (struct free_deleter): Remove.
11223 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11225 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11227 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11228 NULL for an empty pathname.
11230 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11232 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11233 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11234 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11235 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11236 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11237 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11238 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11239 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11240 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11241 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11242 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11243 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11244 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11245 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11246 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11248 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11250 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11251 (gnu_xfer_auxv): New function.
11252 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11253 TARGET_OBJECT_AUXV.
11255 2018-01-08 Yao Qi <yao.qi@linaro.org>
11256 Simon Marchi <simon.marchi@ericsson.com>
11258 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11260 (COMMON_OBS): Remove selftest.o.
11261 * configure.ac: Append selftest-arch.c and common/selftest.c to
11262 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11263 * configure: Re-generated.
11264 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11266 (maintenance_info_selftests): Likewise.
11268 2018-01-08 Xavier Roirand <roirand@adacore.com>
11270 * ada-valprint.c (val_print_packed_array_elements): Use
11271 proper number of elements when printing an array indexed
11272 by an enumeration type.
11274 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11276 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11277 (dw2_get_file_names_reader): Adjust.
11278 (lookup_dwo_signatured_type): Adjust.
11279 (lookup_dwp_signatured_type): Adjust.
11280 (lookup_signatured_type): Adjust.
11281 (create_type_unit_group): Adjust.
11282 (get_type_unit_group): Adjust.
11283 (process_psymtab_comp_unit_reader): Adjust.
11284 (build_type_psymtabs_reader): Adjust.
11285 (scan_partial_symbols): Adjust.
11286 (add_partial_symbol): Adjust.
11287 (add_partial_subprogram): Adjust.
11288 (peek_die_abbrev): Adjust.
11289 (fixup_go_packaging): Adjust.
11290 (process_imported_unit_die): Adjust.
11291 (dwarf2_compute_name): Adjust.
11292 (dwarf2_physname): Adjust.
11293 (read_import_statement): Adjust.
11294 (handle_DW_AT_stmt_list): Adjust.
11295 (read_file_scope): Adjust.
11296 (read_func_scope): Adjust.
11297 (read_lexical_block_scope): Adjust.
11298 (read_call_site_scope): Adjust.
11299 (read_variable): Adjust.
11300 (dwarf2_rnglists_process): Adjust.
11301 (dwarf2_ranges_process): Adjust.
11302 (dwarf2_ranges_read): Adjust.
11303 (dwarf2_get_pc_bounds): Adjust.
11304 (dwarf2_record_block_ranges): Adjust.
11305 (dwarf2_add_field): Adjust.
11306 (dwarf2_add_member_fn): Adjust.
11307 (read_structure_type): Adjust.
11308 (process_structure_scope): Adjust.
11309 (read_enumeration_type): Adjust.
11310 (read_array_type): Adjust.
11311 (mark_common_block_symbol_computed): Adjust.
11312 (read_common_block): Adjust.
11313 (read_namespace_type): Adjust.
11314 (read_namespace): Adjust.
11315 (read_module_type): Adjust.
11316 (read_tag_pointer_type): Adjust.
11317 (read_tag_ptr_to_member_type): Adjust.
11318 (read_tag_string_type): Adjust.
11319 (read_subroutine_type): Adjust.
11320 (read_typedef): Adjust.
11321 (read_base_type): Adjust.
11322 (attr_to_dynamic_prop): Adjust.
11323 (read_subrange_type): Adjust.
11324 (read_unspecified_type): Adjust.
11325 (dwarf2_read_abbrevs): Adjust.
11326 (load_partial_dies): Adjust.
11327 (read_partial_die): Adjust.
11328 (find_partial_die): Adjust.
11329 (guess_partial_die_structure_name): Adjust.
11330 (fixup_partial_die): Adjust.
11331 (read_attribute_value): Adjust.
11332 (read_addr_index): Adjust.
11333 (read_addr_index_from_leb128): Adjust.
11334 (read_str_index): Adjust.
11335 (dwarf2_string_attr): Adjust.
11336 (get_debug_line_section): Adjust.
11337 (dwarf_decode_line_header): Adjust.
11338 (lnp_state_machine::check_line_address): Adjust.
11339 (dwarf_decode_lines_1): Adjust.
11340 (dwarf_decode_lines): Adjust.
11341 (dwarf2_start_symtab): Adjust.
11342 (var_decode_location): Adjust.
11343 (new_symbol_full): Adjust.
11344 (dwarf2_const_value_data): Adjust.
11345 (dwarf2_const_value_attr): Adjust.
11346 (dwarf2_const_value): Adjust.
11347 (die_type): Adjust.
11348 (die_containing_type): Adjust.
11349 (build_error_marker_type): Adjust.
11350 (lookup_die_type): Adjust.
11351 (guess_full_die_structure_name): Adjust.
11352 (anonymous_struct_prefix): Adjust.
11353 (determine_prefix): Adjust.
11354 (dwarf2_name): Adjust.
11355 (follow_die_ref_or_sig): Adjust.
11356 (follow_die_offset): Adjust.
11357 (follow_die_ref): Adjust.
11358 (follow_die_sig_1): Adjust.
11359 (follow_die_sig): Adjust.
11360 (get_signatured_type): Adjust.
11361 (get_DW_AT_signature_type): Adjust.
11362 (decode_locdesc): Adjust.
11363 (dwarf_decode_macros): Adjust.
11364 (cu_debug_loc_section): Adjust.
11365 (fill_in_loclist_baton): Adjust.
11366 (dwarf2_symbol_mark_computed): Adjust.
11367 (init_one_comp_unit): Don't assign
11368 dwarf2_cu::dwarf2_per_objfile.
11369 (set_die_type): Adjust.
11371 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11373 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11374 <dwarf2_per_objfile>: New field.
11375 (dwarf2_per_objfile): Remove global.
11376 (get_dwarf2_per_objfile): New function.
11377 (set_dwarf2_per_objfile): New function.
11378 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11379 dwarf2_per_objfile.
11380 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11381 (read_abbrev_offset): Likewise.
11382 (read_indirect_string): Likewise.
11383 (read_indirect_line_string): Likewise.
11384 (read_indirect_string_at_offset): Likewise.
11385 (read_indirect_string_from_dwz): Likewise.
11386 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11387 dwarf2_per_objfile.
11388 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11389 (create_all_comp_units): Change objfile parameter to
11390 dwarf2_per_objfile.
11391 (create_all_type_units): Likewise.
11392 (process_queue): Add dwarf2_per_objfile parameter.
11393 (read_and_check_comp_unit_head): Likewise.
11394 (lookup_dwo_unit_in_dwp): Likewise.
11395 (get_dwp_file): Likewise.
11396 (process_cu_includes): Likewise.
11397 (struct free_dwo_file_cleanup_data): New struct.
11398 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11399 set_dwarf2_per_objfile.
11400 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11401 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11402 context, adjust calls.
11403 (dw2_instantiate_symtab): Likewise.
11404 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11405 (dw2_get_cu): Likewise.
11406 (create_cu_from_index_list): Change objfile parameter to
11407 dwarf2_per_objfile.
11408 (create_cus_from_index_list): Get dwarf2_per_objfile from
11409 context, adjust calls.
11410 (create_cus_from_index): Likewise.
11411 (create_signatured_type_table_from_index): Change objfile
11412 parameter to dwarf2_per_objfile.
11413 (create_signatured_type_table_from_debug_names): Change objfile
11414 parameter to dwarf2_per_objfile.
11415 (create_addrmap_from_index): Likewise.
11416 (create_addrmap_from_aranges): Likewise.
11417 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11418 (dw2_setup): Remove.
11419 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11421 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11422 get_dwarf2_per_objfile.
11423 (dw2_forget_cached_source_info): Likewise.
11424 (dw2_map_symtabs_matching_filename): Likewise.
11425 (struct dw2_symtab_iterator) <index>: Remove.
11426 <dwarf2_per_objfile>: New field.
11427 (dw2_symtab_iter_init): Replace index parameter with
11428 dwarf2_per_objfile.
11429 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11430 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11431 (dw2_print_stats): Likewise.
11432 (dw2_dump): Likewise.
11433 (dw2_expand_symtabs_for_function): Likewise.
11434 (dw2_expand_all_symtabs): Likewise.
11435 (dw2_expand_symtabs_with_fullname): Likewise.
11436 (dw2_expand_marked_cus): Replace index and objfile parameters
11437 with dwarf2_per_objfile.
11438 (dw_expand_symtabs_matching_file_matcher): Add
11439 dwarf2_per_objfile parameter and adjust calls.
11440 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11442 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11443 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11445 (create_cus_from_debug_names_list): Replace objfile parameter
11446 with dwarf2_per_objfile and adjust calls.
11447 (create_cus_from_debug_names): Likewise.
11448 (dwarf2_read_debug_names): Likewise.
11449 (mapped_debug_names::namei_to_name): Adjust call.
11450 (dw2_debug_names_iterator::next): Likewise.
11451 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11452 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11453 (dw2_debug_names_dump): Likewise.
11454 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11455 (dw2_debug_names_expand_symtabs_matching): Likewise.
11456 (dwarf2_initialize_objfile): Likewise.
11457 (dwarf2_build_psymtabs): Likewise.
11458 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11460 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11461 (read_and_check_comp_unit_head): Likewise.
11462 (read_abbrev_offset): Likewise.
11463 (create_debug_type_hash_table): Likewise.
11464 (create_debug_types_hash_table): Likewise.
11465 (create_all_type_units): Replace objfile parameter with
11466 dwarf2_per_objfile.
11467 (add_type_unit): Add dwarf2_per_objfile parameter.
11468 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11469 with dwarf2_per_objfile.
11470 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11471 (lookup_dwp_signatured_type): Likewise.
11472 (lookup_signatured_type): Likewise.
11473 (read_cutu_die_from_dwo): Likewise.
11474 (init_tu_and_read_dwo_dies): Likewise.
11475 (init_cutu_and_read_dies): Likewise.
11476 (init_cutu_and_read_dies_no_follow): Likewise.
11477 (allocate_type_unit_groups_table): Add objfile parameter.
11478 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11479 (get_type_unit_group): Likewise.
11480 (process_psymtab_comp_unit): Update call.
11481 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11482 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11483 (print_tu_stats): Likewise.
11484 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11485 in void* parameter.
11486 (build_type_psymtabs): Change objfile parameter to
11487 dwarf2_per_objfile.
11488 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11489 passed in void* parameter.
11490 (process_skeletonless_type_units): Change objfile parameter to
11491 dwarf2_per_objfile.
11492 (set_partial_user): Likewise.
11493 (dwarf2_build_psymtabs_hard): Likewise.
11494 (read_comp_units_from_section): Likewise.
11495 (create_all_comp_units): Likewise.
11496 (scan_partial_symbols): Update calls.
11497 (add_partial_symbol): Likewise.
11498 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11499 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11500 (process_queue): Add dwarf2_per_objfile parameter.
11501 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11502 (compute_compunit_symtab_includes): Likewise.
11503 (process_cu_includes): Add dwarf2_per_objfile parameter.
11504 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11505 (process_full_type_unit): Likewise.
11506 (process_imported_unit_die): Update call.
11507 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11508 (read_file_scope): Likewise.
11509 (allocate_dwo_file_hash_table): Add objfile parameter.
11510 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11511 (create_cus_hash_table): Likewise.
11512 (create_dwp_hash_table): Likewise.
11513 (create_dwo_unit_in_dwp_v1): Likewise.
11514 (create_dwp_v2_section): Likewise.
11515 (create_dwo_unit_in_dwp_v2): Likewise.
11516 (lookup_dwo_unit_in_dwp): Likewise.
11517 (try_open_dwop_file): Likewise.
11518 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11519 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11520 cleanup to include a reference to dwarf2_per_objfile.
11521 (open_dwp_file): Add dwarf2_per_objfile parameter.
11522 (open_and_init_dwp_file): Likewise.
11523 (get_dwp_file): Likewise.
11524 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11525 (queue_and_load_all_dwo_tus): Update call.
11526 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11528 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11529 (dwarf2_ranges_process): Likewise.
11530 (dwarf2_get_pc_bounds): Likewise.
11531 (mark_common_block_symbol_computed): Likewise.
11532 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11533 (dwarf2_read_abbrevs): Update call.
11534 (read_partial_die): Use dwarf2_per_objfile from cu.
11535 (find_partial_die): Likewise.
11536 (fixup_partial_die): Likewise.
11537 (read_attribute_value): Likewise.
11538 (read_indirect_string_at_offset_from): Add objfile parameter.
11539 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11541 (read_indirect_string_from_dwz): Add objfile parameter.
11542 (read_indirect_string): Add objfile parameter.
11543 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11544 (read_addr_index): Use dwarf2_per_objfile from cu.
11545 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11547 (read_str_index): Use dwarf2_per_objfile from cu.
11548 (get_debug_line_section): Likewise.
11549 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11550 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11551 (new_symbol_full): Use dwarf2_per_objfile from cu.
11552 (build_error_marker_type): Likewise.
11553 (lookup_die_type): Likewise.
11554 (determine_prefix): Likewise.
11555 (follow_die_offset): Likewise.
11556 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11557 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11558 (dwarf2_fetch_die_type_sect_off): Likewise.
11559 (dwarf2_get_die_type): Likewise.
11560 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11561 (get_signatured_type): Likewise.
11562 (get_DW_AT_signature_type): Likewise.
11563 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11564 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11565 (cu_debug_loc_section): Likewise.
11566 (fill_in_loclist_baton): Likewise.
11567 (dwarf2_symbol_mark_computed): Likewise.
11568 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11569 dwarf2_per_objfile.
11570 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11572 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11573 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11574 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11575 (set_die_type): Use dwarf2_free_objfile from cu.
11576 (get_die_type_at_offset): Likewise.
11577 (dwarf2_per_objfile_free): Don't assign global variable.
11578 (debug_names) <constructor>: Add dwarf2_per_objfile
11579 parameter, update m_debugstrlookup construction.
11580 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11582 <m_dwarf2_per_objfile>: New field.
11583 <lookup>: Use m_dwarf2_per_objfile.
11584 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11585 (psyms_seen_size): Likewise.
11586 (write_gdbindex): Replace objfile parameter with
11587 dwarf2_per_objfile.
11588 (write_debug_names): Likewise.
11589 (write_psymtabs_to_index): Likewise.
11590 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11593 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11595 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11596 <dwarf2_per_objfile>: New field.
11597 (struct dwarf2_per_cu_data) <objfile>: Remove.
11598 <dwarf2_per_objfile>: New field.
11599 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11601 (create_signatured_type_table_from_index): Likewise.
11602 (create_debug_type_hash_table): Likewise.
11603 (fill_in_sig_entry_from_dwo_entry): Likewise.
11604 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11605 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11607 (create_partial_symtab): Access objfile through
11608 dwarf2_per_objfile.
11609 (process_psymtab_comp_unit_reader): Likewise.
11610 (read_comp_units_from_section): Likewise.
11611 (scan_partial_symbols): Likewise.
11612 (add_partial_symbol): Likewise.
11613 (add_partial_subprogram): Likewise.
11614 (peek_die_abbrev): Likewise.
11615 (fixup_go_packaging): Likewise.
11616 (process_full_comp_unit): Likewise.
11617 (process_full_type_unit): Likewise.
11618 (process_imported_unit_die): Likewise.
11619 (dwarf2_compute_name): Likewise.
11620 (dwarf2_physname): Likewise.
11621 (read_import_statement): Likewise.
11622 (create_cus_hash_table): Assign dwarf2_physname instead of
11624 (read_func_scope): Access objfile through dwarf2_per_objfile.
11625 (read_lexical_block_scope): Likewise.
11626 (read_call_site_scope): Likewise.
11627 (read_variable): Likewise.
11628 (dwarf2_rnglists_process): Likewise.
11629 (dwarf2_ranges_process): Likewise.
11630 (dwarf2_ranges_read): Likewise.
11631 (dwarf2_record_block_ranges): Likewise.
11632 (dwarf2_add_field): Likewise.
11633 (dwarf2_add_member_fn): Likewise.
11634 (read_structure_type): Likewise.
11635 (process_structure_scope): Likewise.
11636 (read_enumeration_type): Likewise.
11637 (read_array_type): Likewise.
11638 (read_common_block): Likewise.
11639 (read_namespace_type): Likewise.
11640 (read_namespace): Likewise.
11641 (read_module_type): Likewise.
11642 (read_tag_pointer_type): Likewise.
11643 (read_tag_ptr_to_member_type): Likewise.
11644 (read_tag_string_type): Likewise.
11645 (read_subroutine_type): Likewise.
11646 (read_typedef): Likewise.
11647 (read_base_type): Likewise.
11648 (attr_to_dynamic_prop): Likewise.
11649 (read_subrange_type): Likewise.
11650 (read_unspecified_type): Likewise.
11651 (load_partial_dies): Likewise.
11652 (read_partial_die): Likewise.
11653 (find_partial_die): Likewise.
11654 (guess_partial_die_structure_name): Likewise.
11655 (fixup_partial_die): Likewise.
11656 (read_attribute_value): Likewise.
11657 (read_addr_index_from_leb128): Likewise.
11658 (dwarf2_read_addr_index): Likewise.
11659 (dwarf2_string_attr): Likewise.
11660 (lnp_state_machine::check_line_address): Likewise.
11661 (dwarf_decode_lines_1): Likewise.
11662 (dwarf_decode_lines): Likewise.
11663 (dwarf2_start_symtab): Likewise.
11664 (var_decode_location): Likewise.
11665 (new_symbol_full): Likewise.
11666 (dwarf2_const_value_data): Likewise.
11667 (dwarf2_const_value_attr): Likewise.
11668 (dwarf2_const_value): Likewise.
11669 (die_type): Likewise.
11670 (die_containing_type): Likewise.
11671 (lookup_die_type): Likewise.
11672 (guess_full_die_structure_name): Likewise.
11673 (anonymous_struct_prefix): Likewise.
11674 (dwarf2_name): Likewise.
11675 (follow_die_ref_or_sig): Likewise.
11676 (follow_die_offset): Likewise.
11677 (follow_die_ref): Likewise.
11678 (dwarf2_fetch_die_loc_sect_off): Likewise.
11679 (dwarf2_fetch_constant_bytes): Likewise.
11680 (dwarf2_fetch_die_type_sect_off): Likewise.
11681 (dwarf2_get_die_type): Likewise.
11682 (follow_die_sig): Likewise.
11683 (decode_locdesc): Likewise.
11684 (dwarf2_per_cu_objfile): Likewise.
11685 (dwarf2_per_cu_text_offset): Likewise.
11686 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11688 (set_die_type): Access objfile through
11689 dwarf2_per_objfile.
11691 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11693 * valprint.c (converted_character_d): Remove typedef.
11694 (DEF_VEC_O (converted_character_d)): Remove.
11695 (count_next_character): Use std::vector.
11696 (print_converted_chars_to_obstack): Likewise.
11697 (generic_printstr): Likewise.
11699 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11701 * xml-support.h (struct gdb_xml_value): Add constructor.
11702 <value>: Change type to unique_xmalloc_ptr.
11703 (gdb_xml_value_s): Remove typedef.
11704 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11705 (gdb_xml_element_start_handler): Change parameter type to
11707 (xml_find_attribute): Likewise.
11708 * xml-support.c (xml_find_attribute): Change parameter type to
11709 std::vector and adjust.
11710 (gdb_xml_values_cleanup): Remove.
11711 (gdb_xml_parser::start_element): Adjust to std::vector.
11712 (xinclude_start_include): Change paraeter type to std::vector
11714 * btrace.c (check_xml_btrace_version): Likewise.
11715 (parse_xml_btrace_block): Likewise.
11716 (parse_xml_btrace_pt_config_cpu): Likewise.
11717 (parse_xml_btrace_pt): Likewise.
11718 (parse_xml_btrace_conf_bts): Likewise.
11719 (parse_xml_btrace_conf_pt): Likewise.
11720 * memory-map.c (memory_map_start_memory): Likewise.
11721 (memory_map_start_property): Likewise.
11722 * osdata.c (osdata_start_osdata): Likewise.
11723 (osdata_start_item): Likewise.
11724 (osdata_start_column): Likewise.
11725 * remote.c (start_thread): Likewise.
11726 * solib-aix.c (library_list_start_library): Likewise.
11727 (library_list_start_list): Likewise.
11728 * solib-svr4.c (library_list_start_library): Likewise.
11729 (svr4_library_list_start_list): Likewise.
11730 * solib-target.c (library_list_start_segment): Likewise.
11731 (library_list_start_section): Likewise.
11732 (library_list_start_library): Likewise.
11733 (library_list_start_list): Likewise.
11734 * tracepoint.c (traceframe_info_start_memory): Likewise.
11735 (traceframe_info_start_tvar): Likewise.
11736 * xml-syscall.c (syscall_start_syscall): Likewise.
11737 * xml-tdesc.c (tdesc_start_target): Likewise.
11738 (tdesc_start_feature): Likewise.
11739 (tdesc_start_reg): Likewise.
11740 (tdesc_start_union): Likewise.
11741 (tdesc_start_struct): Likewise.
11742 (tdesc_start_flags): Likewise.
11743 (tdesc_start_enum): Likewise.
11744 (tdesc_start_field): Likewise.
11745 (tdesc_start_enum_value): Likewise.
11746 (tdesc_start_vector): Likewise.
11748 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11750 * extension.h (struct xmethod_worker) <clone>: Remove.
11751 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11753 (python_xmethod_worker::clone): Remove.
11754 * valops.c (find_overload_match): Use std::move instead of
11757 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11759 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11760 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11761 <free_xmethod_worker_data>: Remove.
11762 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11763 <get_xmethod_arg_types>: Remove.
11764 <get_xmethod_result_type>: Remove.
11765 <invoke_xmethod>: Remove.
11766 * extension.c (new_xmethod_worker): Remove.
11767 (clone_xmethod_worker): Remove.
11768 (get_matching_xmethod_workers): Return void, pass std::vector by
11770 (get_xmethod_arg_types): Rename to...
11771 (xmethod_worker::get_arg_types): ... this, and adjust.
11772 (get_xmethod_result_type): Rename to...
11773 (xmethod_worker::get_result_type): ... this, and adjust.
11774 (invoke_xmethod): Remove.
11775 (free_xmethod_worker): Remove.
11776 (free_xmethod_worker_vec): Remove.
11777 * extension.h (enum ext_lang_rc): Move here from
11779 (struct xmethod_worker): Add constructor and destructor.
11782 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11783 virtual pure methods.
11784 <get_arg_types, get_result_type>: New methods.
11785 (xmethod_worker_ptr): Remove typedef.
11786 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11787 (xmethod_worker_vec): Remove typedef.
11788 (xmethod_worker_up): New typedef.
11789 (invoke_xmethod): Remove.
11790 (clone_xmethod_worker): Remove.
11791 (free_xmethod_worker): Remove.
11792 (free_xmethod_worker_vec): Remove.
11793 (get_xmethod_arg_types): Remove.
11794 (get_xmethod_result_type): Remove.
11795 * valops.c (find_method_list): Use std::vector, don't use
11796 intermediate vector.
11797 (value_find_oload_method_list): Use std::vector.
11798 (find_overload_match): Use std::vector.
11799 (find_oload_champ): Use std::vector.
11800 * value.c (value_free): Use operator delete.
11801 (value_of_xmethod): Rename to...
11802 (value_from_xmethod): ... this. Don't assign
11803 xmethod_worker::value, take rvalue-reference.
11804 (result_type_of_xmethod): Adjust.
11805 (call_xmethod): Adjust.
11806 * value.h: Include extension.h.
11807 (struct xmethod_worker): Don't forward-declare.
11808 (value_of_xmethod): Rename to...
11809 (value_from_xmethod): ... this, take rvalue-reference.
11810 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11811 (struct python_xmethod_worker): ... this, add constructor and
11813 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11814 (gdbpy_free_xmethod_worker_data): Rename to...
11815 (python_xmethod_worker::~python_xmethod_worker): ... this and
11817 (gdbpy_clone_xmethod_worker_data): Rename to...
11818 (python_xmethod_worker::clone): ... this and adjust.
11819 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11821 (gdbpy_get_xmethod_arg_types): Rename to...
11822 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11823 (gdbpy_get_xmethod_result_type): Rename to...
11824 (python_xmethod_worker::do_get_result_type): ... this and
11826 (gdbpy_invoke_xmethod): Rename to...
11827 (python_xmethod_worker::invoke): ... this and adjust.
11828 (new_python_xmethod_worker): Rename to...
11829 (python_xmethod_worker::python_xmethod_worker): ... this and
11831 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11833 (gdbpy_free_xmethod_worker_data): Remove.
11834 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11835 (gdbpy_get_xmethod_arg_types): Remove.
11836 (gdbpy_get_xmethod_result_type): Remove.
11837 (gdbpy_invoke_xmethod): Remove.
11838 * python/python.c (python_extension_ops): Remove obsolete
11841 2018-01-05 Pedro Alves <palves@redhat.com>
11844 * common/signals-state-save-restore.c
11845 (save_original_signals_state): New parameter 'quiet'. Warn if we
11846 find a custom handler preinstalled, instead of internal erroring.
11847 But only warn if !quiet.
11848 * common/signals-state-save-restore.h
11849 (save_original_signals_state): New parameter 'quiet'.
11850 * main.c (captured_main_1): Move save_original_signals_state call
11851 after option handling, and pass QUIET.
11853 2018-01-05 Pedro Alves <palves@redhat.com>
11855 * spu-tdep.c (spu_catch_start): Pass
11856 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11858 2018-01-05 Pedro Alves <palves@redhat.com>
11861 * ada-lang.c (literal_symbol_name_matcher): New function.
11862 (ada_get_symbol_name_matcher): Use it for
11863 symbol_name_match_type::SEARCH_NAME.
11864 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11865 it down instead of assuming symbol_name_match_type::FULL.
11866 * block.h (block_lookup_symbol): New parameter 'match_type'.
11867 * c-valprint.c (print_unpacked_pointer): Use
11868 lookup_symbol_search_name instead of lookup_symbol.
11869 * compile/compile-object-load.c (get_out_value_type): Pass down
11870 symbol_name_match_type::SEARCH_NAME.
11871 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11872 symbol_name_match_type::FULL.
11873 * cp-support.c (cp_get_symbol_name_matcher): Handle
11874 symbol_name_match_type::SEARCH_NAME.
11875 * infrun.c (insert_exception_resume_breakpoint): Use
11876 lookup_symbol_search_name.
11877 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11878 * psymtab.c (maintenance_check_psymtabs): Use
11879 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11880 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11881 SYMBOL_SEARCH_NAME.
11882 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11883 if symbol_name_match_type::SEARCH_NAME.
11884 (lookup_symbol_in_language): Pass down
11885 symbol_name_match_type::FULL.
11886 (lookup_symbol_search_name): New.
11887 (lookup_language_this): Pass down
11888 symbol_name_match_type::SEARCH_NAME.
11889 (lookup_symbol_aux, lookup_local_symbol): New parameter
11890 'match_type'. Pass it down.
11891 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11892 (lookup_symbol_search_name): New declaration.
11893 (lookup_symbol_in_block): New 'match_type' parameter.
11895 2018-01-05 Pedro Alves <palves@redhat.com>
11898 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11900 (ada_lookup_symbol): Reimplement in terms of
11901 ada_lookup_symbol_list, bits factored out from
11902 ada_lookup_encoded_symbol.
11904 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11906 * ada-exp.y (write_object_renaming): When subscripting an array
11907 using a symbol as the index, pass the block in call to
11908 ada_lookup_encoded_symbol when looking that symbol up.
11910 2018-01-05 Jerome Guitton <guitton@adacore.com>
11912 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11915 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11917 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11918 the case where VALUE_LVAL (val0) is not lval_memory.
11920 2018-01-05 Xavier Roirand <roirand@adacore.com>
11922 * ada-valprint.c (print_optional_low_bound): Handle
11923 character-indexed array printing like boolean-indexed array
11926 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11928 * NEWS: Create a new section for the next release branch.
11929 Rename the section of the current branch, now that it has
11932 2018-01-05 Joel Brobecker <brobecker@adacore.com>
11934 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11935 * version.in: Bump version to 8.1.50.DATE-git.
11937 2018-01-03 Xavier Roirand <roirand@adacore.com>
11939 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11941 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11943 (default_exception_support_info) <catch_handlers_sym>: Add field.
11944 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11945 (ada_exception_name_addr_1): Add "catch handlers" handling.
11946 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11947 Update all callers.
11948 (create_excep_cond_exprs) <ex>: Add parameter.
11949 (re_set_exception): Update create_excep_cond_exprs call.
11950 (print_it_exception, print_one_exception, print_mention_exception)
11951 (print_recreate_exception): Add "catch handler" handling.
11952 (allocate_location_catch_handlers, re_set_catch_handlers)
11953 (check_status_catch_handlers, print_it_catch_handlers)
11954 (print_one_catch_handlers, print_mention_catch_handlers)
11955 (print_recreate_catch_handlers): New function.
11956 (catch_handlers_breakpoint_ops): New variable.
11957 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11958 Add parameter. Add "catch handler" handling.
11959 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11960 Add "catch handler" handling.
11961 (ada_exception_catchpoint_cond_string): Add "catch handler"
11963 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11965 (catch_ada_handlers_command): New function.
11966 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11967 operations structure.
11968 (_initialize_ada_language): Add "catch handlers" command entry.
11969 * NEWS: Document "catch handlers" feature.
11971 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11973 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11974 account when creating the array type of the slice.
11975 (ada_value_slice): Likewise.
11977 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11979 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11981 (create_array_type_with_stride): Add byte_stride_prop parameter.
11982 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11983 New parameter. Update all callers in this file.
11984 (array_type_has_dynamic_stride): New function.
11985 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11986 of arrays with dynamic byte strides.
11987 * dwarf2read.c (read_array_type): Add support for dynamic
11988 DW_AT_byte_stride attributes.
11990 2018-01-02 Joel Brobecker <brobecker@adacore.com>
11992 * dwarf2read.c (read_unspecified_type): Treat
11993 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11995 2018-01-01 Joel Brobecker <brobecker@adacore.com>
11997 Update copyright year range in all GDB files.
11999 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12001 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12002 and gdb/testsuite/gdb.base/step-line.c.
12004 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12006 * copyright.py (main): Dump the contents of
12007 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12008 even if BY_HAND is empty.
12010 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12012 * top.c (print_gdb_version): Update Copyright year in version
12015 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12017 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12019 For older changes see ChangeLog-2017.
12025 version-control: never