1 2018-08-16 Gary Benson <gbenson@redhat.com>
4 * gdb/main.c (captured_main_1): Exit with nonzero status
5 in batch mode if the last command to be executed failed.
6 * NEWS: Mention the above.
8 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
10 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
11 end of warning message.
13 2018-08-29 Alan Hayward <alan.hayward@arm.com>
16 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
17 (aarch64_extract_return_value): Use
18 aapcs_is_vfp_call_or_return_candidate.
19 (aarch64_return_in_memory): Likewise.
20 (aarch64_store_return_value): Likewise.
22 2018-08-29 Alan Hayward <alan.hayward@arm.com>
25 (aapcs_is_vfp_call_or_return_candidate): Make static
26 (pass_in_v_or_stack): Remove function.
27 (pass_in_v_vfp_candidate): New function.
28 (aarch64_push_dummy_call): Check for float register candidates.
30 2018-08-29 Alan Hayward <alan.hayward@arm.com>
32 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
33 (aapcs_is_vfp_call_or_return_candidate_1): New function.
34 (aapcs_is_vfp_call_or_return_candidate): Likewise.
36 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
39 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
40 (struct ipa_sym_addresses): Rename to...
41 (struct ipa_sym_addresses_common): ... this.
42 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
44 2018-08-28 Tom Tromey <tom@tromey.com>
46 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
47 (token_fifo): Now a std::vector.
48 (yylex, c_parse): Update.
49 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
50 (token_fifo): Now a std::vector.
51 (yylex, d_parse): Update.
52 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
53 (token_fifo): Now a std::vector.
54 (yylex, go_parse): Update.
56 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
58 * parser-defs.h (struct type_stack) <elements>: Change type to
59 std::vector<union type_stack_elt>.
60 <depth, size>: Remove.
61 * parse.c (parse_exp_in_context_1): Adjust.
62 (type_stack_reserve): Remove.
63 (check_type_stack_depth): Remove.
64 (insert_into_type_stack): Adjust to std::vector.
65 (insert_type): Likewise.
66 (push_type): Likewise.
67 (push_type_int): Likewise.
68 (insert_type_address_space): Likewise.
70 (pop_type_int): Likewise.
71 (pop_typelist): Likewise.
72 (pop_type_stack): Likewise.
73 (append_type_stack): Likewise.
74 (push_type_stack): Likewise.
75 (get_type_stack): Likewise.
76 (type_stack_cleanup): Likewise.
77 (push_typelist): Likewise.
78 (follow_types): Likewise.
79 (_initialize_parse): Likewise.
81 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
83 * NEWS: Mention csky target.
85 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
86 Hafiz Abid Qadeer <abidh@codesourcery.com>
87 Don Breazeal <donb@codesourcery.com>
89 * csky-linux-tdep.c: New file.
90 * csky-tdep.c: Likewise.
91 * csky-tdep.h: Likewise.
92 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
94 (HFILES_NO_SRCDIR): Add csky-tdep.h.
95 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
96 * configure.tgt: Add csky support.
98 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
100 * python/py-framefilter.c (py_print_frame): Print frame architecture
101 when printing on an MI output.
103 2018-08-27 Tom Tromey <tom@tromey.com>
106 * configure: Rebuild.
107 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
109 2018-08-27 Tom Tromey <tom@tromey.com>
111 * aarch64-linux-tdep.c
112 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
115 2018-08-27 Tom Tromey <tom@tromey.com>
117 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
119 (ppc64_standard_linkage1, ppc64_standard_linkage2)
120 (ppc64_standard_linkage3, ppc64_standard_linkage4)
121 (ppc64_standard_linkage5, ppc64_standard_linkage6)
122 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
125 2018-08-27 Tom Tromey <tom@tromey.com>
127 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
128 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
130 2018-08-27 Tom Tromey <tom@tromey.com>
132 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
133 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
135 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
137 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
139 * sparc-linux-tdep.c (sparc32_linux_sigframe)
140 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
141 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
143 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
144 (ppc64_linux_sigaction_tramp_frame)
145 (ppc32_linux_sighandler_tramp_frame)
146 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
147 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
148 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
149 * mn10300-linux-tdep.c (am33_linux_sigframe)
150 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
151 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
152 * mips-linux-tdep.c (mips_linux_o32_sigframe)
153 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
154 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
155 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
156 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
157 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
158 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
159 * microblaze-linux-tdep.c
160 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
161 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
162 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
163 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
164 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
165 * common/common-types.h (ULONGEST_MAX): New define.
166 (CORE_ADDR_MAX): Fix formatting.
167 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
168 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
169 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
170 (arm_linux_rt_sigreturn_tramp_frame)
171 (arm_eabi_linux_sigreturn_tramp_frame)
172 (arm_eabi_linux_rt_sigreturn_tramp_frame)
173 (thumb2_eabi_linux_sigreturn_tramp_frame)
174 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
175 (arm_linux_restart_syscall_tramp_frame)
176 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
177 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
178 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
180 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
182 2018-08-27 Tom Tromey <tom@tromey.com>
184 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
186 * mips-tdep.c (mips_deal_with_atomic_sequence)
187 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
188 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
189 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
190 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
192 * aarch64-tdep.c (aarch64_software_single_step): Use
195 2018-08-27 Tom Tromey <tom@tromey.com>
197 * linespec.c (complete_linespec_component): Add cast to "char".
198 * completer.c (completion_tracker::build_completion_result): Add
201 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
203 * solist.h (struct solist, struct target_so_ops): Fix
206 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
208 * ada-tasks.c (ada_task_info_s): Remove typedef.
209 (DEF_VEC_O(ada_task_info_s)): Remove.
210 (struct ada_tasks_inferior_data): Initialize fields.
211 <task_list>: Make an std::vector.
212 (get_ada_tasks_inferior_data): Allocate with new.
213 (ada_get_task_number): Adjust.
214 (get_task_number_from_id): Likewise.
215 (valid_task_id): Likewise.
216 (ada_get_task_info_from_ptid): Likewise.
217 (iterate_over_live_ada_tasks): Likewise.
218 (add_ada_task): Likewise.
219 (read_known_tasks): Likewise.
220 (ada_build_task_list): Likewise.
221 (print_ada_task_info): Likewise.
222 (info_task): Likewise.
223 (task_command_1): Likewise.
225 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
227 * ada-lang.c (add_angle_brackets): Return std::string.
229 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
231 * python/py-threadevent.c (py_get_event_thread): Initialize
234 2018-08-24 Pedro Alves <palves@redhat.com>
236 * python/py-bpevent.c (create_breakpoint_event_object): Use
238 * python/py-continueevent.c (emit_continue_event): Use
240 * python/py-exitedevent.c (create_exited_event_object): Return a
242 (emit_exited_event): Use copy-initialization.
243 * python/py-inferior.c (python_new_inferior)
244 (python_inferior_deleted, add_thread_object): Use
246 * python/py-infevents.c (create_inferior_call_event_object)
247 (create_register_changed_event_object)
248 (create_memory_changed_event_object): Return a gdbpy_ref<>.
249 (emit_inferior_call_event, emit_memory_changed_event)
250 (emit_register_changed_event): Use copy-initialization.
251 * python/py-newobjfileevent.c (create_new_objfile_event_object):
252 Return a gdbpy_ref<>.
253 (emit_new_objfile_event): Use copy-initialization.
254 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
255 (emit_clear_objfiles_event): Use copy-initialization.
256 * python/py-signalevent.c (create_signal_event_object): Use
258 * python/py-threadevent.c (create_thread_event_object): Use
261 2018-08-24 Pedro Alves <palves@redhat.com>
262 Simon Marchi <simon.marchi@ericsson.com>
265 * python/py-continueevent.c: Include "gdbthread.h".
266 (create_continue_event_object): Add intro comment. Add 'ptid'
267 parameter. Use it to find thread to pass to
268 create_thread_event_object.
269 (emit_continue_event): Pass PTID down to
270 create_continue_event_object.
271 * python/py-event.h (py_get_event_thread): Declare.
272 (create_thread_event_object): Remove default from 'thread'
274 * python/py-stopevent.c (create_stop_event_object): Use
276 * python/py-threadevent.c (get_event_thread): Rename to ...
277 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
278 and use it to find the thread.
279 (create_thread_event_object): Assert that THREAD isn't null.
280 Don't find the event thread here.
282 2018-08-23 Kevin Buettner <kevinb@redhat.com>
284 * block.h (blockrange, blockranges): New struct declarations.
285 (struct block): Add new field named `ranges'.
286 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
287 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
288 macros for accessing ranges in struct block.
289 (make_blockranges): New declaration.
290 block.c (make_blockranges): New function.
291 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
293 * symtab.h (find_pc_partial_function): Add new parameter `block'.
294 * blockframe.c (cache_pc_function_block): New static global.
295 (clear_pc_function_cache): Clear cache_pc_function_block.
296 (find_pc_partial_function): Move comment to symtab.h. Add
297 support for non-contiguous blocks.
298 * cli/cli-cmds.c (block.h): Include.
299 (print_disassembly): Handle printing of non-contiguous blocks.
300 (disassemble_current_function): Likewise.
301 (disassemble_command): Likewise.
303 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
305 * blockframe.c (get_pc_function_start): Likewise.
306 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
307 (gcc_symbol_address): Likewise.
308 * compile/compile-object-run.c (compile_object_run): Likewise.
309 * compile/compile.c (get_expr_block_and_pc): Likewise.
310 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
311 (func_addr_to_tail_call_list): Likewise.
312 * findvar.c (default_read_var_value): Likewise.
313 * inline-frame.c (inline_frame_this_id): Likewise.
314 (skip-inline_frames): Likewise.
315 * infcmd.c (until_next_command): Likewise.
316 * linespec.c (convert_linespec_to_sals): Likewise.
317 * parse.c (parse_exp_in_context_1): Likewise.
318 * printcmd.c (build_address_symbolic): likewise.
319 (info_address_command): Likewise.
320 symtab.c (find_function_start_sal): Likewise.
321 (skip_prologue_sal): Likewise.
322 (find_function_alias_target): Likewise.
323 (find_gnu_ifunc): Likewise.
324 * stack.c (find_frame_funname): Likewise.
325 * symtab.c (fixup_symbol_section): Likewise.
326 (find_function_start_sal): Likewise.
327 (skip_prologue_sal): Likewsie.
328 (find_function_alias_target): Likewise.
329 (find_gnu_ifunc): Likewise.
330 * tracepoint.c (info_scope_command): Likewise.
331 * value.c (value_fn_field): Likewise.
333 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
334 in place of find_pc_partial_function.
335 * blockframe.c (find_function_entry_range_from_pc): New function.
336 * symtab.h (find_function_entry_range_from_pc): Declare and document.
337 * objfiles.c (objfile_relocate1): Relocate start and end addresses
338 for each range in a block.
341 2018-08-23 Xavier Roirand <roirand@adacore.com>
343 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
346 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
348 * solib-svr4.c (read_program_headers_from_bfd): Return
349 gdb::optional<gdb::byte_vector>.
350 (svr4_exec_displacement): Adjust.
352 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
354 * solib-svr4.c (read_program_header): Return
355 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
356 (find_program_interpreter): Return
357 gdb::optional<gdb::byte_vector>.
358 (scan_dyntag_auxv): Adjust.
359 (enable_break): Adjust.
360 (svr4_exec_displacement): Adjust.
362 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
364 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
365 * inf-child.c (inf_child_target::terminal_save_inferior): New.
367 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
369 * guile/scm-string.c (gdbscm_scm_from_printf): Use
371 * guile/scm-utils.c (gdbscm_printf): Likewise.
372 * serial.c (serial_printf): Likewise.
373 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
375 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
377 * stack.c (print_frame): Print frame architecture when printing on
379 * NEWS: Mention new "arch" attribute in frame output.
381 2018-08-21 Alan Hayward <alan.hayward@arm.com>
383 * arch/aarch64.h (aarch64_regnum): Update comment.
385 2018-08-21 Alan Hayward <alan.hayward@arm.com>
387 * NEWS: Add SVE to 8.2 section.
389 2018-08-21 Pedro Alves <palves@redhat.com>
391 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
392 out from gdbscm_parse_function_args.
393 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
394 gdbscm_parse_function_args_1.
396 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
399 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
402 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
404 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
406 2018-08-19 Michael Spang <spang@google.com>
409 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
412 2018-08-18 Kevin Buettner <kevinb@redhat.com>
414 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
415 dwarf_variable_value.
416 * dwarf2-frame.c (class dwarf_expr_executor):
417 Add override for dwarf_variable_value.
418 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
419 (class symbol_needs_eval_context): Likewise.
420 (indirect_synthetic_pointer): Add forward declaration.
421 (sect_variable_value): New function.
422 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
423 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
424 for DW_OP_GNU_variable_value.
426 2018-08-16 Tom Tromey <tom@tromey.com>
428 * top.c (read_command_file): Update.
429 (command_line_input): Remove "repeat" argument.
430 * ada-lang.c (get_selections): Update.
431 * linespec.c (decode_line_2): Update.
432 * defs.h (command_line_input): Remove argument.
433 * cli/cli-script.c (read_next_line): Update.
434 * python/py-gdb-readline.c: Update.
436 2018-08-17 Tom Tromey <tom@tromey.com>
438 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
441 2018-08-15 Tom Tromey <tom@tromey.com>
443 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
445 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
447 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
448 If used, use find_pc_partial_function to find address range
450 * mi/mi-main.c (mi_cmd_list_features): Report
451 "data-disassemble-a-option" feature.
452 * NEWS: Mention new -data-disassemble option -a.
454 2018-08-13 Tom Tromey <tom@tromey.com>
456 * common/common-defs.h (_FORTIFY_SOURCE): Define.
458 2018-08-13 Alan Hayward <alan.hayward@arm.com>
460 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
461 (aarch64_linux_collect_sve_regset): Likewise.
462 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
463 * regcache.h (regcache_map_entry_size): New function.
465 2018-08-13 Alan Hayward <alan.hayward@arm.com>
467 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
468 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
469 (SVE_HEADER_VL_LENGTH): Likewise.
470 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
471 (SVE_HEADER_FLAGS_LENGTH): Likewise.
472 (SVE_HEADER_RESERVED_LENGTH): Likewise.
473 (SVE_HEADER_SIZE_OFFSET): Likewise.
474 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
475 (SVE_HEADER_VL_OFFSET): Likewise.
476 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
477 (SVE_HEADER_FLAGS_OFFSET): Likewise.
478 (SVE_HEADER_RESERVED_OFFSET): Likewise.
479 (SVE_HEADER_SIZE): Likewise.
480 (aarch64_linux_core_read_vq): Add function.
481 (aarch64_linux_core_read_description): Check for SVE section.
483 2018-08-13 Alan Hayward <alan.hayward@arm.com>
485 * aarch64-fbsd-tdep.c
486 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
488 * aarch64-linux-tdep.c
489 (aarch64_linux_iterate_over_regset_sections): Likewise.
491 (alpha_linux_iterate_over_regset_sections):
493 (alphanbsd_iterate_over_regset_sections): Likewise.
495 (amd64fbsd_iterate_over_regset_sections): Likewise.
497 (amd64_linux_iterate_over_regset_sections): Likewise.
499 (armbsd_iterate_over_regset_sections): Likewise.
501 (arm_fbsd_iterate_over_regset_sections): Likewise.
503 (arm_linux_iterate_over_regset_sections): Likewise.
504 * corelow.c (get_core_registers_cb): Likewise.
505 (core_target::fetch_registers): Likewise.
506 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
507 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
508 * gdbarch.h (void): Regenerate.
509 * gdbarch.sh: Add supply_size and collect_size.
510 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
511 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
512 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
513 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
514 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
515 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
516 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
517 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
518 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
519 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
520 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
521 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
522 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
523 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
524 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
525 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
526 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
527 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
528 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
529 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
530 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
531 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
532 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
533 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
534 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
535 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
536 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
537 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
538 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
539 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
541 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
543 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
546 2018-08-10 Keith Seitz <keiths@redhat.com>
548 * compile/compile-c-support.c (add_code_header, add_code_footer):
549 Move into policy class.
550 (c_push_user_expression, pop_user_expression_nop)
551 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
552 (compile_program): New host class.
553 (c_compile_program): New typedef.
554 (c_compute_porgram): Use c_compile_program.
556 2018-08-10 Keith Seitz <keiths@redhat.com>
558 * compile/compile-internal.h (compile_instance::~compile_instance):
559 Remove calls to htab_delete.
560 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
561 * compile.c (compile_instance::compile_instance): Initialize
562 htab unique pointers.
563 (compile_instance::get_cached_type, compile_instance::insert_type)
564 (compile_instance::error_symbol_once): Update for unique_ptr.
566 2018-08-10 Keith Seitz <keiths@redhat.com>
568 * compile/compile-c-symbols.c (struct symbol_error)
569 (hash_symbol_error, eq_symbol_error, del_symbol_error)
570 (compile_instance::insert_symbol_error)
571 (compile_instance::error_symbol_once): Move to ...
572 * compile/compile.c: ... here.
574 2018-08-10 Keith Seitz <keiths@redhat.com>
576 * compile/compile-c-support.c (c_get_compile_context): Use `new'
577 instead of `new_compile_instance'.
578 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
580 If the symbol error map is not initialized, create it.
581 (generate_c_for_for_one_symbol): Do not check/initialize
582 the symbol error map.
583 * compile/compile-c-types.c (compile_c_instance): Make a class.
585 (compile_instance::compile_instance): Initialize the type cache.
586 (get_cached_type): New function.
587 (insert_type): Update description.
588 (compile_c_instance::m_default_cflags): Define.
589 (convert_type): Update description. Use get_cached_type.
590 (delete_instance): Moved to destructor.
591 (new_compile_instance): Moved to constructor.
592 * compile/compile-c.h (compile_c_instance): Make class inheriting
593 from compile_instance.
594 <base>: Remove field.
595 <type_map, symbol_err_map>: Move to base class.
596 <c_plugin>: Rename to `m_plugin' and remove pointer type.
597 * compile/compile-internal.h (compile_instance): Make class.
598 <type_map_t, symbol_err_map_t>: Define.
599 <fe>: Rename to `m_gcc_fe'.
600 <scope, block, gcc_target_options>: Add `m_' prefix.
601 <m_type_map, m_symbol_err_map>: New fields, moved from
604 (convert_type, new_compile_instance): Remove.
605 * compile/compile.c (cleanup_compile_instance): Remove.
606 (compile_to_object): Use unique_ptr to eliminate cleanups.
607 (compile_instance::set_print_callback, compile_instance::version)
608 (compile_instance::set_verbose)
609 (compile_instance::set_driver_filename)
610 (compile_instance::set_triplet_regexp)
611 (compile_instance::set_arguments)
612 (compile_instance::set_source_file)
613 (compile_instance::compile): Define.
615 2018-08-10 Keith Seitz <keiths@redhat.com>
617 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
618 * compile/compile-c-types.c: Define GCC_METHODN macros and include
619 gcc-c-fe.def to define C plugin.
620 (delete_instance): Delete `c_plugin'.
621 (new_compile_instance): Initialize `c_plugin'.
622 * compile/compile-c.h: Include gcc_c_plugin.h.
623 (struct compile_c_instance) <c_plugin>: New member.
624 * gcc-c-plugin.h: New file.
625 Update all callers with API change.
627 2018-08-10 Keith Seitz <keiths@redhat.com>
629 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
630 (HFILES_NO_SRCDIR): ... to here.
631 Add compile-internal.h and compile-c.h.
632 * compile/compile-c-support.c: Include compile-c.h.
633 * compile/compile-c-symbols.c: Include compile-c.h.
634 (generate_c_for_variable_locations): Update comment.
635 * compile/compile-c-types.c: Include compile-c.h.
636 * compile/compile-c.h: New file -- moved C language declarations
637 from other files here.
638 * compile/compile-internal.h: Do not include hashtab.h or
640 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
641 (gcc_convert_symbol, gcc_symbol_address)
642 (generate_c_for_variable_locations, c_get_mode_for_size)
643 (c_get_range_decl_name): Definitions moved to compile-c.h.
644 * compile/compile-loc2c.c: Include compile-c.h.
646 2018-08-10 Keith Seitz <keiths@redhat.com>
648 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
649 (c_symbol_substitution_name): ... this.
652 2018-08-10 Keith Seitz <keiths@redhat.com>
654 * compile/compile-c-support.c (c_compute_program): Use
655 unique_xmalloc_ptr to eliminate cleanup.
656 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
657 Return a unique_xmalloc_ptr and eliminate cleanup.
658 * compile/compile-internal.h (generate_c_for_variable_locations):
659 Return unique_xmalloc_ptr and update description.
661 2018-08-10 Alan Hayward <alan.hayward@arm.com>
663 * corelow.c (core_target::get_core_register_section): Rename
664 min_size to section_min_size.
666 2018-08-09 Jim Wilson <jimw@sifive.com>
668 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
669 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
670 * NEWS: Mention new GNU/Linux RISC-V target.
671 * configure.host: Add riscv*-*-linux*.
672 * configure.nat: Add riscv*.
673 * configure.tgt: Add riscv*-*-linux*.
674 * riscv-linux-nat.c: New file.
675 * riscv-linux-tdep.c: New file.
677 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
679 * infrun.c (resume): Make static, add forward declaration.
680 (proceed): Update header comment.
681 * infrun.h (resume): Delete declaration.
683 2018-08-09 Tom Tromey <tom@tromey.com>
685 * riscv-tdep.h: Minor formatting fixes.
687 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
689 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
690 * dwarf-index-cache.c (create_dir_and_check): Likewise.
691 (test_mkdir_recursive): Likewise.
692 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
694 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
696 * valarith.c (value_subscripted_rvalue): If an array is not in
697 memory, and we don't know the upper bound, then we can't know that
698 the requested element exists or not.
700 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
702 * target.c (str_comma_list_concat_elem): Fix typo in comment.
703 (target_options_to_string): Add comment.
705 2018-08-08 Tom Tromey <tom@tromey.com>
707 * unittests/scoped_mmap-selftests.c: Check result of "write".
709 2018-08-08 Jim Wilson <jimw@sifive.com>
711 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
712 (decode_register_index_short): New.
713 (decode_j_type_insn, decode_cj_type_insn): New.
714 (decode_b_type_insn, decode_cb_type_insn): New.
715 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
716 local xlen. Check xlen when decoding ambiguous compressed insns. In
717 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
718 is_c_sw_insn instead of is_sw_insn.
719 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
720 (riscv_software_single_step): New.
721 * riscv-tdep.h (riscv_software_single_step): Declare.
723 * riscv-tdep.c (riscv_isa_xlen): Drop static.
724 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
726 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
729 * target.c (dispose_inferior): Don't dispose of inferiors that are
732 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
734 * remote.c (remote_target::download_tracepoint): Change char* to
737 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
739 * target.h (target_options_to_string): Return an std::string.
740 * target.c (str_comma_list_concat_elem): Return void, use
742 (do_option): Likewise.
743 (target_options_to_string): Return an std::string.
744 * linux-nat.c (linux_nat_target::wait): Adjust.
745 * target-debug.h (target_debug_print_options): Adjust.
747 2018-08-07 Tom Tromey <tom@tromey.com>
749 * Makefile.in (CPPFLAGS): New variable.
750 (INTERNAL_CPPFLAGS): Use it.
752 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
754 * NEWS: Mention the index cache.
756 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
758 * common/pathstuff.h (get_standard_cache_dir): New.
759 * common/pathstuff.c (get_standard_cache_dir): New.
760 * build-id.h (build_id_to_string): New.
761 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
762 DEBUG_STR_SUFFIX): Move to here.
763 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
764 DEBUG_STR_SUFFIX): Move from there.
765 (write_psymtabs_to_index): Make non-static, add basename
766 parameter. Write to temporary files, rename when done.
767 (save_gdb_index_command): Adjust call to
768 write_psymtabs_to_index.
769 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
771 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
772 (get_gdb_index_contents_from_cache): New.
773 (get_gdb_index_contents_from_cache_dwz): New.
774 (dwarf2_initialize_objfile): Read index from cache.
775 (dwarf2_build_psymtabs): Save to index.
776 * dwarf-index-cache.h: New file.
777 * dwarf-index-cache.c: New file.
778 * dwarf-index-write.h: New file.
780 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
782 * gnulib/aclocal.m4: Re-generate.
783 * gnulib/config.in: Re-generate.
784 * gnulib/configure: Re-generate.
785 * gnulib/import/Makefile.am: Re-generate.
786 * gnulib/import/Makefile.in: Re-generate.
787 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
788 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
789 * gnulib/import/m4/mkdir.m4: New file.
790 * gnulib/import/mkdir.c: New file.
791 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
794 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
796 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
797 * common/scoped_mmap.c: New file.
798 * common/scoped_mmap.h (destroy): New method.
799 (~scoped_mmap, reset): Use destroy.
800 (scoped_mmap): New move constructor.
801 (mmap_file): New declaration.
802 * unittests/scoped_mmap-selftests.c (test_normal,
803 test_invalid_filename, run_tests): New functions.
804 (_initialize_scoped_mmap_selftests): Register selftest.
806 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
808 * dwarf2read.c (read_gdb_index_from_section): Rename to...
809 (read_gdb_index_from_buffer): ... this. Remove section
810 parameter, add buffer parameter.
811 (get_gdb_index_contents_ftype,
812 get_gdb_index_contents_dwz_ftype): New typedefs.
813 (dwarf2_read_gdb_index): Add callback parameters to get the
815 (get_gdb_index_contents_from_section): New.
816 (dwarf2_initialize_objfile): Update call to
817 dwarf2_read_gdb_index.
819 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
821 * common/filestuff.h (gdb_fopen_cloexec): New overload.
822 (gdb_open_cloexec): Likewise.
823 * nat/linux-osdata.c (command_from_pid): Use string_printf.
824 (commandline_from_pid): Likewise.
825 (linux_xfer_osdata_threads): Likewise.
826 (linux_xfer_osdata_fds): Likewise.
827 * ada-lang.c (is_package_name): Likewise.
828 * auxv.c (procfs_xfer_auxv): Likewise.
829 * breakpoint.c (print_one_breakpoint_location): Use
831 (print_one_catch_solib): Use string_printf.
832 * coff-pe-read.c (add_pe_exported_sym): Likewise.
833 (add_pe_forwarded_sym): Likewise.
834 * dwarf2read.c (create_type_unit_group): Likewise.
835 (build_error_marker_type): Likewise.
836 * infcall.c (get_function_name): Likewise.
837 * valprint.c (print_converted_chars_to_obstack): Likewise.
838 * xtensa-tdep.c (xtensa_register_type): Likewise.
840 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
842 * remote.c (remote_target::download_tracepoint): Fix format
845 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
847 * tracefile.c: Include common/byte-vector.h.
848 (trace_save): Change type of buf to gdb::byte_vector. Initialize
849 with trace_regblock_size if needed. Update uses of buf.
851 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
853 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
854 std::vector<unsigned char>.
855 * tracepoint.c (collection_list::collection_list): Remove
856 m_regs_mask initializer from initializer list. Resize
857 m_regs_mask using the largest remote register number.
858 (collection_list::add_remote_register): Remove size check on
859 m_regs_mask. Use at to access element.
860 (collection_list::stringify): Change type of temp_buf to
861 gdb::char_vector. Update uses of temp_buf. Resize if needed to
862 stringify the register mask. Use pack_hex_byte for the register
865 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
867 * tracepoint.h (class collection_list) <add_register>: Remove.
868 <add_remote_register, add_ax_registers, add_local_register>:
870 <add_memrange>: Add scope parameter.
871 * tracepoint.c (encode_actions_1): Likewise.
872 (collection_list::add_register): Rename to ...
873 (collection_list::add_remote_register): ... this. Update
875 (collection_list::add_ax_registers, add_local_register): New
877 (collection_list::add_memrange): Add scope parameter. Call
878 add_local_register instead of add_register.
879 (finalize_tracepoint_aexpr): New function.
880 (collection_list::collect_symbol): Update calls to add_memrange.
881 Call add_local_register instead of add_register. Call
882 add_ax_registers. Call finalize_tracepoint_aexpr.
883 (encode_actions_1): Get remote regnos for $reg action. Call
884 add_remote_register, add_ax_registers, and add_local_register.
885 Update call to add_memrange. Call finalize_tracepoint_aexpr.
886 (validate_actionline): Call finalize_tracepoint_aexpr.
888 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
890 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
891 Replace array buf with gdb::char_vector buf, of size
892 get_remote_packet_size (). Replace references to buf and
893 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
894 and xsnprintf with snprintf. Raise errors if the buffer is too
897 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
899 * remote.c (remote_target::download_tracepoint): Fix the has_more
900 predicate in the QTDP action list iteration.
902 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
904 * remote.c (remote_target::download_tracepoint): Fix indentation
907 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
909 * proc-api.c (_initialize_proc_api): Remove c, unused.
910 * procfs.c (procfs_init_inferior): Remove signals, unused.
911 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
914 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
915 Andrew Burgess <andrew.burgess@embecosm.com>
917 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
918 'W_STOPCODE (0)' as this could be ambiguous.
920 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
922 * ser-tcp.c (net_open): Fix thinko when deciding whether to
923 disable TCP's Nagle algorithm (use "ai_protocol" instead of
926 2018-08-02 Tom Tromey <tom@tromey.com>
929 * dwarf2read.c (read_func_scope): Set symtab on template parameter
931 (process_structure_scope): Likewise.
933 2018-08-02 Xavier Roirand <roirand@adacore.com>
936 * darwin-nat.c (darwin_kill_inferior): Fix handling of
939 2018-08-02 Tom Tromey <tom@tromey.com>
941 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
942 (darwin_suspend_inferior, darwin_resume_inferior)
943 (darwin_decode_notify_message, darwin_resume_inferior_threads)
944 (darwin_check_new_threads): Check result of get_darwin_inferior.
946 2018-07-31 Joel Brobecker <brobecker@adacore.com>
950 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
952 * varobj.c (varobj_get_path_expr_parent): Report an error if
953 parent is a dynamic varobj.
955 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
957 * gnulib/aclocal.m4: Re-generate.
958 * gnulib/config.in: Re-generate.
959 * gnulib/configure: Re-generate.
960 * gnulib/import/Makefile.in: Re-generate.
961 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
962 * gnulib/import/m4/onceonly.m4: Re-generate.
964 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
966 * target-descriptions.c (struct xml_test_tdesc): New.
967 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
968 (record_xml_tdesc): Update.
969 (maintenance_check_xml_descriptions): Update.
970 * target-descriptions.h (record_xml_tdesc): Update comment.
972 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
974 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
975 checking array bounds are defined.
977 2018-07-30 Tom Tromey <tom@tromey.com>
979 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
980 irreflexivity violation.
982 2018-07-30 Tom Tromey <tom@tromey.com>
984 * cli/cli-decode.c (lookup_cmd): Remove lint code.
985 * value.c (unpack_long): Remove lint code.
986 * valops.c (value_ind): Remove lint code.
987 * valarith.c (value_x_binop, value_x_unop, value_equal)
988 (value_pos): Remove lint code.
990 2018-07-28 Tom de Vries <tdevries@suse.de>
992 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
993 with undefined upper bound as <optimized out>.
995 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
997 * gcore.in: Rename variable "name" to "prefix". Expand
1000 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1002 * windows-nat.c (windows_nat_target::create_inferior): Update to
1003 call close() in global namespace.
1005 2018-07-26 Tom Tromey <tom@tromey.com>
1007 * dwarf-index-write.c (add_address_entry): Don't add objfile
1009 * dbxread.c (find_stab_function): Rename from
1010 find_stab_function_addr. Return a bound_minimal_symbol.
1011 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1012 Don't add objfile offsets.
1013 (end_psymtab): Use raw_text_low, raw_text_high,
1014 MSYMBOL_VALUE_RAW_ADDRESS.
1015 (read_ofile_symtab): Update.
1016 (process_one_symbol): Update.
1017 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1019 (dw2_relocate): Remove.
1020 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1022 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1024 (process_psymtab_comp_unit_reader, add_partial_symbol)
1025 (add_partial_subprogram, dwarf2_ranges_read): Update.
1026 (load_partial_dies): Update.
1027 (add_address_entry): Don't add objfile offsets.
1028 (dwarf2_build_include_psymtabs): Update.
1029 (create_addrmap_from_aranges): Don't add objfile offsets.
1030 (dw2_find_pc_sect_compunit_symtab): Update.
1031 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1032 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1034 (parse_partial_symbols): Don't add objfile offsets. Use
1035 raw_text_low, raw_text_high. Update.
1036 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1037 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1038 or call 'relocate' quick function. Clear psymbol_map.
1039 * psympriv.h (struct partial_symbol) <address>: Add section
1041 <set_unrelocated_address>: Rename from set_address.
1042 <raw_text_low, raw_text_high>: New methods.
1043 <text_low, text_high>: Add objfile parameter.
1044 (add_psymbol_to_bcache): Add 'section' parameter. Call
1045 set_unrelocated_address.
1046 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1047 (find_pc_psymbol): Update.
1048 (fixup_psymbol_section, relocate_psymtabs): Remove.
1049 (dump_psymtab, psym_functions): Update.
1050 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1052 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1053 (start_psymtab_common): Update.
1054 * symfile-debug.c (debug_qf_relocate): Remove.
1055 (debug_sym_quick_functions): Update.
1056 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1057 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1060 2018-07-26 Tom Tromey <tromey@redhat.com>
1062 * dbxread.c (end_psymtab): Use text_high_valid and
1064 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1065 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1066 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1068 <text_low_valid, text_high_valid>: New fields.
1069 <set_text_low, set_text_high>: Update.
1070 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1072 2018-07-26 Tom Tromey <tom@tromey.com>
1074 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1076 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1077 textlow and texthigh fields.
1078 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1080 * mdebugread.c (parse_lines, parse_partial_symbols)
1081 (psymtab_to_symtab_1): Update.
1082 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1083 Rename fields. Update comment. Now private.
1084 <text_low, text_high, set_text_low, set_text_high>: New methods.
1085 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1086 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1087 (start_psymtab_common, maintenance_info_psymtabs)
1088 (maintenance_check_psymtabs): Update.
1089 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1091 (scan_xcoff_symtab): Update.
1093 2018-07-26 Tom Tromey <tromey@redhat.com>
1095 * psympriv.h (struct partial_symbol) <unrelocated_address,
1096 address, set_address>: New methods.
1097 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1098 (fixup_psymbol_section, relocate_psymtabs): Update.
1099 (print_partial_symbols): Add 'objfile' parameter. Update.
1100 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1103 2018-07-26 Tom Tromey <tom@tromey.com>
1105 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1106 (debug_names::write_psymbols): Update.
1107 * psympriv.h (struct partial_symbol): Derive from
1108 general_symbol_info.
1109 <obj_section>: New method.
1110 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1111 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1112 (find_pc_sect_psymbol, fixup_psymbol_section)
1113 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1114 (print_partial_symbols, recursively_search_psymtabs)
1115 (compare_psymbols, psymbol_hash, psymbol_compare)
1116 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1117 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1119 2018-07-26 Tom Tromey <tromey@redhat.com>
1121 * dbxread.c (end_psymtab): Remove dead code.
1123 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1125 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1126 DWARF unwinders are disabled.
1127 * dwarf2-frame.c: Add dwarf2read.h include.
1128 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1130 (dwarf2_frame_unwinders_enabled_p): Define.
1131 (show_dwarf_unwinders_enabled_p): New function.
1132 (_initialize_dwarf2_frame): Register switch to control DWARF
1134 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1135 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1136 (show_dwarf_cmdlist): Remove static keyword.
1137 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1138 (show_dwarf_cmdlist): Declare.
1139 * NEWS: Document new feature.
1141 2018-07-26 Tom de Vries <tdevries@suse.de>
1143 PR breakpoints/23366
1144 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1146 2018-07-26 Tom de Vries <tdevries@suse.de>
1148 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1149 DW_AT_count can't be translated to a dynamic prop.
1151 2018-07-25 Tom de Vries <tdevries@suse.de>
1153 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1156 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1158 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1160 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1162 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1164 2018-07-24 Keith Seitz <keiths@redhat.comt
1167 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1168 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1169 instead of add_symbol_to_list.
1170 (read_file_scope): Call prepare_one_comp_unit before reading
1173 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1175 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1177 2018-07-24 Tom Tromey <tom@tromey.com>
1179 * utils.c (malloc, realloc, free): Don't declare.
1180 * configure, config.in: Rebuild.
1181 * configure.ac: Don't check for declarations of free, malloc, or
1184 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1186 * aarch64-linux-nat.c
1187 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1189 * arm-linux-nat.c (fetch_regs): Likewise.
1190 (store_regs): Likewise.
1191 (fetch_vfp_regs): Likewise.
1192 (store_vfp_regs): Likewise.
1193 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1194 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1195 (arm_linux_nat_target::insert_watchpoint): Likewise.
1196 (arm_linux_nat_target::remove_watchpoint): Likewise.
1197 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1199 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1201 * ppc-linux-nat.c (fetch_register): Likewise.
1202 (fetch_all_gp_regs): Likewise.
1203 (fetch_ppc_registers): Likewise.
1204 (store_all_gp_regs): Likewise.
1205 (store_ppc_registers): Likewise.
1206 (hwdebug_insert_point): Likewise.
1207 (can_use_watchpoint_cond_accel): Likewise.
1208 * remote-sim.c (gdb_os_write_stdout): Likewise.
1210 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1211 Tom Tromey <tom@tromey.com>
1213 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1215 * configure: Rebuild.
1217 2018-07-22 Tom Tromey <tom@tromey.com>
1219 * regformats/regdat.sh: Define xmltarget_${name} inside
1220 #ifndef IN_PROCESS_AGENT.
1222 2018-07-22 Tom Tromey <tom@tromey.com>
1224 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1226 2018-07-22 Tom Tromey <tom@tromey.com>
1228 * symfile.c (reread_symbols): Notify iter, not objfile.
1230 2018-07-22 Tom Tromey <tom@tromey.com>
1232 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1234 (ravenscar_thread_target::prepare_to_store): Likewise.
1236 2018-07-22 Tom Tromey <tom@tromey.com>
1238 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1239 unused variable. Call value_fetch_lazy when needed.
1240 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1241 Remove unused variable. Call value_fetch_lazy when needed.
1243 2018-07-22 Tom Tromey <tom@tromey.com>
1245 * m32c-tdep.c (mark_dma): Return void.
1246 (make_regs): Remove unused declarations.
1248 2018-07-22 Tom Tromey <tom@tromey.com>
1250 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1251 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1252 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1253 bkscm_get_valid_block_smob_arg_unsafe for effect.
1255 2018-07-22 Tom Tromey <tom@tromey.com>
1257 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1260 2018-07-22 Tom Tromey <tom@tromey.com>
1262 * windows-nat.c (saved_context): Conditionally define.
1263 * remote.c (remote_target::remote_btrace_maybe_reopen):
1264 Conditionally declare "warned".
1265 * inflow.c (sigquit_ours): Conditionally define.
1266 (new_tty): Move "tty" declaration inside #if.
1267 * guile/guile.c (guile_datadir): Conditionally define.
1268 * charset.c (set_be_le_names): Move some declarations inside #if.
1269 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1271 (parse_xml_btrace_conf): Likewise.
1273 2018-07-22 Tom Tromey <tom@tromey.com>
1275 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1277 2018-07-22 Tom Tromey <tom@tromey.com>
1279 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1280 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1281 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1282 * buildsym-legacy.c (get_macro_table): Remove unused variable.
1283 * stack.c (frame_apply_level_command): Remove unused variable.
1284 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1285 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1286 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1288 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1289 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1290 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1292 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1293 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1295 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1296 Remove unused variable.
1297 * cli/cli-script.c (recurse_read_control_structure): Remove unused
1299 * common/tdesc.c (print_xml_feature::visit): Remove unused
1301 * compile/compile-object-load.c (store_regs): Remove unused
1303 * complaints.c (clear_complaints): Remove unused variable.
1304 * corelow.c (core_target_open): Remove unused variable.
1305 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1307 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1309 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1311 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1313 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1315 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1317 * ia64-tdep.c (examine_prologue): Remove unused variable.
1318 * infcall.c (run_inferior_call): Remove unused variable.
1319 * inferior.c (exit_inferior): Remove unused variable.
1320 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1321 * linespec.c (decode_line_2): Remove unused variable.
1322 * linux-nat.c (super_close): Remove.
1323 * linux-tdep.c (linux_info_proc): Remove unused variable.
1324 * mi/mi-main.c (mi_execute_command): Remove unused variable.
1325 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1326 Remove unused variable.
1327 * parse.c (find_minsym_type_and_address): Remove unused variable.
1328 * printcmd.c (info_symbol_command, printf_floating): Remove unused
1330 * python/py-breakpoint.c (bppy_set_commands): Remove unused
1332 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1334 * record-btrace.c (record_btrace_target::store_registers): Remove
1336 (cmd_show_record_btrace_cpu): Remove unused variable.
1337 * riscv-tdep.c (riscv_register_reggroup_p)
1338 (riscv_push_dummy_call, riscv_return_value): Remove unused
1340 * rust-exp.y (literal): Remove unused variable.
1341 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1343 <STRUCTOP_ANONYMOUS>: Likewise.
1344 * s390-linux-tdep.c (s390_linux_init_abi_31)
1345 (s390_linux_init_abi_64): Remove unused variable.
1346 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1347 (file_select_thread, net_windows_open, _initialize_ser_windows):
1348 Remove unused variables.
1349 * symtab.c (find_pc_sect_line): Remove unused variable.
1350 * target-memory.c (compute_garbled_blocks): Remove unused
1352 (target_write_memory_blocks): Remove unused variable.
1353 * target.c (target_stack::unpush): Remove unused variables.
1354 * tracepoint.c (start_tracing, all_tracepoint_actions)
1355 (merge_uploaded_trace_state_variables)
1356 (print_one_static_tracepoint_marker): Remove unused variable.
1357 * unittests/basic_string_view/element_access/char/1.cc (test01):
1358 Remove unused variable.
1359 * windows-nat.c (windows_continue, windows_add_all_dlls)
1360 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1361 Remove unused variables.
1363 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1365 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1366 attr_profile in HAVE_ELF.
1367 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1370 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1372 * frame.c (frame_register_unwind): Change parameter name.
1373 (frame_unwind_register): Likewise.
1374 (frame_unwind_register_value): Likewise.
1375 (frame_unwind_register_signed): Likewise.
1376 (frame_unwind_register_unsigned): Likewise.
1377 * frame.h (frame_register_unwind): Likewise.
1378 (frame_unwind_register): Likewise.
1379 (frame_unwind_register_value): Likewise.
1380 (frame_unwind_register_signed): Likewise.
1381 (frame_unwind_register_unsigned): Likewise.
1382 (frame_unwind_arch): Likewise.
1384 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1386 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1389 2018-07-20 Maciej W. Rozycki <macro@mips.com>
1391 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1392 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1395 2018-07-20 Keith Seitz <keiths@redhat.com>
1397 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1398 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1399 m_compunit_symtab, m_language>: Add "m_" prefix.
1401 * buildsym.c: Update all uses.
1403 2018-07-20 Tom Tromey <tom@tromey.com>
1405 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1406 * buildsym.h (record_line_ftype): Remove typedef.
1408 2018-07-20 Tom Tromey <tom@tromey.com>
1410 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1411 (end_expandable_symtab): Likewise.
1412 (end_symtab_get_static_block): Likewise.
1413 (end_symtab_from_static_block): Likewise.
1414 * buildsym-legacy.c (augment_type_symtab): Remove.
1415 (end_expandable_symtab): Remove.
1416 (end_symtab_get_static_block): Remove.
1417 (end_symtab_from_static_block): Remove.
1419 2018-07-20 Tom Tromey <tom@tromey.com>
1421 * dwarf2read.c: Include buildsym.h.
1422 (struct dwarf2_cu) <builder>: New method.
1423 (fixup_go_packaging): Update.
1424 (process_full_comp_unit, process_full_type_unit): Update. Don't
1425 use scoped_free_pendings.
1426 (using_directives): Add "cu" parameter, remove "language".
1427 (read_import_statement, setup_type_unit_groups, )
1428 (read_func_scope, read_lexical_block_scope)
1429 (dwarf2_record_block_ranges, read_namespace): Update.
1430 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1431 (lnp_state_machine::handle_end_sequence): Update.
1432 (class lnp_state_machine) <m_cu>: New member.
1433 <m_record_line_callback>: Remove.
1434 <m_currently_recording_lines>: New member.
1435 (lnp_state_machine::handle_set_file): Update.
1436 (noop_record_line): Remove.
1437 (dwarf_record_line_p): Add cu parameter.
1438 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1439 (lnp_state_machine::record_line)
1440 (lnp_state_machine::lnp_state_machine)
1441 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1442 (dwarf_decode_lines): Update.
1443 (dwarf2_start_subfile): Add cu parameter.
1444 (dwarf2_start_symtab, new_symbol): Update.
1445 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1446 Remove dwarf2_per_objfile parameter.
1447 (dwarf_decode_macros): Update.
1449 2018-07-20 Tom Tromey <tom@tromey.com>
1451 * stabsread.c (define_symbol): Update.
1452 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1453 * dwarf2read.c (new_symbol): Update.
1454 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1455 * cp-namespace.c: Include buildsym.h.
1456 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1457 * buildsym-legacy.c (get_buildsym_compunit): New function.
1459 2018-07-20 Tom Tromey <tom@tromey.com>
1461 * xcoffread.c: Include buildsym-legacy.h.
1462 * windows-nat.c: Include buildsym-legacy.h.
1463 * stabsread.c: Include buildsym-legacy.h.
1464 * mdebugread.c: Include buildsym-legacy.h.
1465 * buildsym-legacy.h: New file.
1466 * buildsym-legacy.c: New file, from buildsym.c.
1467 * go32-nat.c: Include buildsym-legacy.h.
1468 * dwarf2read.c: Include buildsym-legacy.h.
1469 * dbxread.c: Include buildsym-legacy.h.
1470 * cp-namespace.c: Include buildsym-legacy.h.
1471 * coffread.c: Include buildsym-legacy.h.
1472 * buildsym.h: Move some contents to buildsym-legacy.h.
1473 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1475 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1477 2018-07-20 Tom Tromey <tom@tromey.com>
1479 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1480 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1481 (buildsym_compunit::buildsym_compunit)
1482 (buildsym_compunit::~buildsym_compunit)
1483 (buildsym_compunit::get_macro_table): Define.
1485 2018-07-20 Tom Tromey <tom@tromey.com>
1487 * buildsym.c (reset_symtab_globals): Remove.
1488 (buildsym_compunit::end_symtab_from_static_block): Update.
1489 (buildsym_compunit::augment_type_symtab): Update.
1490 (end_symtab_from_static_block): Call free_buildsym_compunit.
1491 (augment_type_symtab, end_symtab, end_expandable_symtab):
1494 2018-07-20 Tom Tromey <tom@tromey.com>
1496 * arch-utils.c: Do not include buildsym.h.
1497 * mipsread.c: Do not include buildsym.h.
1498 * machoread.c: Do not include buildsym.h.
1499 * elfread.c: Do not include buildsym.h.
1501 2018-07-20 Tom Tromey <tom@tromey.com>
1503 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1505 (buildsym_compunit): Add new constructor.
1506 (struct buildsym_compunit) <get_last_source_file, finish_block,
1507 record_block_range, start_subfile, patch_subfile_names,
1508 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1509 set_last_source_start_addr, get_last_source_start_addr,
1510 get_local_using_directives, set_local_using_directives,
1511 get_global_using_directives, outermost_context_p,
1512 get_current_context_stack, get_context_stack_depth,
1513 get_current_subfile, get_local_symbols, get_file_symbols,
1514 get_global_symbols, record_debugformat, record_producer,
1515 push_context, pop_context, end_symtab_get_static_block,
1516 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1518 <record_pending_block, finish_block_internal, make_blockvector,
1519 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1523 2018-05-22 Tom Tromey <tom@tromey.com>
1525 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1527 (finish_block_internal): Update.
1529 2018-07-20 Tom Tromey <tom@tromey.com>
1531 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1533 (finish_block_internal): Update.
1535 2018-07-20 Tom Tromey <tom@tromey.com>
1537 * buildsym.h (EXTERN): Don't define or undef.
1538 * buildsym.c (EXTERN): Don't define.
1540 2018-07-20 Tom Tromey <tom@tromey.com>
1542 * buildsym.c: Remove TODO comment.
1544 2018-07-20 Tom Tromey <tom@tromey.com>
1546 * coffread.c (coff_symtab_read): Update.
1547 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1548 (xcoff_new_init): Update.
1549 * mipsread.c (mipscoff_new_init): Update.
1550 * mdebugread.c (mdebug_build_psymtabs): Update.
1551 * elfread.c (elf_new_init): Update.
1552 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1554 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1555 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1556 (stabsect_build_psymtabs): Update.
1557 * buildsym.h (buildsym_init): Don't declare.
1558 * buildsym.c: Update comment.
1559 (prepare_for_building): Remove.
1560 (start_symtab, restart_symtab): Update.
1561 (reset_symtab_globals): Update comment.
1562 (buildsym_init): Remove.
1564 2018-07-20 Tom Tromey <tom@tromey.com>
1566 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1567 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1568 (read_enum_type, common_block_start, common_block_end)
1569 (cleanup_undefined_types_1, finish_global_stabs): Update.
1570 * mdebugread.c (psymtab_to_symtab_1): Update.
1571 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1572 (read_lexical_block_scope, new_symbol): Update.
1573 * dbxread.c (process_one_symbol): Update.
1574 * coffread.c (coff_symtab_read, process_coff_symbol)
1575 (coff_read_enum_type): Update.
1576 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1578 (get_local_symbols, get_file_symbols, get_global_symbols): New
1580 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1582 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1583 (~scoped_free_pendings): Update.
1584 (finish_block, prepare_for_building, reset_symtab_globals)
1585 (end_symtab_get_static_block, end_symtab_with_blockvector)
1586 (augment_type_symtab, push_context): Update.
1587 (get_local_symbols, get_file_symbols, get_global_symbols): New
1589 (buildsym_init): Update.
1591 2018-07-20 Tom Tromey <tom@tromey.com>
1593 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1594 (process_full_type_unit): Likewise.
1595 (dwarf2_start_symtab): Set list_in_scope.
1597 2018-07-20 Tom Tromey <tom@tromey.com>
1599 * dwarf2read.c (process_psymtab_comp_unit_reader)
1600 (build_type_psymtabs_reader): Do not set list_in_scope.
1602 2018-07-20 Tom Tromey <tom@tromey.com>
1604 * buildsym.c (free_pendings): Remove.
1605 (add_symbol_to_list, scoped_free_pendings)
1606 (finish_block_internal, buildsym_init): Update.
1608 2018-07-20 Tom Tromey <tom@tromey.com>
1610 * xcoffread.c (read_xcoff_symtab): Update.
1611 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1613 * dbxread.c (process_one_symbol): Update.
1614 * coffread.c (coff_symtab_read): Update.
1615 * buildsym.h (finish_block): Update.
1616 * buildsym.c (finish_block): Remove "listhead" argument.
1617 (end_symtab_get_static_block): Update.
1619 2018-07-20 Tom Tromey <tom@tromey.com>
1621 * buildsym.h (class scoped_free_pendings): Remove constructor.
1622 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1624 <m_pending_block_obstack, m_pending_blocks>: New members.
1625 (pending_block_obstack, pending_blocks): Remove.
1626 (scoped_free_pendings::scoped_free_pendings): Default.
1627 (~scoped_free_pendings): Update.
1628 (free_pending_blocks): Remove.
1629 (finish_block_internal, record_pending_block, make_blockvector)
1630 (end_symtab_get_static_block, augment_type_symtab, push_context)
1631 (buildsym_init): Update.
1633 2018-07-20 Tom Tromey <tom@tromey.com>
1635 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1636 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1638 (pending_addrmap, pending_addrmap_obstack)
1639 (pending_addrmap_interesting): Remove.
1640 (scoped_free_pendings, record_block_range, make_blockvector)
1641 (prepare_for_building, reset_symtab_globals, buildsym_init):
1644 2018-07-20 Tom Tromey <tom@tromey.com>
1646 * xcoffread.c (process_linenos): Update.
1647 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1648 * mdebugread.c (psymtab_to_symtab_1): Update.
1649 * dwarf2read.c (setup_type_unit_groups)
1650 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1651 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1652 * dbxread.c (process_one_symbol): Update.
1653 * coffread.c (coff_symtab_read, enter_linenos)
1654 (process_coff_symbol): Update.
1655 * buildsym.h (current_subfile): Don't declare.
1656 (get_current_subfile): Declare.
1657 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1659 (start_subfile, free_buildsym_compunit, push_subfile)
1660 (prepare_for_building, start_symtab): Update.
1661 (get_current_subfile): New function.
1663 2018-07-20 Tom Tromey <tom@tromey.com>
1665 * coffread.c (coff_symtab_read): Update.
1666 * xcoffread.c (read_xcoff_symtab): Update.
1667 * dwarf2read.c (new_symbol): Update.
1668 (read_func_scope, read_lexical_block_scope): Update.
1669 * dbxread.c (process_one_symbol): Update.
1670 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1671 (outermost_context_p): Remove macro.
1672 (outermost_context_p, get_current_context_stack)
1673 (get_context_stack_depth): Declare.
1674 (pop_context): Return struct context_stack.
1675 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1677 (context_stack_size): Remove.
1678 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1679 (prepare_for_building, end_symtab_get_static_block)
1680 (augment_type_symtab, push_context): Update.
1681 (pop_context): Return struct context_stack.
1682 (outermost_context_p, get_current_context_stack)
1683 (get_context_stack_depth): New functions.
1684 (buildsym_init): Update.
1686 2018-07-20 Tom Tromey <tom@tromey.com>
1688 * rust-exp.y: Now a pure parser. Update all rules.
1689 (%union): Move earlier.
1690 (current_parser, work_obstack): Remove globals.
1691 (rust_parser, ~rust_parser): Update.
1692 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1693 lex_character, lex_number, lex_string, lex_identifier,
1694 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1695 convert_name, convert_params_to_expression,
1696 convert_ast_to_expression, ast_basic_type, ast_operation,
1697 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1698 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1699 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1700 ast_array_type, ast_slice_type, ast_reference_type,
1701 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1702 (rust_parse): Update.
1703 (rustyyerror, rustyylex): Add parser parameter.
1704 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1705 (rust_lex_stringish_test, rust_lex_test_sequence)
1706 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1707 (rust_lex_test_push_back, rust_lex_tests): Update.
1709 2018-07-19 Pedro Alves <palves@redhat.com>
1711 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1712 gdb::unique_xmalloc_ptr.
1713 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1714 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1715 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1716 copy-initialization.
1717 * guile/scm-pretty-print.c (ppscm_print_children): Use
1718 gdb::unique_xmalloc_ptr instead of cleanups.
1719 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1720 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1721 gdb::unique_xmalloc_ptr.
1722 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1723 Adjust to use gdb::unique_xmalloc_ptr.
1724 * guile/scm-utils.c (extract_arg): Adjust.
1725 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1726 gdb::unique_xmalloc_ptr instead of a cleanup.
1728 2018-07-19 Tom Tromey <tom@tromey.com>
1730 * utils.c (do_value_free_to_mark)
1731 (make_cleanup_value_free_to_mark): Remove.
1732 * utils.h (make_cleanup_value_free_to_mark): Remove.
1734 2018-07-19 Pedro Alves <palves@redhat.com>
1736 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1737 forwarding reference.
1739 2018-07-18 Pedro Alves <palves@redhat.com>
1741 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1742 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1745 2018-07-18 Pedro Alves <palves@redhat.com>
1747 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1749 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1751 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1752 directly instead of a cleanup.
1753 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1754 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1755 (vlscm_binop_gdbthrow): New, factored out from ...
1756 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1757 (vlscm_rich_compare): Use gdbscm_wrap.
1758 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1759 instead of a cleanup.
1760 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1762 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1763 Use xfree directly instead of a cleanup.
1764 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1765 Adjust to use gdbscm_wrap and scoped_value_mark.
1766 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1767 (gdbscm_value_address, gdbscm_value_dereference)
1768 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1770 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1771 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1773 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1774 gdbscm_wrap and scoped_value_mark.
1775 (gdbscm_value_to_string): Use xfree directly instead of a
1776 cleanup. Move 'buffer' unique_ptr to TRY scope.
1777 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1778 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1780 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1781 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1783 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1786 2018-07-18 Tom de Vries <tdevries@suse.de>
1788 * findvar.c (default_read_var_value): Also resolve dynamic type for
1789 LOC_OPTIMIZED_OUT vars.
1791 2018-07-18 Maciej W. Rozycki <macro@mips.com>
1793 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1796 2018-07-17 Tom Tromey <tom@tromey.com>
1798 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1799 (compute_enum_list, pascm_set_param_value_x)
1800 (gdbscm_parameter_value): Update.
1801 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1802 (gdbscm_scm_to_host_string): Update.
1803 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1805 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1806 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1807 * guile/scm-string.c (gdbscm_scm_to_string): Return
1809 (gdbscm_scm_to_host_string): Likewise.
1811 2018-07-17 Tom Tromey <tom@tromey.com>
1813 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1814 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1815 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1816 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1819 2018-07-17 Tom Tromey <tom@tromey.com>
1821 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1822 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1824 * guile/scm-cmd.c (cmdscm_function): Update.
1825 * guile/scm-pretty-print.c
1826 (ppscm_print_exception_unless_memory_error): Update.
1827 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1828 Return unique_xmalloc_ptr.
1830 2018-07-17 Tom Tromey <tom@tromey.com>
1832 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1835 2018-07-17 Jim Wilson <jimw@sifive.com>
1837 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1838 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1839 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1840 unecessary braces after EF_RISCV_RVC test. Delete call to
1841 set_gdbarch_decr_pc_after_break.
1843 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1844 RISCV_LAST_FP_REGNUM + 1.
1845 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1847 2018-07-17 Tom Tromey <tom@tromey.com>
1849 * configure.ac: Remove --disable-gdbcli.
1850 * configure: Rebuild.
1851 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1852 (SUBDIR_CLI_CFLAGS): Remove.
1853 (SFILES): Use SUBDIR_CLI_SRCS.
1854 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1856 2018-07-17 Tom Tromey <tom@tromey.com>
1859 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1861 2018-07-16 Jim Wilson <jimw@sifive.com>
1863 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1865 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1867 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1869 (libunwind_frame_sniffer): Likewise.
1870 (libunwind_frame_prev_register): Likewise.
1871 (libunwind_sigtramp_frame_sniffer): Likewise.
1872 * ia64-tdep.c (ia64_access_reg): Likewise.
1873 (ia64_access_rse_reg): Likewise.
1874 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1875 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1877 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1879 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1881 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1883 * remote-sim.c (gdbsim_target::close,
1884 gdbsim_target::mourn_inferior): Remove unused variables.
1886 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1888 * ia64-tdep.c (ktab_buf): New global.
1889 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1890 (get_kernel_table): Adjust.
1892 2018-07-16 Tom Tromey <tom@tromey.com>
1894 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1895 * dwarf2read.c (using_directives, new_symbol): Use
1896 outermost_context_p.
1897 * dbxread.c (process_one_symbol): Use outermost_context_p.
1898 * coffread.c (coff_symtab_read): Use outermost_context_p.
1900 2018-07-16 Tom Tromey <tom@tromey.com>
1902 * dwarf2read.c (using_directives, read_func_scope)
1903 (read_lexical_block_scope): Update.
1904 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1905 * buildsym.h (local_using_directives, global_using_directives):
1907 (get_local_using_directives, set_local_using_directives)
1908 (get_global_using_directives): Declare.
1909 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1910 m_global_using_directives>: New members.
1911 (finish_block_internal, prepare_for_building)
1912 (reset_symtab_globals, end_symtab_get_static_block)
1913 (push_context): Update.
1914 (get_local_using_directives, set_local_using_directives)
1915 (get_global_using_directives): New functions.
1916 (buildsym_init): Update.
1918 2018-07-16 Tom Tromey <tom@tromey.com>
1920 * xcoffread.c (xcoff_initial_scan): Don't call
1921 free_pending_blocks.
1922 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1923 * buildsym.h (class scoped_free_pendings): Add constructor.
1924 (free_pending_blocks): Don't declare.
1925 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1926 (free_pending_blocks): Now static.
1928 2018-07-16 Tom Tromey <tom@tromey.com>
1930 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1931 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1933 (struct subfile_stack): Remove.
1934 (subfile_stack): Remove.
1935 (push_subfile, pop_subfile, buildsym_init): Update.
1937 2018-07-16 Tom Tromey <tom@tromey.com>
1939 * buildsym.c (push_subfile): Use gdb_assert.
1940 (pop_subfile): Use gdb_assert.
1942 2018-07-16 Tom Tromey <tom@tromey.com>
1944 * buildsym.h (merge_symbol_lists): Remove.
1945 * buildsym.c (merge_symbol_lists): Remove.
1947 2018-07-16 Tom Tromey <tom@tromey.com>
1949 * stabsread.c (scan_file_globals): Update comment.
1950 * stabsread.h (scan_file_globals): Move from buildsym.h.
1951 * buildsym.h (scan_file_globals): Move to stabsread.h.
1953 2018-07-16 Tom Tromey <tom@tromey.com>
1955 * xcoffread.c (xcoff_new_init): Update.
1956 * mipsread.c (mipscoff_new_init): Update.
1957 * mdebugread.c (mdebug_build_psymtabs): Update.
1958 * elfread.c (elf_new_init): Update.
1959 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1960 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1961 * buildsym.h (buildsym_new_init): Don't declare.
1962 * buildsym.c (buildsym_new_init): Remove.
1964 2018-07-16 Tom Tromey <tom@tromey.com>
1966 * stabsread.h (within_function): Move from buildsym.h.
1967 * stabsread.c (start_stabs): Clear within_function.
1968 * coffread.c (coff_start_symtab): Clear within_function.
1969 * buildsym.h (within_function): Move to stabsread.h.
1970 * buildsym.c (prepare_for_building): Update.
1972 2018-07-16 Tom Tromey <tom@tromey.com>
1974 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1975 * dwarf2read.c (dwarf2_start_symtab): Don't set
1976 processing_gcc_compilation.
1977 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1979 2018-07-16 Tom Tromey <tom@tromey.com>
1981 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1982 (next_symbol_text_func): Move from buildsym.h.
1983 * stabsread.c (hashname): Move from buildsym.c.
1984 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1985 (next_symbol_text_func, hashname): Move to stabsread.h.
1986 * buildsym.c: Don't include bcache.h
1987 (hashname): Move to stasbread.c.
1989 2018-07-16 Tom Tromey <tom@tromey.com>
1991 * buildsym.h (context_stack_size): Don't declare.
1992 * buildsym.c (context_stack_size): New global.
1994 2018-07-16 Tom Tromey <tom@tromey.com>
1996 * dbxread.c (processing_acc_compilation): New global.
1997 * buildsym.h (processing_acc_compilation): Don't declare.
1999 2018-07-16 Tom Tromey <tom@tromey.com>
2001 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2002 * dbxread.c (read_ofile_symtab): Update.
2003 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2004 * buildsym.h (last_source_start_addr): Remove.
2005 (set_last_source_start_addr, get_last_source_start_addr):
2007 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2009 (struct buildsym_compunit) <m_last_source_start_addr>: New
2011 (prepare_for_building): Remove start_addr parameter.
2012 (start_symtab, restart_symtab, end_symtab_get_static_block)
2013 (end_symtab_with_blockvector): Update.
2014 (set_last_source_start_addr, get_last_source_start_addr): New
2017 2018-07-16 Tom Tromey <tom@tromey.com>
2019 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2021 (have_line_numbers): Remove.
2022 (record_line, prepare_for_building, end_symtab_get_static_block)
2023 (augment_type_symtab): Update.
2025 2018-07-16 Tom Tromey <tom@tromey.com>
2027 * buildsym.c (~buildsym_compunit): Free the macro table.
2028 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2030 <m_pending_macros>: New member.
2031 (pending_macros): Remove.
2032 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2033 (reset_symtab_globals, end_symtab_get_static_block)
2034 (end_symtab_with_blockvector, augment_type_symtab)
2035 (buildsym_init): Update.
2037 2018-07-16 Tom Tromey <tom@tromey.com>
2039 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2041 (buildsym_compunit::set_last_source_file): New method.
2042 <m_last_source_file>: New member.
2043 (prepare_for_building): Remove "name" parameter.
2044 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2045 (last_source_file): Remove.
2046 (set_last_source_file, get_last_source_file): Update.
2048 2018-07-16 Tom Tromey <tom@tromey.com>
2050 * buildsym.c (prepare_for_building): Add assert.
2052 2018-07-16 Tom Tromey <tom@tromey.com>
2054 * buildsym.c (~buildsym_compunit): Update.
2055 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2056 (start_subfile, patch_subfile_names)
2057 (end_symtab_with_blockvector): Update.
2059 2018-07-16 Tom Tromey <tom@tromey.com>
2061 * buildsym.c (struct buildsym_compunit): Add constructor,
2062 destructor, initializers.
2063 (start_buildsym_compunit): Remove.
2064 (free_buildsym_compunit): Use "delete".
2065 (start_symtab, restart_symtab): Use "new".
2067 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2069 * symfile.c (set_objfile_default_section_offset): Remove struct
2072 2018-07-14 Stafford Horne <shorne@gmail.com>
2074 * (Responsible Maintainers): Add myself as or1k maintainer.
2076 2018-07-13 Tom Tromey <tom@tromey.com>
2078 * symfile.c (set_objfile_default_section_offset): Use extra braces
2081 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2083 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2086 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2088 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2089 unittests/cli-utils-selftests.c
2090 * unittests/cli-utils-selftests.c: New file.
2092 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2094 * NEWS: Mention new commands. Mention change to 'thread apply'.
2096 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2098 * thread.c (thr_try_catch_cmd): New function.
2099 (thread_apply_all_command): Handle qcs flags.
2100 (thread_apply_command): Handle qcs flags.
2101 (taas_command): New function.
2102 (tfaas_command): New function.
2103 (_initialize_thread): Update to setup the new commands 'taas
2104 and 'tfaas'. Change doc string for 'thread apply'.
2106 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2108 * stack.c: (trailing_outermost_frame): New function, mostly
2109 extracted from backtrace_command_1.
2110 (leading_innermost_frame): New function.
2111 (backtrace_command_1): Update to call trailing_outermost_frame.
2112 (frame_apply_command_count): New function.
2113 (frame_apply_level_command): New function.
2114 (frame_apply_all_command): New function.
2115 (frame_apply_command): New function.
2116 (faas_command): New function.
2117 (frame_cmd_list): New variable.
2118 (_initialize_stack): Update to setup the new commands 'frame apply'
2121 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2123 * cli-utils.c (number_or_range_parser::get_number): Only handle
2124 numbers or convenience var as numbers.
2125 (parse_flags): New function.
2126 (parse_flags_qcs): New function.
2127 (number_or_range_parser::finished): Ensure parsing end is detected
2128 before end of string.
2129 * cli-utils.h (parse_flags): New function.
2130 (parse_flags_qcs): New function.
2131 (number_or_range_parser): Remove m_finished bool.
2132 (number_or_range_parser::skip_range): Set m_in_range to false.
2134 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2136 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2139 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2140 Jan Kratochvil <jan.kratochvil@redhat.com>
2141 Paul Fertser <fercerpav@gmail.com>
2142 Tsutomu Seki <sekiriki@gmail.com>
2143 Pedro Alves <palves@redhat.com>
2145 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2146 'unittests/parse-connection-spec-selftests.c'.
2147 (COMMON_SFILES): Add 'common/netstuff.c'.
2148 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2149 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2150 * common/netstuff.c: New file.
2151 * common/netstuff.h: New file.
2152 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2153 (wait_for_connect): Update comment. New parameter
2154 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2155 Use 'sock' directly instead of 'scb->fd'.
2156 (try_connect): New function, with code from 'net_open'.
2157 (net_open): Rewrite main loop to deal with multiple
2158 sockets/addresses. Handle IPv6-style hostnames; implement
2159 support for IPv6 connections.
2160 * unittests/parse-connection-spec-selftests.c: New file.
2162 2018-07-11 Pedro Alves <palves@redhat.com>
2165 * remote.c (remote_target::remote_detach_pid): Call
2166 set_current_process.
2168 2018-07-11 Pedro Alves <palves@redhat.com>
2170 * h8300-tdep.c (h8300_gdbarch_init): Remove
2171 set_gdbarch_ecoff_reg_to_regnum calls.
2173 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2176 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2177 offsets/sizes for static members of a class/struct.
2179 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2181 * target-descriptions.c (tdesc_register_bitsize): Rename.
2182 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2183 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2184 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2186 2018-07-10 Tom Tromey <tom@tromey.com>
2188 * breakpoint.c (moribund_locations): Now static and a
2190 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2191 (build_bpstat_chain, update_global_location_list)
2192 (breakpoint_retire_moribund): Update.
2193 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2196 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2198 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2199 (riscv_register_reggroup_p): Use new function, remove unneeded
2201 (riscv_push_dummy_call): Extend assert to compare against xlen or
2202 flen based on register type.
2204 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2206 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2208 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2210 * remote.c (show_hardware_watchpoint_limit): New function.
2211 (show_hardware_watchpoint_length_limit): New function.
2212 (show_hardware_breakpoint_limit): New function.
2213 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2214 where appropriate, update help text.
2216 2018-07-09 Tom Tromey <tom@tromey.com>
2218 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2219 (CLIBS): Don't mention NAT_CLIBS.
2221 2018-07-09 Tom Tromey <tom@tromey.com>
2223 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2224 (LIBGDB_OBS, clean mostlyclean): Update.
2225 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2227 2018-07-09 Tom Tromey <tom@tromey.com>
2229 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2230 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2231 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2233 2018-07-09 Tom Tromey <tom@tromey.com>
2235 * Makefile.in (ALLDEPFILES): Remove exec.c.
2236 (COMMON_OBS): Remove exec.o.
2237 (COMMON_SFILES): Add exec.c.
2239 2018-07-09 Tom Tromey <tom@tromey.com>
2241 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2243 2018-07-09 Tom Tromey <tom@tromey.com>
2245 * Makefile.in (clean mostlyclean): Remove stamp-version.
2246 (version.c): Depend on stamp-version.
2247 (stamp-version): New rule, from version.c rule.
2249 2018-07-09 Tom Tromey <tom@tromey.com>
2251 * Makefile.in (init.c): Depend on stamp-init.
2252 (stamp-init): New rule, from init.c rule.
2253 (clean mostlyclean): Remove stamp-init.
2255 2018-07-09 Tom Tromey <tom@tromey.com>
2257 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2258 SUBDIR_GCC_COMPILE_SRCS.
2260 2018-07-09 Tom Tromey <tom@tromey.com>
2262 * Makefile.in (init.c): Remove some unused sed rules.
2264 2018-07-09 Tom Tromey <tom@tromey.com>
2266 * Makefile.in (TSOBS): Remove.
2267 (INIT_FILES): Update.
2268 (LIBGDB_OBS): Update.
2269 (COMMON_SFILES): Add inflow.c.
2270 (SFILES): Remove inflow.c.
2272 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2274 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2276 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
2278 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2279 get_saveloc_name, is_signal_frame_name, step_name,
2280 init_remote_name, create_addr_space_name,
2281 destroy_addr_space_name, search_unwind_table_name,
2282 find_dyn_list_name): Constify.
2284 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
2286 * darwin-nat.c (darwin_pthread_kill): New function.
2287 (darwin_resume_thread): Use darwin_pthread_kill.
2289 2018-07-05 Tom de Vries <tdevries@suse.de>
2291 * macroexp.c (macro_buffer) <operator=>: New member function.
2293 2018-07-04 Tom Tromey <tom@tromey.com>
2295 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2297 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
2299 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2300 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2301 * maint.c: Likewise.
2304 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2306 * NEWS: Create a new section for the next release branch.
2307 Rename the section of the current branch, now that it has
2310 2018-07-04 Joel Brobecker <brobecker@adacore.com>
2312 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2313 * version.in: Bump version to 8.2.50.DATE-git.
2315 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2316 Pedro Alves <palves@redhat.com>
2318 * linux-nat.c (linux_init_ptrace): Rename to ...
2319 (linux_init_ptrace_procfs): ... this. Call
2320 linux_proc_init_warnings.
2321 (linux_nat_target::post_attach)
2322 (linux_nat_target::post_startup_inferior): Adjust.
2323 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2324 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2326 2018-07-04 Tom de Vries <tdevries@suse.de>
2328 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2330 (read_comp_unit_head): ... here.
2332 2018-07-03 Tom Tromey <tom@tromey.com>
2334 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2335 (stop_tracing, tstatus_command)
2336 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2337 (print_one_static_tracepoint_marker): Update.
2338 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2340 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
2342 (all_tracepoints, static_tracepoints_here): Return std::vector.
2344 2018-07-03 Tom Tromey <tom@tromey.com>
2346 * common/ptid.c (ptid_equal): Remove.
2347 * common/ptid.h (ptid_equal): Don't declare.
2348 * ada-tasks.c: Update.
2349 * breakpoint.c: Update.
2350 * common/agent.c: Update.
2351 * corelow.c: Update.
2352 * darwin-nat-info.c: Update.
2353 * darwin-nat.c: Update.
2355 * dtrace-probe.c: Update.
2356 * dummy-frame.c: Update.
2357 * fbsd-nat.c: Update.
2359 * gdbthread.h: Update.
2360 * gnu-nat.c: Update.
2361 * go32-nat.c: Update.
2362 * inf-loop.c: Update.
2363 * inf-ptrace.c: Update.
2364 * infcall.c: Update.
2368 * linux-fork.c: Update.
2369 * linux-nat.c: Update.
2370 * linux-thread-db.c: Update.
2371 * mi/mi-cmd-var.c: Update.
2372 * mi/mi-interp.c: Update.
2373 * mi/mi-main.c: Update.
2374 * nto-procfs.c: Update.
2375 * ppc-linux-tdep.c: Update.
2377 * python/py-inferior.c: Update.
2378 * python/py-record-btrace.c: Update.
2379 * python/py-record.c: Update.
2380 * ravenscar-thread.c: Update.
2381 * regcache.c: Update.
2382 * remote-sim.c: Update.
2384 * sol-thread.c: Update.
2387 * tui/tui-stack.c: Update.
2389 * windows-nat.c: Update.
2390 * windows-tdep.c: Update.
2392 2018-07-03 Tom Tromey <tom@tromey.com>
2394 * common/ptid.c (ptid_match): Remove.
2395 * common/ptid.h (ptid_match): Don't declare.
2396 * fbsd-nat.c: Update.
2399 * linux-nat.c: Update.
2400 * record-btrace.c: Update.
2401 * regcache.c: Update.
2404 2018-07-03 Tom Tromey <tom@tromey.com>
2406 * common/ptid.c (ptid_tid_p): Remove.
2407 * common/ptid.h (ptid_tid_p): Don't declare.
2408 * sol-thread.c: Update.
2410 2018-07-03 Tom Tromey <tom@tromey.com>
2412 * common/ptid.c (ptid_lwp_p): Remove.
2413 * common/ptid.h (ptid_lwp_p): Don't declare.
2414 * fbsd-nat.c: Update.
2415 * linux-nat.c: Update.
2416 * nat/linux-procfs.c: Update.
2417 * nat/x86-linux-dregs.c: Update.
2418 * sol-thread.c: Update.
2420 2018-07-03 Tom Tromey <tom@tromey.com>
2422 * common/ptid.c (ptid_is_pid): Remove.
2423 * common/ptid.h (ptid_is_pid): Don't declare.
2425 * linux-nat.c: Update.
2426 * mi/mi-interp.c: Update.
2430 2018-07-03 Tom Tromey <tom@tromey.com>
2432 * common/ptid.c (ptid_get_tid): Remove.
2433 * common/ptid.h (ptid_get_tid): Don't declare.
2434 * ada-tasks.c: Update.
2435 * aix-thread.c: Update.
2436 * bsd-uthread.c: Update.
2437 * darwin-nat.c: Update.
2438 * fbsd-nat.c: Update.
2439 * i386-darwin-nat.c: Update.
2441 * linux-tdep.c: Update.
2442 * nto-procfs.c: Update.
2443 * ppc-ravenscar-thread.c: Update.
2444 * python/py-infthread.c: Update.
2445 * ravenscar-thread.c: Update.
2446 * sol-thread.c: Update.
2447 * sparc-ravenscar-thread.c: Update.
2448 * windows-nat.c: Update.
2450 2018-07-03 Tom Tromey <tom@tromey.com>
2452 * common/ptid.c (ptid_get_lwp): Remove.
2453 * common/ptid.h (ptid_get_lwp): Don't declare.
2454 * aarch64-linux-nat.c: Update.
2455 * ada-tasks.c: Update.
2456 * aix-thread.c: Update.
2457 * amd64-linux-nat.c: Update.
2458 * arm-linux-nat.c: Update.
2459 * corelow.c: Update.
2460 * fbsd-nat.c: Update.
2461 * fbsd-tdep.c: Update.
2462 * gnu-nat.c: Update.
2463 * i386-cygwin-tdep.c: Update.
2464 * i386-gnu-nat.c: Update.
2465 * i386-linux-nat.c: Update.
2466 * ia64-linux-nat.c: Update.
2467 * inf-ptrace.c: Update.
2469 * linux-fork.c: Update.
2470 * linux-nat.c: Update.
2471 * linux-tdep.c: Update.
2472 * linux-thread-db.c: Update.
2473 * mips-linux-nat.c: Update.
2474 * nat/aarch64-linux-hw-point.c: Update.
2475 * nat/aarch64-linux.c: Update.
2476 * nat/linux-btrace.c: Update.
2477 * nat/linux-osdata.c: Update.
2478 * nat/linux-procfs.c: Update.
2479 * nat/x86-linux-dregs.c: Update.
2480 * obsd-nat.c: Update.
2481 * ppc-fbsd-nat.c: Update.
2482 * ppc-linux-nat.c: Update.
2484 * python/py-infthread.c: Update.
2485 * ravenscar-thread.c: Update.
2487 * s390-linux-nat.c: Update.
2488 * sol-thread.c: Update.
2489 * sol2-tdep.c: Update.
2490 * spu-linux-nat.c: Update.
2491 * x86-linux-nat.c: Update.
2492 * xtensa-linux-nat.c: Update.
2494 2018-07-03 Tom Tromey <tom@tromey.com>
2496 * common/ptid.c (ptid_get_pid): Remove.
2497 * common/ptid.h (ptid_get_pid): Don't declare.
2498 * aarch64-linux-nat.c: Update.
2499 * ada-lang.c: Update.
2500 * aix-thread.c: Update.
2501 * alpha-bsd-nat.c: Update.
2502 * amd64-fbsd-nat.c: Update.
2503 * amd64-linux-nat.c: Update.
2504 * arm-linux-nat.c: Update.
2505 * arm-nbsd-nat.c: Update.
2507 * break-catch-syscall.c: Update.
2508 * breakpoint.c: Update.
2509 * bsd-uthread.c: Update.
2510 * corelow.c: Update.
2512 * darwin-nat.c: Update.
2513 * fbsd-nat.c: Update.
2514 * fbsd-tdep.c: Update.
2516 * gnu-nat.c: Update.
2517 * hppa-nbsd-nat.c: Update.
2518 * hppa-obsd-nat.c: Update.
2519 * i386-fbsd-nat.c: Update.
2520 * ia64-linux-nat.c: Update.
2521 * inf-ptrace.c: Update.
2523 * inferior.c: Update.
2524 * inferior.h: Update.
2527 * linux-fork.c: Update.
2528 * linux-nat.c: Update.
2529 * linux-tdep.c: Update.
2530 * linux-thread-db.c: Update.
2531 * m68k-bsd-nat.c: Update.
2532 * mi/mi-interp.c: Update.
2533 * mi/mi-main.c: Update.
2534 * mips-linux-nat.c: Update.
2535 * mips-nbsd-nat.c: Update.
2536 * mips64-obsd-nat.c: Update.
2537 * nat/aarch64-linux-hw-point.c: Update.
2538 * nat/aarch64-linux.c: Update.
2539 * nat/linux-btrace.c: Update.
2540 * nat/linux-osdata.c: Update.
2541 * nat/linux-procfs.c: Update.
2542 * nat/x86-linux-dregs.c: Update.
2543 * nto-procfs.c: Update.
2544 * obsd-nat.c: Update.
2545 * ppc-linux-nat.c: Update.
2546 * ppc-nbsd-nat.c: Update.
2547 * ppc-obsd-nat.c: Update.
2548 * proc-service.c: Update.
2550 * python/py-inferior.c: Update.
2551 * python/py-infthread.c: Update.
2552 * ravenscar-thread.c: Update.
2554 * remote-sim.c: Update.
2556 * rs6000-nat.c: Update.
2557 * s390-linux-nat.c: Update.
2558 * sh-nbsd-nat.c: Update.
2559 * sol-thread.c: Update.
2560 * sparc-nat.c: Update.
2561 * sparc64-tdep.c: Update.
2562 * spu-linux-nat.c: Update.
2563 * spu-tdep.c: Update.
2564 * target-debug.h: Update.
2567 * tid-parse.c: Update.
2568 * tracefile-tfile.c: Update.
2569 * vax-bsd-nat.c: Update.
2570 * windows-nat.c: Update.
2571 * x86-linux-nat.c: Update.
2572 * x86-nat.c: Update.
2574 2018-07-03 Tom Tromey <tom@tromey.com>
2576 * common/ptid.c (pid_to_ptid): Remove.
2577 * common/ptid.h (pid_to_ptid): Don't declare.
2578 * aix-thread.c: Update.
2579 * arm-linux-nat.c: Update.
2580 * common/ptid.c: Update.
2581 * common/ptid.h: Update.
2582 * corelow.c: Update.
2584 * darwin-nat.c: Update.
2585 * fbsd-nat.c: Update.
2586 * fork-child.c: Update.
2587 * gnu-nat.c: Update.
2588 * go32-nat.c: Update.
2589 * inf-ptrace.c: Update.
2591 * inferior.c: Update.
2593 * linux-fork.c: Update.
2594 * linux-nat.c: Update.
2595 * nat/aarch64-linux-hw-point.c: Update.
2596 * nat/fork-inferior.c: Update.
2597 * nat/x86-linux-dregs.c: Update.
2598 * nto-procfs.c: Update.
2599 * obsd-nat.c: Update.
2601 * progspace.c: Update.
2603 * rs6000-nat.c: Update.
2604 * s390-linux-nat.c: Update.
2605 * sol-thread.c: Update.
2606 * spu-linux-nat.c: Update.
2609 * tracefile-tfile.c: Update.
2610 * windows-nat.c: Update.
2612 2018-07-03 Tom Tromey <tom@tromey.com>
2614 * common/ptid.h (ptid_build): Don't declare.
2615 * common/ptid.c (ptid_build): Remove.
2616 * aix-thread.c: Update.
2617 * bsd-kvm.c: Update.
2618 * bsd-uthread.c: Update.
2619 * common/agent.c: Update.
2620 * common/ptid.c: Update.
2621 * common/ptid.h: Update.
2622 * corelow.c: Update.
2623 * darwin-nat.c: Update.
2624 * fbsd-nat.c: Update.
2625 * gnu-nat.c: Update.
2626 * linux-fork.c: Update.
2627 * linux-nat.c: Update.
2628 * linux-thread-db.c: Update.
2629 * nat/linux-osdata.c: Update.
2630 * nat/linux-procfs.c: Update.
2631 * nto-procfs.c: Update.
2632 * obsd-nat.c: Update.
2633 * proc-service.c: Update.
2635 * ravenscar-thread.c: Update.
2636 * remote-sim.c: Update.
2638 * sol-thread.c: Update.
2640 * windows-nat.c: Update.
2642 2018-07-03 Tom Tromey <tom@tromey.com>
2644 * infrun.c (follow_exec): Use exit_inferior_silent.
2645 * inferior.c (exit_inferior_num_silent): Remove.
2646 * inferior.h (exit_inferior_num_silent): Don't declare.
2648 2018-07-03 Tom Tromey <tom@tromey.com>
2651 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2652 inferior_ptid on error.
2654 2018-07-02 Maciej W. Rozycki <macro@mips.com>
2655 Simon Marchi <simon.marchi@polymtl.ca>
2658 * disasm.h (gdb_disassembler): Add
2659 `m_disassembler_options_holder'. member
2660 * disasm.c (get_all_disassembler_options): New function.
2661 (gdb_disassembler::gdb_disassembler): Use it.
2662 (gdb_buffered_insn_length_init_dis): Likewise.
2663 (gdb_buffered_insn_length): Adjust accordingly.
2664 (set_disassembler_options): Handle options with arguments.
2665 (show_disassembler_options_sfunc): Likewise. Add a leading new
2666 line if showing options with descriptions.
2667 (disassembler_options_completer): Adapt to using the
2668 `disasm_options_and_args_t' structure.
2669 * mips-tdep.c (mips_disassembler_options): New variable.
2670 (mips_disassembler_options_o32): Likewise.
2671 (mips_disassembler_options_n32): Likewise.
2672 (mips_disassembler_options_n64): Likewise.
2673 (gdb_print_insn_mips): Don't set `disassembler_options'.
2674 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2676 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2677 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2678 `gdbarch_disassembler_options_implicit' and
2679 `gdbarch_valid_disassembler_options'.
2680 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2681 `disasm_options_and_args_t' structure.
2682 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2684 (valid_disassembler_options): Switch from `disasm_options_t' to
2685 the `disasm_options_and_args_t' structure.
2686 * NEWS: Document `set disassembler-options' support for the MIPS
2688 * gdbarch.h: Regenerate.
2689 * gdbarch.c: Regenerate.
2691 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2693 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2695 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2697 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2698 parameter in call to amd64_target_description.
2699 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2700 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2701 (amd64fbsd_init_abi): Likewise.
2702 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2703 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2704 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2705 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2707 2018-06-29 Pedro Alves <palves@redhat.com>
2709 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2710 "segments" parameter.
2711 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2712 (_initialize_amd64_tdep): Update call to
2713 amd64_create_target_description.
2714 (amd64_target_description): Add "segments" parameter. Adjust
2715 the implementation to use it.
2716 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2717 call to amd64_create_target_description.
2718 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2719 * gdb/arch/amd64.h (amd64_create_target_description): Add
2720 "segments" register.
2721 * gdb/arch/amd64.c (amd64_create_target_description): Add
2722 "segments" parameter. Call create_feature_i386_64bit_segments
2723 only if SEGMENTS is true.
2724 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2725 call to amd64_create_target_description.
2727 2018-06-29 Pedro Alves <palves@redhat.com>
2729 * thread.c (thread_target_id_str): New, factored out from ...
2730 (print_thread_info_1): ... here. Use it to compute the max
2731 "Target Id" column width.
2733 2018-06-29 Pedro Alves <palves@redhat.com>
2735 * remote.c (remote_target::extra_thread_info): Delete
2736 'display_buf' and 'n' locals. from the cache, regardless of
2737 packet mechanims is in use. Use cache for qThreadExtra and qP
2740 2018-06-29 Pedro Alves <palves@redhat.com>
2742 * blockframe.c (find_pc_sect_containing_function): New function.
2743 * breakpoint.c (print_breakpoint_location): Don't call
2744 find_pc_sect_function.
2745 * linespec.c (create_sals_line_offset): Record the location's
2747 * linespec.c (convert_address_location_to_sals): Fill in sal's
2748 symbol with find_pc_sect_containing_function.
2749 * symtab.c (find_function_start_sal): Rename to ...
2750 (find_function_start_sal_1): ... this.
2751 (find_function_start_sal): Reimplement as wrapper around
2752 find_function_start_sal_1, and use
2753 find_pc_sect_containing_function to fill in the sal's symbol.
2754 (find_function_start_sal(symbol*, bool)): Adjust.
2755 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2757 (find_pc_sect_containing_function): Declare.
2759 2018-06-29 Pedro Alves <palves@redhat.com>
2761 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2762 true if the the location has no symbol.
2764 2018-06-28 Tom Tromey <tom@tromey.com>
2766 * NEWS: Mention --enable-codesign.
2767 * silent-rules.mk (ECHO_SIGN): New variable.
2768 * configure.ac: Add --enable-codesign.
2769 * configure: Rebuild.
2770 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2771 (gdb$(EXEEXT)): Optionally invoke codesign.
2773 2018-06-28 Pedro Alves <palves@redhat.com>
2775 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2777 (switch_to_thread_no_regs): Adjust comment.
2778 * infcmd.c (stop_pc): Delete.
2779 (post_create_inferior, info_program_command): Replace references
2780 to stop_pc with references to thread_info->suspend.stop_pc.
2781 * inferior.h (stop_pc): Delete declaration.
2782 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2783 (handle_inferior_event_1, handle_signal_stop)
2784 (process_event_stop_test, keep_going_stepped_thread)
2785 (handle_step_into_function, handle_step_into_function_backward)
2786 (print_stop_location): Replace references to stop_pc with
2787 references to thread_info->suspend.stop_pc.
2788 (struct infcall_suspend_state) <stop_pc>: Delete field.
2789 (save_infcall_suspend_state, restore_infcall_suspend_state):
2790 Remove references to inf_stat->stop_pc.
2791 * linux-fork.c (fork_load_infrun_state): Likewise.
2792 * record-btrace.c (record_btrace_set_replay): Likewise.
2793 * record-full.c (record_full_goto_entry): Likewise.
2794 * remote.c (print_one_stopped_thread): Likewise.
2795 * target.c (target_resume): Extend comment.
2796 * thread.c (set_executing_thread): New.
2797 (set_executing): Use it.
2798 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2799 Remove references to stop_pc.
2801 2018-06-28 Pedro Alves <palves@redhat.com>
2803 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2804 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2806 2018-06-28 Tom Tromey <tom@tromey.com>
2808 * coffread.c (coff_symfile_finish): Update.
2809 * xcoffread.c (xcoff_symfile_finish): Update.
2810 * elfread.c (elf_symfile_finish): Update.
2811 * symfile.h (dwarf2_free_objfile): Don't declare.
2812 * dwarf2read.c (_initialize_dwarf2_read): Use
2813 register_objfile_data_with_cleanup.
2814 (dwarf2_free_objfile): Now static. Change signature.
2816 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2818 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2819 option "-o" to add-symbol-file-load to add an offset to each
2820 section's load address.
2821 * symfile.c (set_objfile_default_section_offset): New function.
2823 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2825 * symfile.c (add_symbol_file_command): Make sure that sections
2826 with the same name are sorted in the same order.
2828 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2830 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2831 require the second argument. If omitted, load sections at the
2832 addresses specified in the file.
2834 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2836 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2837 (_initialize_symfile): Add option "-o" to symbol-file to add an
2838 offset to each section of the symbol file.
2840 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
2842 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2844 2018-06-27 Tom Tromey <tom@tromey.com>
2846 * stack.c (_initialize_stack): Update "func" help text.
2848 2018-06-27 Tom Tromey <tom@tromey.com>
2850 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2852 (unwind_infopy_str, pyuw_create_unwind_info)
2853 (unwind_infopy_add_saved_register, pyuw_sniffer)
2854 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2856 (struct saved_reg): Add constructor.
2857 <value>: Now a gdbpy_ref<>.
2859 2018-06-27 Tom Tromey <tom@tromey.com>
2861 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2863 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2865 * gdb-gdb.py.in: Format using autopep8.
2867 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2869 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2870 (type_lookup_function): Recognize CORE_ADDR values.
2872 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2874 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2877 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2879 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2882 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2884 * gdb-gdb.py: Move to...
2885 * gdb-gdb.py.in: ... here.
2886 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2887 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2889 (distclean): Remove gdb-gdb.py when cleaning.
2890 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2891 * configure: Re-generate.
2893 2018-06-27 Pedro Alves <palves@redhat.com>
2895 * proc-service.c (get_ps_regcache): New.
2896 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2897 (ps_lsetfpregs): Use it.
2899 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
2902 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2903 (dwarf_decode_lines_1): Adjust.
2905 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2907 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2909 <info_proc>: Likewise.
2911 2018-06-26 Joel Brobecker <brobecker@adacore.com>
2913 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2914 to windows_fetch_one_register, and only handle the case of
2915 fetching one register. Move the code that reloads the context
2916 and iterates over all registers if R is negative to...
2917 (windows_nat_target::fetch_registers): ... here.
2918 (do_windows_store_inferior_registers): Rename to
2919 windows_store_one_register, and only handle the case of storing
2920 one register. Move the code that handles the case where r is
2922 (windows_nat_target::store_registers) ... here.
2924 2018-06-26 Tom Tromey <tom@tromey.com>
2927 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2928 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2930 (rust_internal_print_type): Add podata parameter.
2931 (rust_print_type): Update.
2933 2018-06-26 Tom Tromey <tom@tromey.com>
2935 * typeprint.h (struct print_offset_data) <update, finish,
2936 maybe_print_hole>: New methods.
2937 <indentation>: New constant.
2938 * typeprint.c (print_offset_data::indentation): Define.
2939 (print_offset_data::maybe_print_hole, print_offset_data::update)
2940 (print_offset_data::finish): Move from c-typeprint.c and rename.
2941 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2942 (print_spaces_filtered_with_print_options): Update.
2943 (c_print_type_union_field_offset, maybe_print_hole)
2944 (c_print_type_struct_field_offset): Move to typeprint.c and
2946 (c_type_print_base_struct_union): Update.
2948 2018-06-25 Pedro Alves <palves@redhat.com>
2950 * gdbthread.h (thread_info_ref, delete_thread)
2951 (delete_thread_silent, first_thread_of_inferior)
2952 (any_thread_of_inferior, switch_to_thread)
2953 (enable_thread_stack_temporaries)
2954 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2955 (get_last_thread_stack_temporary)
2956 (value_in_thread_stack_temporaries, can_access_registers_thread):
2957 Spell out "struct thread_info" instead of just "thread_info".
2958 * inferior.h (notice_new_inferior): Likewise.
2960 2018-06-25 Pedro Alves <palves@redhat.com>
2962 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2963 pass thread_info pointer to delete_thread.
2964 (windows_nat_target::detach): Pass inferior pointer to
2966 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2968 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2969 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2970 and pass a thread_info pointer to delete_thread.
2971 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2972 pass thread_info pointer to delete_thread.
2973 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2974 delete_thread_silent call.
2975 * procfs.c (procfs_target::detach): Pass inferior pointer to
2977 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2978 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2979 delete_thread_silent call.
2980 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2981 pass thread_info pointer to delete_thread.
2982 (windows_nat_target::detach): Pass inferior pointer to
2985 2018-06-22 Alan Hayward <alan.hayward@arm.com>
2987 * regcache.c (readable_regcache::read_part): Fix asserts.
2988 (reg_buffer::raw_collect_part): New function.
2989 (regcache::write_part): Fix asserts.
2990 (reg_buffer::raw_supply_part): New function.
2991 (regcache::transfer_regset_register): New helper function.
2992 (regcache::transfer_regset): Call new functions.
2993 (regcache_supply_regset): Use gdb_byte*.
2994 (regcache::supply_regset): Likewise.
2995 (regcache_collect_regset): Likewise.
2996 (regcache::collect_regset): Likewise.
2997 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2998 (reg_buffer::raw_supply_part): Likewise.
2999 (regcache::transfer_regset_register): Likewise.
3000 (regcache::transfer_regset): Use gdb_byte*.
3002 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3004 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3006 2018-06-21 Pedro Alves <palves@redhat.com>
3008 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3009 instead of a ptid_t. All callers adjusted.
3010 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3012 (print_ada_task_info, display_current_task_id, task_command_1):
3014 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3016 (breakpoint_kind): Adjust.
3017 (remove_breakpoints_pid): Rename to ...
3018 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3019 pointer. All callers adjusted.
3020 (bpstat_clear_actions): Use inferior_thread.
3021 (get_bpstat_thread): New.
3022 (bpstat_do_actions): Use it.
3023 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3024 to take a thread_info pointer. All callers adjusted.
3025 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3026 (breakpoint_re_set_thread): Use inferior_thread.
3027 * breakpoint.h (struct inferior): Forward declare.
3028 (bpstat_stop_status): Update.
3029 (remove_breakpoints_pid): Delete.
3030 (remove_breakpoints_inf): New.
3031 * bsd-uthread.c (bsd_uthread_target::wait)
3032 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3033 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3034 (maint_btrace_packet_history_cmd)
3035 (maint_btrace_clear_packet_history_cmd): Adjust.
3036 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3038 * cli/cli-interp.c: Include "inferior.h".
3039 * common/refcounted-object.h (struct
3040 refcounted_object_ref_policy): New.
3041 * compile/compile-object-load.c: Include gdbthread.h.
3042 (store_regs): Use inferior_thread.
3043 * corelow.c (core_target::close): Use current_inferior.
3044 (core_target_open): Adjust to use first_thread_of_inferior and use
3045 the current inferior.
3046 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3047 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3048 <thread>: ... this new field. All references adjusted.
3049 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3050 Take a thread_info pointer instead of a ptid_t.
3051 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3052 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3053 thread_info pointer instead of a ptid_t.
3054 * elfread.c: Include "inferior.h".
3055 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3056 Use inferior_thread.
3057 * eval.c (evaluate_subexp): Likewise.
3058 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3060 * gdb_proc_service.h (struct thread_info): Forward declare.
3061 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3062 <thread>: ... this new field. All references adjusted.
3063 * gdbarch.h, gdbarch.c: Regenerate.
3064 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3065 'thread' parameter. All implementations and callers adjusted.
3066 * gdbthread.h (thread_info) <set_running>: New method.
3067 (delete_thread, delete_thread_silent): Take a thread_info pointer
3069 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3070 (first_thread_of_process): Delete, replaced by ...
3071 (first_thread_of_inferior): ... this new function. All callers
3073 (any_live_thread_of_process): Delete, replaced by ...
3074 (any_live_thread_of_inferior): ... this new function. All callers
3076 (switch_to_thread, switch_to_no_thread): Declare.
3077 (is_executing): Delete.
3078 (enable_thread_stack_temporaries): Update comment.
3079 <enable_thread_stack_temporaries>: Take a thread_info pointer
3080 instead of a ptid_t. Incref the thread.
3081 <~enable_thread_stack_temporaries>: Decref the thread.
3084 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3085 (get_last_thread_stack_temporary)
3086 (value_in_thread_stack_temporaries, can_access_registers_thread):
3087 Take a thread_info pointer instead of a ptid_t. All callers
3089 * infcall.c (get_call_return_value): Use inferior_thread.
3090 (run_inferior_call): Work with thread pointers instead of ptid_t.
3091 (call_function_by_hand_dummy): Work with thread pointers instead
3092 of ptid_t. Use thread_info_ref.
3093 * infcmd.c (proceed_thread_callback): Access thread's state
3095 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3096 access thread's state directly.
3097 (continue_command): Use inferior_thread.
3098 (info_program_command): Use find_thread_ptid and access thread
3100 (proceed_after_attach_callback): Use thread state directly.
3101 (notice_new_inferior): Take a thread_info pointer instead of a
3102 ptid_t. All callers adjusted.
3103 (exit_inferior): Take an inferior pointer instead of a pid. All
3105 (exit_inferior_silent): New.
3106 (detach_inferior): Delete.
3107 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3108 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3109 (detach_inferior_command, kill_inferior_command): Use
3110 find_inferior_id instead of valid_gdb_inferior_id and
3111 gdb_inferior_id_to_pid.
3112 (inferior_command): Use inferior and thread pointers.
3113 * inferior.h (struct thread_info): Forward declare.
3114 (notice_new_inferior): Take a thread_info pointer instead of a
3115 ptid_t. All callers adjusted.
3116 (detach_inferior): Delete declaration.
3117 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3118 instead of a pid. All callers adjusted.
3119 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3120 (valid_gdb_inferior_id): Delete.
3121 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3122 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3123 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3125 <inf>: ... this new field.
3126 <step_ptid>: Delete, replaced by ...
3127 <step_thread>: ... this new field.
3128 (get_displaced_stepping_state): Take an inferior pointer instead
3129 of a pid. All callers adjusted.
3130 (displaced_step_in_progress_any_inferior): Adjust.
3131 (displaced_step_in_progress_thread): Take a thread pointer instead
3132 of a ptid_t. All callers adjusted.
3133 (displaced_step_in_progress, add_displaced_stepping_state): Take
3134 an inferior pointer instead of a pid. All callers adjusted.
3135 (get_displaced_step_closure_by_addr): Adjust.
3136 (remove_displaced_stepping_state): Take an inferior pointer
3137 instead of a pid. All callers adjusted.
3138 (displaced_step_prepare_throw, displaced_step_prepare)
3139 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3140 All callers adjusted.
3141 (start_step_over): Adjust.
3142 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3143 displaced step queue.
3144 (do_target_resume): Adjust.
3145 (fetch_inferior_event): Use inferior_thread.
3146 (context_switch, get_inferior_stop_soon): Take an
3147 execution_control_state pointer instead of a ptid_t. All callers
3149 (switch_to_thread_cleanup): Delete.
3150 (stop_all_threads): Use scoped_restore_current_thread.
3151 * inline-frame.c: Include "gdbthread.h".
3152 (inline_state) <inline_state>: Take a thread pointer instead of a
3153 ptid_t. All callers adjusted.
3154 <ptid>: Delete, replaced by ...
3155 <thread>: ... this new field.
3156 (find_inline_frame_state): Take a thread pointer instead of a
3157 ptid_t. All callers adjusted.
3158 (skip_inline_frames, step_into_inline_frame)
3159 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3160 pointer instead of a ptid_t. All callers adjusted.
3161 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3162 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3163 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3165 * linux-nat.c (get_detach_signal): Likewise.
3166 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3167 (thread_db_notice_clone): Adjust.
3168 (thread_db_find_new_threads_silently)
3169 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3170 a thread pointer instead of a ptid_t. All callers adjusted.
3171 * mi/mi-cmd-var.c: Include "inferior.h".
3172 (mi_cmd_var_update_iter): Update to use thread pointers.
3173 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3175 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3177 (mi_output_running): ... this new function.
3178 (mi_on_resume_1): Adjust to use it.
3179 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3180 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3182 (interrupt_thread_callback): : Adjust to use thread and inferior
3184 * proc-service.c: Include "gdbthread.h".
3185 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3186 * progspace-and-thread.c: Include "inferior.h".
3187 * progspace.c: Include "inferior.h".
3188 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3189 hold a reference to an inferior_object.
3190 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3192 * python/py-inferior.c (struct inferior_object): Give the type a
3193 tag name instead of a typedef.
3194 (python_on_normal_stop): No need to check if the current thread is
3196 (inferior_to_inferior_object): Change return type to
3197 inferior_object. All callers adjusted.
3198 (find_thread_object): Delete, bits factored out to ...
3199 (thread_to_thread_object): ... this new function.
3200 * python/py-infthread.c (create_thread_object): Use
3201 inferior_to_inferior_object.
3202 (thpy_is_stopped): Use thread pointer directly.
3203 (gdbpy_selected_thread): Use inferior_thread.
3204 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3205 field, replaced with ...
3206 <thread>: ... this new field. All users adjusted.
3207 (btpy_insn_or_gap_new): Drop const.
3208 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3210 * python/py-record.c: Include "gdbthread.h".
3211 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3212 a ptid_t. All callers adjusted.
3213 (gdbpy_current_recording): Use inferior_thread.
3214 * python/py-record.h (recpy_record_object) <ptid>: Delete
3215 field, replaced with ...
3216 <thread>: ... this new field. All users adjusted.
3217 (recpy_element_object) <ptid>: Delete
3218 field, replaced with ...
3219 <thread>: ... this new field. All users adjusted.
3220 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3221 a ptid_t. All callers adjusted.
3222 * python/py-threadevent.c: Include "gdbthread.h".
3223 (get_event_thread): Use thread_to_thread_object.
3224 * python/python-internal.h (struct inferior_object): Forward
3226 (find_thread_object, find_inferior_object): Delete declarations.
3227 (thread_to_thread_object, inferior_to_inferior_object): New
3229 * record-btrace.c: Include "inferior.h".
3230 (require_btrace_thread): Use inferior_thread.
3231 (record_btrace_frame_sniffer)
3232 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3233 (get_thread_current_frame): Use scoped_restore_current_thread and
3235 (get_thread_current_frame): Use thread pointer directly.
3236 (record_btrace_replay_at_breakpoint): Use thread's inferior
3238 * record-full.c: Include "inferior.h".
3239 * regcache.c: Include "gdbthread.h".
3240 (get_thread_arch_regcache): Use the inferior's address space
3242 (get_thread_regcache, registers_changed_thread): New.
3243 * regcache.h (get_thread_regcache(thread_info *thread)): New
3245 (registers_changed_thread): New.
3246 (remote_target) <remote_detach_1>: Swap order of parameters.
3247 (remote_add_thread): <remote_add_thread>: Return the new thread.
3248 (get_remote_thread_info(ptid_t)): New overload.
3249 (remote_target::remote_notice_new_inferior): Use thread pointers
3251 (remote_target::process_initial_stop_replies): Use
3252 thread_info::set_running.
3253 (remote_target::remote_detach_1, remote_target::detach)
3254 (extended_remote_target::detach): Adjust.
3255 * stack.c (frame_show_address): Use inferior_thread.
3256 * target-debug.h (target_debug_print_thread_info_pp): New.
3257 * target-delegates.c: Regenerate.
3258 * target.c (default_thread_address_space): Delete.
3259 (memory_xfer_partial_1): Use current_inferior.
3260 (target_detach): Use current_inferior.
3261 (target_thread_address_space): Delete.
3262 (generic_mourn_inferior): Use current_inferior.
3263 * target.h (struct target_ops) <thread_address_space>: Delete.
3264 (target_thread_address_space): Delete.
3265 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3267 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3268 thread pointer instead of a ptid_t. Adjust all callers.
3269 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3270 (first_thread_of_process): Delete, replaced by ...
3271 (first_thread_of_inferior): ... this new function. All callers
3273 (any_thread_of_process): Rename to ...
3274 (any_thread_of_inferior): ... this, and take an inferior pointer.
3275 (any_live_thread_of_process): Rename to ...
3276 (any_live_thread_of_inferior): ... this, and take an inferior
3278 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3279 (value_in_thread_stack_temporaries)
3280 (get_last_thread_stack_temporary): Take a thread pointer instead
3281 of a ptid_t. Adjust all callers.
3282 (thread_info::set_running): New.
3283 (validate_registers_access): Use inferior_thread.
3284 (can_access_registers_ptid): Rename to ...
3285 (can_access_registers_thread): ... this, and take a thread
3287 (print_thread_info_1): Adjust to compare thread pointers instead
3289 (switch_to_no_thread, switch_to_thread): Make extern.
3290 (scoped_restore_current_thread::~scoped_restore_current_thread):
3291 Use m_thread pointer directly.
3292 (scoped_restore_current_thread::scoped_restore_current_thread):
3293 Use inferior_thread.
3294 (thread_command): Use thread pointer directly.
3295 (thread_num_make_value_helper): Use inferior_thread.
3296 * top.c (execute_command): Use inferior_thread.
3297 * tui/tui-interp.c: Include "inferior.h".
3298 * varobj.c (varobj_create): Use inferior_thread.
3299 (value_of_root_1): Use find_thread_global_id instead of
3300 global_thread_id_to_ptid.
3302 2018-06-21 Alan Hayward <alan.hayward@arm.com>
3304 * regcache.c (readable_regcache::read_part): Avoid memcpy when
3306 (regcache::write_part): Likewise.
3307 (readable_regcache::cooked_read_part): Update comment.
3308 (readable_regcache::cooked_write_part): Likewise.
3309 * regcache.h: (readable_regcache::read_part): Likewise.
3310 (regcache::write_part): Likewise.
3312 2018-06-21 Richard Bunt <richard.bunt@arm.com>
3313 Dirk Schubert <dirk.schubert@arm.com>
3315 * aarch64-linux-nat.c (post_attach): New.
3316 (aarch64_linux_nat_target::post_attach): Override post_attach to
3317 record the number of hardware debug registers.
3319 2018-06-20 Tom Tromey <tom@tromey.com>
3321 * python/py-param.c (add_setshow_generic): Make parameters const.
3322 (parmpy_init): Update.
3324 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3326 * regcache.h (regcache_cooked_read_ftype): Rename to...
3327 (register_read_ftype): ...this, change type to function_view.
3328 (class reg_buffer) <save>: Remove src parameter.
3329 (readonly_detached_regcache) <readonly_detached_regcache>: Make
3330 parameter non-const in first overload. Remove src parameter in
3332 * regcache.c (do_cooked_read): Remove.
3333 (readonly_detached_regcache::readonly_detached_regcache): Make
3334 parameter non-const, adjust call to other constructor.
3335 (reg_buffer::save): Remove src parameter.
3336 * frame.c (do_frame_register_read): Remove.
3337 (frame_save_as_regcache): Use lambda function.
3338 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3339 parameter to ppu2spu_data *.
3340 (ppu2spu_sniffer): Use lambda function.
3342 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
3344 * record-full.c (record_full_target::insert_breakpoint): Remove
3345 "struct" keyword, add const.
3347 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3349 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3350 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3351 * configure.ac: Remove AC_PREREQ, add missing quoting.
3352 * gnulib/configure.ac: Modernize usage of
3353 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3354 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3355 (AUTOMAKE_VERSION): Bump to 1.15.1.
3356 * configure: Re-generate.
3357 * config.in: Re-generate.
3358 * aclocal.m4: Re-generate.
3359 * gnulib/aclocal.m4: Re-generate.
3360 * gnulib/config.in: Re-generate.
3361 * gnulib/configure: Re-generate.
3362 * gnulib/import/Makefile.in: Re-generate.
3364 2018-06-19 Pedro Alves <palves@redhat.com>
3366 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3367 (lookup_minimal_symbol_by_pc_section): ... here with
3368 gdb_assert_not_reached added.
3370 2018-06-19 Pedro Alves <palves@redhat.com>
3372 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3373 parameter with a block parameter. Compare location's block symbol
3374 with the frame's block instead of addresses.
3375 (skip_inline_frames): Pass the current block instead of the
3376 frame's address. Break out as soon as we determine the frame
3377 should not be skipped.
3379 2018-06-18 Tom Tromey <tom@tromey.com>
3381 * solib-aix.c (solib_aix_get_section_offsets): Return
3383 (solib_aix_solib_create_inferior_hook): Update.
3385 2018-06-18 Tom Tromey <tom@tromey.com>
3387 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3389 2018-06-18 Tom Tromey <tom@tromey.com>
3391 * solib-frv.c (frv_relocate_main_executable): Use
3393 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3396 2018-06-18 Tom Tromey <tom@tromey.com>
3398 * objfiles.h (inhibit_section_map_updates): Update.
3399 (resume_section_map_updates, resume_section_map_updates_cleanup):
3401 * solib-svr4.c (svr4_handle_solib_event): Update.
3402 * objfiles.c (inhibit_section_map_updates): Return
3403 scoped_restore_tmpl<int>.
3404 (resume_section_map_updates, resume_section_map_updates_cleanup):
3407 2018-06-18 Tom Tromey <tom@tromey.com>
3409 * valprint.h (read_string): Update.
3410 * valprint.c (read_string): Change type of "buffer".
3411 (val_print_string): Update.
3412 * python/py-value.c (valpy_string): Update.
3413 * language.h (struct language_defn) <la_get_string>: Change
3415 (default_get_string, c_get_string): Update.
3416 * language.c (default_get_string): Change type of "buffer".
3417 * guile/scm-value.c (gdbscm_value_to_string): Update.
3418 * c-lang.c (c_get_string): Change type of "buffer".
3420 2018-06-18 Tom Tromey <tom@tromey.com>
3422 * ser-mingw.c (struct pipe_state_destroyer): New.
3423 (pipe_state_up): New typedef.
3424 (cleanup_pipe_state): Remove.
3425 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3427 2018-06-18 Tom Tromey <tom@tromey.com>
3429 * rust-lang.h (rust_yyerror): Don't declare.
3430 * rust-lang.c (rust_language_defn): Update.
3431 * rust-exp.y (yyerror): Now static.
3432 * parse.c (parse_exp_in_context_1): Update.
3433 * p-lang.h (p_yyerror): Don't declare.
3434 * p-lang.c (p_language_defn): Update.
3435 * p-exp.y (yyerror): Now static.
3436 * opencl-lang.c (opencl_language_defn): Update.
3437 * objc-lang.c (objc_language_defn): Update.
3438 * m2-lang.h (m2_yyerror): Don't declare.
3439 * m2-lang.c (m2_language_defn): Update.
3440 * m2-exp.y (yyerror): Now static.
3441 * language.h (struct language_defn) <la_error>: Remove.
3442 * language.c (unk_lang_error): Remove.
3443 (unknown_language_defn, auto_language_defn): Remove.
3444 * go-lang.h (go_yyerror): Don't declare.
3445 * go-lang.c (go_language_defn): Update.
3446 * go-exp.y (yyerror): Now static.
3447 * f-lang.h (f_yyerror): Don't declare.
3448 * f-lang.c (f_language_defn): Update.
3449 * f-exp.y (yyerror): Now static.
3450 * d-lang.h (d_yyerror): Don't declare.
3451 * d-lang.c (d_language_defn): Update.
3452 * d-exp.y (yyerror): Now static.
3453 * c-lang.h (c_yyerror): Don't declare.
3454 * c-lang.c (c_language_defn, cplus_language_defn)
3455 (asm_language_defn, minimal_language_defn): Update.
3456 * c-exp.y (yyerror): Now static.
3457 * ada-lang.h (ada_yyerror): Don't declare.
3458 * ada-lang.c (ada_language_defn): Update.
3459 * ada-exp.y (yyerror): Now static.
3461 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3463 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3464 (store_sveregs_to_thread): Likewise.
3465 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3466 (aarch64_linux_store_inferior_registers): Likewise.
3467 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3469 (aarch64_sve_regs_copy_to_regcache): Likewise.
3470 (aarch64_sve_regs_copy_from_regcache): Likewise.
3471 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3473 (aarch64_sve_regs_copy_to_regcache): Likewise.
3474 (aarch64_sve_regs_copy_from_regcache): Likewise.
3475 (sve_context): Structure from Linux headers.
3476 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3477 (SVE_SIG_ZREG_SIZE): Likewise.
3478 (SVE_SIG_PREG_SIZE): Likewise.
3479 (SVE_SIG_FFR_SIZE): Likewise.
3480 (SVE_SIG_REGS_OFFSET): Likewise.
3481 (SVE_SIG_ZREGS_OFFSET): Likewise.
3482 (SVE_SIG_ZREG_OFFSET): Likewise.
3483 (SVE_SIG_ZREGS_SIZE): Likewise.
3484 (SVE_SIG_PREGS_OFFSET): Likewise.
3485 (SVE_SIG_PREG_OFFSET): Likewise.
3486 (SVE_SIG_PREGS_SIZE): Likewise.
3487 (SVE_SIG_FFR_OFFSET): Likewise.
3488 (SVE_SIG_REGS_SIZE): Likewise.
3489 (SVE_SIG_CONTEXT_SIZE): Likewise.
3490 (SVE_PT_REGS_MASK): Likewise.
3491 (SVE_PT_REGS_FPSIMD): Likewise.
3492 (SVE_PT_REGS_SVE): Likewise.
3493 (SVE_PT_VL_INHERIT): Likewise.
3494 (SVE_PT_VL_ONEXEC): Likewise.
3495 (SVE_PT_REGS_OFFSET): Likewise.
3496 (SVE_PT_FPSIMD_OFFSET): Likewise.
3497 (SVE_PT_FPSIMD_SIZE): Likewise.
3498 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3499 (SVE_PT_SVE_PREG_SIZE): Likewise.
3500 (SVE_PT_SVE_FFR_SIZE): Likewise.
3501 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3502 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3503 (__SVE_SIG_TO_PT): Likewise.
3504 (SVE_PT_SVE_OFFSET): Likewise.
3505 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3506 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3507 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3508 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3509 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3510 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3511 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3512 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3513 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3514 (SVE_PT_SVE_SIZE): Likewise.
3515 (SVE_PT_SIZE): Likewise.
3516 (HAS_SVE_STATE): New define.
3518 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3520 * nat/aarch64-sve-linux-sigcontext.h: New file.
3521 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3523 (SVE_VQ_MIN): Likewise.
3524 (SVE_VQ_MAX): Likewise.
3525 (SVE_VL_MIN): Likewise.
3526 (SVE_VL_MAX): Likewise.
3527 (SVE_NUM_ZREGS): Likewise.
3528 (SVE_NUM_PREGS): Likewise.
3529 (sve_vl_valid): Likewise.
3530 (struct user_sve_header): Likewise.
3532 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3533 Richard Bunt <Richard.Bunt@arm.com>
3535 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3536 was requested by GDB.
3538 2018-06-15 Tom de Vries <tdevries@suse.de>
3540 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3542 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3544 * gnulib/update-gnulib.sh: Print expected versions of
3547 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3549 * arch-utils.c (default_type_align): Use type_length_units.
3550 * gdbtypes.c (type_align): Use type_length_units.
3552 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3554 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3555 of 'define' command.
3557 2018-06-14 Tom de Vries <tdevries@suse.de>
3560 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3561 get_no_prettyformat_print_options.
3563 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3565 * sparc-nat.h: Include target.h.
3566 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3567 <fetch_registers>: Remove this argument in function call.
3568 <store_registers>: Remove this argument in function call, remove
3570 <low_forget_process>: Call sparc64_forget_process instead of
3571 sparc_forget_process.
3573 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3575 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3576 (procfs_target::make_corefile_notes): Adjust to new
3577 target_read_alloc return type.
3579 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3580 Stephen Roberts <stephen.roberts@arm.com>
3583 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3584 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3585 Move should_notify_stop local into more inner scope.
3587 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3588 Stephen Roberts <stephen.roberts@arm.com>
3591 * infrun.c (resume_1): Add call to mark_async_event_handler.
3593 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3595 * infrun.c (do_target_wait): Change old version of $pc printed.
3597 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3599 * dwarf2read.c (read_index_from_section): Rename to...
3600 (read_gdb_index_from_section): ... this, update all callers.
3601 (dwarf2_read_index): Rename to...
3602 (dwarf2_read_gdb_index): ... this, update all callers.
3604 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
3606 * gdb/hppa-linux-nat.c
3607 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3608 hppa_linux_nat_target::fetch_registers.
3610 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3612 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3613 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3614 (AARCH64_DWARF_SVE_FFR): Likewise.
3615 (AARCH64_DWARF_SVE_P0): Likewise.
3616 (AARCH64_DWARF_SVE_Z0): Likewise.
3618 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3620 * common/common-regcache.h (raw_compare): New function.
3621 * regcache.c (regcache::raw_compare): Likewise.
3622 * regcache.h (regcache::raw_compare): New declaration.
3624 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3626 * common/common-regcache.h (reg_buffer_common): New structure.
3627 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3628 (reg_buffer::raw_supply): Likewise.
3629 (reg_buffer::raw_supply_integer): Likewise.
3630 (reg_buffer::raw_supply_zeroed): Likewise.
3631 (reg_buffer::raw_collect): Likewise.
3632 (reg_buffer::raw_collect_integer): Likewise.
3633 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3634 (reg_buffer::raw_supply): Likewise.
3635 (reg_buffer::raw_supply_integer): Likewise.
3636 (reg_buffer::raw_supply_zeroed): Likewise.
3637 (reg_buffer::raw_collect): Likewise.
3638 (reg_buffer::raw_collect_integer): Likewise.
3640 2018-06-10 Tom Tromey <tom@tromey.com>
3642 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3643 (class remote_state) <stop_reply_queue>: Now std::vector.
3644 (remote_state::~remote_state)
3645 (remote_target::stop_reply_queue_length): Update.
3646 (struct queue_iter_param, remove_child_of_pending_fork)
3647 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3648 (check_pending_event_prevents_wildcard_vcont_callback)
3649 (remove_stop_reply_for_inferior)
3650 (remove_stop_reply_of_remote_state)
3651 (remote_notif_remove_once_on_match)
3652 (stop_reply_match_ptid_and_ws)
3653 (remote_kill_child_of_pending_fork): Remove.
3654 (remote_target::remove_new_fork_children)
3655 (remote_target::check_pending_events_prevent_wildcard_vcont)
3656 (remote_target::discard_pending_stop_replies)
3657 (remote_target::discard_pending_stop_replies_in_queue)
3658 (remote_target::remote_notif_remove_queued_reply)
3659 (remote_target::queued_stop_reply)
3660 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3661 (remote_target::wait, remote_target::kill_new_fork_children)
3662 (remote_target::async): Update.
3664 2018-06-10 Tom Tromey <tom@tromey.com>
3666 * record-full.c (record_full_arch_list_cleanups): Remove.
3667 (record_full_message): Use try/catch.
3668 (record_full_wait_cleanups): Remove.
3669 (record_full_wait_1): Use try/catch.
3670 (record_full_restore): Likewise.
3672 2018-06-10 Tom Tromey <tom@tromey.com>
3674 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3675 declare VEC. Add constructor.
3676 <in_target_beneath>: Now bool.
3677 (record_full_breakpoints): Now a std::vector, static.
3678 (record_full_sync_record_breakpoints)
3679 (record_full_init_record_breakpoints)
3680 (record_full_target::insert_breakpoint)
3681 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3683 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3685 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3686 * serial.c (serial_interface_lookup): Remove struct keyword.
3688 2018-06-10 Tom Tromey <tom@tromey.com>
3690 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3692 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3694 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3696 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3697 "beneath" as a method.
3698 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3699 Use "beneath" as a method.
3701 2018-06-10 Tom Tromey <tom@tromey.com>
3703 * tracefile.c (struct trace_file_writer_deleter): New.
3704 <operator()>: Rename from trace_file_writer_xfree.
3705 (trace_file_writer_up): New typedef.
3706 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3708 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3710 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3711 <m_registers, m_register_status>: Change type to
3713 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3716 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3718 * common/common-regcache.h (enum register_status): Add
3719 underlying type "signed char".
3720 * regcache.h (reg_buffer) <m_register_status>: Change type to
3722 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3723 register_status instead of signed char.
3724 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3725 (reg_buffer::get_register_status): Remove cast.
3726 (readable_regcache::raw_read): Remove cast.
3727 (readable_regcache::cooked_read): Remove cast.
3729 2018-06-09 Tom Tromey <tom@tromey.com>
3731 * source.c (reverse_search_command, forward_search_command): Use
3734 2018-06-09 Tom Tromey <tom@tromey.com>
3736 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3737 (serial_ops_list): Now static, std::vector.
3738 (serial_interface_lookup, serial_add_interface): Update.
3740 2018-06-09 Tom Tromey <tom@tromey.com>
3742 * dwarf2read.c (process_cu_includes): Update.
3743 (process_full_comp_unit): Update.
3744 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3747 2018-06-08 Paul Koning <paul_koning@dell.com>
3751 * python/python.c (do_start_initialization):
3752 Avoid call to internal Python API.
3753 (init__gdb_module): New function.
3755 2018-06-08 Gary Benson <gbenson@redhat.com>
3757 * linux-thread-db.c (valprint.h): New include.
3758 (struct check_thread_db_info): New structure.
3759 (check_thread_db_on_load, tdb_testinfo): New static globals.
3760 (check_thread_db, check_thread_db_callback): New functions.
3761 (try_thread_db_load_1): Run integrity checks if requested.
3762 (maintenance_check_libthread_db): New function.
3763 (_initialize_thread_db): Register "maint check libthread-db"
3764 and "maint set/show check-libthread-db".
3765 * NEWS: Mention the above new commands.
3767 2018-06-08 Tom Tromey <tom@tromey.com>
3769 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3772 2018-06-08 Tom Tromey <tom@tromey.com>
3774 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3776 2018-06-08 Tom Tromey <tom@tromey.com>
3778 * common/btrace-common.h (struct btrace_data): Add constructor,
3779 destructor, move assignment operator.
3780 <empty, clear, fini>: New methods.
3781 <format>: Initialize.
3782 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3783 (btrace_data_empty): Don't declare.
3784 * common/btrace-common.c (btrace_data_init): Remove.
3785 (btrace_data::fini): Rename from btrace_data_fini.
3786 (btrace_data::empty): Rename from btrace_data_empty.
3787 (btrace_data::clear): Rename from btrace_data_clear. Return
3789 * btrace.h (make_cleanup_btrace_data): Don't declare.
3790 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3791 (parse_xml_btrace): Update.
3792 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3793 (maint_btrace_clear_packet_history_cmd): Update.
3795 2018-06-07 Pedro Alves <palves@redhat.com>
3797 * target.h (target_ops) <beneath>: Now a method. All references
3799 (class target_stack): New.
3800 * target.c (g_target_stack): New.
3801 (g_current_top_target): Delete.
3802 (current_top_target): Get the top target out of g_target_stack.
3803 (target_stack::push, target_stack::unpush): New.
3804 (push_target, unpush_target): Reimplement.
3805 (target_is_pushed): Reimplement in terms of g_target_stack.
3806 (target_ops::beneath, target_stack::find_beneath): New.
3808 2018-06-07 Pedro Alves <palves@redhat.com>
3810 * target.h (find_target_beneath): Delete declaration.
3811 * target.c (find_target_beneath): Delete definition.
3812 * aix-thread.c: All callers of find_target_beneath adjusted to
3813 call target_ops::beneath instead.
3814 * bsd-uthread.c: Likewise.
3815 * linux-thread-db.c: Likewise.
3816 * ravenscar-thread.c: Likewise.
3817 * sol-thread.c: Likewise.
3818 * spu-multiarch.c: Likewise.
3820 2018-06-07 Pedro Alves <palves@redhat.com>
3822 * target.h (target_ops) <beneath>: Now a method. All references
3824 (target_ops) <m_beneath>: New.
3825 * target.c (target_ops::beneath): New.
3826 * corelow.c: Adjust all references to target_ops::beneath.
3827 * linux-thread-db.c: Likewise.
3828 * make-target-delegates: Likewise.
3829 * record-btrace.c: Likewise.
3830 * record-full.c: Likewise.
3831 * remote.c: Likewise.
3832 * target.c: Likewise.
3833 * target-delegates.c: Regenerate.
3835 2018-06-07 Pedro Alves <palves@redhat.com>
3837 * target.h (target_stack): Delete.
3838 (current_top_target): Declare function.
3839 * target.c (target_stack): Delete.
3840 (g_current_top_target): New.
3841 (current_top_target): New function.
3842 * auxv.c: Use current_top_target instead of target_stack
3844 * avr-tdep.c: Likewise.
3845 * breakpoint.c: Likewise.
3846 * corefile.c: Likewise.
3847 * elfread.c: Likewise.
3849 * exceptions.c: Likewise.
3850 * frame.c: Likewise.
3851 * gdbarch-selftests.c: Likewise.
3852 * gnu-v3-abi.c: Likewise.
3853 * ia64-tdep.c: Likewise.
3854 * ia64-vms-tdep.c: Likewise.
3855 * infcall.c: Likewise.
3856 * infcmd.c: Likewise.
3857 * infrun.c: Likewise.
3858 * linespec.c: Likewise.
3859 * linux-tdep.c: Likewise.
3860 * minsyms.c: Likewise.
3861 * ppc-linux-nat.c: Likewise.
3862 * ppc-linux-tdep.c: Likewise.
3863 * procfs.c: Likewise.
3864 * regcache.c: Likewise.
3865 * remote.c: Likewise.
3866 * rs6000-tdep.c: Likewise.
3867 * s390-linux-nat.c: Likewise.
3868 * s390-tdep.c: Likewise.
3869 * solib-aix.c: Likewise.
3870 * solib-darwin.c: Likewise.
3871 * solib-dsbt.c: Likewise.
3872 * solib-spu.c: Likewise.
3873 * solib-svr4.c: Likewise.
3874 * solib-target.c: Likewise.
3875 * sparc-tdep.c: Likewise.
3876 * sparc64-tdep.c: Likewise.
3877 * spu-tdep.c: Likewise.
3878 * symfile.c: Likewise.
3879 * symtab.c: Likewise.
3880 * target-descriptions.c: Likewise.
3881 * target-memory.c: Likewise.
3882 * target.c: Likewise.
3883 * target.h: Likewise.
3884 * tracefile-tfile.c: Likewise.
3885 * tracepoint.c: Likewise.
3886 * valops.c: Likewise.
3887 * valprint.c: Likewise.
3888 * value.c: Likewise.
3889 * windows-tdep.c: Likewise.
3890 * mi/mi-main.c: Likewise.
3892 2018-06-07 Tom Tromey <tom@tromey.com>
3894 * valprint.h (build_address_symbolic): Declare.
3895 * printcmd.c (print_address_symbolic): Update.
3896 (build_address_symbolic): Change "name" and "filename" to
3898 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3900 * defs.h (build_address_symbolic): Remove declaration.
3902 2018-06-07 Alan Hayward <alan.hayward@arm.com>
3904 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3905 (aarch64_vnv_type): Add function.
3906 (aarch64_pseudo_register_name): Add V regs for SVE.
3907 (aarch64_pseudo_register_type): Likewise.
3908 (aarch64_pseudo_register_reggroup_p): Likewise.
3909 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3910 (aarch64_pseudo_read_value): Add V regs for SVE.
3911 (aarch64_pseudo_write_2): Use V0 offset for SVE
3912 (aarch64_pseudo_write): Add V regs for SVE.
3913 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3915 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3917 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3918 (sve_vl_from_vq): Likewise.
3920 2018-06-05 Tom Tromey <tom@tromey.com>
3922 * cli/cli-cmds.c (show_version): Update.
3923 * top.c (print_gdb_version): Add "interactive" parameter.
3925 * main.c (captured_main_1): Update.
3926 * top.h (print_gdb_version): Add "interactive" parameter and a
3929 2018-06-05 David Malcolm <dmalcolm@redhat.com>
3931 * common/enum-flags.h: Add trailing semicolon to example in
3934 2018-06-05 Tom Tromey <tom@tromey.com>
3937 * NEWS: Add entry about pager.
3938 * utils.c (pagination_disabled_for_command): New global.
3939 (prompt_for_continue): Allow "c" response to prompt.
3940 (reinitialize_more_filter): Clear
3941 pagination_disabled_for_command.
3942 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3944 2018-06-04 Tom Tromey <tom@tromey.com>
3946 * ada-lang.h (ada_lookup_symbol_list): Update.
3947 * ada-lang.c (resolve_subexp): Update.
3948 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3950 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3951 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3952 results parameter to std::vector.
3953 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3955 * ada-exp.y (block_lookup): Update.
3956 (select_possible_type_sym): Change type of syms. Remove nsyms
3958 (write_var_or_type, write_name_assoc): Update.
3960 2018-06-04 Joel Brobecker <brobecker@adacore.com>
3962 * windows-nat.c (windows_nat_target::xfer_partial): Return
3963 TARGET_XFER_E_IO if we need to delegate to the target beneath
3964 but BENEATH is NULL.
3966 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3968 * Makefile.in (config.status): Add configure.nat as a
3971 2018-06-04 Tom Tromey <tom@tromey.com>
3973 * cp-name-parser.y (cpname_state): Add method declarations.
3974 (HANDLE_QUAL): Update.
3975 (cpname_state::d_grab, cpname_state::fill_comp)
3976 (cpname_state::make_operator, cpname_state::make_dtor)
3977 (cpname_state::make_builtin_type, cpname_state::make_name)
3978 (cpname_state::d_qualify, cpname_state::d_int_type)
3979 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3980 (%union): Move earlier.
3982 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3984 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3986 2018-06-04 Alan Hayward <alan.hayward@arm.com>
3988 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3989 (aarch64_pseudo_write_1): Likewise.
3990 (aarch64_pseudo_read_value): Use helper.
3991 (aarch64_pseudo_write): Likewise.
3993 2018-06-04 Pedro Alves <palves@redhat.com>
3995 * darwin-nat.c (darwin_ops): Delete.
3996 (darwin_attach_pid): Use get_native_target.
3998 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4000 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4001 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4003 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4005 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4006 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4007 (aarch64_gdbarch_init): Check for SVE.
4008 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4010 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4012 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4013 * aarch64-tdep.h (aarch64_read_description): Likewise.
4014 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4015 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4016 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4017 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4018 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4020 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4022 * value.c (value_fetch_lazy_bitfield): New.
4023 (value_fetch_lazy_memory): New.
4024 (value_fetch_lazy_register): New.
4025 (value_fetch_lazy): Factor out to smaller functions.
4027 2018-06-01 Tom Tromey <tom@tromey.com>
4029 * cp-name-parser.y (backslashable, represented): Now const.
4031 2018-06-01 Tom Tromey <tom@tromey.com>
4033 * cp-name-parser.y: Include parser-defs.h.
4034 (parser_fprintf): Remove declaration.
4036 2018-06-01 Tom Tromey <tom@tromey.com>
4038 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4040 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4041 (global_result): Remove globals.
4042 (struct cpname_state): New.
4043 (yyparse): Don't declare.
4044 (yylex, yyerror): Move declarations after %union.
4045 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4046 (make_name): Add state parameter.
4048 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4050 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4052 (yylex): Add lvalp, state parameters.
4053 (yyerror): Add state parameter.
4054 (cp_demangled_name_to_comp): Update.
4056 2018-06-01 Tom Tromey <tom@tromey.com>
4058 * cp-name-parser.y (parser_fprintf): Declare.
4059 (GDB_YY_REMAP_PREFIX): Define.
4060 Include yy-remap.h. Don't redefine yy* identifiers.
4062 2018-06-01 Tom Tromey <tom@tromey.com>
4064 * python/py-type.c (typy_legacy_template_argument): Update.
4065 * cp-support.h (cp_demangled_name_to_comp): Update.
4066 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4067 parameter to be a "std::string *".
4070 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4072 * ada-lex.l: Include "diagnostics.h" instead of
4073 "common/diagnostics.h".
4074 * unittests/environ-selftests.c: Likewise.
4075 * common/diagnostics.h: Moved to ../include.
4077 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4079 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4080 to language_mode_manual while calling breakpoint_re_set_one.
4082 2018-06-01 Tom Tromey <tom@tromey.com>
4084 * valops.c (value_cast_structs, destructor_name_p): Update.
4085 * symtab.c (gdb_mangle_name): Update.
4086 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4088 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4089 (pascal_object_print_value_fields, pascal_object_print_value):
4091 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4092 * linespec.c (find_methods): Update.
4093 * gdbtypes.h (type_name_no_tag): Remove.
4094 (type_name_or_error): Rename from type_name_no_tag_or_error.
4095 * gdbtypes.c (type_name_no_tag): Remove.
4096 (type_name_or_error): Rename from type_name_no_tag_or_error.
4097 (lookup_struct_elt_type, check_typedef): Update.
4098 * expprint.c (print_subexp_standard): Update.
4099 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4100 * d-namespace.c (d_lookup_nested_symbol): Update.
4101 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4102 (cp_print_class_member): Update.
4103 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4104 * completer.c (add_struct_fields): Update.
4105 * c-typeprint.c (cp_type_print_derivation_info)
4106 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4108 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4109 (ada_prefer_type, ada_is_exception_sym): Update.
4111 2018-06-01 Tom Tromey <tom@tromey.com>
4113 * valops.c (enum_constant_from_type, value_namespace_elt)
4114 (value_maybe_namespace_elt): Update.
4115 * valarith.c (find_size_for_pointer_math): Update.
4116 * target-descriptions.c (make_gdb_type): Update.
4117 * symmisc.c (print_symbol): Update.
4118 * stabsread.c (define_symbol, read_type)
4119 (complain_about_struct_wipeout, add_undefined_type)
4120 (cleanup_undefined_types_1): Update.
4121 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4122 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4123 (rust_internal_print_type, rust_composite_type)
4124 (rust_evaluate_funcall, rust_evaluate_subexp)
4125 (rust_inclusive_range_type_p): Update.
4126 * python/py-type.c (typy_get_tag): Update.
4127 * p-typeprint.c (pascal_type_print_base): Update.
4128 * mdebugread.c (parse_symbol, parse_type): Update.
4129 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4131 * guile/scm-type.c (gdbscm_type_tag): Update.
4132 * go-lang.c (sixg_string_p): Update.
4133 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4135 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4136 (TYPE_TAG_NAME): Remove.
4137 * gdbtypes.c (type_name_no_tag): Simplify.
4138 (check_typedef, check_types_equal, recursive_dump_type)
4139 (copy_type_recursive, arch_composite_type): Update.
4140 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4141 in summary mode when needed.
4142 * eval.c (evaluate_funcall): Update.
4143 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4144 (process_structure_scope, read_enumeration_type)
4145 (read_namespace_type, read_module_type, determine_prefix): Update.
4146 * cp-support.c (inspect_type): Update.
4147 * coffread.c (process_coff_symbol, decode_base_type): Update.
4148 * c-varobj.c (c_is_path_expr_parent): Update.
4149 * c-typeprint.c (c_type_print_base_struct_union): Update.
4150 (c_type_print_base_1): Update. Print struct/class/union/enum in
4151 summary when using C language.
4152 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4153 (gen_maybe_namespace_elt): Update.
4154 * ada-lang.c (ada_type_name): Simplify.
4155 (empty_record, ada_template_to_fixed_record_type_1)
4156 (template_to_static_fixed_type)
4157 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4159 2018-06-01 Tom Tromey <tom@tromey.com>
4161 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4163 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4164 (c_print_type): Update.
4165 (c_print_type): New overload.
4166 (c_type_print_varspec_prefix, c_type_print_args)
4167 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4168 (c_type_print_base_struct_union, c_type_print_base_1)
4169 (cp_type_print_method_args): Add "language" parameter.
4170 (c_type_print_base): Update.
4171 * c-lang.h (c_print_type): Add new overload.
4173 2018-06-01 Tom Tromey <tom@tromey.com>
4175 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4176 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4178 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4180 * aarch64-tdep.c (aarch64_sve_register_names): New const
4182 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4183 (AARCH64_SVE_Z_REGS_NUM): New define.
4184 (AARCH64_SVE_P_REGS_NUM): Likewise.
4185 (AARCH64_SVE_NUM_REGS): Likewise.
4187 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4189 * nat/linux-ptrace.h [__alpha__]
4190 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4193 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4195 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4196 the endianness selected.
4197 * NEWS: Document `set endian auto' mode operation update.
4199 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4201 * Makefile.in: Add new header.
4202 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4203 (sve_vl_from_vg): Likewise.
4204 (sve_vq_from_vl): Likewise.
4205 (sve_vl_from_vq): Likewise.
4206 (sve_vq_from_vg): Likewise.
4207 (sve_vg_from_vq): Likewise.
4208 * configure.nat: Add new c file.
4209 * nat/aarch64-sve-linux-ptrace.c: New file.
4210 * nat/aarch64-sve-linux-ptrace.h: New file.
4212 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4214 * aarch64-linux-nat.c (aarch64_linux_read_description):
4216 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4218 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4219 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4220 (aarch64_gdbarch_init): Add parmeter zero.
4221 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4222 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4223 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4225 * doc/gdb.texinfo: Describe SVE feature
4226 * features/aarch64-sve.c: New file.
4228 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4231 * gdbarch.sh (significant_addr_bit): Default to zero when
4232 not set by target architecture.
4233 * gdbarch.c: Re-generated.
4234 * utils.c (address_significant): Update.
4236 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4238 * stack.c (func_command): Remove trailing newline in call to error.
4240 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4242 * regcache.h (regcache_raw_collect): Remove, update callers to
4243 use regcache::raw_collect.
4244 * regcache.c (regcache_raw_collect): Remove.
4246 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4248 * regcache.h (regcache_raw_supply): Remove, update callers to
4249 use detached_regcache::raw_supply.
4250 * regcache.c (regcache_raw_supply): Remove.
4252 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4254 * regcache.h (regcache_cooked_write_part): Remove, update
4255 callers to use regcache::cooked_write_part.
4256 * regcache.c (regcache_cooked_write_part): Remove.
4258 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4260 * regcache.h (regcache_cooked_read_part): Remove, update callers
4261 to use readable_regcache::cooked_read_part.
4262 * regcache.c (regcache_cooked_read_part): Remove.
4264 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4266 * regcache.h (regcache_cooked_read_value): Remove, update
4267 callers to use readable_regcache::cooked_read_value.
4268 * regcache.c (regcache_cooked_read_value): Remove.
4270 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4272 * regcache.h (regcache_cooked_write): Remove, update callers to
4273 use regcache::cooked_write.
4274 * regcache.c (regcache_cooked_write): Remove.
4276 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4278 * regcache.h (regcache_invalidate): Remove, update callers to
4279 use detached_regcache::invalidate instead.
4280 * regcache.c (regcache_invalidate): Remove.
4282 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4284 * regcache.h (regcache_raw_write_part): Remove, update callers
4285 to use regcache::raw_write_part instead.
4286 * regcache.c (regcache_raw_write_part): Remove.
4288 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4290 * regcache.h (regcache_raw_read_part): Remove, update callers to
4291 use readable_regcache::raw_read_part instead.
4292 * regcache.c (regcache_raw_read_part): Remove.
4294 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4296 * regcache.h (regcache_cooked_read): Remove, update callers to
4297 use readable_regcache::cooked_read instead.
4298 * regcache.c (regcache_cooked_read): Remove.
4300 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4302 * regcache.h (regcache_raw_write): Remove, update callers to use
4303 regcache::raw_write instead.
4304 * regcache.c (regcache_raw_write): Remove.
4306 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4308 * regcache.h (regcache_raw_read): Remove, update callers to use
4309 readable_regcache::raw_read instead.
4310 * regcache.c (regcache_raw_read): Remove.
4312 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4314 * regcache.h (regcache_raw_update): Remove, update callers to
4315 use readable_regcache::raw_update instead.
4316 * regcache.c (regcache_raw_update): Remove.
4318 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4320 * regcache.h (regcache_register_status): Remove, update callers
4321 to use reg_buffer::get_register_status directly instead.
4322 * regcache.c (regcache_register_status): Remove.
4324 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4326 * regcache.h (regcache_get_ptid): Remove, update all callers to
4327 call regcache::ptid instead.
4328 * regcache.c (regcache_get_ptid): Remove.
4330 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4332 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4334 2018-05-30 Pedro Alves <palves@redhat.com>
4336 * common/common-exceptions.h (exception_rethrow): Use
4339 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
4341 * breakpoint.c (print_solib_event, check_status_catch_solib):
4342 Remove struct keyword in range-based for loops.
4343 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4344 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4346 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4348 * symfile.c (addr_info_make_relative): Likewise.
4349 * thread.c (value_in_thread_stack_temporaries): Likewise.
4351 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
4354 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4355 aggregate type to get its real type before accessing it.
4357 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
4359 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4360 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4361 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4362 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4363 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4364 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4365 * printcmd.c (info_address_command): Likewise.
4367 2018-05-29 Tom Tromey <tom@tromey.com>
4369 * windows-nat.c (handle_exception): Update fall-through comment.
4371 2018-05-29 Tom Tromey <tom@tromey.com>
4373 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4374 (struct program_space) <added_solibs>: Now a std::vector.
4375 * breakpoint.c (print_solib_event): Update.
4376 (check_status_catch_solib): Update.
4377 * progspace.c (clear_program_space_solib_cache): Update.
4378 * solib.c (update_solib_list): Update.
4380 2018-05-29 Tom Tromey <tom@tromey.com>
4382 * python/py-type.c (typy_richcompare): Update.
4383 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4384 * gdbtypes.h (types_deeply_equal): Return bool.
4385 (types_equal): Likewise.
4386 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4388 (check_types_equal): Change worklist to std::vector. Return
4390 (struct type_equality_entry): Add constructor.
4391 (compare_maybe_null_strings): Return bool.
4392 (check_types_worklist): Return bool. Change worklist to
4394 (types_deeply_equal): Use std::vector.
4395 (types_equal): Return bool.
4396 (compare_maybe_null_strings): Simplify.
4398 2018-05-29 Tom Tromey <tom@tromey.com>
4400 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4402 2018-05-29 Tom Tromey <tom@tromey.com>
4404 * objc-lang.h: Don't include cp-support.h.
4405 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4408 2018-05-27 Tom Tromey <tom@tromey.com>
4410 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4412 2018-05-25 Tom Tromey <tom@tromey.com>
4414 * value.c (value::location): Initialize.
4416 2018-05-25 Tom Tromey <tom@tromey.com>
4418 * dbxread.c (init_bincl_list): Remove.
4419 (bincl_list): Now a std::vector.
4420 (bincls_allocated, next_bincl): Remove.
4421 (free_bincl_list, do_free_bincl_list_cleanup)
4422 (make_cleanup_free_bincl_list): Remove.
4423 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4425 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4426 (struct header_file_location): Add constructor.
4427 (add_bincl_to_list): Remove.
4429 2018-05-25 Tom Tromey <tom@tromey.com>
4431 * tui/tui.c (tui_enable): Update.
4432 * mi/mi-interp.c (mi_interp::init): Update.
4433 * interps.h (class interp) <name>: New method.
4434 <m_name>: Rename from name.
4435 (~scoped_restore_interp): Update.
4436 * interps.c (interp::interp): Update.
4437 (interp_add, interp_set, interp_lookup_existing)
4438 (current_interp_named_p): Update.
4440 2018-05-25 Tom Tromey <tom@tromey.com>
4442 * interps.c (interp_name): Remove.
4443 * mi/mi-interp.c (mi_interp::init): Update.
4444 * interps.h (interp_name): Remove.
4445 (~scoped_restore_interp): Update.
4446 * tui/tui.c (tui_enable): Update.
4448 2018-05-25 Tom Tromey <tom@tromey.com>
4450 * utils.c (fputs_maybe_filtered): Update.
4451 * linespec.c (decode_line_full): Update.
4452 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4453 (mi_print_breakpoint_for_event, mi_solib_loaded)
4454 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4455 (mi_user_selected_context_changed): Update.
4456 * mi/mi-main.c (mi_execute_command): Update.
4457 * cli/cli-script.c (execute_control_command): Update.
4458 * python/python.c (execute_gdb_command): Update.
4459 * solib.c (info_sharedlibrary_command): Update.
4460 * interps.c (interp_ui_out): Remove.
4461 * interps.h (interp_ui_out): Remove.
4463 2018-05-25 Tom Tromey <tom@tromey.com>
4465 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4466 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4467 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4469 2018-05-25 Tom Tromey <tom@tromey.com>
4471 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4472 * interps.c (interp_exec): Use scoped_restore.
4474 2018-05-25 Tom Tromey <tom@tromey.com>
4476 * remote.c (remote_target::remote_file_get): Use
4478 (remote_target::remote_file_put): Likewise.
4480 2018-05-25 Tom Tromey <tom@tromey.com>
4482 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4484 (get_pe_section_index, add_pe_exported_sym): Update.
4485 (read_pe_exported_syms): Use gdb::def_vector.
4487 2018-05-25 Tom Tromey <tom@tromey.com>
4489 * frame.c (remove_prev_frame): Remove.
4490 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4492 2018-05-25 Maciej W. Rozycki <macro@mips.com>
4494 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4496 * mips-linux-nat.c (supply_fpregset): Always call
4497 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4498 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4499 `mips_fill_fpregset'.
4500 * mips-linux-tdep.c (mips_supply_fpregset)
4501 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4502 (mips_fill_fpregset_wrapper): Remove functions.
4503 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4504 (mips_linux_fpregset): Remove variable.
4505 (mips_linux_iterate_over_regset_sections): Use
4506 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4507 (mips_linux_o32_sigframe_init): Remove comment.
4509 2018-05-25 Pedro Alves <palves@redhat.com>
4511 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4512 (struct readahead_cache, struct packet_reg, struct
4513 remote_arch_state, class remote_state): Move higher up in the
4515 (remote_target::m_remote_state): Now an object instead of a pointer.
4516 (remote_target::get_remote_state): Adjust.
4518 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4520 * stack.c (select_and_print_frame): Delete.
4521 (struct function_bounds): Move struct within function.
4522 (func_command): Most content moved into new function
4523 find_frame_for_function, use new function, print result, add
4525 (find_frame_for_function): New function, now returns a result.
4527 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4529 * stack.c (iterate_over_block_arg_vars): Fix comment.
4530 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4532 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4536 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4538 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4540 * frame.h (class scoped_restore_selected_frame): New class.
4541 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4542 of any exception, use scoped_restore_selected_frame to restore the
4545 2018-05-24 Pedro Alves <palves@redhat.com>
4547 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4550 2018-05-23 Tom Tromey <tom@tromey.com>
4552 * complaints.c (struct complaints): Remove.
4553 (symfile_complaint_book): Remove.
4554 (series): New global.
4555 (complaint_internal): Update.
4556 (clear_complaints): Update.
4558 2018-05-23 Tom Tromey <tom@tromey.com>
4560 * complaints.c (counters): New global.
4561 (struct complain): Remove.
4562 (struct complaints) <root>: Remove.
4563 (complaint_sentinel): Remove.
4564 (symfile_complaint_book): Update.
4565 (find_complaint) Remove.
4566 (complaint_internal, clear_complaints): Update.
4568 2018-05-23 Tom Tromey <tom@tromey.com>
4570 * complaints.c (struct complain) <file, line>: Remove.
4571 (find_complaint): Remove file, line parameters.
4572 (complaint_internal): Update.
4574 2018-05-23 Tom Tromey <tom@tromey.com>
4576 * complaints.c (vcomplaint): Remove.
4577 (complaint_internal) Merge in contents of vcomplaint.
4579 2018-05-23 Tom Tromey <tom@tromey.com>
4581 * complaints.c (struct complaints) <explanation>: Remove.
4582 (symfile_explanations): Remove.
4583 (symfile_complaint_book): Update.
4584 (vcomplaint): Update.
4585 (struct explanation): Remove.
4587 2018-05-23 Tom Tromey <tom@tromey.com>
4589 * complaints.c (symfile_complaints): Remove.
4590 (complaint_internal): Remove "complaints" parameter.
4591 (clear_complaints, vcomplaint): Remove "c" parameter.
4592 (get_complaints): Remove.
4593 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4594 (dwarf2_debug_line_missing_file_complaint)
4595 (dwarf2_debug_line_missing_end_sequence_complaint)
4596 (dwarf2_complex_location_expr_complaint)
4597 (dwarf2_const_value_length_mismatch_complaint)
4598 (dwarf2_section_buffer_overflow_complaint)
4599 (dwarf2_macro_malformed_definition_complaint)
4600 (dwarf2_invalid_attrib_class_complaint)
4601 (create_addrmap_from_index, dw2_symtab_iter_next)
4602 (dw2_expand_marked_cus)
4603 (dw2_debug_names_iterator::find_vec_in_debug_names)
4604 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4605 (create_debug_type_hash_table, init_cutu_and_read_dies)
4606 (partial_die_parent_scope, add_partial_enumeration)
4607 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4608 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4609 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4610 (create_cus_hash_table, create_dwp_hash_table)
4611 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4612 (dwarf2_rnglists_process, dwarf2_ranges_process)
4613 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4614 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4615 (handle_struct_member_die, process_structure_scope)
4616 (read_array_type, read_common_block, read_module_type)
4617 (read_tag_pointer_type, read_typedef, read_base_type)
4618 (read_subrange_type, load_partial_dies, partial_die_info::read)
4619 (partial_die_info::read, partial_die_info::read)
4620 (partial_die_info::read, read_checked_initial_length_and_offset)
4621 (dwarf2_string_attr, read_formatted_entries)
4622 (dwarf_decode_line_header)
4623 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4624 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4625 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4626 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4627 (get_signatured_type, get_DW_AT_signature_type)
4628 (decode_locdesc, file_file_name, consume_improper_spaces)
4629 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4630 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4631 (dwarf2_symbol_mark_computed, set_die_type)
4632 (read_attribute_value): Update.
4633 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4635 * dbxread.c (unknown_symtype_complaint)
4636 (lbrac_mismatch_complaint, repeated_header_complaint)
4637 (set_namestring, function_outside_compilation_unit_complaint)
4638 (read_dbx_symtab, process_one_symbol): Update.
4639 * gdbtypes.c (stub_noname_complaint): Update.
4640 * windows-nat.c (handle_unload_dll): Update.
4641 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4642 (decode_base_type): Update.
4643 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4644 (eb_complaint, record_include_begin, record_include_end)
4645 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4646 (process_xcoff_symbol, read_symbol)
4647 (function_outside_compilation_unit_complaint)
4648 (scan_xcoff_symtab): Update.
4649 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4650 * buildsym.c (finish_block_internal, make_blockvector)
4651 (end_symtab_get_static_block, augment_type_symtab): Update.
4652 * dtrace-probe.c (dtrace_process_dof)
4653 (dtrace_static_probe_ops::get_probes): Update.
4654 * complaints.h (struct complaint): Don't declare.
4655 (symfile_complaints): Remove.
4656 (complaint_internal): Remove "complaints" parameter.
4657 (complaint): Likewise.
4658 (clear_complaints): Likewise.
4659 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4660 (reread_symbols): Update.
4661 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4662 (dwarf2_frame_cache, decode_frame_entry): Update.
4663 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4664 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4665 (info_selectors_command): Update.
4666 * macrotab.c (macro_include, check_for_redefinition)
4667 (macro_undef): Update.
4668 * objfiles.c (filter_overlapping_sections): Update.
4669 * stabsread.c (invalid_cpp_abbrev_complaint)
4670 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4671 (define_symbol, error_type, read_type, rs6000_builtin_type)
4672 (stabs_method_name_from_physname, read_member_functions)
4673 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4674 (attach_fields_to_type, complain_about_struct_wipeout)
4675 (read_range_type, read_args, common_block_start)
4676 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4678 * mdebugread.c (index_complaint, unknown_ext_complaint)
4679 (basic_type_complaint, bad_tag_guess_complaint)
4680 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4681 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4682 (parse_procedure, parse_lines)
4683 (function_outside_compilation_unit_complaint)
4684 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4685 (bad_tag_guess_complaint, reg_value_complaint): Update.
4686 * cp-support.c (demangled_name_complaint): Update.
4687 * macroscope.c (sal_macro_scope): Update.
4688 * dwarf-index-write.c (class debug_names): Update.
4690 2018-05-23 Tom Tromey <tom@tromey.com>
4692 * complaints.c (clear_complaints): Remove "noisy" parameter.
4693 * complaints.h (clear_complaints): Update.
4694 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4695 (reread_symbols): Update.
4697 2018-05-23 Tom Tromey <tom@tromey.com>
4699 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4701 (vcomplaint, clear_complaints): Update.
4702 (symfile_explanations): Remove some messages.
4704 2018-05-23 Tom Tromey <tom@tromey.com>
4706 * complaints.c (internal_complaint): Remove.
4707 * complaints.h (internal_complaint): Remove.
4709 2018-05-22 Maciej W. Rozycki <macro@mips.com>
4711 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4713 2018-05-22 Pedro Alves <palves@redhat.com>
4715 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4716 (remote_fileio_badfd, remote_fileio_return_errno)
4717 (remote_fileio_return_success, remote_fileio_func_open)
4718 (remote_fileio_func_open, remote_fileio_func_close)
4719 (remote_fileio_func_read, remote_fileio_func_write)
4720 (remote_fileio_func_lseek, remote_fileio_func_rename)
4721 (remote_fileio_func_unlink, remote_fileio_func_stat)
4722 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4723 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4724 remote_target parameter.
4725 (remote_fio_func_map) <func>: Add remote_target parameter.
4726 (do_remote_fileio_request, remote_fileio_request):
4727 * remote-fileio.h (remote_fileio_request):
4728 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4729 remote_target parameter.
4730 (remote_notif_process, handle_notification): Adjust to pass down
4732 (remote_notif_state_allocate): Add remote_target parameter. Save
4734 * remote-notif.h (struct remote_target): Forward declare.
4735 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4736 remote_target parameter.
4737 (struct remote_notif_state) <remote>: New field.
4738 (remote_notif_ack, remote_notif_parse): Add remote_target
4740 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4741 remote_target parameter.
4742 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4743 (threads_listing_context, rmt_thread_action, protocol_feature)
4744 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4745 (packet_result, struct threads_listing_context, remote_state):
4746 Move definitions and declarations higher up.
4747 (remote_target) <~remote_target>: Declare.
4748 (remote_download_command_source, remote_file_put, remote_file_get)
4749 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4750 (remote_hostio_pread_vFile, remote_hostio_send_command)
4751 (remote_hostio_set_filesystem, remote_hostio_open)
4752 (remote_hostio_close, remote_hostio_unlink, remote_state)
4753 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4754 (get_memory_write_packet_size, get_memory_read_packet_size)
4755 (append_pending_thread_resumptions, remote_detach_1)
4756 (append_resumption, remote_resume_with_vcont)
4757 (add_current_inferior_and_thread, wait_ns, wait_as)
4758 (process_stop_reply, remote_notice_new_inferior)
4759 (process_initial_stop_replies, remote_add_thread)
4760 (btrace_sync_conf, remote_btrace_maybe_reopen)
4761 (remove_new_fork_children, kill_new_fork_children)
4762 (discard_pending_stop_replies, stop_reply_queue_length)
4763 (check_pending_events_prevent_wildcard_vcont)
4764 (discard_pending_stop_replies_in_queue, stop_reply)
4765 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4766 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4767 (remote_interrupt_as, remote_interrupt_ns)
4768 (remote_get_noisy_reply, remote_query_attached)
4769 (remote_add_inferior, remote_current_thread, get_current_thread)
4770 (set_thread, set_general_thread, set_continue_thread)
4771 (set_general_process, write_ptid)
4772 (remote_unpack_thread_info_response, remote_get_threadinfo)
4773 (parse_threadlist_response, remote_get_threadlist)
4774 (remote_threadlist_iterator, remote_get_threads_with_ql)
4775 (remote_get_threads_with_qxfer)
4776 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4777 (get_offsets, remote_check_symbols, remote_supported_packet)
4778 (remote_query_supported, remote_packet_size)
4779 (remote_serial_quit_handler, remote_detach_pid)
4780 (remote_vcont_probe, remote_resume_with_hc)
4781 (send_interrupt_sequence, interrupt_query)
4782 (remote_notif_get_pending_events, fetch_register_using_p)
4783 (send_g_packet, process_g_packet, fetch_registers_using_g)
4784 (store_register_using_P, store_registers_using_G)
4785 (set_remote_traceframe, check_binary_download)
4786 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4787 (remote_xfer_live_readonly_partial, remote_read_bytes)
4788 (remote_send_printf, remote_flash_write, readchar)
4789 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4790 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4791 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4792 (extended_remote_disable_randomization, extended_remote_run)
4793 (send_environment_packet, extended_remote_environment_support)
4794 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4795 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4796 (packet_command): Now methods of ...
4797 (remote_target): ... this class.
4798 (m_remote_state) <remote_target>: New field.
4799 (struct remote_state) <stop_reply_queue,
4800 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4802 (remote_state::remote_state): Allocate stop_reply_queue.
4803 (remote_state): Delete global.
4804 (get_remote_state_raw): Delete.
4805 (remote_target::get_remote_state): Allocate m_remote_state on
4807 (get_current_remote_target): New.
4808 (remote_ops, extended_remote_ops): Delete.
4809 (wait_forever_enabled_p, remote_async_inferior_event_token):
4810 Delete, moved to struct remote_state.
4811 (remote_target::close): Delete self. Destruction bits split to
4813 (remote_target::~remote_target): ... this.
4814 (show_memory_packet_size): Adjust to use
4815 get_current_remote_target.
4816 (struct protocol_feature) <func>: Add remote_target parameter.
4817 All callers adjusted.
4818 (curr_quit_handler_target): New.
4819 (remote_serial_quit_handler): Reimplement.
4820 (remote_target::open_1): Adjust to use get_current_remote_target.
4821 Heap-allocate remote_target/extended_remote_target instances.
4822 (vcont_builder::vcont_builder): Add remote_target parameter, and
4823 save it in m_remote. All callers adjusted.
4824 (vcont_builder::m_remote): New field.
4825 (vcont_builder::restart, vcont_builder::flush)
4826 (vcont_builder::push_action): Use it.
4827 (remote_target::commit_resume): Use it.
4828 (struct queue_iter_param) <remote>: New field.
4829 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4830 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4831 (check_pending_event_prevents_wildcard_vcont_callback)
4832 (remote_target::check_pending_events_prevent_wildcard_vcont)
4833 (remote_target::discard_pending_stop_replies)
4834 (remote_target::discard_pending_stop_replies_in_queue)
4835 (remote_target::remote_notif_remove_queued_reply): Fill in
4837 (remote_notif_get_pending_events): New.
4838 (remote_target::readchar, remote_target::remote_serial_write):
4839 Save/restore curr_quit_handler_target.
4841 (kill_new_fork_children): Fill in 'remote' field.
4842 (packet_command): Use get_current_remote_target, defer to
4843 remote_target method of same name.
4844 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4845 parameter, and save it in m_remote. All callers adjusted.
4846 (scoped_remote_fd::release): Use m_remote.
4847 (scoped_remote_fd::m_remote): New field.
4848 (remote_file_put, remote_file_get, remote_file_delete): Use
4849 get_current_remote_target, defer to remote_target method of same
4851 (remote_btrace_reset): Add remote_state paremeter. Update all
4853 (remote_async_inferior_event_handler). Pass down 'data'.
4854 (remote_new_objfile): Use get_current_remote_target.
4855 (remote_target::vcont_r_supported): New.
4856 (set_range_stepping): Use get_current_remote_target and
4857 remote_target::vcont_r_supported.
4858 (_initialize_remote): Don't allocate 'remote_state' and
4859 'stop_reply_queue' globals.
4860 * remote.h (struct remote_target): Forward declare.
4861 (getpkt, putpkt, remote_notif_get_pending_events): Add
4862 'remote_target' parameter.
4864 2018-05-22 Pedro Alves <palves@redhat.com>
4866 * remote.c (vcont_builder): Now a class. Make all data members
4868 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4870 (vcont_builder_restart): Rename to ...
4871 (vcont_builder::restart): ... this.
4872 (vcont_builder_flush): Rename to ...
4873 (vcont_builder::flush): ... this.
4874 (vcont_builder_push_action): Rename to ...
4875 (vcont_builder::push_action): ... this.
4876 (remote_target::commit_resume): Adjust.
4878 2018-05-22 Pedro Alves <palves@redhat.com>
4880 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4881 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4882 (get_fixed_memory_packet_size): New.
4883 (get_memory_packet_size): Use it.
4884 (set_memory_packet_size): Don't override the config size with
4885 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4886 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4887 Don't refer to get_memory_packet_size if not connected to a remote
4888 target. Show "(default)" if configured size is 0.
4890 2018-05-22 Pedro Alves <palves@redhat.com>
4892 * remote.c (remote_target::mourn_inferior): Move
4893 discard_pending_stop_replies call here from ...
4894 (_initialize_remote): ... here.
4896 2018-05-22 Pedro Alves <palves@redhat.com>
4898 * remote.c (compare_section_command): Remove set_general_process
4901 2018-05-22 Pedro Alves <palves@redhat.com>
4903 * remote.c (struct packet_reg, struct remote_arch_state):
4904 Move higher up in the file.
4905 (remote_state) <m_arch_states>: Store remote_arch_state values
4906 instead of remote_arch_state pointers.
4907 (remote_state::get_remote_arch_state): Adjust.
4909 2018-05-22 Pedro Alves <palves@redhat.com>
4911 * remote.c: Include <unordered_map>.
4912 (remote_state): Now a class.
4913 (remote_state) <get_remote_arch_state>: Declare method.
4914 <get_remote_arch_state>: New field.
4915 (remote_arch_state) <remote_arch_state>: Declare ctor.
4916 <regs>: Now a unique_ptr.
4917 (remote_gdbarch_data_handle): Delete.
4918 (get_remote_arch_state): Delete.
4919 (remote_state::get_remote_arch_state): New.
4920 (get_remote_state): Adjust to call remote_state's
4921 get_remote_arch_state method.
4922 (init_remote_state): Delete, bits factored out to ...
4923 (remote_arch_state::remote_arch_state): ... this new method.
4924 (get_remote_packet_size, get_memory_packet_size)
4925 (process_g_packet, remote_target::fetch_registers)
4926 (remote_target::prepare_to_store, store_registers_using_G)
4927 (remote_target::store_registers, remote_target::get_trace_status):
4928 Adjust to call remote_state's method.
4929 (_initialize_remote): Remove reference to
4930 remote_gdbarch_data_handle.
4932 2018-05-22 Pedro Alves <palves@redhat.com>
4934 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4935 pread>: New method declarations.
4936 (remote_target::open_1): Adjust.
4937 (readahead_cache_invalidate): Rename to ...
4938 (readahead_cache::invalidate): ... this, and adjust to be a class
4940 (readahead_cache_invalidate_fd): Rename to ...
4941 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4943 (remote_hostio_pwrite): Adjust.
4944 (remote_hostio_pread_from_cache): Rename to ...
4945 (readahead_cache::pread): ... this, and adjust to be a class
4947 (remote_hostio_close): Adjust.
4949 2018-05-22 Pedro Alves <palves@redhat.com>
4951 * remote.c (remote_hostio_close_cleanup): Delete.
4952 (class scoped_remote_fd): New.
4953 (remote_file_put, remote_file_get): Use it.
4955 2018-05-22 Pedro Alves <palves@redhat.com>
4957 (struct vCont_action_support): Use bool and initialize all fields.
4958 (struct readahead_cache): Initialize all fields.
4959 (remote_state): Use bool and initialize all fields.
4960 (remote_state::remote_state, remote_state::~remote_state): New.
4961 (new_remote_state): Delete.
4962 (_initialize_remote): Use new to allocate remote_state.
4964 2018-05-22 Pedro Alves <palves@redhat.com>
4968 * c-exp.y: Include "c-support.h".
4969 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4970 of tolower. Use c_ident_is_alpha to scan names.
4971 * c-lang.c: Include "c-support.h".
4972 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4973 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4974 * c-support.h: New file, with bits factored out from ...
4975 * cp-name-parser.y: ... this file.
4976 Include "c-support.h".
4977 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4978 c-support.h and renamed.
4979 (symbol_end, yylex): Adjust.
4981 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4983 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4984 parameter type to CORE_ADDR.
4985 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4986 parameter type in declaration to CORE_ADDR.
4987 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4988 target_auxv_search to get AT_HWCAP and use the result to get the
4990 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4991 to CORE_ADDR. Remove the cast of the return value to unsigned
4992 long. Fix error predicate of target_auxv_search.
4993 (ppc_linux_nat_target::read_description): Change the type of the
4994 hwcap variable to CORE_ADDR.
4996 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4998 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4999 if the size of fpscr is larger than 32 bits.
5001 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5003 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5004 (ppc32_linux_vsxregmap): New global.
5005 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5006 regcache_supply_regset, and regcache_collect_regset.
5007 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5008 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5009 (fetch_vsx_register, store_vsx_register): Remove.
5010 (fetch_vsx_registers): Add regno parameter. Get regset using
5011 ppc_linux_vsxregset. Use regset to supply registers.
5012 (store_vsx_registers): Add regno parameter. Get regset using
5013 ppc_linux_vsxregset. Use regset to collect registers.
5014 (fetch_register): Call fetch_vsx_registers instead of
5016 (store_register): Call store_vsx_registers instead of
5018 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5019 new regno parameter.
5020 (store_ppc_registers): Call store_vsx_registers with -1 for the
5021 new regno parameter.
5022 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5023 (ppc_collect_vsxregset): Remove.
5025 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5027 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5029 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5030 for vector register offset fields.
5031 (ppc64_fbsd_reg_offsets): Likewise.
5032 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5033 to vector register offset fields.
5034 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5035 to vector register offset fields.
5036 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5037 vector register offset fields.
5038 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5039 initializers for vector register offset fields.
5040 (rs6000_aix64_reg_offsets): Likewise.
5041 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5042 (ppc_supply_vrregset): Remove.
5043 (ppc_collect_vrregset): Remove.
5044 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5045 (ppc_linux_vrregset) : New function.
5046 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5047 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5048 (ppc32_linux_vrregset): Remove.
5049 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5050 and use result instead of ppc32_linux_vrregset.
5051 (ppc32_linux_reg_offsets): Remove initializers for vector register
5053 (ppc64_linux_reg_offsets): Likewise.
5054 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5055 * ppc-linux-nat.c: Include regset.h.
5056 (gdb_vrregset_t): Adjust comment to account for little-endian
5058 (supply_vrregset, fill_vrregset): Remove.
5059 (fetch_altivec_register, store_altivec_register): Remove.
5060 (fetch_altivec_registers): Add regno parameter. Get regset using
5061 ppc_linux_vrregset. Use regset to supply registers.
5062 (store_altivec_registers): Add regno parameter. Get regset using
5063 ppc_linux_vrregset. Use regset to collect registers.
5064 (fetch_register): Call fetch_altivec_registers instead of
5065 fetch_altivec_register.
5066 (store_register): Call store_altivec_registers instead of
5067 store_altivec_register.
5068 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5069 the new regno parameter.
5070 (store_ppc_registers): Call store_altivec_registers with -1 for
5071 the new regno parameter.
5073 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5075 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5076 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5077 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5078 (gdb_vrregset_t): Change array type size to
5079 PPC_LINUX_SIZEOF_VRREGSET.
5080 (gdb_vsxregset_t): Change array type size to
5081 PPC_LINUX_SIZEOF_VSXREGSET.
5082 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5083 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5084 PPC_LINUX_SIZEOF_VSXREGSET.
5086 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5088 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5089 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5091 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5092 ppc_linux_target_wordsize with tid.
5093 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5095 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5096 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5097 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5098 tid parameter. Remove static specifier.
5099 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5100 (ppc_linux_target_wordsize): New declaration.
5102 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5104 * arch/ppc-linux-common.c: New file.
5105 * arch/ppc-linux-common.h: New file.
5106 * arch/ppc-linux-tdesc.h: New file.
5107 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5108 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5109 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5110 arch/ppc-linux-tdesc.h.
5111 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5112 arch/ppc-linux-tdesc.h.
5113 (ppc_linux_nat_target::read_description): Remove target
5114 description matching code. Fill a ppc_linux_features struct and
5115 call ppc_linux_match_description with it. Move comment about ISA
5116 2.05 to ppc-linux-common.c.
5117 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5118 arch/ppc-linux-tdesc.h.
5119 (ppc_linux_core_read_description): Remove target description
5120 matching code. Fill a ppc_linux_features struct and call
5121 ppc_linux_match_description with it.
5122 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5123 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5124 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5125 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5126 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5127 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5128 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5129 (tdesc_powerpc_e500l): Remove.
5131 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5133 * ada-lang.c (catch_assert_command): Pass empty string instead
5134 of NULL for excep_string argument.
5136 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5138 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5139 the width of the requested register exceeds the width of the
5142 2018-05-21 Tom Tromey <tom@tromey.com>
5144 * printcmd.c (output_command): Remove.
5145 (output_command_const): Rename to output_command.
5146 * valprint.h (output_command): Rename from output_command_const.
5147 * tracepoint.c (trace_dump_actions): Call output_command.
5149 2018-05-21 Tom Tromey <tom@tromey.com>
5151 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5152 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5153 * ada-lang.h (create_ada_exception_catchpoint): Update.
5154 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5156 (create_excep_cond_exprs, ~ada_catchpoint)
5157 (should_stop_exception, print_one_exception)
5158 (print_mention_exception, print_recreate_exception): Update.
5159 (ada_get_next_arg): Remove.
5160 (catch_ada_exception_command_split): Use std::string. Change type
5161 of "excep_string", "cond_string".
5162 (catch_ada_exception_command): Update.
5163 (create_ada_exception_catchpoint): Change type of excep_string.
5164 (ada_exception_sal): Remove excep_string parameter.
5165 (~ada_catchpoint): Remove.
5167 2018-05-21 Tom Tromey <tom@tromey.com>
5169 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5172 2018-05-21 Tom Tromey <tom@tromey.com>
5174 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5175 Return unique_xmalloc_ptr.
5176 (print_it_exception): Update.
5178 2018-05-21 Tom Tromey <tom@tromey.com>
5180 * tracepoint.c (trace_dump_actions): Use std::string.
5182 2018-05-21 Tom Tromey <tom@tromey.com>
5184 * symfile.c (reread_symbols): Use std::string for original_name.
5186 2018-05-21 Tom Tromey <tom@tromey.com>
5188 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5189 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5192 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5194 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5196 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5197 * objfiles.c (get_objfile_bfd_data): Allocate
5198 objfile_per_bfd_storage with obstack_new when allocating on
5201 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5203 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5205 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5206 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5207 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5208 (add_pending): Likewise.
5209 (parse_symbol): Likewise.
5210 (parse_partial_symbols): Likewise.
5211 (psymtab_to_symtab_1): Likewise.
5212 (new_psymtab): Likewise.
5213 (elfmdebug_build_psymtabs): Likewise.
5214 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5215 * objfiles.c (get_objfile_bfd_data): Likewise.
5216 (objfile_register_static_link): Likewise.
5217 * psymtab.c (allocate_psymtab): Likewise.
5218 * stabsread.c (read_member_functions): Likewise.
5219 * xcoffread.c (xcoff_end_psymtab): Likewise.
5221 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5223 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5224 compiler supports std::is_trivially_constructible.
5225 * common/poison.h: Include obstack.h.
5226 (IsMallocable): Define to is_trivially_constructible if the
5227 compiler supports it, define to true_type otherwise.
5231 (XOBNEWVEC): Redefine.
5232 * gdb_obstack.h (obstack_zalloc): New.
5233 (OBSTACK_ZALLOC): Redefine.
5234 (obstack_calloc): New.
5235 (OBSTACK_CALLOC): Redefine.
5237 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5238 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5240 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5241 obstack_calloc/obstack_zalloc.
5242 (gdbarch_obstack_zalloc): Remove.
5243 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5245 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5247 * stack.c (backtrace_command_1): Remove useless variable int i.
5249 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5251 * stack.c (print_frame_info): Fix comment.
5253 2018-05-18 Tom Tromey <tom@tromey.com>
5255 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5256 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5257 (~dwarf2_per_objfile): Update
5258 (dwarf2_get_dwz_file): Use new.
5259 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5262 2018-05-18 Tom Tromey <tom@tromey.com>
5264 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5266 * dwarf2read.c (struct dwp_file): Add constructor and
5268 (open_and_init_dwp_file): Return a unique_ptr.
5269 (dwarf2_per_objfile, create_dwp_hash_table)
5270 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5271 (lookup_dwo_unit_in_dwp): Update.
5272 (open_and_init_dwp_file, get_dwp_file): Update.
5274 2018-05-18 Tom Tromey <tom@tromey.com>
5276 * dwarf2read.c (dwarf2_per_objfile): Update.
5277 (struct mapped_index): Add initializers.
5278 (dwarf2_read_index): Use new.
5279 (dw2_symtab_iter_init): Update.
5280 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5283 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5285 * dwarf2read.c (mapped_index) <total_size>: Remove.
5287 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
5289 * unittests/format_pieces-selftests.c (test_format_specifier):
5292 2018-05-18 Tom Tromey <tom@tromey.com>
5294 * c-typeprint.c (maybe_print_hole): New function.
5295 (c_print_type_struct_field_offset): Update.
5296 (c_type_print_base_struct_union): Call maybe_print_hole.
5298 2018-05-17 Keith Seitz <keiths@redhat.com>
5300 * breakpoint.c (build_bpstat_chain): New function, moved from
5302 (bpstat_stop_status): Add optional parameter, `stop_chain'.
5303 If no stop chain is passed, call build_bpstat_chain to build it.
5304 * breakpoint.h (build_bpstat_chain): Declare.
5305 (bpstat_stop_status): Move documentation here from breakpoint.c.
5306 * infrun.c (handle_signal_stop): Before eliding inlined frames,
5307 build the stop chain and pass it to skip_inline_frames.
5308 Pass this stop chain to bpstat_stop_status.
5309 * inline-frame.c: Include breakpoint.h.
5310 (stopped_by_user_bp_inline_frame): New function.
5311 (skip_inline_frames): Add parameter `stop_chain'.
5312 Move documention to inline-frame.h.
5313 If non-NULL, use stopped_by_user_bp_inline_frame to determine
5314 whether the frame should be elided.
5315 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5316 Add moved documentation and update for new parameter.
5318 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5321 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5322 unittests/format_pieces-selftests.c.
5323 * common/format.h (format_piece) <operator==>: New.
5324 (format_pieces) <operator[]>: Remove.
5325 * common/format.c (format_pieces::format_pieces): Handle \e.
5326 * unittests/format_pieces-selftests.c: New.
5328 2018-05-17 Tom Tromey <tom@tromey.com>
5331 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5332 (dw2_instantiate_symtab): Add skip_partial parameter.
5333 (dw2_find_last_source_symtab, dw2_map_expand_apply)
5334 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5335 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5336 (dw2_expand_symtabs_matching_one)
5337 (dw2_find_pc_sect_compunit_symtab)
5338 (dw2_debug_names_lookup_symbol)
5339 (dw2_debug_names_expand_symtabs_for_function): Update.
5340 (init_cutu_and_read_dies): Add skip_partial parameter.
5341 (process_psymtab_comp_unit, build_type_psymtabs_1)
5342 (process_skeletonless_type_unit, load_partial_comp_unit)
5343 (psymtab_to_symtab_1): Update.
5344 (load_full_comp_unit): Add skip_partial parameter.
5345 (process_imported_unit_die, dwarf2_read_addr_index)
5346 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5347 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5348 (read_signatured_type): Update.
5350 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5352 * value.c (release_value): Remove unused variable.
5353 (record_latest_value): Likewise.
5354 (access_value_history): Likewise.
5355 (preserve_values): Likewise.
5357 2018-05-17 Tom Tromey <tom@tromey.com>
5359 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5362 2018-05-16 Maciej W. Rozycki <macro@mips.com>
5365 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5366 Also handle registers whose width is not a multiple of
5368 (linux_nat_trad_target::store_register): Likewise.
5370 2018-05-16 Tom Tromey <tom@tromey.com>
5372 * gdbcore.h (core_bfd): Redefine.
5373 * corelow.c (core_target::close): Update.
5374 (core_target_open): Update.
5375 * progspace.h (struct program_space) <cbfd>: Now a
5378 2018-05-16 Tom Tromey <tom@tromey.com>
5381 * symfile-add-flags.h (enum symfile_add_flags)
5382 <SYMFILE_NOT_FILENAME>: New constant.
5383 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5384 objfile name from BFD.
5385 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5386 * minidebug.c (find_separate_debug_file_in_section): Put
5387 ".gnu_debugdata" into BFD's file name.
5389 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5391 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5394 2018-05-15 Tamar Christina <tamar.christina@arm.com>
5397 * aarch64-tdep.c (aarch64_analyze_prologue,
5398 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5399 Indicate not interested in errors.
5401 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5403 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5404 Supply the MIPS_ZERO_REGNUM register.
5406 2018-05-15 Maciej W. Rozycki <macro@mips.com>
5408 * mips-tdep.c (mask_address_var): Make variable static.
5410 2018-05-14 Tom Tromey <tom@tromey.com>
5412 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5414 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5416 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5417 FXSAVE_ADDR for the mxcsr register.
5419 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5421 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5423 2018-05-11 Pedro Alves <palves@redhat.com>
5425 * corelow.c (core_target) <core_target>: No longer inline.
5426 Initialize m_core_gdbarch, m_core_vec and build the section table
5428 <~core_target>: New.
5429 <core_gdbarch, get_core_register_section>: New methods.
5430 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5431 factored out from ...
5432 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5434 (sniff_core_bfd): Add gdbarch parameter.
5435 (core_close): Delete, merged into ...
5436 (core_target::close): ... here. Delete self.
5437 (core_close_cleanup): Delete.
5438 (core_target_open): Allocate a core_target on the heap. Use a
5439 unique_ptr instead of a cleanup. Bits moved into the core_target
5440 ctor. Adjust to use core_target methods instead of globals.
5441 (get_core_register_section): Rename to ...
5442 (core_target::get_core_register_section): ... this and adjust.
5443 (struct get_core_registers_cb_data): New.
5444 (get_core_registers_cb): Use it. Use bool.
5445 (core_target::fetch_registers, core_target::files_info)
5446 (core_target::xfer_partial, core_target::read_description)
5447 (core_target::pid_to, core_target::thread_name): Adjust to
5448 reference class fields instead of globals.
5449 * target.h (struct target_ops_deleter, target_ops_up): New.
5451 2018-05-11 Pedro Alves <palves@redhat.com>
5453 * corefile.c (core_file_command): Move to corelow.c.
5454 * corelow.c (the_core_target): Delete.
5455 (core_file_command): Moved from corefile.c. Check exec_bfd
5456 instead of the_core_target. Use target_detach instead of calling
5457 into the_core_target directly.
5458 (maybe_say_no_core_file_now): New.
5459 (core_target::detach): Use it.
5460 (_initialize_corelow): Remove references to the_core_target.
5461 * gdbcore.h (the_core_target): Delete.
5463 2018-05-11 Tom Tromey <tromey@redhat.com>
5464 Pedro Alves <palves@redhat.com>
5466 * corefile.c (core_bfd): Remove.
5467 * gdbcore.h (core_bfd): Now a macro.
5468 * progspace.h (struct program_space) <cbfd>: New field.
5470 2018-05-11 Tom Tromey <tom@tromey.com>
5472 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5475 2018-05-10 Tom Tromey <tom@tromey.com>
5477 * configure: Rebuild.
5478 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5480 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5483 * regformats/regdat.sh: Adjust script, following the addition
5484 of the new expedite_regs parameter to init_target_desc.
5486 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
5489 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5490 set_gdbarch_significant_addr_bit.
5491 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5492 set_gdbarch_significant_addr_bit.
5493 * utils.c (address_significant): Update to sign extend addr.
5495 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5497 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5498 (xtensa_linux_init_abi): Limit tdep->num_regs by
5499 tdep->num_nopriv_regs.
5500 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5501 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5504 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5506 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5508 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5510 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5511 (I387_MXCSR_INIT_VAL): New constant.
5512 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5513 buffer if it was supplied by the inferior.
5514 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5515 (i387_xsave_get_clear_bv): New function.
5516 (i387_supply_xsave): Only read x87 control registers from the
5517 xsave buffer if the feature is enabled, and the state will have
5518 been written, otherwise, provide a suitable default.
5519 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5520 including x87 control registers. Update control registers if they
5521 have changed from the default value, and mark features as enabled
5523 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5525 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5527 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5529 2018-05-07 Tom Tromey <tom@tromey.com>
5531 * configure: Rebuild.
5532 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5534 2018-05-07 Tom Tromey <tom@tromey.com>
5537 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5538 bit. Use correct value for VDIV.
5540 2018-05-04 Tom Tromey <tom@tromey.com>
5542 * configure: Rebuild.
5543 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5545 2018-05-04 Tom Tromey <tom@tromey.com>
5547 * linux-record.c (record_linux_system_call) <case
5548 RECORD_SYS_RECVFROM>: Add "break".
5550 2018-05-04 Tom Tromey <tom@tromey.com>
5552 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5553 Add missing "break".
5554 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5555 Add missing "break".
5557 2018-05-04 Tom Tromey <tom@tromey.com>
5559 * rs6000-tdep.c (ppc_process_record_op4)
5560 (ppc_process_record_op63): Add fall-through comment.
5562 2018-05-04 Tom Tromey <tom@tromey.com>
5564 * i386-tdep.c (i386_process_record): Add fall-through comment.
5566 2018-05-04 Tom Tromey <tom@tromey.com>
5568 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5571 2018-05-04 Tom Tromey <tom@tromey.com>
5573 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5574 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5575 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5577 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5579 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5582 2018-05-04 Tom Tromey <tom@tromey.com>
5584 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5586 2018-05-04 Tom Tromey <tom@tromey.com>
5588 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5589 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5590 * symfile.c (section_is_mapped): Fix fall-through comment.
5591 * stabsread.c (define_symbol, read_member_functions): Fix
5592 fall-through comment.
5593 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5595 * remote.c (remote_wait_as): Fix fall-through comment.
5596 * p-exp.y (yylex): Fix fall-through comment.
5597 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5599 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5600 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5601 * jv-exp.y (yylex): Fix fall-through comment.
5602 * go-exp.y (lex_one_token): Fix fall-through comment.
5603 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5604 fall-through comment.
5605 * f-exp.y (yylex): Fix fall-through comment.
5606 * dwarf2read.c (process_die): Fix fall-through comments.
5607 * dbxread.c (process_one_symbol): Fix fall-through comment.
5608 * d-exp.y (lex_one_token): Fix fall-through comment.
5609 * cp-name-parser.y (yylex): Fix fall-through comment.
5610 * coffread.c (coff_symtab_read): Fix fall-through comment.
5611 * c-exp.y (lex_one_token): Fix fall-through comment.
5612 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5614 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5617 2018-05-04 Tom Tromey <tom@tromey.com>
5620 * NEWS: Mention gdb.execute change.
5621 * gdbcmd.h (execute_control_command): Don't declare.
5622 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5623 execute_control_commands, execute_control_commands_to_string.
5624 * cli/cli-script.h (execute_control_commands)
5625 (execute_control_commands_to_string): Declare.
5626 (execute_control_command): Add from_tty parameter.
5627 * cli/cli-script.c (execute_control_commands)
5628 (execute_control_commands_to_string): New functions.
5629 (execute_user_command): Use execute_control_commands.
5630 (execute_control_command_1): Add "from_tty" parameter. Update.
5631 (execute_control_command): Likewise.
5633 2018-05-04 Tom Tromey <tom@tromey.com>
5636 * NEWS: Mention that breakpoint commands are writable.
5637 * python/py-breakpoint.c (bppy_set_commands): New function.
5638 (breakpoint_object_getset) <"commands">: Use it.
5640 2018-05-04 Tom Tromey <tom@tromey.com>
5642 * tracepoint.c (actions_command): Update.
5643 * mi/mi-cmd-break.c (mi_command_line_array)
5644 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5645 (mi_read_next_line): Remove.
5646 (mi_cmd_break_commands): Update.
5647 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5649 * cli/cli-script.c (get_command_line): Update.
5650 (process_next_line): Use function_view. Constify.
5651 (recurse_read_control_structure, read_command_lines)
5652 (read_command_lines_1): Change argument types to function_view.
5653 (do_define_command, document_command): Update.
5654 * breakpoint.h (check_tracepoint_command): Don't declare.
5655 * breakpoint.c (check_tracepoint_command): Remove.
5656 (commands_command_1, create_tracepoint_from_upload): Update.
5658 2018-05-04 Tom Tromey <tom@tromey.com>
5661 * cli/cli-script.h (enum command_control_type) <define_control>:
5663 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5664 (build_command_line, execute_control_command_1)
5665 (process_next_line): Likewise.
5666 (do_define_command): New function, extracted from define_command.
5667 (define_command): Use it.
5669 2018-05-04 Tom Tromey <tom@tromey.com>
5671 * tracepoint.c (actions_command): Update.
5672 * cli/cli-script.h (read_command_lines): Update.
5673 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5674 (MAX_TMPBUF): Remove define.
5675 (define_command): Use string_printf.
5676 (document_command): Likewise.
5677 * breakpoint.c (commands_command_1): Update.
5679 2018-05-04 Tom Tromey <tom@tromey.com>
5681 * top.c (execute_command): Update.
5682 * cli/cli-script.h (print_command_lines): Now varargs.
5683 * cli/cli-script.c (print_command_lines): Now varargs.
5684 (execute_control_command_1) <case while_control, case if_control>:
5687 2018-05-04 Tom Tromey <tom@tromey.com>
5689 * tracepoint.c (all_tracepoint_actions): Rename from
5690 all_tracepoint_actions_and_cleanup. Change return type.
5691 (actions_command, encode_actions_1, encode_actions)
5692 (trace_dump_actions, tdump_command): Update.
5693 * remote.c (remote_download_command_source): Update.
5694 * python/python.c (gdbpy_eval_from_control_command)
5695 (python_command, python_interactive_command): Update.
5696 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5697 * guile/guile.c (guile_command)
5698 (gdbscm_eval_from_control_command, guile_command): Update.
5699 * compile/compile.c (compile_code_command)
5700 (compile_print_command, compile_to_object): Update.
5701 * cli/cli-script.h (struct command_lines_deleter): New.
5702 (counted_command_line): New typedef.
5703 (struct command_line): Add constructor, destructor.
5704 <body_list>: Remove.
5705 <body_list_0, body_list_1>: New members.
5706 (command_line_up): Remove typedef.
5707 (read_command_lines, read_command_lines_1, get_command_line):
5709 (copy_command_lines): Don't declare.
5710 * cli/cli-script.c (build_command_line): Use "new".
5711 (get_command_line): Return counted_command_line.
5712 (print_command_lines, execute_user_command)
5713 (execute_control_command_1, while_command, if_command): Update.
5714 (realloc_body_list): Remove.
5715 (process_next_line, recurse_read_control_structure): Update.
5716 (read_command_lines, read_command_lines_1): Return counted_command_line.
5717 (free_command_lines): Use "delete".
5718 (copy_command_lines): Remove.
5719 (define_command, document_command, show_user_1): Update.
5720 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5721 a counted_command_line.
5722 * breakpoint.h (counted_command_line): Remove typedef.
5723 (breakpoint_set_commands): Update.
5724 * breakpoint.c (check_no_tracepoint_commands)
5725 (validate_commands_for_breakpoint): Update.
5726 (breakpoint_set_commands): Change commands to be a
5727 counted_command_line.
5728 (commands_command_1, update_dprintf_command_list)
5729 (create_tracepoint_from_upload): Update.
5731 2018-05-04 Tom Tromey <tom@tromey.com>
5733 * cli/cli-decode.h (cmd_list_element): New constructor.
5734 (~cmd_list_element): New destructor.
5735 (struct cmd_list_element): Add initializers.
5736 * cli/cli-decode.c (do_add_cmd): Use "new".
5737 (delete_cmd): Use "delete".
5739 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5740 Pedro Alves <palves@redhat.com>
5742 PR breakpoints/19806 and support for PR external/20207.
5743 * NEWS: Mention Aarch64 watchpoint improvements.
5744 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5745 watchpoints and PR external/20207 watchpoints.
5746 * nat/aarch64-linux-hw-point.c
5747 (kernel_supports_any_contiguous_range): New.
5748 (aarch64_watchpoint_offset): New.
5749 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5750 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5751 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5752 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5753 next_addr_orig_p. Support PR external/20207 watchpoints.
5754 (aarch64_downgrade_regs): New.
5755 (aarch64_dr_state_insert_one_point): New parameters offset and
5757 (aarch64_dr_state_remove_one_point): Likewise.
5758 (aarch64_handle_breakpoint): Update caller.
5759 (aarch64_handle_aligned_watchpoint): Likewise.
5760 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5762 (aarch64_linux_set_debug_regs): Remove const from state. Call
5763 aarch64_downgrade_regs.
5764 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5765 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5766 (DR_CONTROL_MASK): ... this.
5767 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5768 (unsigned int aarch64_watchpoint_offset): New prototype.
5769 (aarch64_linux_set_debug_regs): Remove const from state.
5770 * utils.c (align_up, align_down): Move to ...
5771 * common/common-utils.c (align_up, align_down): ... here.
5772 * utils.h (align_up, align_down): Move to ...
5773 * common/common-utils.h (align_up, align_down): ... here.
5775 2018-05-04 Joel Brobecker <brobecker@adacore.com>
5777 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5778 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5779 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5780 Re-implement to match the ABI as summarized in GCC's
5781 gcc/config/sparc/sparc.c. All callers updated.
5782 (sparc32_store_arguments): Remove assertion.
5784 2018-05-04 Tom Tromey <tom@tromey.com>
5786 * printcmd.c: Don't include tui.h.
5787 (decode_format): Use skip_spaces.
5789 2018-05-04 Tom Tromey <tom@tromey.com>
5792 * printcmd.c (last_count): New global.
5793 (x_command): Use saved count when repeating.
5795 2018-05-04 Tom Tromey <tom@tromey.com>
5797 * nto-procfs.c (do_closedir_cleanup): Remove.
5798 (procfs_pidlist): Use gdb_dir_up.
5799 * procfs.c (do_closedir_cleanup): Remove.
5800 (proc_update_threads): Use gdb_dir_up.
5801 * common/filestuff.h (struct gdb_dir_deleter): New.
5802 (gdb_dir_up): New typedef.
5804 2018-05-04 Tom Tromey <tom@tromey.com>
5806 * ada-lang.c (print_mention_exception): Use std::string.
5808 2018-05-04 Tom Tromey <tom@tromey.com>
5810 * ada-lang.c (create_excep_cond_exprs): Update.
5811 (ada_exception_catchpoint_cond_string): Use std::string.
5813 2018-05-04 Tom Tromey <tom@tromey.com>
5815 * ada-lang.c (xget_renaming_scope): Return std::string.
5816 (old_renaming_is_invisible): Update.
5818 2018-05-04 Tom Tromey <tom@tromey.com>
5820 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5821 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5823 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5825 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5827 2018-05-04 Tom Tromey <tom@tromey.com>
5829 * remote.c (remote_query_supported_append): Change type.
5830 (remote_check_symbols): Update.
5832 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5835 * configure.ac: Prepend libpython.
5836 * python/python-config.py: Likewise.
5837 * configure: Regenerate.
5839 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5841 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5843 2018-05-03 Pedro Alves <palves@redhat.com>
5846 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5847 override. Write 'true' instead of '1'.
5848 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5851 2018-05-02 Pedro Alves <palves@redhat.com>
5853 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5854 add_inf_child_target.
5855 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5856 add_inf_child_target.
5857 * aix-thread.c (aix_thread_target_info): New.
5858 (aix_thread_target) <shortname, longname, doc>: Delete.
5860 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5861 add_inf_child_target.
5862 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5863 add_inf_child_target.
5864 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5865 add_inf_child_target.
5866 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5867 add_inf_child_target.
5868 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5869 add_inf_child_target.
5870 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5871 add_inf_child_target.
5872 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5873 add_inf_child_target.
5874 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5875 add_inf_child_target.
5876 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5877 add_inf_child_target.
5878 * bfd-target.c (target_bfd_target_info): New.
5879 (target_bfd) <shortname, longname, doc>: Delete.
5881 * bsd-kvm.c (bsd_kvm_target_info): New.
5882 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5884 (bsd_kvm_target::open): Rename to ...
5885 (bsd_kvm_target_open): ... this. Adjust.
5886 * bsd-uthread.c (bsd_uthread_target_info): New.
5887 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5889 * corefile.c (core_file_command): Adjust.
5890 * corelow.c (core_target_info): New.
5891 (core_target) <shortname, longname, doc>: Delete.
5893 (core_target::open): Rename to ...
5894 (core_target_open): ... this. Adjust.
5895 * ctf.c (ctf_target_info): New.
5896 (ctf_target) <shortname, longname, doc>: Delete.
5898 (ctf_target::open): Rename to ...
5899 (ctf_target_open): ... this.
5900 (_initialize_ctf): Adjust.
5901 * exec.c (exec_target_info): New.
5902 (exec_target) <shortname, longname, doc>: Delete.
5904 (exec_target::open): Rename to ...
5905 (exec_target_open): ... this.
5906 * gdbcore.h (core_target_open): Declare.
5907 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5908 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5909 add_inf_child_target.
5910 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5911 add_inf_child_target.
5912 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5913 add_inf_child_target.
5914 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5915 add_inf_child_target.
5916 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5917 add_inf_child_target.
5918 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5919 add_inf_child_target.
5920 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5921 add_inf_child_target.
5922 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5923 add_inf_child_target.
5924 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5925 add_inf_child_target.
5926 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5927 add_inf_child_target.
5928 * inf-child.c (inf_child_target_info): New.
5929 (inf_child_target::info): New.
5930 (inf_child_open_target): Remove 'target' parameter. Use
5931 get_native_target instead.
5932 (inf_child_target::open): Delete.
5933 (add_inf_child_target): New.
5934 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5937 (add_inf_child_target): Declare.
5938 (inf_child_open_target): Declare.
5939 * linux-thread-db.c (thread_db_target_info): New.
5940 (thread_db_target) <shortname, longname, doc>: Delete.
5942 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5943 add_inf_child_target.
5944 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5945 add_inf_child_target.
5946 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5947 add_inf_child_target.
5948 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5949 add_inf_child_target.
5950 * make-target-delegates (print_class): Adjust.
5951 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5952 add_inf_child_target.
5953 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5954 add_inf_child_target.
5955 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5956 add_inf_child_target.
5957 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5958 add_inf_child_target.
5959 * nto-procfs.c (nto_native_target_info): New.
5960 (nto_procfs_target_native) <shortname, longname, doc>:
5963 (nto_procfs_target_info): New.
5964 (nto_procfs_target_procfs) <shortname, longname, doc>:
5967 (init_procfs_targets): Adjust.
5968 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5969 add_inf_child_target.
5970 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5971 add_inf_child_target.
5972 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5973 add_inf_child_target.
5974 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5975 add_inf_child_target.
5976 * ravenscar-thread.c (ravenscar_target_info): New.
5977 (ravenscar_thread_target) <shortname, longname, doc>:
5980 * record-btrace.c (record_btrace_target_info):
5981 (record_btrace_target) <shortname, longname, doc>: Delete.
5983 (record_btrace_target::open): Rename to ...
5984 (record_btrace_target_open): ... this. Adjust.
5985 * record-full.c (record_longname, record_doc): New.
5986 (record_full_base_target) <shortname, longname, doc>: Delete.
5988 (record_full_target_info): New.
5989 (record_full_target): <shortname>: Delete.
5991 (record_full_core_open_1, record_full_open_1): Update comments.
5992 (record_full_base_target::open): Rename to ...
5993 (record_full_open): ... this.
5994 (cmd_record_full_restore): Update.
5995 (_initialize_record_full): Update.
5996 * remote-sim.c (remote_sim_target_info): New.
5997 (gdbsim_target) <shortname, longname, doc>: Delete.
5999 (gdbsim_target::open): Rename to ...
6000 (gdbsim_target_open): ... this.
6001 (_initialize_remote_sim): Adjust.
6002 * remote.c (remote_doc): New.
6003 (remote_target_info): New.
6004 (remote_target) <shortname, longname, doc>: Delete.
6006 (extended_remote_target_info): New.
6007 (extended_remote_target) <shortname, longname, doc>: Delete.
6009 (remote_target::open_1): Make static. Adjust.
6010 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6011 * s390-linux-nat.c (_initialize_s390_nat): Use
6012 add_inf_child_target.
6013 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6014 add_inf_child_target.
6015 * sol-thread.c (thread_db_target_info): New.
6016 (sol_thread_target) <shortname, longname, doc>: Delete.
6018 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6019 add_inf_child_target.
6020 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6021 add_inf_child_target.
6022 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6023 add_inf_child_target.
6024 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6025 add_inf_child_target.
6026 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6027 add_inf_child_target.
6028 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6029 add_inf_child_target.
6030 * spu-linux-nat.c (_initialize_spu_nat): Use
6031 add_inf_child_target.
6032 * spu-multiarch.c (spu_multiarch_target_info): New.
6033 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6035 * target-delegates.c: Regenerate.
6036 * target.c: Include <unordered_map>.
6037 (target_ops_p): Delete.
6038 (DEF_VEC_P(target_ops_p)): Delete.
6039 (target_factories): New.
6040 (test_target_info): New.
6041 (test_target_ops::info): New.
6042 (open_target): Adjust to use target_factories.
6043 (add_target_with_completer): Rename to ...
6044 (add_target): ... this. Change prototype. Register target_info
6045 and open callback in target_factories. Register target_info in
6046 command context instead of target_ops.
6047 (add_target): Delete old implementation.
6048 (add_deprecated_target_alias): Change prototype. Adjust.
6049 (the_native_target): New.
6050 (set_native_target, get_native_target): New.
6051 (find_default_run_target): Use the_native_target.
6052 (find_attach_target, find_run_target): Simplify.
6053 (target_ops::open): Delete.
6054 (dummy_target_info): New.
6055 (dummy_target::shortname, dummy_target::longname)
6056 (dummy_target::doc): Delete.
6057 (dummy_target::info): New.
6058 (debug_target::shortname, debug_target::longname)
6059 (debug_target::doc): Delete.
6060 (debug_target::info): New.
6061 * target.h (struct target_info): New.
6062 (target_ops::~target_ops): Add comment.
6063 (target_ops::info): New.
6064 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6065 longer virtual. Implement in terms of target_info.
6066 (set_native_target, get_native_target): Declare.
6067 (target_open_ftype): New.
6068 (add_target, add_target_with_completer)
6069 (add_deprecated_target_alias): Change prototype.
6070 (test_target) <shortname, longname, doc>: Delete.
6072 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6073 add_inf_child_target.
6074 * tracefile-tfile.c (tfile_target_info): New.
6075 (tfile_target) <shortname, longname, doc>: Delete.
6077 (tfile_target::open): Rename to ...
6078 (tfile_target_open): ... this.
6079 (_initialize_tracefile_tfile): Adjust.
6080 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6081 add_inf_child_target.
6082 * windows-nat.c (_initialize_windows_nat): Use
6083 add_inf_child_target.
6084 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6085 add_inf_child_target.
6087 2018-05-02 Pedro Alves <palves@redhat.com>
6089 * linux-nat.h (linux_nat_target) <low_new_thread,
6090 low_delete_thread, low_new_fork, low_forget_process,
6091 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6092 New virtual methods.
6093 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6094 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6095 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6096 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6097 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6099 * linux-fork.c (delete_fork): Adjust to call low method.
6100 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6101 (linux_nat_new_fork, linux_nat_forget_process_hook)
6102 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6103 (linux_nat_status_is_event):
6104 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6105 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6107 (sigtrap_is_event): Rename to ...
6108 (linux_nat_target::low_status_is_event): ... this.
6109 (linux_nat_set_status_is_event): Delete.
6110 (save_stop_reason, linux_nat_wait_1)
6111 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6113 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6114 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6115 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6116 (linux_nat_set_prepare_to_resume): Delete.
6117 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6118 low virtual methods.
6119 * amd64-linux-nat.c: Likewise.
6120 * arm-linux-nat.c: Likewise.
6121 * i386-linux-nat.c: Likewise.
6122 * ia64-linux-nat.c: Likewise.
6123 * mips-linux-nat.c: Likewise.
6124 * ppc-linux-nat.c: Likewise.
6125 * s390-linux-nat.c: Likewise.
6126 * sparc64-linux-nat.c: Likewise.
6127 * x86-linux-nat.c: Likewise.
6128 * x86-linux-nat.h: Include "nat/x86-linux.h".
6129 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6130 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6133 2018-05-02 Pedro Alves <palves@redhat.com>
6135 * target.h (target_ops)
6136 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6137 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6138 stopped_by_watchpoint, have_continuable_watchpoint,
6139 stopped_data_address, watchpoint_addr_within_range,
6140 can_accel_watchpoint_condition, can_run, thread_alive,
6141 has_all_memory, has_memory, has_stack, has_registers,
6142 has_execution, can_async_p, is_async_p, supports_non_stop,
6143 always_non_stop_p, can_execute_reverse, supports_multi_process,
6144 supports_enable_disable_tracepoint,
6145 supports_disable_randomization, supports_string_tracing,
6146 supports_evaluation_of_breakpoint_conditions,
6147 can_run_breakpoint_commands, filesystem_is_local,
6148 can_download_tracepoint, get_trace_state_variable_value,
6149 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6150 record_is_replaying, record_will_replay,
6151 augmented_libraries_svr4_read>: Adjust to return bool.
6152 * aarch64-linux-nat.c: All implementations adjusted.
6153 * aix-thread.c: All implementations adjusted.
6154 * arm-linux-nat.c: All implementations adjusted.
6155 * breakpoint.c: All implementations adjusted.
6156 * bsd-kvm.c: All implementations adjusted.
6157 * bsd-uthread.c: All implementations adjusted.
6158 * corelow.c: All implementations adjusted.
6159 * ctf.c: All implementations adjusted.
6160 * darwin-nat.c: All implementations adjusted.
6161 * darwin-nat.h: All implementations adjusted.
6162 * exec.c: All implementations adjusted.
6163 * fbsd-nat.c: All implementations adjusted.
6164 * fbsd-nat.h: All implementations adjusted.
6165 * gnu-nat.c: All implementations adjusted.
6166 * gnu-nat.h: All implementations adjusted.
6167 * go32-nat.c: All implementations adjusted.
6168 * ia64-linux-nat.c: All implementations adjusted.
6169 * inf-child.c: All implementations adjusted.
6170 * inf-child.h: All implementations adjusted.
6171 * inf-ptrace.c: All implementations adjusted.
6172 * inf-ptrace.h: All implementations adjusted.
6173 * linux-nat.c: All implementations adjusted.
6174 * linux-nat.h: All implementations adjusted.
6175 * mips-linux-nat.c: All implementations adjusted.
6176 * nto-procfs.c: All implementations adjusted.
6177 * ppc-linux-nat.c: All implementations adjusted.
6178 * procfs.c: All implementations adjusted.
6179 * ravenscar-thread.c: All implementations adjusted.
6180 * record-btrace.c: All implementations adjusted.
6181 * record-full.c: All implementations adjusted.
6182 * remote-sim.c: All implementations adjusted.
6183 * remote.c: All implementations adjusted.
6184 * s390-linux-nat.c: All implementations adjusted.
6185 * sol-thread.c: All implementations adjusted.
6186 * spu-multiarch.c: All implementations adjusted.
6187 * target-delegates.c: All implementations adjusted.
6188 * target.c: All implementations adjusted.
6189 * target.h: All implementations adjusted.
6190 * tracefile-tfile.c: All implementations adjusted.
6191 * tracefile.c: All implementations adjusted.
6192 * tracefile.h: All implementations adjusted.
6193 * windows-nat.c: All implementations adjusted.
6194 * x86-linux-nat.h: All implementations adjusted.
6195 * x86-nat.h: All implementations adjusted.
6197 2018-05-02 Pedro Alves <palves@redhat.com>
6199 * make-target-delegates (scan_target_h): Don't trim lines here.
6200 Replace sequences of tabs and/or whitespace with a single
6202 (top level, parsing methods): Trim each line before processing it
6205 2018-05-02 Pedro Alves <palves@redhat.com>
6206 John Baldwin <jhb@freebsd.org>
6208 * target.h (enum strata) <debug_stratum>: New.
6209 (struct target_ops) <all delegation methods>: Replace by C++
6210 virtual methods, and drop "to_" prefix. All references updated
6212 <to_shortname, to_longname, to_doc, to_data,
6213 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6214 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6215 virtual methods. All references updated throughout.
6216 <can_attach, supports_terminal_ours, can_create_inferior,
6217 get_thread_control_capabilities, attach_no_wait>: New
6219 <insert_breakpoint, remove_breakpoint>: Now
6220 TARGET_DEFAULT_NORETURN methods.
6221 <info_proc>: Now returns bool.
6223 (OPS_MAGIC): Delete.
6224 (current_target): Delete. All references replaced by references
6226 (target_stack): ... this. New.
6227 (target_shortname, target_longname): Adjust.
6228 (target_can_run): Now a function declaration.
6229 (default_child_has_all_memory, default_child_has_memory)
6230 (default_child_has_stack, default_child_has_registers)
6231 (default_child_has_execution): Remove target_ops parameter.
6232 (complete_target_initialization): Delete.
6233 (memory_breakpoint_target): New template class.
6234 (test_target_ops): Refactor as a C++ class with virtual methods.
6235 * make-target-delegates (NAME_PART): Tighten.
6236 (POINTER_PART, CP_SYMBOL): New.
6237 (SIMPLE_RETURN_PART): Reimplement.
6238 (VEC_RETURN_PART): Expect less.
6239 (RETURN_PART, VIRTUAL_PART): New.
6240 (METHOD): Adjust to C++ virtual methods.
6241 (scan_target_h): Remove reference to C99.
6242 (dname): Output "target_ops::" prefix.
6243 (write_function_header): Adjust to output a C++ class method.
6244 (write_declaration): New.
6245 (write_delegator): Adjust to output a C++ class method.
6246 (tdname): Output "dummy_target::" prefix.
6247 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6249 (tdefault_names, debug_names): Delete.
6250 (return_types, tdefaults, styles, argtypes_array): New.
6251 (top level): All methods are delegators.
6253 (top level): Print dummy_target and debug_target classes.
6254 * target-delegates.c: Regenerate.
6255 * target-debug.h (target_debug_print_enum_info_proc_what)
6256 (target_debug_print_thread_control_capabilities)
6257 (target_debug_print_thread_info_p): New.
6258 * target.c (dummy_target): Delete.
6259 (the_dummy_target, the_debug_target): New.
6260 (target_stack): Now extern.
6261 (set_targetdebug): Push/unpush debug target.
6262 (default_child_has_all_memory, default_child_has_memory)
6263 (default_child_has_stack, default_child_has_registers)
6264 (default_child_has_execution): Remove target_ops parameter.
6265 (complete_target_initialization): Delete.
6266 (add_target_with_completer): No longer call
6267 complete_target_initialization.
6268 (target_supports_terminal_ours): Use regular delegation.
6269 (update_current_target): Delete.
6270 (push_target): No longer check magic number. Don't call
6271 update_current_target.
6272 (unpush_target): Don't call update_current_target.
6273 (target_is_pushed): No longer check magic number.
6274 (target_require_runnable): Skip for all stratums over
6276 (target_ops::info_proc): New.
6277 (target_info_proc): Use find_target_at and
6278 find_default_run_target.
6279 (target_supports_disable_randomization): Use regular delegation.
6280 (target_get_osdata): Use find_target_at.
6281 (target_ops::open, target_ops::close, target_ops::can_attach)
6282 (target_ops::attach, target_ops::can_create_inferior)
6283 (target_ops::create_inferior, target_ops::can_run)
6284 (target_can_run): New.
6285 (default_fileio_target): Use regular delegation.
6286 (target_ops::fileio_open, target_ops::fileio_pwrite)
6287 (target_ops::fileio_pread, target_ops::fileio_fstat)
6288 (target_ops::fileio_close, target_ops::fileio_unlink)
6289 (target_ops::fileio_readlink): New.
6290 (target_fileio_open_1, target_fileio_unlink)
6291 (target_fileio_readlink): Always call the target method. Handle
6293 (return_zero, return_zero_has_execution): Delete.
6294 (init_dummy_target): Delete.
6295 (dummy_target::dummy_target, dummy_target::shortname)
6296 (dummy_target::longname, dummy_target::doc)
6297 (debug_target::debug_target, debug_target::shortname)
6298 (debug_target::longname, debug_target::doc): New.
6299 (target_supports_delete_record): Use regular delegation.
6300 (setup_target_debug): Delete.
6301 (maintenance_print_target_stack): Skip debug_stratum.
6302 (initialize_targets): Instantiate the_dummy_target and
6304 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
6306 (target_auxv_search, fprint_target_auxv): Adjust.
6307 (info_auxv_command): Adjust to use target_stack.
6308 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6309 * exceptions.c (print_flush): Handle a NULL target_stack.
6310 * regcache.c (target_ops_no_register): Refactor as class with
6313 * exec.c (exec_target): New class.
6314 (exec_ops): Now an exec_target.
6315 (exec_open, exec_close_1, exec_get_section_table)
6316 (exec_xfer_partial, exec_files_info, exec_has_memory)
6317 (exec_make_note_section): Refactor as exec_target methods.
6318 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6320 (exec_target::find_memory_regions): New.
6321 (_initialize_exec): Don't call init_exec_ops.
6322 * gdbcore.h (exec_file_clear): Delete.
6324 * corefile.c (core_target): Delete.
6325 (core_file_command): Adjust.
6326 * corelow.c (core_target): New class.
6327 (the_core_target): New.
6328 (core_close): Remove target_ops parameter.
6329 (core_close_cleanup): Adjust.
6330 (core_target::close): New.
6331 (core_open, core_detach, get_core_registers, core_files_info)
6332 (core_xfer_partial, core_thread_alive, core_read_description)
6333 (core_pid_to_str, core_thread_name, core_has_memory)
6334 (core_has_stack, core_has_registers, core_info_proc): Rework as
6335 core_target methods.
6336 (ignore, core_remove_breakpoint, init_core_ops): Delete.
6337 (_initialize_corelow): Initialize the_core_target.
6338 * gdbcore.h (core_target): Delete.
6339 (the_core_target): New.
6341 * ctf.c: (ctf_target): New class.
6342 (ctf_ops): Now a ctf_target.
6343 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6344 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6345 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6347 (init_ctf_ops): Delete.
6348 (_initialize_ctf): Don't call it.
6349 * tracefile-tfile.c (tfile_target): New class.
6350 (tfile_ops): Now a tfile_target.
6351 (tfile_open, tfile_close, tfile_files_info)
6352 (tfile_get_tracepoint_status, tfile_trace_find)
6353 (tfile_fetch_registers, tfile_xfer_partial)
6354 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6355 Refactor as tfile_target methods.
6356 (tfile_xfer_partial_features): Remove target_ops parameter.
6357 (init_tfile_ops): Delete.
6358 (_initialize_tracefile_tfile): Don't call it.
6359 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6360 (tracefile_has_stack, tracefile_has_registers)
6361 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6362 tracefile_target methods.
6363 (init_tracefile_ops): Delete.
6364 (tracefile_target::tracefile_target): New.
6365 * tracefile.h: Include "target.h".
6366 (tracefile_target): New class.
6367 (init_tracefile_ops): Delete.
6369 * spu-multiarch.c (spu_multiarch_target): New class.
6370 (spu_ops): Now a spu_multiarch_target.
6371 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6372 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6373 (spu_search_memory, spu_mourn_inferior): Refactor as
6374 spu_multiarch_target methods.
6375 (init_spu_ops): Delete.
6376 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6377 complete_target_initialization.
6379 * ravenscar-thread.c (ravenscar_thread_target): New class.
6380 (ravenscar_ops): Now a ravenscar_thread_target.
6381 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6382 (ravenscar_thread_alive, ravenscar_pid_to_str)
6383 (ravenscar_fetch_registers, ravenscar_store_registers)
6384 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6385 (ravenscar_stopped_by_hw_breakpoint)
6386 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6387 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6388 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6390 (init_ravenscar_thread_ops): Delete.
6391 (_initialize_ravenscar): Remove references to
6392 init_ravenscar_thread_ops and complete_target_initialization.
6394 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6395 (bsd_uthread_target): New class.
6396 (bsd_uthread_ops): Now a bsd_uthread_target.
6397 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6398 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6399 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6400 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6401 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6402 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6403 (bsd_uthread_target): Delete function.
6404 (_initialize_bsd_uthread): Remove reference to
6405 complete_target_initialization.
6407 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6408 (target_bfd): ... this new class.
6409 (target_bfd_xfer_partial, target_bfd_get_section_table)
6410 (target_bfd_close): Refactor as target_bfd methods.
6411 (target_bfd::~target_bfd): New.
6412 (target_bfd_reopen): Adjust.
6413 (target_bfd::close): New.
6415 * record-btrace.c (record_btrace_target): New class.
6416 (record_btrace_ops): Now a record_btrace_target.
6417 (record_btrace_open, record_btrace_stop_recording)
6418 (record_btrace_disconnect, record_btrace_close)
6419 (record_btrace_async, record_btrace_info)
6420 (record_btrace_insn_history, record_btrace_insn_history_range)
6421 (record_btrace_insn_history_from, record_btrace_call_history)
6422 (record_btrace_call_history_range)
6423 (record_btrace_call_history_from, record_btrace_record_method)
6424 (record_btrace_is_replaying, record_btrace_will_replay)
6425 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6426 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6427 (record_btrace_store_registers, record_btrace_prepare_to_store)
6428 (record_btrace_to_get_unwinder)
6429 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6430 (record_btrace_commit_resume, record_btrace_wait)
6431 (record_btrace_stop, record_btrace_can_execute_reverse)
6432 (record_btrace_stopped_by_sw_breakpoint)
6433 (record_btrace_supports_stopped_by_sw_breakpoint)
6434 (record_btrace_stopped_by_hw_breakpoint)
6435 (record_btrace_supports_stopped_by_hw_breakpoint)
6436 (record_btrace_update_thread_list, record_btrace_thread_alive)
6437 (record_btrace_goto_begin, record_btrace_goto_end)
6438 (record_btrace_goto, record_btrace_stop_replaying_all)
6439 (record_btrace_execution_direction)
6440 (record_btrace_prepare_to_generate_core)
6441 (record_btrace_done_generating_core): Refactor as
6442 record_btrace_target methods.
6443 (init_record_btrace_ops): Delete.
6444 (_initialize_record_btrace): Remove reference to
6445 init_record_btrace_ops.
6446 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6447 the execution_direction global.
6448 (record_full_base_target, record_full_target)
6449 (record_full_core_target): New classes.
6450 (record_full_ops): Now a record_full_target.
6451 (record_full_core_ops): Now a record_full_core_target.
6452 (record_full_target::detach, record_full_target::disconnect)
6453 (record_full_core_target::disconnect)
6454 (record_full_target::mourn_inferior, record_full_target::kill):
6456 (record_full_open, record_full_close, record_full_async): Refactor
6457 as methods of the record_full_base_target class.
6458 (record_full_resume, record_full_commit_resume): Refactor
6459 as methods of the record_full_target class.
6460 (record_full_wait, record_full_stopped_by_watchpoint)
6461 (record_full_stopped_data_address)
6462 (record_full_stopped_by_sw_breakpoint)
6463 (record_full_supports_stopped_by_sw_breakpoint)
6464 (record_full_stopped_by_hw_breakpoint)
6465 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6466 methods of the record_full_base_target class.
6467 (record_full_store_registers, record_full_xfer_partial)
6468 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6469 Refactor as methods of the record_full_target class.
6470 (record_full_can_execute_reverse, record_full_get_bookmark)
6471 (record_full_goto_bookmark, record_full_execution_direction)
6472 (record_full_record_method, record_full_info, record_full_delete)
6473 (record_full_is_replaying, record_full_will_replay)
6474 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6475 (record_full_stop_replaying): Refactor as methods of the
6476 record_full_base_target class.
6477 (record_full_core_resume, record_full_core_kill)
6478 (record_full_core_fetch_registers)
6479 (record_full_core_prepare_to_store)
6480 (record_full_core_store_registers, record_full_core_xfer_partial)
6481 (record_full_core_insert_breakpoint)
6482 (record_full_core_remove_breakpoint)
6483 (record_full_core_has_execution): Refactor
6484 as methods of the record_full_core_target class.
6485 (record_full_base_target::supports_delete_record): New.
6486 (init_record_full_ops): Delete.
6487 (init_record_full_core_ops): Delete.
6488 (record_full_save): Refactor as method of the
6489 record_full_base_target class.
6490 (_initialize_record_full): Remove references to
6491 init_record_full_ops and init_record_full_core_ops.
6493 * remote.c (remote_target, extended_remote_target): New classes.
6494 (remote_ops): Now a remote_target.
6495 (extended_remote_ops): Now an extended_remote_target.
6496 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6497 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6498 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6499 (remote_pass_signals, remote_set_syscall_catchpoint)
6500 (remote_program_signals, )
6501 (remote_thread_always_alive): Remove target_ops parameter.
6502 (remote_thread_alive, remote_thread_name)
6503 (remote_update_thread_list, remote_threads_extra_info)
6504 (remote_static_tracepoint_marker_at)
6505 (remote_static_tracepoint_markers_by_strid)
6506 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6507 (remote_open): Refactor as methods of remote_target.
6508 (extended_remote_open, extended_remote_detach)
6509 (extended_remote_attach, extended_remote_post_attach):
6510 (extended_remote_supports_disable_randomization)
6511 (extended_remote_create_inferior): : Refactor as method of
6512 extended_remote_target.
6513 (remote_set_permissions, remote_open_1, remote_detach)
6514 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6515 (remote_resume, remote_commit_resume, remote_stop)
6516 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6517 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6518 (remote_prepare_to_store, remote_store_registers)
6519 (remote_flash_erase, remote_flash_done, remote_files_info)
6520 (remote_kill, remote_mourn, remote_insert_breakpoint)
6521 (remote_remove_breakpoint, remote_insert_watchpoint)
6522 (remote_watchpoint_addr_within_range)
6523 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6524 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6525 (remote_supports_stopped_by_sw_breakpoint)
6526 (remote_stopped_by_hw_breakpoint)
6527 (remote_supports_stopped_by_hw_breakpoint)
6528 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6529 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6530 (remote_verify_memory): Refactor as methods of remote_target.
6531 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6533 (remote_xfer_partial, remote_get_memory_xfer_limit)
6534 (remote_search_memory, remote_rcmd, remote_memory_map)
6535 (remote_pid_to_str, remote_get_thread_local_address)
6536 (remote_get_tib_address, remote_read_description): Refactor as
6537 methods of remote_target.
6538 (remote_target::fileio_open, remote_target::fileio_pwrite)
6539 (remote_target::fileio_pread, remote_target::fileio_close): New.
6540 (remote_hostio_readlink, remote_hostio_fstat)
6541 (remote_filesystem_is_local, remote_can_execute_reverse)
6542 (remote_supports_non_stop, remote_supports_disable_randomization)
6543 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6544 (remote_supports_enable_disable_tracepoint)
6545 (remote_supports_string_tracing)
6546 (remote_can_run_breakpoint_commands, remote_trace_init)
6547 (remote_download_tracepoint, remote_can_download_tracepoint)
6548 (remote_download_trace_state_variable, remote_enable_tracepoint)
6549 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6550 (remote_trace_start, remote_get_trace_status)
6551 (remote_get_tracepoint_status, remote_trace_stop)
6552 (remote_trace_find, remote_get_trace_state_variable_value)
6553 (remote_save_trace_data, remote_get_raw_trace_data)
6554 (remote_set_disconnected_tracing, remote_core_of_thread)
6555 (remote_set_circular_trace_buffer, remote_traceframe_info)
6556 (remote_get_min_fast_tracepoint_insn_len)
6557 (remote_set_trace_buffer_size, remote_set_trace_notes)
6558 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6559 (remote_disable_btrace, remote_teardown_btrace)
6560 (remote_read_btrace, remote_btrace_conf)
6561 (remote_augmented_libraries_svr4_read, remote_load)
6562 (remote_pid_to_exec_file, remote_can_do_single_step)
6563 (remote_execution_direction, remote_thread_handle_to_thread_info):
6564 Refactor as methods of remote_target.
6565 (init_remote_ops, init_extended_remote_ops): Delete.
6566 (remote_can_async_p, remote_is_async_p, remote_async)
6567 (remote_thread_events, remote_upload_tracepoints)
6568 (remote_upload_trace_state_variables): Refactor as methods of
6570 (_initialize_remote): Remove references to init_remote_ops and
6571 init_extended_remote_ops.
6573 * remote-sim.c (gdbsim_target): New class.
6574 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6575 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6576 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6577 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6578 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6579 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6580 Refactor as methods of gdbsim_target.
6581 (gdbsim_ops): Now a gdbsim_target.
6582 (init_gdbsim_ops): Delete.
6583 (gdbsim_cntrl_c): Adjust.
6584 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6586 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6587 (the_amd64_linux_nat_target): New.
6588 (amd64_linux_fetch_inferior_registers)
6589 (amd64_linux_store_inferior_registers): Refactor as methods of
6590 amd64_linux_nat_target.
6591 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6592 * i386-linux-nat.c: Don't include "linux-nat.h".
6593 (i386_linux_nat_target): New class.
6594 (the_i386_linux_nat_target): New.
6595 (i386_linux_fetch_inferior_registers)
6596 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6597 as methods of i386_linux_nat_target.
6598 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6599 * inf-child.c (inf_child_ops): Delete.
6600 (inf_child_fetch_inferior_registers)
6601 (inf_child_store_inferior_registers): Delete.
6602 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6603 methods of inf_child_target.
6604 (inf_child_target::supports_terminal_ours)
6605 (inf_child_target::terminal_init)
6606 (inf_child_target::terminal_inferior)
6607 (inf_child_target::terminal_ours_for_output)
6608 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6609 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6611 (inf_child_open, inf_child_disconnect, inf_child_close)
6612 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6613 (inf_child_post_startup_inferior, inf_child_can_run)
6614 (inf_child_pid_to_exec_file): Refactor as methods of
6616 (inf_child_follow_fork): Delete.
6617 (inf_child_target::can_create_inferior)
6618 (inf_child_target::can_attach): New.
6619 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6620 (inf_child_target::has_stack, inf_child_target::has_registers)
6621 (inf_child_target::has_execution): New.
6622 (inf_child_fileio_open, inf_child_fileio_pwrite)
6623 (inf_child_fileio_pread, inf_child_fileio_fstat)
6624 (inf_child_fileio_close, inf_child_fileio_unlink)
6625 (inf_child_fileio_readlink, inf_child_use_agent)
6626 (inf_child_can_use_agent): Refactor as methods of
6628 (return_zero, inf_child_target): Delete.
6629 (inf_child_target::inf_child_target): New.
6630 * inf-child.h: Include "target.h".
6631 (inf_child_target): Delete function prototype.
6632 (inf_child_target): New class.
6633 (inf_child_open_target, inf_child_mourn_inferior)
6634 (inf_child_maybe_unpush_target): Delete.
6635 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6636 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6637 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6638 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6639 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6640 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6641 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6642 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6643 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6644 methods of inf_ptrace_target.
6645 (inf_ptrace_target): Delete function.
6646 * inf-ptrace.h: Include "inf-child.h".
6647 (inf_ptrace_target): Delete function declaration.
6648 (inf_ptrace_target): New class.
6649 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6650 * linux-nat.c (linux_target): New.
6651 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6652 (linux_nat_target::~linux_nat_target): New.
6653 (linux_child_post_attach, linux_child_post_startup_inferior)
6654 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6655 (linux_child_remove_fork_catchpoint)
6656 (linux_child_insert_vfork_catchpoint)
6657 (linux_child_remove_vfork_catchpoint)
6658 (linux_child_insert_exec_catchpoint)
6659 (linux_child_remove_exec_catchpoint)
6660 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6661 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6662 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6663 (linux_nat_stopped_data_address)
6664 (linux_nat_stopped_by_sw_breakpoint)
6665 (linux_nat_supports_stopped_by_sw_breakpoint)
6666 (linux_nat_stopped_by_hw_breakpoint)
6667 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6668 (linux_nat_kill, linux_nat_mourn_inferior)
6669 (linux_nat_xfer_partial, linux_nat_thread_alive)
6670 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6671 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6672 (linux_child_static_tracepoint_markers_by_strid)
6673 (linux_nat_is_async_p, linux_nat_can_async_p)
6674 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6675 (linux_nat_supports_multi_process)
6676 (linux_nat_supports_disable_randomization, linux_nat_async)
6677 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6678 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6679 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6680 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6681 methods of linux_nat_target.
6682 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6683 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6685 (check_stopped_by_watchpoint): Adjust.
6686 (linux_xfer_partial): Delete.
6687 (linux_target_install_ops, linux_target, linux_nat_add_target):
6689 (linux_nat_target::linux_nat_target): New.
6690 * linux-nat.h: Include "inf-ptrace.h".
6691 (linux_nat_target): New.
6692 (linux_target, linux_target_install_ops, linux_nat_add_target):
6693 Delete function declarations.
6694 (linux_target): Declare global.
6695 * linux-thread-db.c (thread_db_target): New.
6696 (thread_db_target::thread_db_target): New.
6697 (thread_db_ops): Delete.
6698 (the_thread_db_target): New.
6699 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6700 (thread_db_update_thread_list, thread_db_pid_to_str)
6701 (thread_db_extra_thread_info)
6702 (thread_db_thread_handle_to_thread_info)
6703 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6704 (thread_db_resume): Refactor as methods of thread_db_target.
6705 (init_thread_db_ops): Delete.
6706 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6707 * x86-linux-nat.c: Don't include "linux-nat.h".
6708 (super_post_startup_inferior): Delete.
6709 (x86_linux_nat_target::~x86_linux_nat_target): New.
6710 (x86_linux_child_post_startup_inferior)
6711 (x86_linux_read_description, x86_linux_enable_btrace)
6712 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6713 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6714 methods of x86_linux_nat_target.
6715 (x86_linux_create_target): Delete. Bits folded ...
6716 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6718 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6719 (x86_linux_nat_target): New class.
6720 (x86_linux_create_target): Delete.
6721 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6722 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6723 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6724 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6725 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6726 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6728 (x86_use_watchpoints): Delete.
6729 * x86-nat.h: Include "breakpoint.h" and "target.h".
6730 (x86_use_watchpoints): Delete.
6731 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6732 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6733 (x86_insert_watchpoint, x86_remove_watchpoint)
6734 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6735 (x86_stopped_by_hw_breakpoint): New declarations.
6736 (x86_nat_target): New template class.
6738 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6739 (the_ppc_linux_nat_target): New.
6740 (ppc_linux_fetch_inferior_registers)
6741 (ppc_linux_can_use_hw_breakpoint)
6742 (ppc_linux_region_ok_for_hw_watchpoint)
6743 (ppc_linux_ranged_break_num_registers)
6744 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6745 (ppc_linux_insert_mask_watchpoint)
6746 (ppc_linux_remove_mask_watchpoint)
6747 (ppc_linux_can_accel_watchpoint_condition)
6748 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6749 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6750 (ppc_linux_watchpoint_addr_within_range)
6751 (ppc_linux_masked_watch_num_registers)
6752 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6753 (ppc_linux_read_description): Refactor as methods of
6754 ppc_linux_nat_target.
6755 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6757 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6758 (procfs_target): New class.
6759 (the_procfs_target): New.
6760 (procfs_target): Delete function.
6761 (procfs_auxv_parse, procfs_attach, procfs_detach)
6762 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6763 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6764 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6765 (procfs_create_inferior, procfs_update_thread_list)
6766 (procfs_thread_alive, procfs_pid_to_str)
6767 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6768 (procfs_stopped_data_address, procfs_insert_watchpoint)
6769 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6770 (proc_find_memory_regions, procfs_info_proc)
6771 (procfs_make_note_section): Refactor as methods of procfs_target.
6772 (_initialize_procfs): Adjust.
6773 * sol-thread.c (sol_thread_target): New class.
6774 (sol_thread_ops): Now a sol_thread_target.
6775 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6776 (sol_thread_fetch_registers, sol_thread_store_registers)
6777 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6778 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6779 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6780 (init_sol_thread_ops): Delete.
6781 (_initialize_sol_thread): Adjust. Remove references to
6782 init_sol_thread_ops and complete_target_initialization.
6784 * windows-nat.c (windows_nat_target): New class.
6785 (windows_fetch_inferior_registers)
6786 (windows_store_inferior_registers, windows_resume, windows_wait)
6787 (windows_attach, windows_detach, windows_pid_to_exec_file)
6788 (windows_files_info, windows_create_inferior)
6789 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6790 (windows_close, windows_pid_to_str, windows_xfer_partial)
6791 (windows_get_tib_address, windows_get_ada_task_ptid)
6792 (windows_thread_name, windows_thread_alive): Refactor as
6793 windows_nat_target methods.
6794 (do_initial_windows_stuff): Adjust.
6795 (windows_target): Delete function.
6796 (_initialize_windows_nat): Adjust.
6798 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6799 (darwin_mourn_inferior, darwin_kill_inferior)
6800 (darwin_create_inferior, darwin_attach, darwin_detach)
6801 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6802 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6803 (darwin_supports_multi_process): Refactor as darwin_nat_target
6805 (darwin_resume_to, darwin_files_info): Delete.
6806 (_initialize_darwin_inferior): Rename to ...
6807 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6808 * darwin-nat.h: Include "inf-child.h".
6809 (darwin_nat_target): New class.
6810 (darwin_complete_target): Delete.
6811 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6812 (darwin_target): New.
6813 (i386_darwin_fetch_inferior_registers)
6814 (i386_darwin_store_inferior_registers): Refactor as methods of
6816 (darwin_complete_target): Delete, with ...
6817 (_initialize_i386_darwin_nat): ... bits factored out here.
6819 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6820 (the_alpha_linux_nat_target): New.
6821 (alpha_linux_register_u_offset): Refactor as
6822 alpha_linux_nat_target method.
6823 (_initialize_alpha_linux_nat): Adjust.
6824 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6825 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6826 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6827 methods of linux_nat_trad_target.
6828 (linux_trad_target): Delete.
6829 * linux-nat-trad.h (linux_trad_target): Delete function.
6830 (linux_nat_trad_target): New class.
6831 * mips-linux-nat.c (mips_linux_nat_target): New class.
6832 (super_fetch_registers, super_store_registers, super_close):
6834 (the_mips_linux_nat_target): New.
6835 (mips64_linux_regsets_fetch_registers)
6836 (mips64_linux_regsets_store_registers)
6837 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6838 (mips_linux_register_u_offset, mips_linux_read_description)
6839 (mips_linux_can_use_hw_breakpoint)
6840 (mips_linux_stopped_by_watchpoint)
6841 (mips_linux_stopped_data_address)
6842 (mips_linux_region_ok_for_hw_watchpoint)
6843 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6844 (mips_linux_close): Refactor as methods of mips_linux_nat.
6845 (_initialize_mips_linux_nat): Adjust to C++ification.
6847 * aix-thread.c (aix_thread_target): New class.
6848 (aix_thread_ops): Now an aix_thread_target.
6849 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6850 (aix_thread_fetch_registers, aix_thread_store_registers)
6851 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6852 (aix_thread_thread_alive, aix_thread_pid_to_str)
6853 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6854 Refactor as methods of aix_thread_target.
6855 (init_aix_thread_ops): Delete.
6856 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6857 and complete_target_initialization.
6858 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6859 (rs6000_nat_target): New class.
6860 (the_rs6000_nat_target): New.
6861 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6862 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6863 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6864 (super_create_inferior): Delete.
6865 (_initialize_rs6000_nat): Adjust to C++ification.
6867 * arm-linux-nat.c (arm_linux_nat_target): New class.
6868 (the_arm_linux_nat_target): New.
6869 (arm_linux_fetch_inferior_registers)
6870 (arm_linux_store_inferior_registers, arm_linux_read_description)
6871 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6872 (arm_linux_remove_hw_breakpoint)
6873 (arm_linux_region_ok_for_hw_watchpoint)
6874 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6875 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6876 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6877 arm_linux_nat_target.
6878 (_initialize_arm_linux_nat): Adjust to C++ification.
6880 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6881 (the_aarch64_linux_nat_target): New.
6882 (aarch64_linux_fetch_inferior_registers)
6883 (aarch64_linux_store_inferior_registers)
6884 (aarch64_linux_child_post_startup_inferior)
6885 (aarch64_linux_read_description)
6886 (aarch64_linux_can_use_hw_breakpoint)
6887 (aarch64_linux_insert_hw_breakpoint)
6888 (aarch64_linux_remove_hw_breakpoint)
6889 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6890 (aarch64_linux_region_ok_for_hw_watchpoint)
6891 (aarch64_linux_stopped_data_address)
6892 (aarch64_linux_stopped_by_watchpoint)
6893 (aarch64_linux_watchpoint_addr_within_range)
6894 (aarch64_linux_can_do_single_step): Refactor as methods of
6895 aarch64_linux_nat_target.
6896 (super_post_startup_inferior): Delete.
6897 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6899 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6900 (the_hppa_linux_nat_target): New.
6901 (hppa_linux_fetch_inferior_registers)
6902 (hppa_linux_store_inferior_registers): Refactor as methods of
6903 hppa_linux_nat_target.
6904 (_initialize_hppa_linux_nat): Adjust to C++ification.
6906 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6907 (the_ia64_linux_nat_target): New.
6908 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6909 (ia64_linux_stopped_data_address)
6910 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6911 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6912 ia64_linux_nat_target methods.
6913 (super_xfer_partial): Delete.
6914 (_initialize_ia64_linux_nat): Adjust to C++ification.
6916 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6917 (the_m32r_linux_nat_target): New.
6918 (m32r_linux_fetch_inferior_registers)
6919 (m32r_linux_store_inferior_registers): Refactor as
6920 m32r_linux_nat_target methods.
6921 (_initialize_m32r_linux_nat): Adjust to C++ification.
6923 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6924 (the_m68k_linux_nat_target): New.
6925 (m68k_linux_fetch_inferior_registers)
6926 (m68k_linux_store_inferior_registers): Refactor as
6927 m68k_linux_nat_target methods.
6928 (_initialize_m68k_linux_nat): Adjust to C++ification.
6930 * s390-linux-nat.c (s390_linux_nat_target): New class.
6931 (the_s390_linux_nat_target): New.
6932 (s390_linux_fetch_inferior_registers)
6933 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6934 (s390_insert_watchpoint, s390_remove_watchpoint)
6935 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6936 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6937 (s390_auxv_parse, s390_read_description): Refactor as methods of
6938 s390_linux_nat_target.
6939 (_initialize_s390_nat): Adjust to C++ification.
6941 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6942 (the_sparc_linux_nat_target): New.
6943 (_initialize_sparc_linux_nat): Adjust to C++ification.
6944 * sparc-nat.c (sparc_fetch_inferior_registers)
6945 (sparc_store_inferior_registers): Remove target_ops parameter.
6946 * sparc-nat.h (sparc_fetch_inferior_registers)
6947 (sparc_store_inferior_registers): Remove target_ops parameter.
6948 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6949 (the_sparc64_linux_nat_target): New.
6950 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6952 * spu-linux-nat.c (spu_linux_nat_target): New class.
6953 (the_spu_linux_nat_target): New.
6954 (spu_child_post_startup_inferior, spu_child_post_attach)
6955 (spu_child_wait, spu_fetch_inferior_registers)
6956 (spu_store_inferior_registers, spu_xfer_partial)
6957 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6959 (_initialize_spu_nat): Adjust to C++ification.
6961 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6962 (the_tilegx_linux_nat_target): New.
6963 (fetch_inferior_registers, store_inferior_registers):
6964 Refactor as methods.
6965 (_initialize_tile_linux_nat): Adjust to C++ification.
6967 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6968 (the_xtensa_linux_nat_target): New.
6969 (xtensa_linux_fetch_inferior_registers)
6970 (xtensa_linux_store_inferior_registers): Refactor as
6971 xtensa_linux_nat_target methods.
6972 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6974 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6975 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6976 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6977 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6978 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6979 (fbsd_stopped_by_sw_breakpoint)
6980 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6981 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6982 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6983 (fbsd_post_startup_inferior, fbsd_post_attach)
6984 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6985 (fbsd_set_syscall_catchpoint)
6986 (super_xfer_partial, super_resume, super_wait)
6987 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6988 (fbsd_handle_debug_trap): Remove target_ops parameter.
6989 (fbsd_nat_add_target): Delete.
6990 * fbsd-nat.h: Include "inf-ptrace.h".
6991 (fbsd_nat_add_target): Delete.
6992 (USE_SIGTRAP_SIGINFO): Define.
6993 (fbsd_nat_target): New class.
6995 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6996 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6997 (amd64bsd_target): Delete.
6998 * amd64-bsd-nat.h: New file.
6999 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7001 (amd64_fbsd_nat_target): New class.
7002 (the_amd64_fbsd_nat_target): New.
7003 (amd64fbsd_read_description): Refactor as method of
7004 amd64_fbsd_nat_target.
7005 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7006 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7007 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7008 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7009 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7010 (i386bsd_target): Delete.
7011 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7012 (i386bsd_fetch_inferior_registers)
7013 (i386bsd_store_inferior_registers): Declare.
7014 (i386_bsd_nat_target): New class.
7015 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7016 (the_i386_fbsd_nat_target): New.
7017 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7018 i386_fbsd_nat_target methods.
7019 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7020 (_initialize_i386fbsd_nat): Adjust to C++ification.
7021 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7022 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7023 (_initialize_x86_bsd_nat): Adjust to C++ification.
7024 * x86-bsd-nat.h: Include "x86-nat.h".
7025 (x86bsd_target): Delete declaration.
7026 (x86bsd_nat_target): New class.
7028 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7029 (the_aarch64_fbsd_nat_target): New.
7030 (aarch64_fbsd_fetch_inferior_registers)
7031 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7032 aarch64_fbsd_nat_target.
7033 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7034 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7035 (the_alpha_bsd_nat_target): New.
7036 (alphabsd_fetch_inferior_registers)
7037 (alphabsd_store_inferior_registers): Refactor as
7038 alpha_bsd_nat_target methods.
7039 (_initialize_alphabsd_nat): Refactor as methods of
7040 alpha_bsd_nat_target.
7041 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7042 (the_amd64_nbsd_nat_target): New.
7043 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7044 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7045 (the_amd64_obsd_nat_target): New.
7046 (_initialize_amd64obsd_nat): Adjust to C++ification.
7047 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7048 (the_arm_fbsd_nat_target): New.
7049 (arm_fbsd_fetch_inferior_registers)
7050 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7051 (_initialize_arm_fbsd_nat): Refactor as methods of
7052 arm_fbsd_nat_target.
7053 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7054 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7055 (the_arm_netbsd_nat_target): New.
7056 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7057 arm_netbsd_nat_target.
7058 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7059 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7060 (the_hppa_nbsd_nat_target): New.
7061 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7062 hppa_nbsd_nat_target methods.
7063 (_initialize_hppanbsd_nat): Adjust to C++ification.
7064 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7065 (the_hppa_obsd_nat_target): New.
7066 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7067 methods of hppa_obsd_nat_target.
7068 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7070 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7071 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7073 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7074 (_initialize_i386obsd_nat): Use add_target.
7075 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7076 (the_m68k_bsd_nat_target): New.
7077 (m68kbsd_fetch_inferior_registers)
7078 (m68kbsd_store_inferior_registers): Refactor as methods of
7079 m68k_bsd_nat_target.
7080 (_initialize_m68kbsd_nat): Adjust to C++ification.
7081 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7082 (the_mips_fbsd_nat_target): New.
7083 (mips_fbsd_fetch_inferior_registers)
7084 (mips_fbsd_store_inferior_registers): Refactor as methods of
7085 mips_fbsd_nat_target.
7086 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7088 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7089 (the_mips_nbsd_nat_target): New.
7090 (mipsnbsd_fetch_inferior_registers)
7091 (mipsnbsd_store_inferior_registers): Refactor as methods of
7092 mips_nbsd_nat_target.
7093 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7094 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7095 (the_mips64_obsd_nat_target): New.
7096 (mips64obsd_fetch_inferior_registers)
7097 (mips64obsd_store_inferior_registers): Refactor as methods of
7098 mips64_obsd_nat_target.
7099 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7101 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7103 * nbsd-nat.h: Include "inf-ptrace.h".
7104 (nbsd_nat_target): New class.
7105 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7106 (obsd_wait): Refactor as methods of obsd_nat_target.
7107 (obsd_add_target): Delete.
7108 * obsd-nat.h: Include "inf-ptrace.h".
7109 (obsd_nat_target): New class.
7110 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7111 (the_ppc_fbsd_nat_target): New.
7112 (ppcfbsd_fetch_inferior_registers)
7113 (ppcfbsd_store_inferior_registers): Refactor as methods of
7114 ppc_fbsd_nat_target.
7115 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7117 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7118 (the_ppc_nbsd_nat_target): New.
7119 (ppcnbsd_fetch_inferior_registers)
7120 (ppcnbsd_store_inferior_registers): Refactor as methods of
7121 ppc_nbsd_nat_target.
7122 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7123 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7124 (the_ppc_obsd_nat_target): New.
7125 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7126 methods of ppc_obsd_nat_target.
7127 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7129 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7130 (the_sh_nbsd_nat_target): New.
7131 (shnbsd_fetch_inferior_registers)
7132 (shnbsd_store_inferior_registers): Refactor as methods of
7134 (_initialize_shnbsd_nat): Adjust to C++ification.
7135 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7136 (inf_ptrace_xfer_partial): Delete.
7137 (sparc_xfer_partial, sparc_target): Delete.
7138 * sparc-nat.h (sparc_fetch_inferior_registers)
7139 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7140 (sparc_target): Delete function declaration.
7141 (sparc_target): New template class.
7142 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7143 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7144 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7145 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7147 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7148 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7149 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7150 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7152 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7153 (the_vax_bsd_nat_target): New.
7154 (vaxbsd_fetch_inferior_registers)
7155 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7157 (_initialize_vaxbsd_nat): Adjust to C++ification.
7159 * bsd-kvm.c (bsd_kvm_target): New class.
7160 (bsd_kvm_ops): Now a bsd_kvm_target.
7161 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7162 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7163 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7165 (bsd_kvm_return_one): Delete.
7166 (bsd_kvm_add_target): Adjust to C++ification.
7168 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7169 (nto_procfs_target_procfs): New classes.
7170 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7171 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7172 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7173 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7174 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7175 (procfs_remove_hw_breakpoint, procfs_resume)
7176 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7177 (procfs_kill_inferior, procfs_store_registers)
7178 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7179 as methods of nto_procfs_target.
7180 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7181 (nto_native_ops): Delete.
7182 (procfs_open, procfs_native_open): Delete.
7183 (nto_native_ops): Now an nto_procfs_target_native.
7184 (init_procfs_targets): Adjust to C++ification.
7185 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7186 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7187 Refactor as methods of nto_procfs_target.
7189 * go32-nat.c (go32_nat_target): New class.
7190 (the_go32_nat_target): New.
7191 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7192 (go32_store_registers, go32_xfer_partial, go32_files_info)
7193 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7194 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7195 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7196 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7197 (go32_target): Delete.
7198 (_initialize_go32_nat): Adjust to C++ification.
7200 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7201 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7202 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7203 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7205 (gnu_target): Delete.
7206 * gnu-nat.h (gnu_target): Delete.
7207 (gnu_nat_target): New class.
7208 * i386-gnu-nat.c (gnu_base_target): New.
7209 (i386_gnu_nat_target): New class.
7210 (the_i386_gnu_nat_target): New.
7211 (_initialize_i386gnu_nat): Adjust to C++ification.
7213 2018-05-02 Pedro Alves <palves@redhat.com>
7215 * bfd-target.c (target_bfd_xclose): Rename to ...
7216 (target_bfd_close): ... this.
7217 (target_bfd_reopen): Adjust.
7218 * target.c (target_close): Remove references to to_xclose.
7219 * target.h (target_ops::to_xclose): Delete.
7220 (target_ops::to_close): Update comments.
7222 2018-05-02 Pedro Alves <palves@redhat.com>
7224 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7226 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7227 * inf-ptrace.c (inf_ptrace_register_u_offset)
7228 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7229 (inf_ptrace_store_register, inf_ptrace_store_registers)
7230 (inf_ptrace_trad_target): Move to ...
7231 * linux-nat-trad.c: ... this new file.
7232 * linux-nat-trad.h: New file.
7233 * linux-nat.c (linux_target_install_ops): Make extern.
7234 (linux_trad_target): Delete.
7235 * linux-nat.h (linux_trad_target): Delete declaration.
7236 (linux_target_install_ops): Declare.
7237 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7240 2018-05-02 Pedro Alves <palves@redhat.com>
7242 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7243 procfs_target/add_target here.
7244 * procfs.c (procfs_target): Make static.
7245 (_initialize_procfs): Call add_target here.
7246 * procfs.h (struct target_ops): Remove forward declaration.
7247 (procfs_target): Remove declaration.
7248 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7250 2018-05-02 Pedro Alves <palves@redhat.com>
7252 * procfs.c (procfs_stopped_by_watchpoint)
7253 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7254 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7256 (procfs_use_watchpoints): Delete, move contents...
7257 (procfs_target): ... here.
7258 * procfs.h (procfs_use_watchpoints): Delete declaration.
7259 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7260 procfs_use_watchpoints.
7261 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7262 procfs_use_watchpoints.
7264 2018-05-02 Tom Tromey <tom@tromey.com>
7267 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7268 and var_zuinteger_unlimited.
7269 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7270 and PARAM_ZUINTEGER_UNLIMITED.
7271 (set_parameter_value): Handle var_zuinteger and
7272 var_zuinteger_unlimited.
7273 (add_setshow_generic): Likewise.
7274 (parmpy_init): Likewise.
7276 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
7279 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7280 pointer is not null before dereferencing it.
7282 2018-04-30 Tom Tromey <tom@tromey.com>
7284 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7287 2018-04-30 Tom Tromey <tom@tromey.com>
7289 * breakpoint.c (mention): Remove use of is_mi_like_p.
7290 (print_mention_ranged_breakpoint): Likewise.
7291 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7294 2018-04-30 Tom Tromey <tom@tromey.com>
7296 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7298 2018-04-30 Tom Tromey <tom@tromey.com>
7300 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7301 (info_spu_event_command): Remove some uses of is_mi_like_p.
7303 2018-04-30 Tom Tromey <tom@tromey.com>
7305 * python/py-framefilter.c (py_print_single_arg)
7306 (enumerate_locals, py_print_args, py_print_frame): Remove some
7307 uses of is_mi_like_p.
7309 2018-04-30 Tom Tromey <tom@tromey.com>
7312 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7313 * ui-out.h (ui_out::is_mi_like_p): Now const.
7314 (ui_out::do_is_mi_like_p): Now const.
7315 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7317 2018-04-30 Tom Tromey <tom@tromey.com>
7319 * varobj.c (varobj_set_visualizer): Use new_reference.
7320 * python/python.c (gdbpy_decode_line): Use new_reference.
7321 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7324 2018-04-30 Tom Tromey <tom@tromey.com>
7326 * varobj.c (install_new_value): Use new_reference.
7327 * value.h (value_incref): Return void. Swap intro comment with
7329 * value.c (set_value_parent): Use new_reference.
7330 (value_incref): Return void. Update intro comment.
7331 (release_value): Use new_reference.
7332 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7334 2018-04-30 Tom Tromey <tom@tromey.com>
7336 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7337 * gdb_bfd.h (new_bfd_ref): Remove.
7338 (gdb_bfd_open): Update comment.
7339 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7340 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7341 (gdb_bfd_fdopenr): Use new_reference.
7342 * exec.c (exec_file_attach): Use new_reference.
7344 2018-04-30 Tom Tromey <tom@tromey.com>
7346 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7349 2018-04-30 Tom Tromey <tom@tromey.com>
7351 * jit.c (jit_read_code_entry): Use type_align.
7352 * i386-tdep.c (i386_gdbarch_init): Don't call
7353 set_gdbarch_long_long_align_bit.
7354 * gdbarch.sh: Remove long_long_align_bit.
7355 * gdbarch.c, gdbarch.h: Rebuild.
7356 * arc-tdep.c (arc_type_align): New function.
7357 (arc_gdbarch_init): Use arc_type_align. Don't call
7358 set_gdbarch_long_long_align_bit.
7360 2018-04-30 Tom Tromey <tom@tromey.com>
7362 * rust-lang.c (rust_type_alignment): Remove.
7363 (rust_composite_type): Use type_align.
7365 2018-04-30 Tom Tromey <tom@tromey.com>
7367 * NEWS: Mention Type.align.
7368 * python/py-type.c (typy_get_alignof): New function.
7369 (type_object_getset): Add "alignof".
7371 2018-04-30 Tom Tromey <tom@tromey.com>
7375 * std-operator.def (UNOP_ALIGNOF): New operator.
7376 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7378 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7379 * c-lang.c (c_op_print_tab): Add alignof.
7380 * c-exp.y (ALIGNOF): New token.
7381 (exp): Add "ALIGNOF" production.
7382 (ident_tokens): Add _Alignof and alignof.
7384 2018-04-30 Tom Tromey <tom@tromey.com>
7386 * i386-tdep.c (i386_type_align): New function.
7387 (i386_gdbarch_init): Update.
7388 * gdbarch.sh (type_align): New method.
7389 * gdbarch.c, gdbarch.h: Rebuild.
7390 * arch-utils.h (default_type_align): Declare.
7391 * arch-utils.c (default_type_align): New function.
7392 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7393 (struct type) <align_log2>: New field.
7394 <instance_flags>: Now a bitfield.
7395 (TYPE_RAW_ALIGN): New macro.
7396 (type_align, type_raw_align, set_type_align): Declare.
7397 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7399 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7400 (get_alignment, maybe_set_alignment): New functions.
7401 (read_structure_type, read_enumeration_type, read_array_type)
7402 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7403 (read_subrange_type, read_base_type): Set type alignment.
7405 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7407 * dwarf2read.c (read_index_from_section): Use bool.
7409 2018-04-29 Fabian Groffen <grobian@gentoo.org>
7412 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7415 2018-04-29 John Reiser <jreiser@BitWagon.com>
7418 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7419 last step, and do it atomically.
7421 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
7423 * compile/compile-c-types.c (convert_int, convert_float):
7426 2018-04-27 Tom Tromey <tom@tromey.com>
7429 * rust-lang.c (rust_inclusive_range_type_p): New function.
7430 (rust_range): Handle inclusive ranges.
7431 (rust_compute_range): Likewise.
7432 * rust-exp.y (struct rust_op) <inclusive>: New field.
7433 (DOTDOTEQ): New constant.
7434 (range_expr): Add "..=" productions.
7435 (operator_tokens): Add "..=" token.
7436 (ast_range): Add "inclusive" parameter.
7437 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7439 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7441 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7442 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7444 * expprint.c (print_subexp_standard): Handle new bounds values.
7445 (dump_subexp_body_standard): Likewise.
7447 2018-04-27 Tom Tromey <tom@tromey.com>
7449 * configure: Rebuild.
7450 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7451 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7453 (class symbol_needs_eval_context): Likewise.
7454 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7455 (mock_mapped_index::symbol_name_at): Use "override". Remove
7457 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7459 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7460 * aarch64-tdep.c (instruction_reader::read): Use "override".
7461 (instruction_reader_test::read): Likewise.
7462 * arm-tdep.c (instruction_reader::read): Use "override".
7463 (instruction_reader_thumb::read): Likewise.
7465 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7468 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7469 instead of remote_send.
7470 (remote_send): Remove.
7472 2018-04-26 Pedro Alves <palves@redhat.com>
7474 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7475 find_function_start_sal instead of find_pc_line.
7477 2018-04-26 Pedro Alves <palves@redhat.com>
7479 * breakpoint.c (set_breakpoint_location_function): Handle
7481 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7482 * elfread.c (elf_symtab_read): Give data symbols with
7483 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7484 (elf_rel_plt_read): Update comment.
7485 * linespec.c (convert_linespec_to_sals): Handle
7487 (minsym_found): Handle mst_data_gnu_ifunc.
7488 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7489 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7490 * parse.c (find_minsym_type_and_address): Handle
7492 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7493 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7494 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7496 <mst_data_gnu_ifunc>: New enumerator.
7498 2018-04-26 Pedro Alves <palves@redhat.com>
7500 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7501 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7502 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7504 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7505 (lookup_minimal_symbol_by_pc): Adjust.
7506 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7507 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7508 * minsyms.h (lookup_msym_prefer): New enum.
7509 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7510 parameter by a lookup_msym_prefer parameter.
7512 2018-04-26 Pedro Alves <palves@redhat.com>
7514 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7515 ends in "@plt" instead of looking at the symbol's section.
7517 2018-04-26 Pedro Alves <palves@redhat.com>
7519 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7521 (find_pc_partial_function_gnu_ifunc): Rename to ...
7522 (find_pc_partial_function): ... this, and remove references to
7524 (find_pc_partial_function): Delete old implementation.
7525 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7527 2018-04-26 Pedro Alves <palves@redhat.com>
7529 * linespec.c (struct bound_minimal_symbol_search_key): New.
7530 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7531 skip first line if we found a GNU ifunc minimal symbol by name.
7532 (compare_msymbols): Change parameters to work with a destructured
7534 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7537 2018-04-26 Pedro Alves <palves@redhat.com>
7539 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7540 ifunc targets here. Instead, if we have an ifunc minsym, use its
7542 (add_location_to_breakpoint): Store the minsym and the objfile in
7543 the breakpoint location.
7544 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7545 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7546 Record the minsym in the sal.
7547 * symtab.h (symtab_and_line) <msymbol>: New field.
7549 2018-04-26 Pedro Alves <palves@redhat.com>
7551 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7552 unless we actually resolved the ifunc.
7554 2018-04-26 Pedro Alves <palves@redhat.com>
7556 * c-exp.y (variable production): Prefer ifunc minsyms over
7557 regular function symbols.
7558 * symtab.c (find_gnu_ifunc): New function.
7559 * minsyms.h (lookup_msym_prefer): New enum.
7560 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7561 parameter by a lookup_msym_prefer parameter.
7562 * symtab.h (find_gnu_ifunc): New declaration.
7564 2018-04-26 Pedro Alves <palves@redhat.com>
7566 * blockframe.c (find_gnu_ifunc_target_type): New function.
7567 (find_function_type): New.
7568 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7569 return a value with a memory address.
7570 (eval_call): For calls to GNU ifunc functions, try to find the
7571 type of the target function from the type that the resolver
7573 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7575 * infcall.c (find_function_return_type): Delete.
7576 (find_function_addr): Add 'function_type' parameter. For calls to
7577 GNU ifunc functions, try to find the type of the target function
7578 from the type that the resolver returns, and return it via
7580 (call_function_by_hand_dummy): Adjust to use the function type
7581 returned by find_function_addr.
7582 (find_function_addr): Add 'function_type' parameter and move
7584 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7587 2018-04-26 Pedro Alves <palves@redhat.com>
7589 * c-exp.y (variable production): Skip finding an alias for ifunc
7592 2018-04-26 Pedro Alves <palves@redhat.com>
7594 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7596 2018-04-25 Pedro Alves <palves@redhat.com>
7598 * infcmd.c (kill_command): Print the pid as string, not the whole
7599 thread's ptid. Add comment. s/has been killed/killed/ in output
7601 * remote.c (remote_detach_1): Print the pid as string, not the
7602 whole thread's ptid.
7604 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7605 Sergio Durigan Junior <sergiodj@redhat.com>
7606 Pedro Alves <palves@redhat.com>
7608 * infcmd.c (kill_command): Print message when inferior has
7610 * inferior.c (print_inferior_events): Remove 'static'. Set as
7612 (add_inferior): Improve message printed when
7613 'print_inferior_events' is on.
7614 (exit_inferior): Remove message printed when
7615 'print_inferior_events' is on.
7616 (detach_inferior): Improve message printed when
7617 'print_inferior_events' is on.
7618 (initialize_inferiors): Use 'add_inferior_silent' to set
7619 'current_inferior_'.
7620 * inferior.h (print_inferior_events): Declare here as
7622 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7623 '[Detaching...]' messages when 'print_inferior_events' is on.
7624 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7625 as prefix/suffix for messages. Remove periods. Fix erroneous
7626 'Detaching after fork from child...', replace it by '... from
7628 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7629 prefix/suffix when printing 'Detaching...' messages. Print
7630 them when 'print_inferior_events' is on.
7631 * remote.c (remote_detach_1): Print message when detaching
7632 from inferior and '!is_fork_parent'.
7634 2018-04-24 Tom Tromey <tom@tromey.com>
7636 * cli-out.h: Reindent.
7638 2018-04-24 Tom Tromey <tom@tromey.com>
7640 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7641 (cli_ui_out::do_field_string): Use fputs_filtered.
7642 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7644 2018-04-23 Tom Tromey <tom@tromey.com>
7646 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7647 gdb::unique_xmalloc_ptr.
7649 2018-04-23 Tom Tromey <tom@tromey.com>
7651 * configure: Rebuild.
7653 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7656 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7657 prepare_for_testing. Set normal_bp to r_debug_state if target
7660 2018-04-21 Pedro Alves <palves@redhat.com>
7661 Rajendra SY <rajendra.sy@gmail.com>
7663 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7664 * remote.c (extended_remote_attach): In all-stop mode, mark the
7665 thread as executing.
7667 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7669 * thread.c (thread_apply_all_command): Fix comment.
7670 (thread_command): Fix comment.
7672 2018-04-10 Alan Hayward <alan.hayward@arm.com>
7674 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7676 * features/aarch64-core.c (create_feature_aarch64_core):
7678 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7680 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7682 * features/i386/32bit-avx512.c
7683 (create_feature_i386_32bit_avx512): Likewise.
7684 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7686 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7688 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7690 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7692 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7694 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7696 * features/i386/64bit-avx512.c
7697 (create_feature_i386_64bit_avx512): Likewise.
7698 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7700 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7702 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7704 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7706 * features/i386/64bit-segments.c
7707 (create_feature_i386_64bit_segments): Likewise.
7708 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7710 * features/i386/x32-core.c
7711 (create_feature_i386_x32_core): Likewise.
7712 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7713 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7714 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7715 * target-descriptions.c: In generated code, don't pass xml
7718 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7720 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7721 (print_xml_feature::visit_post): Likewise.
7722 (print_xml_feature::visit): Likewise.
7723 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7724 (print_xml_feature): Add new class.
7725 * regformats/regdat.sh: Null xmltarget on feature targets.
7726 * target-descriptions.c (struct target_desc): Add xmltarget.
7727 (maintenance_check_tdesc_xml_convert): Add unittest function.
7728 (tdesc_get_features_xml): Add function to get xml.
7729 (maintenance_check_xml_descriptions): Test xml generation.
7730 * xml-tdesc.c (string_read_description_xml): Add function.
7731 * xml-tdesc.h (string_read_description_xml): Add declaration.
7733 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7735 * features/Makefile: Add feature marker to targets with new style
7736 target descriptions.
7737 * regformats/aarch64.dat: Regenerate.
7738 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7739 * regformats/i386/amd64-avx-linux.dat: Likewise.
7740 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7741 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7742 * regformats/i386/amd64-linux.dat: Likewise.
7743 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7744 * regformats/i386/amd64.dat: Likewise.
7745 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7746 * regformats/i386/i386-avx-linux.dat: Likewise.
7747 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7748 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7749 * regformats/i386/i386-linux.dat: Likewise.
7750 * regformats/i386/i386-mmx-linux.dat: Likewise.
7751 * regformats/i386/i386-mpx-linux.dat: Likewise.
7752 * regformats/i386/i386.dat: Likewise.
7753 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7754 * regformats/i386/x32-avx-linux.dat: Likewise.
7755 * regformats/i386/x32-linux.dat: Likewise.
7756 * regformats/tic6x-c62x-linux.dat: Likewise.
7757 * regformats/tic6x-c64x-linux.dat: Likewise.
7758 * regformats/tic6x-c64xp-linux.dat: Likewise.
7759 * regformats/regdat.sh: Parse feature marker.
7761 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7763 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7764 (tdesc_osabi_name): Likewise.
7765 * target-descriptions.c (tdesc_architecture_name): Add new
7767 (tdesc_osabi_name): Likewise.
7769 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7771 * common/tdesc.c (tdesc_predefined_type): Move to here.
7772 (tdesc_named_type): Likewise.
7773 (tdesc_create_vector): Likewise.
7774 (tdesc_create_struct): Likewise.
7775 (tdesc_set_struct_size): Likewise.
7776 (tdesc_create_union): Likewise.
7777 (tdesc_create_flags): Likewise.
7778 (tdesc_create_enum): Likewise.
7779 (tdesc_add_field): Likewise.
7780 (tdesc_add_typed_bitfield): Likewise.
7781 (tdesc_add_bitfield): Likewise.
7782 (tdesc_add_flag): Likewise.
7783 (tdesc_add_enum_value): Likewise.
7784 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7785 (struct tdesc_type_vector): Likewise.
7786 (struct tdesc_type_field): Likewise.
7787 (struct tdesc_type_with_fields): Likewise.
7788 (tdesc_create_enum): Add declaration.
7789 (tdesc_add_typed_bitfield): Likewise.
7790 (tdesc_add_enum_value): Likewise.
7791 * target-descriptions.c (tdesc_type_field): Move from here.
7792 (tdesc_type_builtin): Likewise.
7793 (tdesc_type_vector): Likewise.
7794 (tdesc_type_with_fields): Likewise.
7795 (tdesc_predefined_types): Likewise.
7796 (tdesc_named_type): Likewise.
7797 (tdesc_create_vector): Likewise.
7798 (tdesc_create_struct): Likewise.
7799 (tdesc_set_struct_size): Likewise.
7800 (tdesc_create_union): Likewise.
7801 (tdesc_create_flags): Likewise.
7802 (tdesc_create_enum): Likewise.
7803 (tdesc_add_field): Likewise.
7804 (tdesc_add_typed_bitfield): Likewise.
7805 (tdesc_add_bitfield): Likewise.
7806 (tdesc_add_flag): Likewise.
7807 (tdesc_add_enum_value): Likewise.
7808 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7809 (tdesc_add_typed_bitfield): Likewise.
7810 (tdesc_add_enum_value): Likewise.
7812 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7814 * common/tdesc.c (tdesc_feature::accept): Move to here.
7815 (tdesc_feature::operator==): Likewise.
7816 (tdesc_create_reg): Likewise.
7817 * common/tdesc.h (tdesc_type_kind): Likewise.
7818 (struct tdesc_type): Likewise.
7819 (struct tdesc_feature): Likewise.
7820 * regformats/regdat.sh: Create a feature.
7821 * target-descriptions.c (tdesc_type_kind): Move from here.
7822 (tdesc_type): Likewise.
7823 (tdesc_type_up): Likewise.
7824 (tdesc_feature): Likewise.
7825 (tdesc_create_reg): Likewise.
7827 2018-04-18 Alan Hayward <alan.hayward@arm.com>
7829 * Makefile.in: Add arch/tdesc.c
7830 * common/tdesc.c: New file.
7831 * common/tdesc.h (tdesc_element_visitor): Move to here.
7832 (tdesc_element): Likewise.
7833 (tdesc_reg): Likewise.
7834 (tdesc_reg_up): Likewise.
7835 * regformats/regdef.h (reg): Add offset to constructors.
7836 * target-descriptions.c (tdesc_element_visitor): Move from here.
7837 (tdesc_element): Likewise.
7838 (tdesc_reg): Likewise.
7839 (tdesc_reg_up): Likewise.
7841 2018-04-17 Tom Tromey <tom@tromey.com>
7843 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7846 2018-04-17 Tom Tromey <tom@tromey.com>
7848 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7850 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7852 * symtab.c (print_symbol_info): Skip printing filename and line
7853 number when `last' is NULL.
7854 (symtab_symbol_info): Use empty string instead of NULL for first
7855 invocation of print_symbol_info.
7856 (rbreak_command): Pass NULL to `last' parameter of
7859 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7861 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7864 2018-04-16 Pedro Alves <palves@redhat.com>
7866 * MAINTAINERS (sh): Remove.
7867 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7868 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7869 (ALLDEPFILES): Remove sh64-tdep.c.
7870 * NEWS: Mentions that support for SH-5/SH64 is removed.
7871 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7872 (sh*-*-openbsd*): Ditto.
7873 (sh64-*-elf*): Remove.
7875 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7876 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7877 * sh-tdep.c: No longer include "sh64-tdep.h".
7878 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7879 * sh64-tdep.c, sh64-tdep.h: Remove files.
7881 2018-04-16 Pedro Alves <palves@redhat.com>
7883 * MAINTAINERS: Remove m88k.
7884 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7885 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7886 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7887 * NEWS: Mention that support for m88k was removed.
7888 * configure.host (m88*-*-*): Remove support.
7889 * configure.nat (m88k-*-*): Remove support.
7890 * configure.tgt (m88*-*-openbsd*): Remove.
7891 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7893 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7895 * configure.tgt (x86_tobjs): New variable.
7896 (amd64_tobjs, i386_tobjs): Use it.
7898 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7900 * symtab.c (print_symbol_info): Precede the symbol definition by
7901 the line number when available.
7902 * NEWS: Advertise this enhancement.
7904 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7906 * NEWS (New options): announce set/show record btrace cpu.
7907 * btrace.c: Include record-btrace.h.
7908 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7909 the vendor is unknown.
7910 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7911 Maybe overwrite the btrace configuration's cpu.
7912 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7913 (btrace_fetch): Add cpu parameter. Update callers.
7914 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7915 Maybe overwrite the btrace configuration's cpu. Skip enabling
7916 errata workarounds if the vendor is unknown.
7917 * python/py-record-btrace.c: Include record-btrace.h.
7918 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7919 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7920 * record-btrace.c (record_btrace_cpu_state_kind): New.
7921 (record_btrace_cpu): New.
7922 (set_record_btrace_cpu_cmdlist): New.
7923 (record_btrace_get_cpu): New.
7924 (require_btrace_thread, record_btrace_info)
7925 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7926 (cmd_set_record_btrace_cpu_none): New.
7927 (cmd_set_record_btrace_cpu_auto): New.
7928 (cmd_set_record_btrace_cpu): New.
7929 (cmd_show_record_btrace_cpu): New.
7930 (_initialize_record_btrace): Initialize set/show record btrace cpu
7932 * record-btrace.h (record_btrace_get_cpu): New.
7934 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7936 * record.c (set_record_command): Fix typo in message.
7938 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7940 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7942 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7944 * infrun.c (process_event_stop_test): Call
7945 gdbarch_in_indirect_branch_thunk.
7946 * gdbarch.sh (in_indirect_branch_thunk): New.
7947 * gdbarch.c: Regenerated.
7948 * gdbarch.h: Regenerated.
7951 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7952 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7953 (ALLDEPFILES): Add x86-tdep.c.
7954 * arch-utils.h (default_in_indirect_branch_thunk): New.
7955 * arch-utils.c (default_in_indirect_branch_thunk): New.
7956 * i386-tdep: Include x86-tdep.h.
7957 (i386_in_indirect_branch_thunk): New.
7958 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7960 * amd64-tdep: Include x86-tdep.h.
7961 (amd64_in_indirect_branch_thunk): New.
7962 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7964 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7967 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7968 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7969 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7972 2018-04-12 Tom Tromey <tom@tromey.com>
7974 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7975 (rust_evaluate_subexp): Likewise.
7977 2018-04-12 Pedro Alves <palves@redhat.com>
7979 * procfs.c (procfs_detach): Make forward declaration's prototype
7980 match definition's protototype.
7981 (proc_get_LDT_entry): Remove stale do_cleanups call.
7983 2018-04-12 Pedro Alves <palves@redhat.com>
7985 * target.h (target_ops::to_has_exited): Delete.
7986 (target_has_exited): Delete.
7987 * target-delegates.c: Regenerate.
7989 2018-04-11 Pedro Alves <palves@redhat.com>
7991 * target.c (fileio_fh_t::t): Add comment.
7992 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7993 (target_fileio_close): Handle a NULL target.
7994 (invalidate_fileio_fh): New.
7995 (target_close): Call it.
7996 * remote.c (remote_hostio_send_command): No longer check whether
7997 remote_desc is open.
7999 2018-04-11 Pedro Alves <palves@redhat.com>
8001 * target.c (fileio_fh_t): Make it a named struct instead of a
8003 (fileio_fh_t::is_closed): New method.
8004 (DEF_VEC_O (fileio_fh_t)): Remove.
8005 (fileio_fhandles): Now a std::vector.
8006 (is_closed_fileio_fh): Delete.
8007 (acquire_fileio_fd): Adjust. Rename parameters.
8008 (release_fileio_fd): Adjust.
8009 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8010 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8011 (target_fileio_close): Adjust.
8013 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8015 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8018 2018-04-10 Pedro Alves <palves@redhat.com>
8020 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8021 (scoped_finish_thread_state): New class.
8022 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8024 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8025 (fetch_inferior_event, normal_stop): Likewise.
8026 * thread.c (finish_thread_state_cleanup): Delete.
8028 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8029 Pedro Alves <palves@redhat.com>
8031 * value.c: Include "selftest.h" and "common/array-view.h".
8032 (struct range) <operator ==>: New.
8033 (test_ranges_contain): New.
8034 (check_ranges_vector): New.
8035 (test_insert_into_bit_range_vector): New.
8036 (_initialize_values): Register selftests.
8037 * common/array-view.h (operator==, operator!=): New.
8039 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8041 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8043 * inline-frame.c: Include <algorithm>.
8044 (struct inline_state): Add constructor.
8045 (inline_state_s): Remove.
8046 (DEF_VEC_O(inline_state_s)): Remove.
8047 (inline_states): Change type to std::vector.
8048 (find_inline_frame_state): Adjust to std::vector.
8049 (allocate_inline_frame_state): Remove.
8050 (clear_inline_frame_state): Adjust to std::vector.
8051 (skip_inline_frames): Adjust to std::vector.
8053 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8055 * tracepoint.h (struct trace_state_variable): Add constructor.
8056 <name>: Change type to std::string.
8057 * tracepoint.c (tsv_s): Remove.
8058 (DEF_VEC_O(tsv_s)): Remove.
8059 (tvariables): Change to std::vector.
8060 (create_trace_state_variable): Adjust to std::vector.
8061 (find_trace_state_variable): Likewise.
8062 (find_trace_state_variable_by_number): Likewise.
8063 (delete_trace_state_variable): Likewise.
8064 (trace_variable_command): Adjust to std::string.
8065 (delete_trace_variable_command): Likewise.
8066 (tvariables_info_1): Adjust to std::vector.
8067 (save_trace_state_variables): Likewise.
8068 (start_tracing): Likewise.
8069 (merge_uploaded_trace_state_variables): Adjust to std::vector
8071 * target.h (struct target_ops)
8072 <to_download_trace_state_variable>: Pass reference to
8073 trace_state_variable.
8074 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8075 * target-delegates.c: Re-generate.
8076 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8077 (mi_tsv_deleted): Likewise.
8078 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8079 * remote.c (remote_download_trace_state_variable): Change
8080 pointer to reference and adjust.
8081 * make-target-delegates (parse_argtypes): Handle references.
8082 (write_function_header): Likewise.
8083 (munge_type): Likewise.
8085 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8087 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8088 string_view-selftests.c.
8089 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8091 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8092 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8093 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8094 * unittests/basic_string_view/element_access/char/1.cc:
8096 * unittests/basic_string_view/element_access/char/empty.cc:
8098 * unittests/basic_string_view/element_access/char/front_back.cc:
8100 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8101 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8103 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8105 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8107 * unittests/basic_string_view/operations/compare/char/1.cc:
8109 * unittests/basic_string_view/operations/compare/char/13650.cc:
8111 * unittests/basic_string_view/operations/copy/char/1.cc:
8113 * unittests/basic_string_view/operations/data/char/1.cc:
8115 * unittests/basic_string_view/operations/find/char/1.cc:
8117 * unittests/basic_string_view/operations/find/char/2.cc:
8119 * unittests/basic_string_view/operations/find/char/3.cc:
8121 * unittests/basic_string_view/operations/find/char/4.cc:
8123 * unittests/basic_string_view/operations/rfind/char/1.cc:
8125 * unittests/basic_string_view/operations/rfind/char/2.cc:
8127 * unittests/basic_string_view/operations/rfind/char/3.cc:
8129 * unittests/basic_string_view/operations/substr/char/1.cc:
8131 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8132 * unittests/string_view-selftests.c: New file.
8134 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8136 * unittests/basic_string_view/capacity/1.cc: New file.
8137 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8138 * unittests/basic_string_view/cons/char/1.cc: New file.
8139 * unittests/basic_string_view/cons/char/2.cc: New file.
8140 * unittests/basic_string_view/cons/char/3.cc: New file.
8141 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8142 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8143 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8144 * unittests/basic_string_view/element_access/char/1.cc: New file.
8145 * unittests/basic_string_view/element_access/char/2.cc: New file.
8146 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8147 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8148 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8149 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8150 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8151 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8152 * unittests/basic_string_view/include.cc: New file.
8153 * unittests/basic_string_view/inserters/char/1.cc: New file.
8154 * unittests/basic_string_view/inserters/char/2.cc: New file.
8155 * unittests/basic_string_view/inserters/char/3.cc: New file.
8156 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8157 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8158 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8159 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8160 * unittests/basic_string_view/literals/types.cc: New file.
8161 * unittests/basic_string_view/literals/values.cc: New file.
8162 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8163 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8164 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8165 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8166 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8167 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8168 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8169 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8170 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8171 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8172 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8173 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8174 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8175 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8176 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8177 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8178 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8179 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8180 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8181 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8182 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8183 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8184 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8185 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8186 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8187 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8188 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8189 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8190 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8191 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8192 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8193 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8194 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8195 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8196 * unittests/basic_string_view/operators/char/2.cc: New file.
8197 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8198 * unittests/basic_string_view/range_access/char/1.cc: New file.
8199 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8200 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8201 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8202 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8203 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8204 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8205 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8206 * unittests/basic_string_view/typedefs.cc: New file.
8207 * unittests/basic_string_view/types/1.cc: New file.
8209 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8211 * common/gdb_string_view.h: Remove libstdc++ implementation
8212 details, adjust to gdb reality.
8213 * common/gdb_string_view.tcc: Likewise.
8214 * cli/cli-script.c (struct string_view): Remove.
8215 (user_args) <m_args>: Change element type to gdb::string_view.
8216 (user_args::insert_args): Adjust.
8218 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8220 * common/gdb_string_view.h: New file.
8221 * common/gdb_string_view.tcc: New file.
8223 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8225 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8226 * configure: Re-generate.
8228 2018-04-09 Pedro Alves <palves@redhat.com>
8230 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8231 (set_target_gdbarch): Call
8232 gdb::observers::architecture_changed.notify instead of
8233 observer_notify_architecture_changed.
8235 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8237 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8238 (do_restore_current_traceframe_cleanup): Remove.
8239 (restore_current_traceframe_cleanup_dtor): Remove.
8240 (make_cleanup_restore_current_traceframe): Remove.
8241 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8243 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8244 * infrun.c (fetch_inferior_event): Use
8245 scoped_restore_current_traceframe.
8247 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8249 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8251 <n_allocated_type_units>: Remove.
8252 <all_type_units>: Change to std::vector.
8253 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8254 to std::vector change.
8255 (dwarf2_per_objfile::get_cutu): Likewise.
8256 (dwarf2_per_objfile::get_tu): Likewise.
8257 (create_signatured_type_table_from_index): Likewise.
8258 (create_signatured_type_table_from_debug_names): Likewise.
8259 (dw2_symtab_iter_next): Likewise.
8260 (dw2_print_stats): Likewise.
8261 (dw2_expand_all_symtabs): Likewise.
8262 (dw2_expand_marked_cus): Likewise.
8263 (dw2_debug_names_iterator::next): Likewise.
8264 (dwarf2_initialize_objfile): Likewise.
8265 (add_signatured_type_cu_to_table): Likewise.
8266 (create_all_type_units): Likewise.
8267 (add_type_unit): Likewise.
8268 (struct tu_abbrev_offset): Add constructor.
8269 (build_type_psymtabs_1): Adjust to std::vector change.
8270 (print_tu_stats): Likewise.
8271 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8272 (write_debug_names): Likewise.
8274 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8276 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8277 Make an std::vector.
8278 <n_comp_units>: Remove.
8279 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8280 to std::vector change.
8281 (dwarf2_per_objfile::get_cutu): Likewise.
8282 (dwarf2_per_objfile::get_cu): Likewise.
8283 (create_cus_from_index): Likewise.
8284 (create_addrmap_from_index): Likewise.
8285 (create_addrmap_from_aranges): Likewise.
8286 (dwarf2_read_index): Likewise.
8287 (dw2_find_last_source_symtab): Likewise.
8288 (dw2_map_symtabs_matching_filename): Likewise.
8289 (dw2_symtab_iter_next): Likewise.
8290 (dw2_print_stats): Likewise.
8291 (dw2_expand_all_symtabs): Likewise.
8292 (dw2_expand_symtabs_with_fullname): Likewise.
8293 (dw2_expand_marked_cus): Likewise.
8294 (dw2_map_symbol_filenames): Likewise.
8295 (create_cus_from_debug_names): Likewise.
8296 (dwarf2_read_debug_names): Likewise.
8297 (dw2_debug_names_iterator::next): Likewise.
8298 (dwarf2_initialize_objfile): Likewise.
8299 (set_partial_user): Likewise.
8300 (dwarf2_build_psymtabs_hard): Likewise.
8301 (read_comp_units_from_section): Remove arguments, adjust to
8303 (create_all_comp_units): Adjust to std::vector and
8304 read_comp_units_from_section changes.
8305 (dwarf2_find_containing_comp_unit): Adjust to std::vector
8307 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8308 (psyms_seen_size): Likewise.
8309 (write_gdbindex): Likewise.
8310 (write_debug_names): Likewise.
8312 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8314 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8315 with dwarf2_per_objfile.
8316 (create_cus_from_index): Likewise.
8317 (create_signatured_type_table_from_index): Likewise.
8318 (dwarf2_read_index): Likewise.
8319 (dwarf2_initialize_objfile): Likewise.
8320 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
8321 per_cu rather than get_dwarf2_per_objfile.
8323 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8325 * dwarf2read.h (struct signatured_type): Forward declare.
8326 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8328 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8329 (dw2_get_cutu): ...this.
8330 (dwarf2_per_objfile::get_cu): Rename from...
8331 (dw2_get_cu): ...this.
8332 (dwarf2_per_objfile::get_tu): New.
8333 (create_addrmap_from_index): Adjust.
8334 (create_addrmap_from_aranges): Adjust.
8335 (dw2_find_last_source_symtab): Adjust.
8336 (dw2_map_symtabs_matching_filename): Adjust.
8337 (dw2_symtab_iter_next): Adjust.
8338 (dw2_print_stats): Adjust.
8339 (dw2_expand_all_symtabs): Adjust.
8340 (dw2_expand_symtabs_with_fullname): Adjust.
8341 (dw2_expand_marked_cus): Adjust.
8342 (dw_expand_symtabs_matching_file_matcher): Adjust.
8343 (dw2_map_symbol_filenames): Adjust.
8344 (dw2_debug_names_iterator::next): Adjust.
8345 (dwarf2_initialize_objfile): Adjust.
8346 (set_partial_user): Adjust.
8347 (dwarf2_build_psymtabs_hard): Adjust.
8349 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8351 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8352 Remove unused variables.
8353 (dw2_map_symtabs_matching_filename): Likewise.
8354 (dwarf2_record_block_ranges): Likewise.
8355 (dwarf2_read_addr_index): Likewise.
8356 (follow_die_offset): Likewise.
8358 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8360 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8361 to symbol_file_add_main.
8363 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8366 * mi/mi-console.c (do_fputc_async_safe): New.
8367 (mi_console_file::write_async_safe): New.
8368 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8369 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8371 * ui-file.c (ui_file::putstrn): Adjust call to
8372 fputstrn_unfiltered.
8373 * utils.c (printchar): Replace do_fputs and do_fprintf
8374 parameters by do_fputc.
8375 (fputstr_filtered): Adjust call to printchar.
8376 (fputstr_unfiltered): Likewise.
8377 (fputstrn_filtered): Likewise.
8378 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8380 * utils.h (do_fputc_ftype): New typedef.
8381 (fputstrn_unfiltered): Add do_fputc parameter.
8383 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8385 * regformats/i386/i386-avx.dat: Remove.
8387 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8390 * amd64-tdep.c (amd64_none_init_abi): New function.
8391 (amd64_x32_none_init_abi): New function.
8392 (_initialize_amd64_tdep): Register handlers for x86-64 and
8393 x64_32 with GDB_OSABI_NONE.
8394 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8395 GDB_OSABI_NONE osabi.
8397 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8400 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8402 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8403 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8405 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8407 * common/byte-vector.h (char_vector): New type.
8408 * target.h (target_read_alloc): Return
8409 gdb::optional<byte_vector>.
8410 (target_read_stralloc): Return gdb::optional<char_vector>.
8411 (target_get_osdata): Return gdb::optional<char_vector>.
8412 * target.c (target_read_alloc_1): Templatize. Replacement
8413 manual memory management with vector.
8414 (target_read_alloc): Change return type, adjust.
8415 (target_read_stralloc): Change return type, adjust.
8416 (target_get_osdata): Change return type, adjust.
8417 * auxv.c (struct auxv_info) <length>: Remove.
8418 <data>: Change type to gdb::optional<byte_vector>.
8419 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8420 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8421 (target_auxv_search): Adjust.
8422 (fprint_target_auxv): Adjust.
8423 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8424 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8425 (linux_make_corefile_notes): Adjust.
8426 * osdata.c (get_osdata): Adjust.
8427 * remote.c (remote_get_threads_with_qxfer): Adjust.
8428 (remote_memory_map): Adjust.
8429 (remote_traceframe_info): Adjust.
8430 (btrace_read_config): Adjust.
8431 (remote_read_btrace): Adjust.
8432 (remote_pid_to_exec_file): Adjust.
8433 * solib-aix.c (solib_aix_get_library_list): Adjust.
8434 * solib-dsbt.c (decode_loadmap): Don't free buf.
8435 (dsbt_get_initial_loadmaps): Adjust.
8436 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8437 * solib-target.c (solib_target_current_sos): Adjust.
8438 * tracepoint.c (sdata_make_value): Adjust.
8439 * xml-support.c (xinclude_start_include): Adjust.
8440 (xml_fetch_content_from_file): Adjust.
8441 * xml-support.h (xml_fetch_another): Change return type.
8442 (xml_fetch_content_from_file): Change return type.
8443 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8444 * xml-tdesc.c (file_read_description_xml): Adjust.
8445 (fetch_available_features_from_target): Change return type.
8446 (target_fetch_description_xml): Adjust.
8447 (target_read_description_xml): Adjust.
8449 2018-04-06 Tom Tromey <tom@tromey.com>
8451 * value.c (~value): Update.
8452 (struct value) <contents>: Now unique_xmalloc_ptr.
8453 (value_contents_bits_eq, allocate_value_contents)
8454 (value_contents_raw, value_contents_all_raw)
8455 (value_contents_for_printing, value_contents_for_printing_const)
8456 (set_value_enclosing_type): Update.
8458 2018-04-06 Tom Tromey <tom@tromey.com>
8460 * value.c (range_s): Remove typedef, VEC.
8461 (struct range): Add operator<.
8462 (range_lessthan): Remove.
8463 (ranges_contain): Change type.
8465 (struct value) <unavailable, optimized_out>: Now std::vector.
8466 (value_entirely_available)
8467 (value_entirely_covered_by_range_vector)
8468 (value_entirely_unavailable, value_entirely_optimized_out):
8470 (insert_into_bit_range_vector): Change argument type.
8471 (find_first_range_overlap): Likewise.
8472 (struct ranges_and_idx, value_contents_bits_eq)
8473 (require_not_optimized_out, require_available): Update.
8474 (ranges_copy_adjusted): Change argument types.
8475 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8477 2018-04-06 Tom Tromey <tom@tromey.com>
8479 * value.c (~value): Update.
8480 (struct value) <parent>: Now a value_ref_ptr.
8481 (value_parent, set_value_parent, value_address, value_copy):
8484 2018-04-06 Tom Tromey <tom@tromey.com>
8486 * value.c (struct value): Add constructor, destructor, and member
8488 (allocate_value_lazy, value_decref): Update.
8490 2018-04-06 Tom Tromey <tom@tromey.com>
8492 * value.c (struct value) <released, next>: Remove.
8493 (all_values): Now a std::vector.
8494 (allocate_value_lazy): Update.
8495 (value_next): Remove.
8496 (value_mark, value_free_to_mark, release_value)
8497 (value_release_to_mark): Update.
8499 2018-04-06 Tom Tromey <tom@tromey.com>
8501 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8502 (free_value_chain): Remove.
8503 * value.c (free_value_chain): Remove.
8504 (value_release_to_mark): Return a std::vector.
8505 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8507 (check_condition): Update.
8508 * eval.c (fetch_subexp_value): Change "val_chain" to a
8510 * breakpoint.c (update_watchpoint): Update.
8511 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8513 2018-04-06 Tom Tromey <tom@tromey.com>
8515 * value.h (free_all_values): Remove.
8516 * value.c (free_all_values): Remove.
8518 2018-04-06 Tom Tromey <tom@tromey.com>
8520 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8521 (value_history_chain, value_history_count): Remove.
8522 (value_history): New global.
8523 (record_latest_value, access_value_history, show_values)
8524 (preserve_values): Update.
8526 2018-04-06 Tom Tromey <tom@tromey.com>
8528 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8529 * varobj.c (varobj_set_display_format, varobj_set_value)
8530 (install_default_visualizer, construct_visualizer)
8531 (install_new_value, ~varobj, varobj_get_value_type)
8532 (my_value_of_variable, varobj_editable_p): Update.
8533 * c-varobj.c (c_describe_child, c_value_of_variable)
8534 (cplus_number_of_children, cplus_describe_child): Update.
8535 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8536 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8537 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8539 2018-04-06 Tom Tromey <tom@tromey.com>
8541 * printcmd.c (last_examine_address): Change type to
8543 (do_examine, x_command): Update.
8545 2018-04-06 Tom Tromey <tom@tromey.com>
8547 * value.c (release_value): Update.
8548 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8549 (struct bpstats) <val>: Now a value_ref_ptr.
8550 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8551 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8552 (~watchpoint, print_it_watchpoint, watch_command_1)
8553 (invalidate_bp_value_on_memory_change): Update.
8555 2018-04-06 Tom Tromey <tom@tromey.com>
8557 * varobj.c (varobj_clear_saved_item)
8558 (update_dynamic_varobj_children, install_new_value, ~varobj):
8560 * value.h (value_incref): Move declaration earlier.
8561 (value_decref): Rename from value_free.
8562 (struct value_ref_policy): New.
8563 (value_ref_ptr): New typedef.
8564 (struct value_deleter): Remove.
8565 (gdb_value_up): Remove typedef.
8566 (release_value): Change return type.
8567 (release_value_or_incref): Remove.
8568 * value.c (set_value_parent): Update.
8569 (value_incref): Change return type.
8570 (value_decref): Rename from value_free.
8571 (value_free_to_mark, free_all_values, free_value_chain): Update.
8572 (release_value): Return value_ref_ptr.
8573 (release_value_or_incref): Remove.
8574 (record_latest_value, set_internalvar, clear_internalvar):
8576 * stack.c (info_frame_command): Don't call value_free.
8577 * python/py-value.c (valpy_dealloc, valpy_new)
8578 (value_to_value_object): Update.
8579 * printcmd.c (do_examine): Update.
8580 * opencl-lang.c (lval_func_free_closure): Update.
8581 * mi/mi-main.c (register_changed_p): Don't call value_free.
8582 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8583 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8584 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8586 * guile/scm-value.c (vlscm_free_value_smob)
8587 (vlscm_scm_from_value): Update.
8588 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8589 (frame_unwind_register_unsigned, get_frame_register_bytes)
8590 (put_frame_register_bytes): Don't call value_free.
8591 * findvar.c (address_from_register): Don't call value_free.
8592 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8593 * dwarf2loc.c (entry_data_value_free_closure)
8594 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8595 (dwarf2_evaluate_loc_desc_full): Update.
8596 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8597 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8598 (~watchpoint, watch_command_1)
8599 (invalidate_bp_value_on_memory_change): Update.
8600 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8602 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8605 * warning.m4: Add -Wno-error=deprecated-register.
8606 * configure: Re-generate.
8608 2018-04-05 Tom Tromey <tom@tromey.com>
8610 * linespec.h: Remove include of "vec.h".
8612 2018-04-05 Tom Tromey <tom@tromey.com>
8614 * linespec.c (typep): Remove typedef.
8615 (find_methods, find_superclass_methods): Take a std::vector.
8616 (find_method): Use std::vector.
8618 2018-04-05 Tom Tromey <tom@tromey.com>
8620 * utils.c (compare_strings): Remove.
8621 * utils.h (compare_strings): Remove.
8622 * objc-lang.h (find_imps): Update.
8623 * objc-lang.c (find_methods): Take a std::vector.
8624 (uniquify_strings, find_imps): Likewise.
8625 * linespec.c (find_methods): Take a std::vector.
8626 (decode_objc): Use std::vector.
8627 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8629 (find_method, find_function_symbols): Use std::vector.
8631 2018-04-05 Tom Tromey <tom@tromey.com>
8633 * completer.c (completion_tracker::completion_tracker): Remove
8635 (completion_tracker::discard_completions): Likewise.
8636 * breakpoint.c (ambiguous_names_p): Remove cast.
8637 * ada-lang.c (_initialize_ada_language): Remove cast.
8638 * utils.h (streq): Update.
8639 (streq_hash): Add new declaration.
8640 * utils.c (streq): Return bool.
8641 (streq_hash): New function.
8643 2018-04-05 Tom Tromey <tom@tromey.com>
8645 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8646 Remove a string copy.
8648 2018-04-05 Tom Tromey <tom@tromey.com>
8650 * linespec.c (filter_results): Use std::vector.
8651 (decode_line_2, decode_line_full): Update.
8653 2018-04-05 Tom Tromey <tom@tromey.com>
8655 * linespec.c (canonical_to_fullform): Return std::string.
8656 (filter_results): Update.
8657 (struct decode_line_2_item): Add constructor.
8658 <fullform, displayform>: Now std::string.
8659 (decode_line_2_compare_items): Now a std::sort comparator.
8660 (decode_line_2): Update.
8662 2018-04-05 Tom Tromey <tom@tromey.com>
8664 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8665 (unexpected_linespec_error): Update.
8666 (linespec_parse_basic, parse_linespec): Update.
8668 2018-04-05 Tom Tromey <tom@tromey.com>
8670 * linespec.c (linespec_parse_basic): Reindent.
8672 2018-04-05 Tom Tromey <tom@tromey.com>
8674 * minsyms.h (iterate_over_minimal_symbols): Update.
8675 * minsyms.c (iterate_over_minimal_symbols): Take a
8677 * linespec.c (struct collect_minsyms): Remove.
8678 (compare_msyms): Now a std::sort comparator.
8679 (add_minsym): Add parameters.
8680 (search_minsyms_for_name): Update. Use std::vector.
8682 2018-04-03 Tom Tromey <tom@tromey.com>
8684 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8687 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8689 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8691 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
8694 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8695 printing static type.
8697 2018-04-01 Tom Tromey <tom@tromey.com>
8699 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8700 (rs6000_xfer_shared_libraries): Update.
8702 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8704 * common/gdb_vecs.h (char_ptr): Remove.
8705 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8707 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8709 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8711 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8713 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8715 * tracepoint.h (struct uploaded_tp): Initialize fields.
8716 <actions, step_actions, cmd_strings>: Change type to
8717 std::vector<char *>.
8718 * tracepoint.c (get_uploaded_tp): Allocate with new.
8719 (free_uploaded_tps): Free with delete.
8720 (parse_tracepoint_definition): Adjust to std::vector change.
8721 * breakpoint.c (read_uploaded_action): Likewise.
8722 (create_tracepoint_from_upload): Likewise.
8723 * ctf.c (ctf_write_uploaded_tp): Likewise.
8724 (SET_ARRAY_FIELD): Likewise.
8725 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8727 2018-03-30 Tom Tromey <tom@tromey.com>
8729 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8731 (svr4_keep_data_in_core): Update.
8732 (svr4_read_so_list): Update.
8734 2018-03-30 Tom Tromey <tom@tromey.com>
8736 * windows-nat.c (handle_output_debug_string, handle_exception):
8738 * target.h (target_read_string): Update.
8739 * target.c (target_read_string): Change "string" to
8741 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8743 * solib-frv.c (frv_current_sos): Update.
8744 * solib-dsbt.c (dsbt_current_sos): Update.
8745 * solib-darwin.c (darwin_current_sos): Update.
8746 * linux-thread-db.c (inferior_has_bug): Update.
8747 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8748 Update. Remove alloca.
8749 * ada-lang.c (ada_main_name): Update.
8751 2018-03-30 Tom Tromey <tom@tromey.com>
8753 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8754 (struct dwo_file_deleter): New.
8755 (dwo_file_up): New typedef.
8756 (open_and_init_dwo_file): Use dwo_file_up.
8757 (free_dwo_file_cleanup): Remove.
8759 2018-03-30 Tom Tromey <tom@tromey.com>
8761 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8762 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8764 2018-03-30 Tom Tromey <tom@tromey.com>
8766 * dwarf2read.c (class free_cached_comp_units): New class.
8767 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8768 (free_cached_comp_units): Remove function.
8770 2018-03-30 Tom Tromey <tom@tromey.com>
8772 * utils.h (make_cleanup_unpush_target): Remove.
8773 * inf-ptrace.c (struct target_unpusher): New.
8774 (target_unpush_up) New typedef.
8775 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8777 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8779 2018-03-27 Tom Tromey <tom@tromey.com>
8781 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8783 2018-03-27 Pedro Alves <palves@redhat.com>
8784 Tom Tromey <tom@tromey.com>
8786 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8787 destructor. Now a class.
8788 (gdb_readline_wrapper_cleanup): Remove function.
8789 (gdb_readline_wrapper): Remove cleanups.
8791 2018-03-27 Tom Tromey <tom@tromey.com>
8793 * typeprint.h (struct type_print_options) <local_typedefs,
8794 global_typedefs>: Remove "struct" keyword.
8795 (class typedef_hash_table): New class.
8796 (recursively_update_typedef_hash, add_template_parameters)
8797 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8798 (find_typedef_in_hash): Don't declare.
8799 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8800 (typedef_hash_table::recursively_update): Rename from
8801 recursively_update_typedef_hash. Now a member.
8802 (typedef_hash_table::add_template_parameters): Rename from
8803 add_template_parameters. Now a member.
8804 (typedef_hash_table::typedef_hash_table): Now a constructor;
8805 rename from create_typedef_hash.
8806 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8807 rename from free_typedef_hash.
8808 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8809 (do_free_global_table): Remove.
8810 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8811 from copy_type_recursive.
8812 (create_global_typedef_table): Remove.
8813 (typedef_hash_table::find_global_typedef): Now a member of
8815 (typedef_hash_table::find_typedef): Rename from
8816 find_typedef_in_hash; now a member.
8817 (whatis_exp): Update.
8818 * extension.h (struct ext_lang_type_printers): Add constructor and
8820 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8822 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8823 Now a constructor; rename from start_ext_lang_type_printers.
8824 (ext_lang_type_printers): Now a destructor; rename from
8825 free_ext_lang_type_printers.
8826 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8828 (c_type_print_base_struct_union): Update. Remove cleanups.
8830 2018-03-27 Tom Tromey <tom@tromey.com>
8832 * dwarf-index-write.c: Include <cmath>.
8834 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8836 * NEWS: Add entry describing new "set|show varsize-limit" command.
8837 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8839 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8842 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8844 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8846 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8847 * dwarf-index-common.c: New file.
8848 * dwarf-index-common.h: New file.
8849 * dwarf-index-write.c: New file.
8850 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8851 (struct dwarf2_section_info): Move from here.
8852 (dwarf2_section_info_def): Likewise.
8853 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8854 (offset_type): Likewise.
8855 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8856 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8857 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8858 (byte_swap): Likewise.
8859 (MAYBE_SWAP): Likewise.
8860 (dwarf2_per_cu_ptr): Likewise.
8861 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8862 (struct tu_stats): Likewise.
8863 (struct dwarf2_per_objfile): Likewise.
8864 (struct dwarf2_per_cu_data): Likewise.
8865 (struct signatured_type): Likewise.
8866 (sig_type_ptr): Likewise.
8867 (DEF_VEC_P (sig_type_ptr)): Likewise.
8868 (INDEX4_SUFFIX): Likewise.
8869 (INDEX5_SUFFIX): Likewise.
8870 (DEBUG_STR_SUFFIX): Likewise.
8871 (dwarf2_read_section): Make non-static.
8872 (mapped_index_string_hash): Move from here.
8873 (dwarf5_djb_hash): Likewise.
8874 (file_write): Likewise.
8875 (class data_buf): Likewise.
8876 (struct symtab_index_entry): Likewise.
8877 (struct mapped_symtab): Likewise.
8878 (find_slot): Likewise.
8879 (hash_expand): Likewise.
8880 (add_index_entry): Likewise.
8881 (uniquify_cu_indices): Likewise.
8882 (class c_str_view): Likewise.
8883 (class c_str_view_hasher): Likewise.
8884 (class vector_hasher): Likewise.
8885 (write_hash_table): Likewise.
8886 (psym_index_map): Likewise.
8887 (struct addrmap_index_data): Likewise.
8888 (add_address_entry): Likewise.
8889 (add_address_entry_worker): Likewise.
8890 (write_address_map): Likewise.
8891 (symbol_kind): Likewise.
8892 (write_psymbols): Likewise.
8893 (struct signatured_type_index_data): Likewise.
8894 (write_one_signatured_type): Likewise.
8895 (recursively_count_psymbols): Likewise.
8896 (recursively_write_psymbols): Likewise.
8897 (class debug_names): Likewise.
8898 (check_dwarf64_offsets): Likewise.
8899 (psyms_seen_size): Likewise.
8900 (write_gdbindex): Likewise.
8901 (write_debug_names): Likewise.
8902 (assert_file_size): Likewise.
8903 (write_psymtabs_to_index): Likewise.
8904 (save_gdb_index_command): Likewise.
8905 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8907 * dwarf2read.h: New file.
8909 2018-03-27 Joel Brobecker <brobecker@adacore.com>
8912 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8913 symbol name if the CU's language stores symbol names in linkage
8915 * language.h (struct language_defn)
8916 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8917 all instances of this struct.
8919 2018-03-26 Tom Tromey <tom@tromey.com>
8921 * stack.c (backtrace_command_1): Remove verbose code.
8923 2018-03-26 Tom Tromey <tom@tromey.com>
8925 * python/py-framefilter.c (py_print_type): Don't catch
8926 exceptions. Return void.
8927 (py_print_value): Likewise.
8928 (py_print_single_arg): Likewise.
8929 (enumerate_args): Don't catch exceptions.
8930 (py_print_args): Likewise.
8931 (py_print_frame): Likewise.
8932 (gdbpy_apply_frame_filter): Catch exceptions here.
8934 2018-03-26 Tom Tromey <tom@tromey.com>
8936 * stack.c (_initialize_stack): Remove trailing newlines from help
8937 text. Add "Usage" line to "backtrace" help.
8939 2018-03-26 Tom Tromey <tom@tromey.com>
8942 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8944 2018-03-26 Tom Tromey <tom@tromey.com>
8946 * python/py-framefilter.c (py_print_single_arg): Return
8947 EXT_LANG_BT_ERROR from catch.
8949 2018-03-26 Tom Tromey <tom@tromey.com>
8952 * stack.c (backtrace_command_1): Move some code into no-filters
8955 2018-03-26 Tom Tromey <tom@tromey.com>
8957 * python/py-framefilter.c (throw_quit_or_print_exception): New
8959 (gdbpy_apply_frame_filter): Use it.
8961 2018-03-26 Tom Tromey <tom@tromey.com>
8964 * python/py-framefilter.c (py_print_type, py_print_value)
8965 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8968 2018-03-26 Tom Tromey <tom@tromey.com>
8970 * python/py-framefilter.c (enumerate_args): Use
8971 gdb::unique_xmalloc_ptr.
8973 2018-03-26 Tom Tromey <tom@tromey.com>
8975 * python/py-framefilter.c (py_print_frame): Return
8977 (gdbpy_apply_frame_filter): Update comment.
8978 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8980 <EXT_LANG_BT_NO_FILTERS>: Change value.
8982 2018-03-26 Tom Tromey <tom@tromey.com>
8985 * stack.c (backtrace_command): Parse "hide" argument.
8986 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8987 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8990 2018-03-26 Tom Tromey <tom@tromey.com>
8992 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8994 (backtrace_command): Remove "fulltrace", add "flags".
8996 2018-03-26 Tom Tromey <tom@tromey.com>
8998 * stack.c (backtrace_command): Rewrite command line parsing.
9000 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9002 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9004 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9006 * filename-seen-cache.h: Add include guard.
9008 2018-03-26 Keith Seitz <keiths@redhat.com>
9010 * symfile.c (place_section): Remove "struct" from section_addr_info
9012 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9013 "struct" keyword from section_addr_info.
9015 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9017 * regformats/regdef.h (reg): Add constructors.
9019 2018-03-25 Pedro Alves <palves@redhat.com>
9021 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9022 if then/else bodies in var_func_name extraction.
9024 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9026 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9027 lookup_minimal_symbol() to find symbol entry.
9028 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9030 2018-03-23 Keith Seitz <keiths@redhat.com>
9033 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9034 nested type definitions for C++, too.
9036 2018-03-23 Tom Tromey <tom@tromey.com>
9038 * machoread.c (struct oso_el): Add a constructor. Don't define as
9040 (macho_register_oso): Remove.
9041 (macho_symtab_read): Take a std::vector.
9042 (oso_el_compare_name): Now a std::sort comparator.
9043 (macho_symfile_read_all_oso): Take a std::vector.
9044 (macho_symfile_read): Use std::vector. Remove cleanups.
9046 2018-03-22 Tom Tromey <tom@tromey.com>
9048 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9049 (record_full_goto_bookmark): Use std::string.
9051 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9054 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9057 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9059 * rs6000-tdep.c (store_insn_p): New function.
9060 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9061 and cr_reg to their unshifted values. Use store_insn_p to
9062 match LR saves using either R1 or fdata->alloca_reg. Use
9063 store_insn_p to match CR saves. Set alloca_reg_offset
9064 when alloca_reg and framep are set. Remove lr_reg shift
9065 when assigning to fdata->lr_register.
9067 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9069 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9070 command line args instead of emitting a warning.
9072 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9074 * tracepoint.h (struct static_tracepoint_marker): Initialize
9075 fields, define default constructor, move constructor and move
9076 assignment, disable the rest.
9077 <str_id, extra>: Make std::string.
9078 (release_static_tracepoint_marker): Remove.
9079 (free_current_marker): Remove.
9080 * tracepoint.c (free_current_marker): Remove.
9081 (parse_static_tracepoint_marker_definition): Adjust to
9082 std::string, use new hex2str overload.
9083 (release_static_tracepoint_marker): Remove.
9084 (print_one_static_tracepoint_marker): Get marker by reference
9085 and adjust to std::string.
9086 (info_static_tracepoint_markers_command): Adjust to std::vector
9088 * target.h (static_tracepoint_marker_p): Remove typedef.
9089 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9090 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9092 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9094 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9095 (target_debug_print_std_vector_static_tracepoint_marker): New.
9096 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9098 (target_debug_print_static_tracepoint_marker_p): ... this.
9099 * target-delegates.c: Re-generate.
9100 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9102 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9103 (decode_static_tracepoint_spec): Adjust to std::vector.
9104 (tracepoint_print_one_detail): Adjust to std::string.
9105 (strace_marker_decode_location): Adjust to std::string.
9106 (update_static_tracepoint): Adjust to std::string, remove call
9107 to release_static_tracepoint_marker.
9108 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9109 Adjust to std::vector.
9110 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9111 (remote_static_tracepoint_markers_by_strid): Adjust to
9113 * common/rsp-low.h (hex2str): New overload with explicit count
9115 * common/rsp-low.c (hex2str): New overload with explicit count
9117 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9118 (_initialize_rsp_low_selftests): Add test_hex2str test.
9119 * unittests/tracepoint-selftests.c
9120 (test_parse_static_tracepoint_marker_definition): Adjust to
9123 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9125 * tracepoint.c (parse_static_tracepoint_marker_definition):
9126 Consider case where the definition is followed by more
9128 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9129 tracepoint-selftests.c.
9130 * unittests/tracepoint-selftests.c: New.
9132 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9134 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9137 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9139 * symtab.c (find_pc_sect_line): fixed indentation.
9141 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9143 * symtab.c (find_pc_sect_line): now uses binary search.
9145 2018-03-19 Tom Tromey <tom@tromey.com>
9147 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9150 2018-03-19 Pedro Alves <palves@redhat.com>
9151 Tom Tromey <tom@tromey.com>
9153 * unittests/observable-selftests.c: New file.
9154 * common/observable.h: New file.
9155 * observable.h: New file.
9156 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9157 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9158 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9159 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9160 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9161 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9162 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9163 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9164 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9165 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9166 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9167 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9168 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9169 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9170 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9171 tui/tui-interp.c, valops.c: Update all users.
9172 * tui/tui-hooks.c (tui_bp_created_observer)
9173 (tui_bp_deleted_observer, tui_bp_modified_observer)
9174 (tui_inferior_exit_observer, tui_before_prompt_observer)
9175 (tui_normal_stop_observer, tui_register_changed_observer):
9177 (tui_observers_token): New global.
9178 (attach_or_detach, tui_attach_detach_observers): New functions.
9179 (tui_install_hooks, tui_remove_hooks): Use
9180 tui_attach_detach_observers.
9181 * record-btrace.c (record_btrace_thread_observer): Remove.
9182 (record_btrace_thread_observer_token): New global.
9183 * observer.sh: Remove.
9184 * observer.c: Rename to observable.c.
9185 * observable.c (namespace gdb_observers): Define new objects.
9186 (observer_debug): Move into gdb_observers namespace.
9187 (struct observer, struct observer_list, xalloc_observer_list_node)
9188 (xfree_observer_list_node, generic_observer_attach)
9189 (generic_observer_detach, generic_observer_notify): Remove.
9190 (_initialize_observer): Update.
9191 Don't include observer.inc.
9192 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9193 (clean mostlyclean): Likewise.
9194 (observer.h, observer.inc): Remove targets.
9195 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9196 (COMMON_SFILES): Use observable.c, not observer.c.
9197 * .gitignore: Remove observer.h.
9199 2018-03-18 Tom Tromey <tom@tromey.com>
9201 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9203 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9205 2018-03-17 Tom Tromey <tom@tromey.com>
9207 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9209 2018-03-17 Tom Tromey <tom@tromey.com>
9211 * target.c (class scoped_target_fd): New.
9212 (target_fileio_close_cleanup): Remove.
9213 (target_fileio_read_alloc_1): Use scoped_target_fd.
9215 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9217 * silent-rules.mk: New.
9218 * Makefile.in: Include silent-rules.mk
9219 (srcdir, VPATH, top_srcdir): Move up.
9220 (COMPILE): Add ECHO_CXX.
9221 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9222 (init.c): Add ECHO_INIT_C.
9223 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9224 (version.c): Add ECHO_GEN.
9225 (printcmd.o): Add ECHO_CXX.
9226 (target-float.o): Add ECHO_CXX.
9227 (ada-exp.o): Add ECHO_CXX.
9228 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9229 (insight$(EXEEXT)): Add ECHO_CXXLD.
9230 * gnulib/configure.ac: Add AM_SILENT_RULES.
9231 * gnulib/aclocal.m4: Re-generate.
9232 * gnulib/configure: Re-generate.
9233 * gnulib/import/Makefile.in: Re-generate.
9235 2018-03-16 Tom Tromey <tom@tromey.com>
9237 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9238 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9239 * utils.c (do_free_section_addr_info)
9240 (make_cleanup_free_section_addr_info): Remove.
9241 * symfile.h (struct other_sections): Add constructor.
9242 (struct section_addr_info): Remove.
9243 (section_addr_info): New typedef.
9244 (struct sym_fns) <sym_offsets>: Change type of parameter.
9245 (build_section_addr_info_from_objfile)
9246 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9247 (default_symfile_offsets, symbol_file_add)
9248 (symbol_file_add_from_bfd)
9249 (build_section_addr_info_from_section_table): Update.
9250 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9251 * symfile.c (alloc_section_addr_info): Remove.
9252 (build_section_addr_info_from_section_table): Change return type.
9254 (build_section_addr_info_from_bfd)
9255 (build_section_addr_info_from_objfile): Likewise.
9256 (free_section_addr_info): Remove.
9257 (relative_addr_info_to_section_offsets): Change type of "addrs".
9258 (addrs_section_compar): Now a std::sort comparator.
9259 (addrs_section_sort): Change return type.
9260 (addr_info_make_relative): Change type of "addrs". Update.
9261 (default_symfile_offsets, syms_from_objfile_1)
9262 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9263 (symbol_file_add_separate): Update.
9264 (symbol_file_add): Change type of "addrs". Update.
9265 (add_symbol_file_command): Update. Remove cleanups.
9266 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9268 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9269 * solib.c (solib_read_symbols): Update.
9270 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9271 * machoread.c (macho_symfile_offsets): Update.
9272 * jit.c (jit_bfd_try_read_symtab): Update.
9274 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9276 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9277 unittests/utils-selftests.c.
9278 * unittests/utils-selftests.c: New file.
9280 2018-03-14 Tom Tromey <tom@tromey.com>
9283 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9286 2018-03-14 Tom Tromey <tom@tromey.com>
9289 * printcmd.c (printf_pointer): Allow "-" in format.
9291 2018-03-14 Tom Tromey <tom@tromey.com>
9293 * printcmd.c (_initialize_printcmd): Add usage to printf.
9295 2018-03-14 Yao Qi <qiyao@sourceware.org>
9297 * MAINTAINERS: Update my email address.
9299 2018-03-13 Tom Tromey <tom@tromey.com>
9301 * machoread.c (macho_check_dsym): Change filenamep to a
9303 (macho_symfile_read): Update.
9304 * symfile.c (load_command): Use std::string.
9306 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
9308 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9309 to error message string.
9310 (riscv_register_name): Use xsnprintf instead of sprintf.
9311 (riscv_insn::fetch_instruction): Use gdb_assert instead of
9313 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9315 (riscv_push_dummy_call): Likewise.
9317 2018-03-12 Tom Tromey <tom@tromey.com>
9319 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9320 Use gdb::byte_vector.
9321 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9323 2018-03-12 Yao Qi <yao.qi@linaro.org>
9325 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9326 parameter type to readable_regcache.
9327 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9330 2018-03-11 Tom Tromey <tom@tromey.com>
9332 * dwarf2read.c (struct nextfield): Add initializers.
9333 (struct nextfnfield): Remove.
9334 (struct fnfieldlist): Add initializers. Remove "length" and
9335 "head", use std::vector.
9336 (struct decl_field_list): Remove.
9337 (struct field_info): Add initializers.
9338 <fields, baseclasses>: Now std::vector.
9339 <nbaseclasses, nfnfields, typedef_field_list_count,
9340 nested_types_list_count>: Remove.
9341 (dwarf2_add_field, dwarf2_add_type_defn)
9342 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9343 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9344 (process_structure_scope): Update.
9346 2018-03-11 Tom Tromey <tom@tromey.com>
9348 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9349 for use by std::sort.
9350 (build_type_psymtabs_1): Use std::vector.
9352 2018-03-09 Eli Zaretskii <eliz@gnu.org>
9354 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9355 and LIBMPFR in the printed configuration.
9357 2018-03-08 Tom Tromey <tom@tromey.com>
9359 * source.c (get_filename_and_charpos): Use scoped_fd.
9360 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9361 (procfs_pidlist): Likewise.
9362 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9363 (iterate_over_mappings): Likewise.
9365 2018-03-08 Tom Tromey <tom@tromey.com>
9367 * infcall.c (struct call_return_meta_info)
9368 <stack_temporaries_enabled>: Remove.
9369 (get_call_return_value, call_function_by_hand_dummy): Update.
9370 * thread.c (disable_thread_stack_temporaries): Remove.
9371 (enable_thread_stack_temporaries): Remove.
9372 (thread_stack_temporaries_enabled_p): Return bool.
9373 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9374 (get_last_thread_stack_temporary): Update.
9375 * eval.c (evaluate_subexp): Update.
9376 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9377 class, not a function.
9378 (value_ptr, value_vec): Remove typedefs.
9379 (class thread_info) <stack_temporaries_enabled>: Now bool.
9380 <stack_temporaries>: Now a std::vector.
9381 (thread_stack_temporaries_enabled_p)
9382 (value_in_thread_stack_temporaries): Return bool.
9384 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9386 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9387 (getpkt_or_notif_sane_1): Likewise.
9389 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9391 * build-id.c (build_id_to_debug_bfd): Use std::string.
9393 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9395 * build-id.c (find_separate_debug_file_by_buildid): Return
9397 * build-id.h (find_separate_debug_file_by_buildid): Return
9399 * coffread.c (coff_symfile_read): Adjust to std::string.
9400 * elfread.c (elf_symfile_read): Adjust to std::string.
9401 * symfile.c (separate_debug_file_exists): Change parameter to
9403 (find_separate_debug_file): Return std::string.
9404 (find_separate_debug_file_by_debuglink): Return std::string.
9405 * symfile.h (find_separate_debug_file_by_debuglink): Return
9408 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9410 * common/xml-utils.c (xml_escape_text): Move code to...
9411 (xml_escape_text_append): ... this new function.
9412 * common/xml-utils.h (xml_escape_text_append): New declaration.
9413 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9415 (_initialize_xml_utils): register test_xml_escape_text_append as
9418 2018-03-07 Alan Hayward <alan.hayward@arm.com>
9420 * defs.h: Remove MAX_REGISTER_SIZE.
9421 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9423 * python/py-unwind.c (pyuw_sniffer): Likewise.
9425 2018-03-07 Tom Tromey <tom@tromey.com>
9427 * linux-tdep.c (linux_info_proc): Update.
9428 * target.h (struct target_ops) <to_fileio_readlink>: Return
9430 (target_fileio_readlink): Return optional<string>.
9431 * remote.c (remote_hostio_readlink): Return optional<string>.
9432 * inf-child.c (inf_child_fileio_readlink): Return
9434 * target.c (target_fileio_readlink): Return optional<string>.
9436 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9438 * regcache.c (cooked_read_test): Add riscv to the list of
9439 architectures that have a save_reggroup.
9441 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9443 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9444 value is not a dynamic class object.
9446 2018-03-06 Tom Tromey <tom@tromey.com>
9448 * rust-exp.y: Formatting fixes.
9450 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9452 * riscv-tdep.c (riscv_register_name): Remove target description
9454 (riscv_gdbarch_init): Remove target description check.
9456 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9458 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9460 * riscv-tdep.h: Likewise.
9462 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9464 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9465 (riscv_pseudo_register_write): Delete.
9466 (riscv_gdbarch_init): Remove all use of pseudo registers.
9468 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9470 * record-btrace.c (btrace_print_lines): Replace cleanup
9471 parameter with RAII equivalents.
9472 (btrace_insn_history): Replace cleanup with RAII equivalents.
9473 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9474 make_cleanup_ui_out_tuple_begin_end): Remove.
9475 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9476 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9477 make_cleanup_ui_out_list_begin_end): Remove.
9479 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9481 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9482 parameter types to std::vector. Use bool.
9483 (record_btrace_wait): Replace VEC(tp_t) with
9484 std::vector<thread_info *>.
9485 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9487 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9489 * record-btrace.c (record_btrace_disable_callback): Remove.
9490 (struct scoped_btrace_disable): New.
9491 (record_btrace_open): Use scoped_btrace_disable.
9493 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9495 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9496 reading values from registers.
9498 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9500 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9503 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9505 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9506 change parameter type. Use GDB's print functions, and use
9507 core_addr_to_string where appropriate.
9508 (riscv_push_dummy_call): Use core_addr_to_string where
9509 appropriate, update call to riscv_print_arg_location, and reindent
9511 (riscv_return_value): Update call to riscv_print_arg_location.
9513 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9514 Tim Newsome <tim@sifive.com>
9515 Albert Ou <a0u@eecs.berkeley.edu>
9516 Darius Rad <darius@bluespec.com>
9518 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9519 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9520 (ALLDEPFILES): Add riscv-tdep.c
9521 * configure.tgt: Add riscv support.
9522 * riscv-tdep.c: New file.
9523 * riscv-tdep.h: New file.
9524 * NEWS: Mention new target.
9525 * MAINTAINERS: Add entry for riscv.
9527 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9529 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9530 fields within aggregates.
9532 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9534 * record-btrace.c (btrace_print_lines): Change type of flags to
9535 gdb_disassembly_flags.
9537 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9539 * fbsd-nat.c: Include "inf-ptrace.h".
9540 (USE_SIGTRAP_SIGINFO): Conditionally define.
9541 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9542 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9543 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9545 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9547 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9549 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9550 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9551 "supports_stopped_by_hw_breakpoint" target methods.
9553 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9555 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9556 * fbsd-nat.c (debug_fbsd_nat): New variable.
9557 (show_fbsd_nat_debug): New function.
9558 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9559 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9561 2018-03-04 John Baldwin <jhb@FreeBSD.org>
9563 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9564 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9566 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9567 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9570 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9572 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9573 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9575 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9577 * charset.c (struct charset_vector): New.
9578 (charsets): Change type to charset_vector.
9579 (find_charset_names): Adjust.
9581 (_initialize_charset): Adjust.
9583 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9585 * progspace.h (struct program_space) <deleted_solibs>: Change
9586 type to std::vector<std::string>.
9587 * progspace.c (clear_program_space_solib_cache): Adjust.
9588 * breakpoint.c (print_solib_event): Adjust.
9589 (check_status_catch_solib): Adjust.
9590 * solib.c (update_solib_list): Adjust.
9591 * ui-out.h (class ui_out) <field_string>: New overload.
9592 * ui-out.c (ui_out::field_string): New overload.
9594 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9596 * progspace.h (struct program_space): Add constructor and
9597 destructor, initialize fields.
9598 (add_program_space): Remove.
9599 * progspace.c (add_program_space): Rename to...
9600 (program_space::program_space): ... this.
9601 (release_program_space): Rename to...
9602 (program_space::~program_space): ... this.
9603 (delete_program_space): Use delete to delete program_space.
9604 (initialize_progspace): Use new to allocate program_space.
9605 * inferior.c (add_inferior_with_spaces): Likewise.
9606 (clone_inferior_command): Likewise.
9607 * infrun.c (follow_fork_inferior): Likewise.
9608 (handle_vfork_child_exec_or_exit): Likewise.
9610 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9612 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9613 (delim_string_to_char_ptr_vec): Return std::vector of
9614 gdb::unique_xmalloc_ptr.
9615 (dirnames_to_char_ptr_vec_append): Take std::vector of
9616 gdb::unique_xmalloc_ptr.
9617 (dirnames_to_char_ptr_vec): Return std::vector of
9618 gdb::unique_xmalloc_ptr.
9619 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9620 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9621 (delim_string_to_char_ptr_vec): Return an std::vector of
9622 gdb::unique_xmalloc_ptr, adjust the code.
9623 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9624 gdb::unique_xmalloc_ptr, adjust the code.
9625 (dirnames_to_char_ptr_vec): Return an std::vector of
9626 gdb::unique_xmalloc_ptr, adjust the code.
9627 * auto-load.c (auto_load_safe_path_vec): Change type to
9628 std::vector of gdb::unique_xmalloc_ptr.
9629 (auto_load_expand_dir_vars): Return an std::vector of
9630 gdb::unique_xmalloc_ptr, adjust the code.
9631 (auto_load_safe_path_vec_update): Adjust.
9632 (filename_is_in_auto_load_safe_path_vec): Adjust.
9633 (auto_load_objfile_script_1): Adjust.
9634 * build-id.c (build_id_to_debug_bfd): Adjust.
9635 * linux-thread-db.c (thread_db_load_search): Adjust.
9636 * source.c (add_path): Adjust.
9638 * symfile.c (find_separate_debug_file): Adjust.
9639 * utils.c (do_free_char_ptr_vec): Remove.
9640 (make_cleanup_free_char_ptr_vec): Remove.
9642 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9645 * common/pathstuff.c: Conditionally include "<windows.h>".
9647 2018-03-01 Georg Sauthoff <mail@georg.so>
9650 * gcore.in: Quote variables and switch interpreter to bash.
9652 2018-03-01 Tom Tromey <tom@tromey.com>
9654 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9655 assertion. Add assertion for discriminant_index.
9656 (quirk_rust_enum): Use correct base type name in univariant case.
9658 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9660 * record.c (get_call_history_modifiers): Return a
9662 (cmd_record_call_history): Adjust.
9663 * record-btrace.c (record_btrace_call_history): Adjust.
9664 (record_btrace_call_history_range): Adjust.
9665 (record_btrace_call_history_from): Adjust.
9666 * target-debug.h (target_debug_print_record_print_flags): New.
9667 * target-delegates.c: Re-generate.
9668 * target.c (target_call_history): Change flags type.
9669 (target_call_history_from): Likewise.
9670 (target_call_history_range): Likewise.
9671 * target.h (struct target_ops) <target_call_history>: Likewise.
9672 (target_call_history_from): Likewise.
9673 (target_call_history_range): Likewise.
9675 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9676 Simon Marchi <simon.marchi@polymtl.ca>
9678 * common/common-utils.c: Include "sys/stat.h".
9679 (is_regular_file): Move here from "source.c"; change return
9681 * common/common-utils.h (is_regular_file): New prototype.
9682 * common/pathstuff.c (contains_dir_separator): New function.
9683 * common/pathstuff.h (contains_dir_separator): New prototype.
9684 * source.c: Don't include "sys/stat.h".
9685 (is_regular_file): Move to "common/common-utils.c".
9687 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9689 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9690 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9691 * auto-load.c: Include "common/pathstuff.h".
9692 * common/common-def.h (current_directory): Move here.
9693 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9695 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9697 * common/pathstuff.c: New file.
9698 * common/pathstuff.h: New file.
9699 * compile/compile.c: Include "common/pathstuff.h".
9700 * defs.h (current_directory): Move to "common/common-defs.h".
9701 * dwarf2read.c: Include "common/pathstuff.h".
9703 * guile/scm-safe-call.c: Likewise.
9704 * linux-thread-db.c: Likewise.
9706 * nto-tdep.c: Likewise.
9707 * objfiles.c: Likewise.
9708 * source.c: Likewise.
9709 * symtab.c: Likewise.
9710 * utils.c: Include "common/pathstuff.h".
9711 (gdb_realpath): Move to "common/pathstuff.c".
9712 (gdb_realpath_keepfile): Likewise.
9713 (gdb_abspath): Likewise.
9714 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9715 (gdb_realpath_keepfile): Likewise.
9716 (gdb_abspath): Likewise.
9718 2018-02-28 John Baldwin <jhb@FreeBSD.org>
9720 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9721 wildcard process pid for super_resume for kernels with a
9724 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9726 * compile/compile.c (get_args): Add additional comments
9727 explaining function.
9729 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9730 Tom Tromey <tom@tromey.com>
9732 * target.h (memory_write_request_s): Remove typedef. Don't define
9734 (target_write_memory_blocks): Change argument to std::vector.
9735 (struct memory_write_request): Add constructor.
9736 * target-memory.c (compare_block_starting_address): Return bool.
9737 Change argument types.
9738 (claim_memory): Change arguments to use std::vector.
9739 (split_regular_and_flash_blocks, blocks_to_erase)
9740 (compute_garbled_blocks): Likewise.
9741 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9742 (target_write_memory_blocks): Change argument to std::vector.
9743 * symfile.c (struct load_section_data): Add constructor and
9744 destructor. Use std::vector for "requests".
9745 (struct load_progress_data): Add initializers.
9746 (load_section_callback): Update. Use "new".
9747 (clear_memory_write_data): Remove.
9748 (generic_load): Update.
9750 2018-02-27 Alan Hayward <alan.hayward@arm.com>
9752 * arch/aarch64.h: Use common/tdesc.h.
9754 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9756 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9757 architecture with a 64-bit ABI.
9759 2018-02-26 Maciej W. Rozycki <macro@mips.com>
9761 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9762 ahead of target description loading.
9764 2018-02-26 Tom Tromey <tom@tromey.com>
9766 * stack.c (backtrace_command_1): Update.
9767 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9769 * python/py-framefilter.c (py_print_frame)
9770 (gdbpy_apply_frame_filter): Change type of "flags".
9771 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9773 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9774 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9775 * extension.h (enum frame_filter_flag): Rename from
9777 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9778 (apply_ext_lang_frame_filter): Change type of "flags".
9779 * extension.c (apply_ext_lang_frame_filter): Change type of
9781 * extension-priv.h (struct extension_language_ops)
9782 <apply_frame_filter>: Change type of "flags".
9784 2018-02-26 Tom Tromey <tom@tromey.com>
9787 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9788 off-by-one in py_end computation.
9789 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9791 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9794 2018-02-26 Tom Tromey <tom@tromey.com>
9796 * dwarf2read.c (struct variant_field): New.
9797 (struct nextfield) <variant>: New field.
9798 (dwarf2_add_field): Handle DW_TAG_variant_part.
9799 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9800 discriminated union.
9801 (read_structure_type): Handle DW_TAG_variant_part.
9802 (handle_struct_member_die): New function, extracted from
9803 process_structure_scope. Handle DW_TAG_variant.
9804 (process_structure_scope): Handle discriminated unions. Call
9805 handle_struct_member_die.
9807 2018-02-26 Tom Tromey <tom@tromey.com>
9809 * rust-lang.h (rust_last_path_segment): Declare.
9810 * rust-lang.c (rust_last_path_segment): Now public. Change
9812 (struct disr_info): Remove.
9813 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9814 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9815 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9816 (rust_enum_p, rust_enum_variant): New function.
9817 (rust_underscore_fields): Remove "offset" parameter.
9818 (rust_print_enum): New function.
9819 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9820 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9821 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9823 (rust_internal_print_type): New function, from rust_print_type.
9825 (rust_print_type): Call rust_internal_print_type.
9826 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9827 Update enum handling.
9828 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9829 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9830 (rust_union_quirks): New functions.
9831 (process_full_comp_unit, process_full_type_unit): Call
9833 (process_structure_scope): Update rust_unions if necessary.
9835 2018-02-26 Tom Tromey <tom@tromey.com>
9837 * value.h (value_union_variant): Declare.
9838 * valops.c (value_union_variant): New function.
9839 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9840 (struct discriminant_info): New.
9841 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9843 (struct main_type) <flag_discriminated_union>: New field.
9845 2018-02-26 Tom Tromey <tom@tromey.com>
9847 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9848 unittests/unpack-selftests.c.
9849 * unittests/unpack-selftests.c: New file.
9850 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9852 2018-02-26 Yao Qi <yao.qi@linaro.org>
9854 * dwarf2read.c (struct partial_die_info) <read>: New method.
9855 (read_partial_die): Remove the declaration.
9856 (load_partial_dies): Update.
9857 (partial_die_info::partial_die_info):
9858 (read_partial_die): Change it to partial_die_info::read.
9860 2018-02-26 Yao Qi <yao.qi@linaro.org>
9862 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9863 (fixup_partial_die): Remove declaration.
9864 (scan_partial_symbols): Update.
9865 (partial_die_parent_scope): Likewise.
9866 (partial_die_full_name): Likewise.
9867 (fixup_partial_die): Change it to partial_die_info::fixup.
9869 2018-02-26 Yao Qi <yao.qi@linaro.org>
9871 * dwarf2read.c (read_partial_die): Update the declaration.
9872 (load_partial_dies): Caller update.
9873 (read_partial_die): Remove one argument abbrev_len.
9875 2018-02-26 Yao Qi <yao.qi@linaro.org>
9877 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9878 assignment operator.
9879 (load_partial_dies): Use ctor and copy ctor.
9880 (read_partial_die): Update.
9881 (dwarf2_cu::find_partial_die): Use ctor.
9883 2018-02-26 Yao Qi <yao.qi@linaro.org>
9885 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9886 (find_partial_die_in_comp_unit): Change it to
9887 dwarf2_cu::find_partial_die.
9888 (find_partial_die): Update.
9890 2018-02-26 Yao Qi <yao.qi@linaro.org>
9892 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9895 2018-02-26 Yao Qi <yao.qi@linaro.org>
9897 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9899 2018-02-26 Alan Hayward <alan.hayward@arm.com>
9901 * arch/amd64.h: Use common/tdesc.h.
9902 * arch/i386.c: Likewise.
9903 * arch/i386.h: Likewise.
9904 * arch/tic6x.c: Likewise.
9905 * arch/tdesc.h: Move file from here...
9906 * common/tdesc.h: ...to here.
9907 * features/aarch64-core.c: Regenerate.
9908 * features/aarch64-fpu.c: Regenerate.
9909 * features/i386/32bit-avx.c: Regenerate.
9910 * features/i386/32bit-avx512.c: Regenerate.
9911 * features/i386/32bit-core.c: Regenerate.
9912 * features/i386/32bit-linux.c: Regenerate.
9913 * features/i386/32bit-mpx.c: Regenerate.
9914 * features/i386/32bit-pkeys.c: Regenerate.
9915 * features/i386/32bit-sse.c: Regenerate.
9916 * features/i386/64bit-avx.c: Regenerate.
9917 * features/i386/64bit-avx512.c: Regenerate.
9918 * features/i386/64bit-core.c: Regenerate.
9919 * features/i386/64bit-linux.c: Regenerate.
9920 * features/i386/64bit-mpx.c: Regenerate.
9921 * features/i386/64bit-pkeys.c: Regenerate.
9922 * features/i386/64bit-segments.c: Regenerate.
9923 * features/i386/64bit-sse.c: Regenerate.
9924 * features/i386/x32-core.c: Regenerate.
9925 * features/tic6x-c6xp.c: Regenerate.
9926 * features/tic6x-core.c: Regenerate.
9927 * features/tic6x-gp.c: Regenerate.
9928 * target-descriptions.c: Use common/tdesc.h.
9929 * target-descriptions.h: Likewise.
9931 2018-02-24 Tom Tromey <tom@tromey.com>
9933 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9934 (try_thread_db_load_from_dir, thread_db_load_search): Use
9936 (info_auto_load_libthread_db_compare): Return bool. Change
9938 (info_auto_load_libthread_db): Use std::vector, std::string.
9941 2018-02-24 Tom Tromey <tom@tromey.com>
9943 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9945 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9947 * gdbarch.c: Rebuild.
9948 * gdbarch.h: Rebuild.
9949 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9950 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9951 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9954 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9956 * gdbtypes.h (sect_offset): Change type to uint64_t.
9957 (sect_offset_str): New function.
9958 * dwarf2read.c (create_addrmap_from_aranges): Use
9960 (error_check_comp_unit_head): Likewise.
9961 (create_debug_type_hash_table): Likewise.
9962 (read_cutu_die_from_dwo): Likewise.
9963 (init_cutu_and_read_dies): Likewise.
9964 (init_cutu_and_read_dies_no_follow): Likewise.
9965 (process_psymtab_comp_unit_reader): Likewise.
9966 (partial_die_parent_scope): Likewise.
9967 (peek_die_abbrev): Likewise.
9968 (process_queue): Likewise.
9969 (dwarf2_physname): Likewise.
9970 (read_namespace_alias): Likewise.
9971 (read_import_statement): Likewise.
9972 (create_dwo_cu_reader): Likewise.
9973 (create_cus_hash_table): Likewise.
9974 (lookup_dwo_cutu): Likewise.
9975 (inherit_abstract_dies): Likewise.
9976 (read_func_scope): Likewise.
9977 (read_call_site_scope): Likewise.
9978 (dwarf2_add_member_fn): Likewise.
9979 (read_common_block): Likewise.
9980 (read_module_type): Likewise.
9981 (read_typedef): Likewise.
9982 (read_subrange_type): Likewise.
9983 (load_partial_dies): Likewise.
9984 (read_partial_die): Likewise.
9985 (find_partial_die): Likewise.
9986 (read_str_index): Likewise.
9987 (dwarf2_string_attr): Likewise.
9988 (build_error_marker_type): Likewise.
9989 (lookup_die_type): Likewise.
9990 (dump_die_shallow): Likewise.
9991 (follow_die_ref): Likewise.
9992 (dwarf2_fetch_die_loc_sect_off): Likewise.
9993 (dwarf2_fetch_constant_bytes): Likewise.
9994 (follow_die_sig): Likewise.
9995 (get_signatured_type): Likewise.
9996 (get_DW_AT_signature_type): Likewise.
9997 (dwarf2_find_containing_comp_unit): Likewise.
9998 (set_die_type): Likewise.
10000 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10002 * arch/aarch64.c: Include "common-defs.h".
10003 * arch/amd64.c: Likewise.
10004 * arch/i386.c: Likewise.
10006 2018-02-21 Tom Tromey <tom@tromey.com>
10008 * value.h: (extract_field_op): Update.
10009 * eval.c (extract_field_op): Return a const char *.
10010 * expression.h (parse_expression_for_completion): Update.
10011 * completer.c (complete_expression): Update.
10012 (add_struct_fields): Make fieldname const.
10013 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10014 (mark_completion_tag, parse_exp_in_context_1): Update.
10015 (parse_expression_for_completion): Change "name" to
10016 unique_xmalloc_ptr*.
10018 2018-02-21 Tom Tromey <tom@tromey.com>
10020 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10022 2018-02-21 Yao Qi <yao.qi@linaro.org>
10024 * avr-tdep.c (avr_read_pc): Change parameter type to
10026 * gdbarch.sh (read_pc): Likewise.
10027 * gdbarch.c: Re-generated.
10028 * gdbarch.h: Re-generated.
10029 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10031 * ia64-tdep.c (ia64_read_pc): Likewise.
10032 * mips-tdep.c (mips_read_pc): Likewise.
10033 * spu-tdep.c (spu_read_pc): Likewise.
10035 2018-02-21 Yao Qi <yao.qi@linaro.org>
10037 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10038 * regcache-dump.c: New file.
10039 * regcache.c: Move register_dump to regcache-dump.c.
10040 (maintenance_print_registers): Likewise.
10041 (maintenance_print_raw_registers): Likewise.
10042 (maintenance_print_cooked_registers): Likewise.
10043 (maintenance_print_register_groups): Likewise.
10044 (maintenance_print_remote_registers): Likewise.
10045 (_initialize_regcache): Likewise.
10046 * regcache.h (register_dump): Moved from regcache.c.
10048 2018-02-21 Yao Qi <yao.qi@linaro.org>
10050 * regcache.c (regcache::regcache): Update.
10051 (regcache::invalidate): Move it to detached_regcache::invalidate.
10052 (get_thread_arch_aspace_regcache): Update.
10053 (regcache::raw_update): Update.
10054 (regcache::cooked_read): Remove some code.
10055 (regcache::cooked_read_value): Likewise.
10056 (regcache::raw_write): Remove assert on m_readonly_p.
10057 (regcache::raw_supply_integer): Move it to
10058 detached_regcache::raw_supply_integer.
10059 (regcache::raw_supply_zeroed): Likewise.
10060 * regcache.h (detached_regcache) <raw_supply_integer>: New
10062 <raw_supply_zeroed, invalidate>: Likewise.
10063 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10064 <invalidate>: Likewise.
10065 <m_readonly_p>: Removed.
10067 2018-02-21 Yao Qi <yao.qi@linaro.org>
10069 * infcmd.c (get_return_value): Let stop_regs point to
10070 get_current_regcache.
10071 * regcache.c (regcache::regcache): Remove.
10072 (register_dump_reg_buffer): New class.
10073 (regcache_print): Adjust.
10074 * regcache.h (regcache): Remove constructors.
10076 2018-02-21 Yao Qi <yao.qi@linaro.org>
10078 * regcache.c (class register_dump): New class.
10079 (register_dump_regcache, register_dump_none): New class.
10080 (register_dump_remote, register_dump_groups): New class.
10081 (regcache_print): Update.
10082 * regcache.h (regcache_dump_what): Move it to regcache.c.
10083 (regcache) <dump>: Remove.
10085 2018-02-21 Yao Qi <yao.qi@linaro.org>
10087 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10089 (jit_unwind_reg_set_impl): Call raw_supply.
10090 (jit_frame_sniffer): Use reg_buffer_rw.
10091 * record-full.c (record_full_core_regbuf): Change its type.
10092 (record_full_core_open_1): Use reg_buffer_rw.
10093 (record_full_close): Likewise.
10094 (record_full_core_fetch_registers): Use regcache->raw_supply.
10095 (record_full_core_store_registers): Likewise.
10096 * regcache.c (regcache::get_register_status): Move it to
10098 (regcache_raw_set_cached_value): Remove.
10099 (regcache::raw_set_cached_value): Remove.
10100 (regcache::raw_write): Call raw_supply.
10101 (regcache::raw_supply): Move it to reg_buffer_rw.
10102 * regcache.h (regcache_raw_set_cached_value): Remove.
10103 (reg_buffer_rw): New class.
10105 2018-02-21 Yao Qi <yao.qi@linaro.org>
10107 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10108 readonly_detached_regcache.
10109 (dummy_frame_prev_register): Use regcache->cooked_read.
10110 * frame.c (frame_save_as_regcache): Change return type.
10111 (frame_pop): Update.
10112 * frame.h (frame_save_as_regcache): Update declaration.
10113 * inferior.h (get_infcall_suspend_state_regcache): Update
10115 * infrun.c (infcall_suspend_state) <registers>: use
10116 readonly_detached_regcache.
10117 (save_infcall_suspend_state): Don't use regcache_dup.
10118 (get_infcall_suspend_state_regcache): Change return type.
10119 * linux-fork.c (struct fork_info) <savedregs>: Change to
10120 readonly_detached_regcache.
10122 (fork_save_infrun_state): Don't use regcache_dup.
10123 (info_checkpoints_command): Adjust.
10124 * mi/mi-main.c (register_changed_p): Update declaration.
10125 (mi_cmd_data_list_changed_registers): Use
10126 readonly_detached_regcache.
10127 (register_changed_p): Change parameter type to
10128 readonly_detached_regcache.
10129 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10130 readonly_detached_regcache.
10131 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10132 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10134 (regcache::save): Move it to reg_buffer.
10135 (regcache::restore): Change parameter type.
10136 (regcache_dup): Remove.
10137 * regcache.h (reg_buffer) <save>: New method.
10138 (readonly_detached_regcache): New class.
10139 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10140 readonly_detached_regcache.
10141 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10143 2018-02-21 Yao Qi <yao.qi@linaro.org>
10145 * frame.c (frame_save_as_regcache): Use regcache method save.
10146 (frame_pop): Use regcache method restore.
10147 * infrun.c (restore_infcall_suspend_state): Likewise.
10148 * linux-fork.c (fork_load_infrun_state): Likewise.
10149 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10151 * regcache.c (regcache_save): Remove.
10152 (regcache::restore): More asserts.
10153 (regcache_cpy): Remove.
10154 * regcache.h (regcache_save): Remove the declaration.
10155 (regcache::restore): Move from private to public.
10156 Remove the friend declaration of regcache_cpy.
10157 (regcache_cpy): Remove declaration.
10159 2018-02-21 Yao Qi <yao.qi@linaro.org>
10161 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10162 parameter type to 'readable_regcache *'.
10163 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10164 * arm-tdep.c (arm_neon_quad_read): Likewise.
10165 (arm_pseudo_read): Likewise.
10166 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10167 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10168 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10169 * gdbarch.c: Re-generated.
10170 * gdbarch.h: Re-generated.
10171 * gdbarch.sh (pseudo_register_read): Change parameter type to
10172 'readable_regcache *'.
10173 (pseudo_register_read_value): Likewise.
10174 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10175 (h8300_pseudo_register_read): Likewise.
10176 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10177 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10178 (i386_pseudo_register_read_into_value): Likewise.
10179 (i386_pseudo_register_read_value): Likewise.
10180 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10182 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10183 * m32c-tdep.c (m32c_raw_read): Likewise.
10184 (m32c_read_flg): Likewise.
10185 (m32c_banked_register): Likewise.
10186 (m32c_banked_read): Likewise.
10187 (m32c_sb_read): Likewise.
10188 (m32c_part_read): Likewise.
10189 (m32c_cat_read): Likewise.
10190 (m32c_r3r2r1r0_read): Likewise.
10191 (m32c_pseudo_register_read): Likewise.
10192 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10193 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10194 (mep_pseudo_cr64_read): Likewise.
10195 (mep_pseudo_register_read): Likewise.
10196 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10197 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10198 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10199 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10200 (regcache::cooked_read): Likewise.
10201 (regcache::cooked_read_value): Likewise.
10202 (regcache_cooked_read_signed):
10203 (regcache::cooked_read): Likewise.
10204 * regcache.h (readable_regcache): New class.
10205 (regcache): Inherit readable_regcache. Move some methods to
10207 * rl78-tdep.c (rl78_pseudo_register_read): Change
10208 parameter type to 'readable_regcache *'.
10209 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10210 (e500_pseudo_register_read): Change parameter type to
10211 'readable_regcache *'.
10212 (dfp_pseudo_register_read): Likewise.
10213 (vsx_pseudo_register_read): Likewise.
10214 (efpr_pseudo_register_read): Likewise.
10215 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10216 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10217 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10218 (sh64_pseudo_register_read): Likewise.
10219 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10220 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10221 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10222 (spu_pseudo_register_read): Likewise.
10223 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10224 (xtensa_pseudo_register_read): Likewise.
10226 2018-02-21 Yao Qi <yao.qi@linaro.org>
10228 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10229 (regcache::arch): Move it to reg_buffer::arch.
10230 (regcache::register_buffer): Likewise.
10231 (regcache::assert_regnum): Likewise.
10232 (regcache::num_raw_registers): Likewise.
10233 * regcache.h (reg_buffer): New class.
10234 (regcache): Inherit reg_buffer.
10236 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10238 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10239 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10241 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10243 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10245 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10247 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10248 (SFILES): Remove common/*.c files.
10249 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10250 * common/common.host: Add common reference.
10251 * configure.ac: Likewise.
10252 * configure: Regenerate.
10254 2018-02-16 Yao Qi <yao.qi@linaro.org>
10256 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10257 (block_initialize_namespace): Use new.
10258 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10259 (dwarf2_free_objfile): Use delete.
10260 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10261 (copy_type_recursive): Use new.
10262 * gdb_obstack.h (allocate_on_obstack): New.
10264 2018-02-15 Yao Qi <yao.qi@linaro.org>
10267 * inferior.c (exit_inferior_1): Reset inf->control.
10269 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10271 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10274 2018-02-14 Pedro Alves <palves@redhat.com>
10276 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10277 frame_cleanup_after_sniffer on exception.
10279 2018-02-14 Tom Tromey <tom@tromey.com>
10281 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10283 (solib_bfd_open): Make pathname const.
10284 * solib.c (solib_bfd_open): Make pathname const.
10285 * solib-spu.c (spu_bfd_fopen): Make name const.
10286 (spu_bfd_open): Make pathname const.
10287 * solib-darwin.c (darwin_bfd_open): Make pathname const.
10288 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10290 2018-02-14 Tom Tromey <tom@tromey.com>
10292 * symfile.c (symfile_bfd_open): Update.
10293 * source.h (openp, source_full_path_of, find_and_open_source):
10294 Change argument type to unique_xmalloc_ptr.
10295 * source.c (openp): Take a unique_xmalloc_ptr.
10296 (source_full_path_of, find_and_open_source): Likewise.
10297 (open_source_file, symtab_to_fullname): Update.
10298 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10299 unique_xmalloc_ptr.
10300 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10301 (exec_file_find): Update.
10302 * psymtab.c (psymtab_to_fullname): Update.
10303 * nto-tdep.h (nto_find_and_open_solib): Update.
10304 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10305 unique_xmalloc_ptr.
10306 * exec.c (exec_file_attach): Update.
10307 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10308 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10310 2018-02-14 Tom Tromey <tom@tromey.com>
10312 * solib.c: Include source.h.
10313 * nto-tdep.c: Include source.h.
10314 * mi/mi-cmd-env.c: Include source.h.
10315 * infcmd.c: Include source.h.
10316 * exec.c: Include source.h.
10317 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10318 (add_path, directory_switch, source_path, init_source_path): Move
10320 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10321 (add_path, directory_switch, source_path, init_source_path):
10324 2018-02-14 Tom Tromey <tom@tromey.com>
10326 * solist.h (exec_file_find, solib_find): Return
10327 unique_xmalloc_ptr.
10328 (solib_bfd_fopen): Take a const char *.
10329 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10330 (exec_file_find, solib_find): Likewise.
10331 (solib_bfd_fopen): Do not take ownership of "pathname".
10332 (solib_bfd_open): Use unique_xmalloc_ptr.
10333 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10334 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10335 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10336 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10338 2018-02-14 Joel Brobecker <brobecker@adacore.com>
10340 * ada-lang.c (name_match_type_from_name): Remove reference to
10341 ada_name_for_lookup in function's documentation.
10342 * ada-lang.h (ada_name_for_lookup): Delete declaration.
10344 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10346 * defs.h (enum openp_flags): New enum.
10347 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10348 Move to enum openp_flags.
10349 (openp_flags): New enum flags.
10350 (openp): Change parameter type to openp_flags.
10351 * source.c (openp): Change parameter type to openp_flags.
10352 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10353 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10355 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10357 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10360 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10362 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10364 (class dwarf2_queue_guard): ...the destructor of this new class.
10365 (dw2_do_instantiate_symtab): Create instance of the new class
10366 dwarf2_queue_guard, remove cleanup.
10368 2018-02-09 Tom Tromey <tom@tromey.com>
10370 * source.c (find_source_lines): Don't reference past the end of
10373 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10375 * remote.c (remote_btrace_maybe_reopen): Change error message.
10376 * btrace.c (btrace_enable): Likewise.
10377 (parse_xml_btrace): Likewise.
10378 (parse_xml_btrace_conf): Likewise.
10380 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10382 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10383 (linux_enable_pt, linux_enable_bts): Call
10384 diagnose_perf_event_open_fail.
10386 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10388 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10389 Remove parameter and change return type. Update callers. Move it.
10390 (linux_enable_bts, linux_enable_pt): Improve error message.
10391 (linux_enable_pt): Remove zero buffer size check.
10392 (linux_enable_btrace): Improve error messages. Remove NULL return
10395 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10397 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10398 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10399 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10400 (linux_supports_pt, linux_supports_btrace): Remove.
10401 (linux_enable_bts): Call cpu_supports_bts.
10402 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10403 * remote.c (remote_supports_btrace): Remove.
10404 (init_remote_ops): Remove remote_supports_btrace.
10405 * target-delegates.c: Regenerated.
10406 * target.c (target_supports_btrace): Remove.
10407 * target.h (target_ops) <to_supports_btrace>: Remove
10408 (target_supports_btrace): Remove.
10409 * x86-linux-nat.c (x86_linux_create_target): Remove
10410 linux_supports_btrace.
10412 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10414 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10416 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10417 exception and use message in own exception.
10419 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10421 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10422 (perf_event_pt_event_type): Use gdb_file_up.
10423 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10424 scoped_fd, and scoped_mmap.
10426 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10428 * common/scoped_mmap.h: New.
10429 * unittests/scoped_mmap-selftest.c: New.
10430 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10431 unittests/scoped_mmap-selftest.c.
10433 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10435 * common/scoped_fd.h: New.
10436 * unittests/scoped_fd-selftest.c: New.
10437 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10438 unittests/scoped_fd-selftest.c.
10440 2018-02-09 Tom Tromey <tom@tromey.com>
10442 * auto-load.c (auto_load_section_scripts): Use
10443 gdb::unique_xmalloc_ptr.
10445 2018-02-09 Tom Tromey <tom@tromey.com>
10447 * auto-load.c (execute_script_contents): Use std::string.
10449 2018-02-09 Joel Brobecker <brobecker@adacore.com>
10451 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10452 Python function, rather than a new command.
10454 2018-02-08 Tom Tromey <tom@tromey.com>
10456 * solib.c (solib_find_1): Use std::string.
10457 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10459 2018-02-08 Tom Tromey <tom@tromey.com>
10461 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10463 2018-02-08 Tom Tromey <tom@tromey.com>
10465 * source.c (find_source_lines): Use gdb::def_vector.
10467 2018-02-08 Tom Tromey <tom@tromey.com>
10469 * macrocmd.c (struct temporary_macro_definition): New.
10470 (macro_define_command): Use temporary_macro_definition. Remove
10472 (free_macro_definition_ptr): Remove.
10474 2018-02-08 Tom Tromey <tom@tromey.com>
10476 * macroexp.c (maybe_expand): Use std::string.
10478 2018-02-08 Tom Tromey <tom@tromey.com>
10480 * macroexp.c (struct macro_buffer): Add initializers for some
10482 (init_buffer, init_shared_buffer, free_buffer)
10483 (free_buffer_return_text): Remove.
10484 (macro_buffer): New constructors.
10485 (~macro_buffer): New destructor.
10486 (macro_buffer::set_shared): New method.
10487 (macro_buffer::resize_buffer, macro_buffer::appendc)
10488 (macro_buffer::appendmem): Now methods, not free functions.
10489 (set_token, append_tokens_without_splicing, stringify)
10490 (macro_stringify): Update.
10491 (gather_arguments): Change return type. Remove argc_p argument,
10492 add args_ptr argument. Use std::vector.
10493 (substitute_args): Remove argc argument. Accept std::vector.
10494 (expand): Update. Use std::vector.
10495 (scan, macro_expand, macro_expand_next): Update.
10497 2018-02-08 Tom Tromey <tom@tromey.com>
10499 * symtab.c (default_collect_symbol_completion_matches_break_on):
10500 Use unique_xmalloc_ptr.
10501 * macroscope.h: (sal_macro_scope, user_macro_scope)
10502 (default_macro_scope): Return unique_xmalloc_ptr.
10503 * macroscope.c (sal_macro_scope, user_macro_scope)
10504 (default_macro_scope): Return unique_xmalloc_ptr.
10505 * macroexp.h (macro_expand, macro_expand_once): Return
10506 unique_xmalloc_ptr.
10507 * macroexp.c (macro_expand, macro_expand_once): Return
10508 unique_xmalloc_ptr.
10509 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10510 (info_macro_command, info_macros_command): Use
10511 unique_xmalloc_ptr.
10512 * compile/compile-c-support.c (write_macro_definitions): Use
10513 unique_xmalloc_ptr.
10514 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10516 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10518 * value.c (value_static_field): Assign field type instead of
10519 containing type when returning an optimized out value.
10521 2018-02-06 Yao Qi <yao.qi@linaro.org>
10523 * ft32-tdep.c (ft32_read_pc): Remove.
10524 (ft32_write_pc): Remove.
10525 (ft32_gdbarch_init): Update.
10526 * m32r-tdep.c (m32r_read_pc): Remove.
10527 (m32r_gdbarch_init): Update.
10528 * mep-tdep.c (mep_read_pc): Remove.
10529 (mep_gdbarch_init): Update.
10530 * microblaze-tdep.c (microblaze_write_pc): Remove.
10531 (microblaze_gdbarch_init): Update.
10532 * mn10300-tdep.c (mn10300_read_pc): Remove.
10533 (mn10300_write_pc): Remove.
10534 (mn10300_gdbarch_init): Update.
10535 * moxie-tdep.c (moxie_read_pc): Remove.
10536 (moxie_write_pc): Remove.
10537 (moxie_gdbarch_init): Update.
10539 2018-02-06 Yao Qi <yao.qi@linaro.org>
10541 * expprint.c (print_subexp_standard): Handle
10542 OP_F77_UNDETERMINED_ARGLIST.
10543 (dump_subexp_body_standard): Likewise.
10545 2018-02-05 Alan Hayward <alan.hayward@arm.com>
10547 * target-descriptions.c (tdesc_element_visitor) Add empty
10549 (tdesc_type): Move make_gdb_type from here.
10550 (tdesc_type_builtin): Likewise.
10551 (tdesc_type_vector): Likewise.
10552 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10553 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10554 (make_gdb_type_union): Likewise.
10555 (make_gdb_type_flags): Likewise.
10556 (make_gdb_type_enum): Likewise.
10557 (make_gdb_type): New function.
10558 (tdesc_register_type): Use static make_gdb_type.
10560 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10562 * infcmd.c (default_print_one_register_info): Align natural-format
10563 column values consistently one under another.
10564 (pad_to_column): New function.
10566 2018-02-05 Joel Brobecker <brobecker@adacore.com>
10568 * dwarf2read.c (dwarf2_physname): Move commment.
10570 2018-02-01 Leszek Swirski <leszeks@google.com>
10572 * varobj.c (varobj_formatted_print_options): Allow recursive
10573 pretty printing if pretty printing is enabled.
10575 2018-02-01 Leszek Swirski <leszeks@google.com>
10577 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10578 names after a structop as a filename.
10580 2018-02-01 Yao Qi <yao.qi@linaro.org>
10582 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10583 (arm_record_coproc_data_proc): Likewise.
10585 2018-02-01 Yao Qi <yao.qi@linaro.org>
10587 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10589 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10591 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10592 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10594 2018-01-31 Pedro Alves <palves@redhat.com>
10596 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10597 * inflow.c (child_terminal_save_inferior): Wrap reference to
10598 tcgetpgrp in HAVE_TERMIOS_H.
10599 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10601 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10602 always iterate over all inferiors.
10603 (gdbsim_cntrl_c): Adjust.
10604 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10606 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10608 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10609 index type is objfile-owned if the element type is as well.
10611 2018-01-31 Joel Brobecker <brobecker@adacore.com>
10615 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10617 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10618 "features/s390x-linux64.c".
10619 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10620 s390_linux32 and s390x_linux64.
10621 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10623 * s390-tdep.c: Include "features/s390-linux32.c" and
10624 "features/s390x-linux64.c".
10625 (s390_tdesc_valid): Add check for tdesc_has_registers.
10626 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10627 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10628 tdesc_s390x_linux64.
10629 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10630 tdesc_s390x_linux64 to...
10631 * s390-tdep.h: ...here.
10633 2018-01-30 Pedro Alves <palves@redhat.com>
10636 * config.in, configure: Regenerate.
10637 * configure.ac: Check for getpgid.
10638 * go32-nat.c (go32_pass_ctrlc): New.
10639 (go32_target): Install it.
10640 * inf-child.c (inf_child_target): Install
10641 child_terminal_save_inferior, child_pass_ctrlc and
10643 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10644 (inf_ptrace_target): No longer install it.
10645 * infcmd.c (interrupt_target_1): Adjust.
10646 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10647 (child_interrupt): Declare.
10648 (inferior::terminal_state): New.
10649 * inflow.c (struct terminal_info): Update comments.
10650 (inferior_process_group): Delete.
10651 (terminal_is_ours): Delete.
10652 (gdb_tty_state): New.
10653 (child_terminal_init): Adjust.
10654 (is_gdb_terminal, sharing_input_terminal_1)
10655 (sharing_input_terminal): New functions.
10656 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10657 Set the process's actual process group in the foreground if
10658 possible. Handle is_ours_for_output/is_ours distinction. Don't
10659 mark terminal as the inferior's if not sharing GDB's terminal.
10660 Don't check attach_flag.
10661 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10662 pass down a target_terminal_state.
10663 (child_terminal_save_inferior): New, factored out from ...
10664 (child_terminal_ours_1): ... this. Handle
10665 target_terminal_state::is_ours_for_output.
10666 (child_interrupt, child_pass_ctrlc): New.
10667 (inflow_inferior_exit): Clear the inferior's terminal_state.
10668 (copy_terminal_info): Copy the inferior's terminal state.
10669 (_initialize_inflow): Remove reference to terminal_is_ours.
10670 * inflow.h (inferior_process_group): Delete.
10671 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10672 * procfs.c (procfs_target): Don't install procfs_interrupt.
10673 (procfs_interrupt): Delete.
10674 * remote.c (remote_serial_quit_handler): Adjust.
10675 (remote_interrupt): Remove ptid parameter. Adjust.
10676 * target-delegates.c: Regenerate.
10677 * target.c: Include "terminal.h".
10678 (target_terminal::terminal_state): Rename to ...
10679 (target_terminal::m_terminal_state): ... this.
10680 (target_terminal::init): Adjust.
10681 (target_terminal::inferior): Adjust to per-inferior
10683 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10684 (target_terminal::ours, target_terminal::ours_for_output): Use
10685 target_terminal_is_ours_kind.
10686 (target_interrupt): Remove ptid parameter. Adjust.
10687 (default_target_pass_ctrlc): Adjust.
10688 * target.h (target_ops::to_terminal_save_inferior): New field.
10689 (target_ops::to_interrupt): Remove ptid_t parameter.
10690 (target_interrupt): Remove ptid_t parameter. Update comment.
10691 (target_pass_ctrlc): Update comment.
10692 * target/target.h (target_terminal_state): New scoped enum,
10693 factored out of ...
10694 (target_terminal::terminal_state): ... here.
10695 (target_terminal::inferior): Update comments.
10696 (target_terminal::restore_inferior): New.
10697 (target_terminal::is_inferior, target_terminal::is_ours)
10698 (target_terminal::is_ours_for_output): Adjust.
10699 (target_terminal::scoped_restore_terminal_state): Adjust to
10700 rename, and call restore_inferior() instead of inferior().
10701 (target_terminal::scoped_restore_terminal_state::m_state): Change
10703 (target_terminal::terminal_state): Rename to ...
10704 (target_terminal::m_terminal_state): ... this and change type.
10706 2018-01-30 Pedro Alves <palves@redhat.com>
10708 * linux-nat.c (wait_for_signal): New function.
10709 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10711 (async_terminal_is_ours)
10712 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10713 (linux_nat_add_target): Don't override
10714 to_terminal_inferior/to_terminal_ours.
10716 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10718 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10720 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10722 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10723 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10724 dwarf2_per_objfile_free here.
10725 (dwarf2_per_objfile_free): Remove.
10726 (_initialize_dwarf2_read): Don't register
10727 dwarf2_per_objfile_free as a registry cleanup.
10729 2018-01-27 Eli Zaretskii <eliz@gnu.org>
10731 Avoid compilation errors in MinGW native builds
10733 The error is triggered by including python-internal.h, and the
10736 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10737 from build-gnulib/import/math.h:27,
10738 from d:/usr/Python26/include/pyport.h:235,
10739 from d:/usr/Python26/include/Python.h:58,
10740 from python/python-internal.h:94,
10741 from python/py-arch.c:24:
10742 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10746 This happens because Python headers define 'hypot' to expand t
10747 '_hypot' in the Windows builds.
10748 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10749 'hypoth'. This avoids a compilation error.
10751 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10753 * MAINTAINERS (Write After Approval): Fix ordering.
10755 2018-01-26 Alan Hayward <alan.hayward@arm.com>
10757 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10759 2018-01-26 Alan Modra <amodra@gmail.com>
10761 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10762 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10763 Remove nop. Make const. Comment.
10764 (powerpc32_plt_stub_so_2): New.
10765 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10766 Correct count. Update uses.
10767 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10768 Move common code reading PLT entry word. Correct
10769 powerpc32_plt_stub PLT address calculation.
10770 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10771 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10772 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10773 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10774 (ppc64_standard_linkage8): Likewise.
10775 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10776 Correct insns description.
10777 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10779 2018-01-24 Pedro Alves <palves@redhat.com>
10781 GCC PR libstdc++/83906
10782 * gdbtypes.c (operator==(const dynamic_prop &,
10783 const dynamic_prop &)): New.
10784 (operator==(const range_bounds &, const range_bounds &)): New.
10785 (check_types_equal): Use them instead of memcmp.
10786 * gdbtypes.h (operator==(const dynamic_prop &,
10787 const dynamic_prop &)): Declare.
10788 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10789 (operator==(const range_bounds &, const range_bounds &)): Declare.
10790 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10792 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10794 * s390-linux-tdep.c (s390_record_address_mask)
10795 (s390_record_calc_disp_common, s390_record_calc_disp)
10796 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10797 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10798 (s390_process_record): Move to s390-tdep.c.
10799 (s390_linux_init_abi_any): Adjust.
10800 * s390-tdep.c (s390_record_address_mask)
10801 (s390_record_calc_disp_common, s390_record_calc_disp)
10802 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10803 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10804 (s390_process_record): Moved from s390-linux-tdep.c
10805 (s390_gdbarch_init): Adjust.
10807 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10809 * s390-linux-nat.c (s390-tdep.h): New include.
10810 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10811 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10812 (ALLDEPFILES): Add s390-tdep.c.
10813 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10814 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10815 * s390-tdep.h: ...this. New file.
10816 * s390-linux-tdep.c (s390-tdep.h): New include.
10817 (_initialize_s390_tdep): Rename to...
10818 (_initialize_s390_linux_tdep): ...this and adjust.
10819 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10820 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10822 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10823 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10824 (s390_is_partial_instruction, s390_software_single_step)
10825 (is_non_branch_ril, s390_displaced_step_copy_insn)
10826 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10827 (s390_prologue_data, s390_addr, s390_store, s390_load)
10828 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10829 (s390_register_call_saved, s390_guess_tracepoint_registers)
10830 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10831 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10832 (s390_pseudo_register_name, s390_pseudo_register_type)
10833 (s390_pseudo_register_read, s390_pseudo_register_write)
10834 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10835 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10836 (s390_addr_bits_remove, s390_address_class_type_flags)
10837 (s390_address_class_type_flags_to_name)
10838 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10839 (s390_function_arg_float, s390_function_arg_vector)
10840 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10841 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10842 (s390_frame_align, s390_register_return_value, s390_return_value)
10843 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10844 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10845 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10846 (s390_trad_frame_prev_register, s390_unwind_cache)
10847 (s390_prologue_frame_unwind_cache)
10848 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10849 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10850 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10851 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10852 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10853 (s390_frame_base_address, s390_local_base_address)
10854 (s390_frame_base, s390_gcc_target_options)
10855 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10856 (s390_validate_reg_range, s390_tdesc_valid)
10857 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10858 * s390-tdep.c: ...this. New file.
10860 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10862 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10863 (s390_process_record, s390_gdbarch_tdep_alloc)
10864 (s390_linux_init_abi_any): Use/set new hook.
10866 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10868 * s390-linux-tdep.c (osabi.h): New include.
10869 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10870 (s390_linux_init_abi_any): New functions.
10871 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10873 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10875 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10876 tdesc_has_registers check
10878 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10880 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10881 (s390_validate_reg_range): New macro.
10882 (s390_gdbarch_init): Adjust.
10884 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10886 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10887 (s390_gdbarch_tdep_alloc): Adjust.
10888 (s390_gdbarch_init): Adjust.
10890 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10892 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10893 <have_tdb>: Change type to bool.
10894 (s390_gdbarch_tdep_alloc): Adjust.
10895 (s390_gdbarch_init): Adjust.
10897 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10899 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10900 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10901 (s390_gdbarch_tdep_alloc): New function.
10902 (s390_gdbarch_init): Allocate tdep at start and use its fields
10903 instead of separate variables.
10905 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10907 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10908 when looking for cached gdbarch and add comment for remaining.
10910 2018-01-22 Pedro Alves <palves@redhat.com>
10911 Sergio Durigan Junior <sergiodj@redhat.com>
10913 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10916 2018-01-22 Maciej W. Rozycki <macro@mips.com>
10918 * MAINTAINERS: Update my company e-mail address.
10920 2018-01-22 Yao Qi <yao.qi@linaro.org>
10922 * regcache.c (cooked_write_test): New function.
10923 (_initialize_regcache): Register the test.
10925 2018-01-22 Yao Qi <yao.qi@linaro.org>
10927 * ia64-tdep.c (ia64_pseudo_register_read): Call
10928 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10929 * m32c-tdep.c (m32c_cat_read): Likewise.
10930 (m32c_r3r2r1r0_read): Likewise.
10931 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10932 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10934 2018-01-22 Yao Qi <yao.qi@linaro.org>
10936 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10937 method raw_read instead of regcache_raw_read.
10938 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10939 * arm-tdep.c (arm_neon_quad_read): Likewise.
10940 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10941 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10942 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10943 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10944 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10945 (i386_pseudo_register_read_into_value): Likewise.
10946 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10947 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10948 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10949 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10950 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10951 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10952 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10953 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10954 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10956 2018-01-22 Yao Qi <yao.qi@linaro.org>
10958 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10959 * configure.tgt: Remove target mt.
10960 * mt-tdep.c: Remove.
10961 * regcache.c (cooked_read_test): Remove the check for mt.
10963 2018-01-22 Yao Qi <yao.qi@linaro.org>
10965 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10966 instead of gdbarch_pseudo_register_read_value.
10968 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10970 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10973 2018-01-22 Joel Brobecker <brobecker@adacore.com>
10975 * linespec.c (create_sals_line_offset): Remove code that preserved
10976 the symtab_and_line's line number.
10978 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10980 * varobj.c (varobj_create): Don't set valid_block when creating a
10983 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10985 * varobj.c (varobj_create): Remove out of date comment.
10987 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10990 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10991 updating innermost block.
10992 * parse.c (innermost_block_tracker::update): Take extra type
10993 parameter, and check types match before updating innermost block.
10994 (write_dollar_variable): Update innermost block for registers.
10995 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10996 (innermost_block_tracker::innermost_block_tracker): Initialise
10998 (innermost_block_tracker::reset): Take type parameter.
10999 (innermost_block_tracker::update): Take type parameter, and pass
11000 type through as needed.
11001 (innermost_block_tracker::m_types): New member.
11002 * varobj.c (varobj_create): Pass type when reseting innermost
11005 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11007 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11008 * ada-lang.c (resolve_subexp): Likewise.
11009 * breakpoint.c (set_breakpoint_condition) Likewise.
11010 (watch_command_1) Likewise.
11011 * c-exp.y (variable): Likewise.
11012 * d-exp.y (PrimaryExpression): Likewise.
11013 * f-exp.y (variable): Likewise.
11014 * go-exp.y (variable): Likewise.
11015 * m2-exp.y (variable): Likewise.
11016 * objfiles.c (objfile::~objfile): Likewise.
11017 * p-exp.y (variable): Likewise.
11018 * parse.c (innermost_block): Change type.
11019 * parser-defs.h (class innermost_block_tracker): New.
11020 (innermost_block): Change to innermost_block_tracker.
11021 * printcmd.c (display_command): Switch to innermost_block API.
11022 (do_one_display): Likewise.
11023 * rust-exp.y (do_one_display): Likewise.
11024 * symfile.c (clear_symtab_users): Likewise.
11025 * varobj.c (varobj_create): Switch to innermost_block API, replace
11026 use of innermost_block with block stored on varobj object.
11028 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11030 * expression.h (innermost_block): Remove declaration.
11031 * varobj.c: Add 'parser-defs.h' include.
11033 2018-01-19 Tom Tromey <tom@tromey.com>
11035 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11036 symbols in the static and global blocks.
11038 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11040 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11041 gdb_ptrace.h, and move including gdb_wait.h ...
11042 * nat/linux-ptrace.h: ... to here.
11044 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11046 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11047 inf_ptrace_detach_success.
11048 (inf_ptrace_detach_success): Add inferior parameter, use it
11049 instead of inferior_ptid, pass it to detach_inferior.
11050 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11052 * inferior.c (detach_inferior): Add overload that takes an
11054 * inferior.h (detach_inferior): Likewise.
11055 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11056 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11057 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11059 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11061 * target.h (struct target_ops) <to_detach>: Add inferior
11063 (target_detach): Likewise.
11064 * target.c (dispose_inferior): Pass inferior down.
11065 (target_detach): Pass inferior down. Assert that it is equal to
11066 the current inferior.
11067 * aix-thread.c (aix_thread_detach): Pass inferior down.
11068 * corefile.c (core_file_command): Pass current_inferior() down.
11069 * corelow.c (core_detach): Add inferior parameter.
11070 * darwin-nat.c (darwin_detach): Likewise.
11071 * gnu-nat.c (gnu_detach): Likewise.
11072 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11073 * infcmd.c (detach_command): Pass current_inferior() down to
11075 * infrun.c (follow_fork_inferior): Pass parent_inf to
11077 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11079 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11080 * linux-thread-db.c (thread_db_detach): Likewise.
11081 * nto-procfs.c (procfs_detach): Likewise.
11082 * procfs.c (procfs_detach): Likewise.
11083 * record.c (record_detach): Likewise.
11084 * record.h (struct inferior): Forward-declare.
11085 (record_detach): Add inferior parameter.
11086 * remote-sim.c (gdbsim_detach): Likewise.
11087 * remote.c (remote_detach_1): Likewise.
11088 (remote_detach): Likewise.
11089 (extended_remote_detach): Likewise.
11090 * sol-thread.c (sol_thread_detach): Likewise.
11091 * target-debug.h (target_debug_print_inferior_p): New macro.
11092 * target-delegates.c: Re-generate.
11093 * top.c (kill_or_detach): Pass inferior down to target_detach.
11094 * windows-nat.c (windows_detach): Add inferior parameter.
11096 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11098 * target.h (struct target_ops) <to_detach>: Remove args
11100 (target_detach): Likewise.
11101 * target.c (dispose_inferior): Adjust.
11102 (target_detach): Remove args parameter, adjust.
11103 * aix-thread.c (aix_thread_detach): Adjust.
11104 * corefile.c (core_file_command): Adjust.
11105 * corelow.c (core_detach): Adjust.
11106 * darwin-nat.c (darwin_detach): Adjust.
11107 * gnu-nat.c (gnu_detach): Adjust.
11108 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11109 * infcmd.c (detach_command): Adjust
11110 * infrun.c (follow_fork_inferior): Adjust.
11111 (handle_vfork_child_exec_or_exit): Adjust.
11112 * linux-fork.c (linux_fork_detach): Remove args parameter.
11113 * linux-fork.h (linux_fork_detach): Likewise.
11114 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11115 * linux-thread-db.c (thread_db_detach): Likewise.
11116 * nto-procfs.c (procfs_detach): Likewise.
11117 * procfs.c (procfs_detach): Likewise.
11118 (do_detach): Remove signo parameter.
11119 * record.c (record_detach): Remove args parameter.
11120 * record.h (record_detach): Likewise.
11121 * remote-sim.c (gdbsim_detach): Likewise.
11122 * remote.c (remote_detach_1): Likewise.
11123 (remote_detach): Likewise.
11124 (extended_remote_detach): Likewise.
11125 * sol-thread.c (sol_thread_detach): Likewise.
11126 * target-delegates.c: Re-generate.
11127 * top.c (struct qt_args) <args>: Remove field.
11128 (kill_or_detach): Don't pass args.
11129 (quit_force): Don't set args.
11130 * windows-nat.c (windows_detach): Remove args parameter.
11132 2018-01-19 Yao Qi <yao.qi@linaro.org>
11134 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11135 (arm_linux_init_abi): Install it.
11137 2018-01-19 Yao Qi <yao.qi@linaro.org>
11139 * osabi.c (gdb_osabi_names): Extend the regexp for
11140 arm-linux-gnueabihf.
11142 2018-01-18 Yao Qi <yao.qi@linaro.org>
11144 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11146 (abbrev_table::add_abbrev): Update.
11147 (abbrev_table::lookup_abbrev): Update.
11149 2018-01-18 Yao Qi <yao.qi@linaro.org>
11151 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11153 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11155 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11158 2018-01-17 Tom Tromey <tom@tromey.com>
11160 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11162 2018-01-17 Tom Tromey <tom@tromey.com>
11164 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11165 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11166 (create_array_type_with_stride): Update.
11167 * dwarf2read.c (set_die_type): Update.
11169 2018-01-17 Tom Tromey <tom@tromey.com>
11171 * dwarf2read.c (delayed_method_info): Remove typedef.
11172 (dwarf2_cu::method_info): Now a std::vector.
11173 (add_to_method_list): Update.
11174 (free_delayed_list): Remove.
11175 (compute_delayed_physnames): Update.
11176 (process_full_comp_unit, process_full_type_unit): Clear the method
11177 list. Remove cleanups.
11178 (psymtab_include_file_name): Add name_holder parameter. Use
11179 unique_xmalloc_ptr.
11180 (dwarf_decode_lines): Update.
11182 2018-01-17 Tom Tromey <tom@tromey.com>
11183 Simon Marchi <simon.marchi@ericsson.com>
11185 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11186 (dwarf2_per_objfile::free_cached_comp_units)
11187 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11188 (init_cutu_and_read_dies_no_follow): Update.
11189 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11190 (dwarf2_cu::~dwarf2_cu): New.
11191 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11192 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11194 2018-01-17 Tom Tromey <tom@tromey.com>
11195 Simon Marchi <simon.marchi@ericsson.com>
11197 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11198 (struct die_reader_specs) <abbrev_table>: New member.
11199 (struct abbrev_table): Add constructor.
11200 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11201 <abbrev_obstack>: Now an auto_obstack.
11202 (abbrev_table_up): New typedef.
11203 (init_cu_die_reader): Add abbrev_table parameter.
11204 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11205 Add result_dwo_abbrev_table.
11206 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11207 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11209 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11211 (skip_children): Update.
11212 (abbrev_table::alloc_abbrev): Rename from
11213 abbrev_table_alloc_abbrev.
11214 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11215 (abbrev_table::lookup_abbrev): Rename from
11216 abbrev_table_lookup_abbrev.
11217 (abbrev_table_read_table): Return abbrev_table_up.
11218 (abbrev_table_free, abbrev_table_free_cleanup)
11219 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11220 (load_partial_dies): Update.
11222 2018-01-17 Tom Tromey <tom@tromey.com>
11224 * dwarf2read.c (dwarf2_compute_name): Update comment.
11225 (read_func_scope, read_variable): Update.
11226 (new_symbol): Remove.
11227 (new_symbol_full): Rename to new_symbol.
11229 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11232 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11233 a warning instead of throwing an error, set section size to 0 and return
11235 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11237 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11239 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11241 (linux_ptrace_attach_fail_reason_string): Likewise.
11242 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11244 (linux_ptrace_attach_fail_reason_string): Likewise.
11245 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11247 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11249 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11251 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11254 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11255 checking for fs_base/gs_base fields in struct user_regs_struct.
11256 * configure: Regenerate.
11258 2018-01-17 Yao Qi <yao.qi@linaro.org>
11260 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11262 (aarch64_linux_init_abi): Install it to gdbarch hook
11263 gcc_target_options.
11265 2018-01-15 Pedro Alves <palves@redhat.com>
11267 * common/signals-state-save-restore.c
11268 (save_original_signals_state): Fix typos.
11270 2017-01-12 Tom Tromey <tom@tromey.com>
11271 Sergio Durigan Junior <sergiodj@redhat.com>
11273 * Makefile.in (install-only): Install gdb-add-index.
11275 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11277 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11279 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11281 * infrun.c (keep_going_pass_signal): Clear step-over info when
11282 insert_breakpoints fails.
11284 2018-01-11 Pedro Alves <palves@redhat.com>
11287 * infrun.c (resume): Rename to ...
11288 (resume_1): ... this.
11289 (resume): Reimplement as wrapper around resume_1.
11291 2018-01-11 Pedro Alves <palves@redhat.com>
11294 * remote.c (remote_parse_stop_reply): Default to the last-set
11295 general thread instead of to 'magic_null_ptid'.
11297 2018-01-10 Pedro Alves <palves@redhat.com>
11299 * language.h (language_get_symbol_name_matcher): Rename ...
11300 (get_symbol_name_matcher): ... this.
11301 * language.c (language_get_symbol_name_matcher): Ditto.
11302 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11305 2018-01-10 Pedro Alves <palves@redhat.com>
11309 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11310 Adjust to use language_get_symbol_name_matcher instead of
11311 language_defn::la_get_symbol_name_matcher.
11312 * language.c (language_get_symbol_name_matcher): If in Ada mode
11313 and the lookup name is a verbatim match, return Ada's matcher.
11314 * language.h (language_get_symbol_name_matcher): Adjust comment.
11315 (ada_lookup_name_info::verbatim_p):: New method.
11317 2018-01-10 Pedro Alves <palves@redhat.com>
11320 * ada-lang.c (ada_collect_symbol_completion_matches): If the
11321 minsym's language is language_auto or language_cplus, pass down
11322 language_ada instead.
11323 * symtab.c (compare_symbol_name): Don't frob symbol language here.
11325 2018-01-10 Pedro Alves <palves@redhat.com>
11328 * minsyms.c (linkage_name_str): New function.
11329 (iterate_over_minimal_symbols): Use it.
11331 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11333 * NEWS: Document that 'info proc' now works on FreeBSD.
11335 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11337 * configure.ac: Check for kinfo_getfile in libutil.
11338 * configure: Regenerate.
11339 * config.in: Regenerate.
11340 * fbsd-nat.c: Include "fbsd-tdep.h".
11341 (fbsd_fetch_cmdline): New.
11342 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11343 rather than calling error.
11344 (fbsd_info_proc): New.
11345 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11346 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11347 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11349 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11351 * fbsd-nat.c (struct free_deleter): Remove.
11352 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11354 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11356 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11357 NULL for an empty pathname.
11359 2018-01-09 John Baldwin <jhb@FreeBSD.org>
11361 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11362 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11363 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11364 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11365 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11366 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11367 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11368 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11369 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11370 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11371 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11372 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11373 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11374 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11375 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11377 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11379 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11380 (gnu_xfer_auxv): New function.
11381 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11382 TARGET_OBJECT_AUXV.
11384 2018-01-08 Yao Qi <yao.qi@linaro.org>
11385 Simon Marchi <simon.marchi@ericsson.com>
11387 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11389 (COMMON_OBS): Remove selftest.o.
11390 * configure.ac: Append selftest-arch.c and common/selftest.c to
11391 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11392 * configure: Re-generated.
11393 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11395 (maintenance_info_selftests): Likewise.
11397 2018-01-08 Xavier Roirand <roirand@adacore.com>
11399 * ada-valprint.c (val_print_packed_array_elements): Use
11400 proper number of elements when printing an array indexed
11401 by an enumeration type.
11403 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11405 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11406 (dw2_get_file_names_reader): Adjust.
11407 (lookup_dwo_signatured_type): Adjust.
11408 (lookup_dwp_signatured_type): Adjust.
11409 (lookup_signatured_type): Adjust.
11410 (create_type_unit_group): Adjust.
11411 (get_type_unit_group): Adjust.
11412 (process_psymtab_comp_unit_reader): Adjust.
11413 (build_type_psymtabs_reader): Adjust.
11414 (scan_partial_symbols): Adjust.
11415 (add_partial_symbol): Adjust.
11416 (add_partial_subprogram): Adjust.
11417 (peek_die_abbrev): Adjust.
11418 (fixup_go_packaging): Adjust.
11419 (process_imported_unit_die): Adjust.
11420 (dwarf2_compute_name): Adjust.
11421 (dwarf2_physname): Adjust.
11422 (read_import_statement): Adjust.
11423 (handle_DW_AT_stmt_list): Adjust.
11424 (read_file_scope): Adjust.
11425 (read_func_scope): Adjust.
11426 (read_lexical_block_scope): Adjust.
11427 (read_call_site_scope): Adjust.
11428 (read_variable): Adjust.
11429 (dwarf2_rnglists_process): Adjust.
11430 (dwarf2_ranges_process): Adjust.
11431 (dwarf2_ranges_read): Adjust.
11432 (dwarf2_get_pc_bounds): Adjust.
11433 (dwarf2_record_block_ranges): Adjust.
11434 (dwarf2_add_field): Adjust.
11435 (dwarf2_add_member_fn): Adjust.
11436 (read_structure_type): Adjust.
11437 (process_structure_scope): Adjust.
11438 (read_enumeration_type): Adjust.
11439 (read_array_type): Adjust.
11440 (mark_common_block_symbol_computed): Adjust.
11441 (read_common_block): Adjust.
11442 (read_namespace_type): Adjust.
11443 (read_namespace): Adjust.
11444 (read_module_type): Adjust.
11445 (read_tag_pointer_type): Adjust.
11446 (read_tag_ptr_to_member_type): Adjust.
11447 (read_tag_string_type): Adjust.
11448 (read_subroutine_type): Adjust.
11449 (read_typedef): Adjust.
11450 (read_base_type): Adjust.
11451 (attr_to_dynamic_prop): Adjust.
11452 (read_subrange_type): Adjust.
11453 (read_unspecified_type): Adjust.
11454 (dwarf2_read_abbrevs): Adjust.
11455 (load_partial_dies): Adjust.
11456 (read_partial_die): Adjust.
11457 (find_partial_die): Adjust.
11458 (guess_partial_die_structure_name): Adjust.
11459 (fixup_partial_die): Adjust.
11460 (read_attribute_value): Adjust.
11461 (read_addr_index): Adjust.
11462 (read_addr_index_from_leb128): Adjust.
11463 (read_str_index): Adjust.
11464 (dwarf2_string_attr): Adjust.
11465 (get_debug_line_section): Adjust.
11466 (dwarf_decode_line_header): Adjust.
11467 (lnp_state_machine::check_line_address): Adjust.
11468 (dwarf_decode_lines_1): Adjust.
11469 (dwarf_decode_lines): Adjust.
11470 (dwarf2_start_symtab): Adjust.
11471 (var_decode_location): Adjust.
11472 (new_symbol_full): Adjust.
11473 (dwarf2_const_value_data): Adjust.
11474 (dwarf2_const_value_attr): Adjust.
11475 (dwarf2_const_value): Adjust.
11476 (die_type): Adjust.
11477 (die_containing_type): Adjust.
11478 (build_error_marker_type): Adjust.
11479 (lookup_die_type): Adjust.
11480 (guess_full_die_structure_name): Adjust.
11481 (anonymous_struct_prefix): Adjust.
11482 (determine_prefix): Adjust.
11483 (dwarf2_name): Adjust.
11484 (follow_die_ref_or_sig): Adjust.
11485 (follow_die_offset): Adjust.
11486 (follow_die_ref): Adjust.
11487 (follow_die_sig_1): Adjust.
11488 (follow_die_sig): Adjust.
11489 (get_signatured_type): Adjust.
11490 (get_DW_AT_signature_type): Adjust.
11491 (decode_locdesc): Adjust.
11492 (dwarf_decode_macros): Adjust.
11493 (cu_debug_loc_section): Adjust.
11494 (fill_in_loclist_baton): Adjust.
11495 (dwarf2_symbol_mark_computed): Adjust.
11496 (init_one_comp_unit): Don't assign
11497 dwarf2_cu::dwarf2_per_objfile.
11498 (set_die_type): Adjust.
11500 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11502 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11503 <dwarf2_per_objfile>: New field.
11504 (dwarf2_per_objfile): Remove global.
11505 (get_dwarf2_per_objfile): New function.
11506 (set_dwarf2_per_objfile): New function.
11507 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11508 dwarf2_per_objfile.
11509 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11510 (read_abbrev_offset): Likewise.
11511 (read_indirect_string): Likewise.
11512 (read_indirect_line_string): Likewise.
11513 (read_indirect_string_at_offset): Likewise.
11514 (read_indirect_string_from_dwz): Likewise.
11515 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11516 dwarf2_per_objfile.
11517 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11518 (create_all_comp_units): Change objfile parameter to
11519 dwarf2_per_objfile.
11520 (create_all_type_units): Likewise.
11521 (process_queue): Add dwarf2_per_objfile parameter.
11522 (read_and_check_comp_unit_head): Likewise.
11523 (lookup_dwo_unit_in_dwp): Likewise.
11524 (get_dwp_file): Likewise.
11525 (process_cu_includes): Likewise.
11526 (struct free_dwo_file_cleanup_data): New struct.
11527 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11528 set_dwarf2_per_objfile.
11529 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11530 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11531 context, adjust calls.
11532 (dw2_instantiate_symtab): Likewise.
11533 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11534 (dw2_get_cu): Likewise.
11535 (create_cu_from_index_list): Change objfile parameter to
11536 dwarf2_per_objfile.
11537 (create_cus_from_index_list): Get dwarf2_per_objfile from
11538 context, adjust calls.
11539 (create_cus_from_index): Likewise.
11540 (create_signatured_type_table_from_index): Change objfile
11541 parameter to dwarf2_per_objfile.
11542 (create_signatured_type_table_from_debug_names): Change objfile
11543 parameter to dwarf2_per_objfile.
11544 (create_addrmap_from_index): Likewise.
11545 (create_addrmap_from_aranges): Likewise.
11546 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11547 (dw2_setup): Remove.
11548 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11550 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11551 get_dwarf2_per_objfile.
11552 (dw2_forget_cached_source_info): Likewise.
11553 (dw2_map_symtabs_matching_filename): Likewise.
11554 (struct dw2_symtab_iterator) <index>: Remove.
11555 <dwarf2_per_objfile>: New field.
11556 (dw2_symtab_iter_init): Replace index parameter with
11557 dwarf2_per_objfile.
11558 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11559 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11560 (dw2_print_stats): Likewise.
11561 (dw2_dump): Likewise.
11562 (dw2_expand_symtabs_for_function): Likewise.
11563 (dw2_expand_all_symtabs): Likewise.
11564 (dw2_expand_symtabs_with_fullname): Likewise.
11565 (dw2_expand_marked_cus): Replace index and objfile parameters
11566 with dwarf2_per_objfile.
11567 (dw_expand_symtabs_matching_file_matcher): Add
11568 dwarf2_per_objfile parameter and adjust calls.
11569 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11571 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11572 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11574 (create_cus_from_debug_names_list): Replace objfile parameter
11575 with dwarf2_per_objfile and adjust calls.
11576 (create_cus_from_debug_names): Likewise.
11577 (dwarf2_read_debug_names): Likewise.
11578 (mapped_debug_names::namei_to_name): Adjust call.
11579 (dw2_debug_names_iterator::next): Likewise.
11580 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11581 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11582 (dw2_debug_names_dump): Likewise.
11583 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11584 (dw2_debug_names_expand_symtabs_matching): Likewise.
11585 (dwarf2_initialize_objfile): Likewise.
11586 (dwarf2_build_psymtabs): Likewise.
11587 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11589 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11590 (read_and_check_comp_unit_head): Likewise.
11591 (read_abbrev_offset): Likewise.
11592 (create_debug_type_hash_table): Likewise.
11593 (create_debug_types_hash_table): Likewise.
11594 (create_all_type_units): Replace objfile parameter with
11595 dwarf2_per_objfile.
11596 (add_type_unit): Add dwarf2_per_objfile parameter.
11597 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11598 with dwarf2_per_objfile.
11599 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11600 (lookup_dwp_signatured_type): Likewise.
11601 (lookup_signatured_type): Likewise.
11602 (read_cutu_die_from_dwo): Likewise.
11603 (init_tu_and_read_dwo_dies): Likewise.
11604 (init_cutu_and_read_dies): Likewise.
11605 (init_cutu_and_read_dies_no_follow): Likewise.
11606 (allocate_type_unit_groups_table): Add objfile parameter.
11607 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11608 (get_type_unit_group): Likewise.
11609 (process_psymtab_comp_unit): Update call.
11610 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11611 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11612 (print_tu_stats): Likewise.
11613 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11614 in void* parameter.
11615 (build_type_psymtabs): Change objfile parameter to
11616 dwarf2_per_objfile.
11617 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11618 passed in void* parameter.
11619 (process_skeletonless_type_units): Change objfile parameter to
11620 dwarf2_per_objfile.
11621 (set_partial_user): Likewise.
11622 (dwarf2_build_psymtabs_hard): Likewise.
11623 (read_comp_units_from_section): Likewise.
11624 (create_all_comp_units): Likewise.
11625 (scan_partial_symbols): Update calls.
11626 (add_partial_symbol): Likewise.
11627 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11628 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11629 (process_queue): Add dwarf2_per_objfile parameter.
11630 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11631 (compute_compunit_symtab_includes): Likewise.
11632 (process_cu_includes): Add dwarf2_per_objfile parameter.
11633 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11634 (process_full_type_unit): Likewise.
11635 (process_imported_unit_die): Update call.
11636 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11637 (read_file_scope): Likewise.
11638 (allocate_dwo_file_hash_table): Add objfile parameter.
11639 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11640 (create_cus_hash_table): Likewise.
11641 (create_dwp_hash_table): Likewise.
11642 (create_dwo_unit_in_dwp_v1): Likewise.
11643 (create_dwp_v2_section): Likewise.
11644 (create_dwo_unit_in_dwp_v2): Likewise.
11645 (lookup_dwo_unit_in_dwp): Likewise.
11646 (try_open_dwop_file): Likewise.
11647 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11648 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11649 cleanup to include a reference to dwarf2_per_objfile.
11650 (open_dwp_file): Add dwarf2_per_objfile parameter.
11651 (open_and_init_dwp_file): Likewise.
11652 (get_dwp_file): Likewise.
11653 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11654 (queue_and_load_all_dwo_tus): Update call.
11655 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11657 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11658 (dwarf2_ranges_process): Likewise.
11659 (dwarf2_get_pc_bounds): Likewise.
11660 (mark_common_block_symbol_computed): Likewise.
11661 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11662 (dwarf2_read_abbrevs): Update call.
11663 (read_partial_die): Use dwarf2_per_objfile from cu.
11664 (find_partial_die): Likewise.
11665 (fixup_partial_die): Likewise.
11666 (read_attribute_value): Likewise.
11667 (read_indirect_string_at_offset_from): Add objfile parameter.
11668 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11670 (read_indirect_string_from_dwz): Add objfile parameter.
11671 (read_indirect_string): Add objfile parameter.
11672 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11673 (read_addr_index): Use dwarf2_per_objfile from cu.
11674 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11676 (read_str_index): Use dwarf2_per_objfile from cu.
11677 (get_debug_line_section): Likewise.
11678 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11679 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11680 (new_symbol_full): Use dwarf2_per_objfile from cu.
11681 (build_error_marker_type): Likewise.
11682 (lookup_die_type): Likewise.
11683 (determine_prefix): Likewise.
11684 (follow_die_offset): Likewise.
11685 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11686 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11687 (dwarf2_fetch_die_type_sect_off): Likewise.
11688 (dwarf2_get_die_type): Likewise.
11689 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11690 (get_signatured_type): Likewise.
11691 (get_DW_AT_signature_type): Likewise.
11692 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11693 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11694 (cu_debug_loc_section): Likewise.
11695 (fill_in_loclist_baton): Likewise.
11696 (dwarf2_symbol_mark_computed): Likewise.
11697 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11698 dwarf2_per_objfile.
11699 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11701 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11702 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11703 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11704 (set_die_type): Use dwarf2_free_objfile from cu.
11705 (get_die_type_at_offset): Likewise.
11706 (dwarf2_per_objfile_free): Don't assign global variable.
11707 (debug_names) <constructor>: Add dwarf2_per_objfile
11708 parameter, update m_debugstrlookup construction.
11709 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11711 <m_dwarf2_per_objfile>: New field.
11712 <lookup>: Use m_dwarf2_per_objfile.
11713 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11714 (psyms_seen_size): Likewise.
11715 (write_gdbindex): Replace objfile parameter with
11716 dwarf2_per_objfile.
11717 (write_debug_names): Likewise.
11718 (write_psymtabs_to_index): Likewise.
11719 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11722 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11724 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11725 <dwarf2_per_objfile>: New field.
11726 (struct dwarf2_per_cu_data) <objfile>: Remove.
11727 <dwarf2_per_objfile>: New field.
11728 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11730 (create_signatured_type_table_from_index): Likewise.
11731 (create_debug_type_hash_table): Likewise.
11732 (fill_in_sig_entry_from_dwo_entry): Likewise.
11733 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11734 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11736 (create_partial_symtab): Access objfile through
11737 dwarf2_per_objfile.
11738 (process_psymtab_comp_unit_reader): Likewise.
11739 (read_comp_units_from_section): Likewise.
11740 (scan_partial_symbols): Likewise.
11741 (add_partial_symbol): Likewise.
11742 (add_partial_subprogram): Likewise.
11743 (peek_die_abbrev): Likewise.
11744 (fixup_go_packaging): Likewise.
11745 (process_full_comp_unit): Likewise.
11746 (process_full_type_unit): Likewise.
11747 (process_imported_unit_die): Likewise.
11748 (dwarf2_compute_name): Likewise.
11749 (dwarf2_physname): Likewise.
11750 (read_import_statement): Likewise.
11751 (create_cus_hash_table): Assign dwarf2_physname instead of
11753 (read_func_scope): Access objfile through dwarf2_per_objfile.
11754 (read_lexical_block_scope): Likewise.
11755 (read_call_site_scope): Likewise.
11756 (read_variable): Likewise.
11757 (dwarf2_rnglists_process): Likewise.
11758 (dwarf2_ranges_process): Likewise.
11759 (dwarf2_ranges_read): Likewise.
11760 (dwarf2_record_block_ranges): Likewise.
11761 (dwarf2_add_field): Likewise.
11762 (dwarf2_add_member_fn): Likewise.
11763 (read_structure_type): Likewise.
11764 (process_structure_scope): Likewise.
11765 (read_enumeration_type): Likewise.
11766 (read_array_type): Likewise.
11767 (read_common_block): Likewise.
11768 (read_namespace_type): Likewise.
11769 (read_namespace): Likewise.
11770 (read_module_type): Likewise.
11771 (read_tag_pointer_type): Likewise.
11772 (read_tag_ptr_to_member_type): Likewise.
11773 (read_tag_string_type): Likewise.
11774 (read_subroutine_type): Likewise.
11775 (read_typedef): Likewise.
11776 (read_base_type): Likewise.
11777 (attr_to_dynamic_prop): Likewise.
11778 (read_subrange_type): Likewise.
11779 (read_unspecified_type): Likewise.
11780 (load_partial_dies): Likewise.
11781 (read_partial_die): Likewise.
11782 (find_partial_die): Likewise.
11783 (guess_partial_die_structure_name): Likewise.
11784 (fixup_partial_die): Likewise.
11785 (read_attribute_value): Likewise.
11786 (read_addr_index_from_leb128): Likewise.
11787 (dwarf2_read_addr_index): Likewise.
11788 (dwarf2_string_attr): Likewise.
11789 (lnp_state_machine::check_line_address): Likewise.
11790 (dwarf_decode_lines_1): Likewise.
11791 (dwarf_decode_lines): Likewise.
11792 (dwarf2_start_symtab): Likewise.
11793 (var_decode_location): Likewise.
11794 (new_symbol_full): Likewise.
11795 (dwarf2_const_value_data): Likewise.
11796 (dwarf2_const_value_attr): Likewise.
11797 (dwarf2_const_value): Likewise.
11798 (die_type): Likewise.
11799 (die_containing_type): Likewise.
11800 (lookup_die_type): Likewise.
11801 (guess_full_die_structure_name): Likewise.
11802 (anonymous_struct_prefix): Likewise.
11803 (dwarf2_name): Likewise.
11804 (follow_die_ref_or_sig): Likewise.
11805 (follow_die_offset): Likewise.
11806 (follow_die_ref): Likewise.
11807 (dwarf2_fetch_die_loc_sect_off): Likewise.
11808 (dwarf2_fetch_constant_bytes): Likewise.
11809 (dwarf2_fetch_die_type_sect_off): Likewise.
11810 (dwarf2_get_die_type): Likewise.
11811 (follow_die_sig): Likewise.
11812 (decode_locdesc): Likewise.
11813 (dwarf2_per_cu_objfile): Likewise.
11814 (dwarf2_per_cu_text_offset): Likewise.
11815 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11817 (set_die_type): Access objfile through
11818 dwarf2_per_objfile.
11820 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11822 * valprint.c (converted_character_d): Remove typedef.
11823 (DEF_VEC_O (converted_character_d)): Remove.
11824 (count_next_character): Use std::vector.
11825 (print_converted_chars_to_obstack): Likewise.
11826 (generic_printstr): Likewise.
11828 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11830 * xml-support.h (struct gdb_xml_value): Add constructor.
11831 <value>: Change type to unique_xmalloc_ptr.
11832 (gdb_xml_value_s): Remove typedef.
11833 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11834 (gdb_xml_element_start_handler): Change parameter type to
11836 (xml_find_attribute): Likewise.
11837 * xml-support.c (xml_find_attribute): Change parameter type to
11838 std::vector and adjust.
11839 (gdb_xml_values_cleanup): Remove.
11840 (gdb_xml_parser::start_element): Adjust to std::vector.
11841 (xinclude_start_include): Change paraeter type to std::vector
11843 * btrace.c (check_xml_btrace_version): Likewise.
11844 (parse_xml_btrace_block): Likewise.
11845 (parse_xml_btrace_pt_config_cpu): Likewise.
11846 (parse_xml_btrace_pt): Likewise.
11847 (parse_xml_btrace_conf_bts): Likewise.
11848 (parse_xml_btrace_conf_pt): Likewise.
11849 * memory-map.c (memory_map_start_memory): Likewise.
11850 (memory_map_start_property): Likewise.
11851 * osdata.c (osdata_start_osdata): Likewise.
11852 (osdata_start_item): Likewise.
11853 (osdata_start_column): Likewise.
11854 * remote.c (start_thread): Likewise.
11855 * solib-aix.c (library_list_start_library): Likewise.
11856 (library_list_start_list): Likewise.
11857 * solib-svr4.c (library_list_start_library): Likewise.
11858 (svr4_library_list_start_list): Likewise.
11859 * solib-target.c (library_list_start_segment): Likewise.
11860 (library_list_start_section): Likewise.
11861 (library_list_start_library): Likewise.
11862 (library_list_start_list): Likewise.
11863 * tracepoint.c (traceframe_info_start_memory): Likewise.
11864 (traceframe_info_start_tvar): Likewise.
11865 * xml-syscall.c (syscall_start_syscall): Likewise.
11866 * xml-tdesc.c (tdesc_start_target): Likewise.
11867 (tdesc_start_feature): Likewise.
11868 (tdesc_start_reg): Likewise.
11869 (tdesc_start_union): Likewise.
11870 (tdesc_start_struct): Likewise.
11871 (tdesc_start_flags): Likewise.
11872 (tdesc_start_enum): Likewise.
11873 (tdesc_start_field): Likewise.
11874 (tdesc_start_enum_value): Likewise.
11875 (tdesc_start_vector): Likewise.
11877 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11879 * extension.h (struct xmethod_worker) <clone>: Remove.
11880 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11882 (python_xmethod_worker::clone): Remove.
11883 * valops.c (find_overload_match): Use std::move instead of
11886 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11888 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11889 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11890 <free_xmethod_worker_data>: Remove.
11891 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11892 <get_xmethod_arg_types>: Remove.
11893 <get_xmethod_result_type>: Remove.
11894 <invoke_xmethod>: Remove.
11895 * extension.c (new_xmethod_worker): Remove.
11896 (clone_xmethod_worker): Remove.
11897 (get_matching_xmethod_workers): Return void, pass std::vector by
11899 (get_xmethod_arg_types): Rename to...
11900 (xmethod_worker::get_arg_types): ... this, and adjust.
11901 (get_xmethod_result_type): Rename to...
11902 (xmethod_worker::get_result_type): ... this, and adjust.
11903 (invoke_xmethod): Remove.
11904 (free_xmethod_worker): Remove.
11905 (free_xmethod_worker_vec): Remove.
11906 * extension.h (enum ext_lang_rc): Move here from
11908 (struct xmethod_worker): Add constructor and destructor.
11911 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11912 virtual pure methods.
11913 <get_arg_types, get_result_type>: New methods.
11914 (xmethod_worker_ptr): Remove typedef.
11915 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11916 (xmethod_worker_vec): Remove typedef.
11917 (xmethod_worker_up): New typedef.
11918 (invoke_xmethod): Remove.
11919 (clone_xmethod_worker): Remove.
11920 (free_xmethod_worker): Remove.
11921 (free_xmethod_worker_vec): Remove.
11922 (get_xmethod_arg_types): Remove.
11923 (get_xmethod_result_type): Remove.
11924 * valops.c (find_method_list): Use std::vector, don't use
11925 intermediate vector.
11926 (value_find_oload_method_list): Use std::vector.
11927 (find_overload_match): Use std::vector.
11928 (find_oload_champ): Use std::vector.
11929 * value.c (value_free): Use operator delete.
11930 (value_of_xmethod): Rename to...
11931 (value_from_xmethod): ... this. Don't assign
11932 xmethod_worker::value, take rvalue-reference.
11933 (result_type_of_xmethod): Adjust.
11934 (call_xmethod): Adjust.
11935 * value.h: Include extension.h.
11936 (struct xmethod_worker): Don't forward-declare.
11937 (value_of_xmethod): Rename to...
11938 (value_from_xmethod): ... this, take rvalue-reference.
11939 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11940 (struct python_xmethod_worker): ... this, add constructor and
11942 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11943 (gdbpy_free_xmethod_worker_data): Rename to...
11944 (python_xmethod_worker::~python_xmethod_worker): ... this and
11946 (gdbpy_clone_xmethod_worker_data): Rename to...
11947 (python_xmethod_worker::clone): ... this and adjust.
11948 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11950 (gdbpy_get_xmethod_arg_types): Rename to...
11951 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11952 (gdbpy_get_xmethod_result_type): Rename to...
11953 (python_xmethod_worker::do_get_result_type): ... this and
11955 (gdbpy_invoke_xmethod): Rename to...
11956 (python_xmethod_worker::invoke): ... this and adjust.
11957 (new_python_xmethod_worker): Rename to...
11958 (python_xmethod_worker::python_xmethod_worker): ... this and
11960 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11962 (gdbpy_free_xmethod_worker_data): Remove.
11963 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11964 (gdbpy_get_xmethod_arg_types): Remove.
11965 (gdbpy_get_xmethod_result_type): Remove.
11966 (gdbpy_invoke_xmethod): Remove.
11967 * python/python.c (python_extension_ops): Remove obsolete
11970 2018-01-05 Pedro Alves <palves@redhat.com>
11973 * common/signals-state-save-restore.c
11974 (save_original_signals_state): New parameter 'quiet'. Warn if we
11975 find a custom handler preinstalled, instead of internal erroring.
11976 But only warn if !quiet.
11977 * common/signals-state-save-restore.h
11978 (save_original_signals_state): New parameter 'quiet'.
11979 * main.c (captured_main_1): Move save_original_signals_state call
11980 after option handling, and pass QUIET.
11982 2018-01-05 Pedro Alves <palves@redhat.com>
11984 * spu-tdep.c (spu_catch_start): Pass
11985 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11987 2018-01-05 Pedro Alves <palves@redhat.com>
11990 * ada-lang.c (literal_symbol_name_matcher): New function.
11991 (ada_get_symbol_name_matcher): Use it for
11992 symbol_name_match_type::SEARCH_NAME.
11993 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11994 it down instead of assuming symbol_name_match_type::FULL.
11995 * block.h (block_lookup_symbol): New parameter 'match_type'.
11996 * c-valprint.c (print_unpacked_pointer): Use
11997 lookup_symbol_search_name instead of lookup_symbol.
11998 * compile/compile-object-load.c (get_out_value_type): Pass down
11999 symbol_name_match_type::SEARCH_NAME.
12000 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12001 symbol_name_match_type::FULL.
12002 * cp-support.c (cp_get_symbol_name_matcher): Handle
12003 symbol_name_match_type::SEARCH_NAME.
12004 * infrun.c (insert_exception_resume_breakpoint): Use
12005 lookup_symbol_search_name.
12006 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12007 * psymtab.c (maintenance_check_psymtabs): Use
12008 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12009 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12010 SYMBOL_SEARCH_NAME.
12011 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12012 if symbol_name_match_type::SEARCH_NAME.
12013 (lookup_symbol_in_language): Pass down
12014 symbol_name_match_type::FULL.
12015 (lookup_symbol_search_name): New.
12016 (lookup_language_this): Pass down
12017 symbol_name_match_type::SEARCH_NAME.
12018 (lookup_symbol_aux, lookup_local_symbol): New parameter
12019 'match_type'. Pass it down.
12020 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12021 (lookup_symbol_search_name): New declaration.
12022 (lookup_symbol_in_block): New 'match_type' parameter.
12024 2018-01-05 Pedro Alves <palves@redhat.com>
12027 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12029 (ada_lookup_symbol): Reimplement in terms of
12030 ada_lookup_symbol_list, bits factored out from
12031 ada_lookup_encoded_symbol.
12033 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12035 * ada-exp.y (write_object_renaming): When subscripting an array
12036 using a symbol as the index, pass the block in call to
12037 ada_lookup_encoded_symbol when looking that symbol up.
12039 2018-01-05 Jerome Guitton <guitton@adacore.com>
12041 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12044 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12046 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12047 the case where VALUE_LVAL (val0) is not lval_memory.
12049 2018-01-05 Xavier Roirand <roirand@adacore.com>
12051 * ada-valprint.c (print_optional_low_bound): Handle
12052 character-indexed array printing like boolean-indexed array
12055 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12057 * NEWS: Create a new section for the next release branch.
12058 Rename the section of the current branch, now that it has
12061 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12063 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12064 * version.in: Bump version to 8.1.50.DATE-git.
12066 2018-01-03 Xavier Roirand <roirand@adacore.com>
12068 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12070 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12072 (default_exception_support_info) <catch_handlers_sym>: Add field.
12073 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12074 (ada_exception_name_addr_1): Add "catch handlers" handling.
12075 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12076 Update all callers.
12077 (create_excep_cond_exprs) <ex>: Add parameter.
12078 (re_set_exception): Update create_excep_cond_exprs call.
12079 (print_it_exception, print_one_exception, print_mention_exception)
12080 (print_recreate_exception): Add "catch handler" handling.
12081 (allocate_location_catch_handlers, re_set_catch_handlers)
12082 (check_status_catch_handlers, print_it_catch_handlers)
12083 (print_one_catch_handlers, print_mention_catch_handlers)
12084 (print_recreate_catch_handlers): New function.
12085 (catch_handlers_breakpoint_ops): New variable.
12086 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12087 Add parameter. Add "catch handler" handling.
12088 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12089 Add "catch handler" handling.
12090 (ada_exception_catchpoint_cond_string): Add "catch handler"
12092 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12094 (catch_ada_handlers_command): New function.
12095 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12096 operations structure.
12097 (_initialize_ada_language): Add "catch handlers" command entry.
12098 * NEWS: Document "catch handlers" feature.
12100 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12102 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12103 account when creating the array type of the slice.
12104 (ada_value_slice): Likewise.
12106 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12108 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12110 (create_array_type_with_stride): Add byte_stride_prop parameter.
12111 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12112 New parameter. Update all callers in this file.
12113 (array_type_has_dynamic_stride): New function.
12114 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12115 of arrays with dynamic byte strides.
12116 * dwarf2read.c (read_array_type): Add support for dynamic
12117 DW_AT_byte_stride attributes.
12119 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12121 * dwarf2read.c (read_unspecified_type): Treat
12122 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12124 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12126 Update copyright year range in all GDB files.
12128 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12130 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12131 and gdb/testsuite/gdb.base/step-line.c.
12133 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12135 * copyright.py (main): Dump the contents of
12136 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12137 even if BY_HAND is empty.
12139 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12141 * top.c (print_gdb_version): Update Copyright year in version
12144 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12146 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12148 For older changes see ChangeLog-2017.
12154 version-control: never