1 2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
3 * common/selftest.h (struct selftest): Add virtual destructor.
5 2017-12-07 Phil Muldoon <pmuldoon@redhat.com>
7 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
8 over basic location code. Implement explicit location keywords.
9 (bppy_init_validate_args): New function.
10 * NEWS: Document Python explicit breakpoint locations.
12 2017-12-07 Joel Brobecker <brobecker@adacore.com>
14 * MAINTAINERS: Restore target entries for m68hc11-elf,
15 score-elf and xstormy16-elf, incorrectly removed in a previous
16 patch meant to only update the list of active maintainers.
18 2017-12-06 Pedro Alves <palves@redhat.com>
20 * break-catch-syscall.c (insert_catch_syscall)
21 (remove_catch_syscall): Adjust to pass reference to
22 inf_data->syscalls_counts directly via gdb::array_view.
23 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
25 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
26 * remote.c (remote_set_syscall_catchpoint): Likewise.
27 * target-debug.h (target_debug_print_bool): New.
28 (define target_debug_print_gdb_array_view_const_int): New.
29 * target-delegates.c: Regenerate.
30 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
31 gdb::array_view and bool.
32 (target_set_syscall_catchpoint): Likewise.
34 2017-12-06 Simon Marchi <simon.marchi@ericsson.com>
36 * break-catch-syscall.c (catch_syscall_completer): Get pointers
37 to syscall group strings after building the string vector.
39 2017-12-06 Pedro Alves <palves@redhat.com>
41 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
42 "qXfer:features:read"" is disabled.
43 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
44 Check packet_config_support instead of packet->support directly.
46 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
48 * target-descriptions.c (struct tdesc_feature) <registers>: Use
50 (struct target_desc) <features>: Use tdesc_feature_up typedef.
52 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
54 * target-descriptions.c (struct tdesc_type): Use default
58 (struct tdesc_type_builtin): New.
59 (struct tdesc_type_vector): New.
60 (struct tdesc_type_with_fields): New.
61 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
62 (tdesc_gdb_type): Remove.
63 (tdesc_register_type): Adjust.
64 (tdesc_create_vector): Create tdesc_type_vector.
65 (tdesc_create_struct): Create tdesc_type_with_fields.
66 (tdesc_set_struct_size): Change parameter type.
67 (tdesc_create_union): Create tdesc_type_with_fields.
68 (tdesc_create_flags): Likewise.
69 (tdesc_create_enum): Likewise.
70 (tdesc_add_field): Change parameter type.
71 (tdesc_add_typed_bitfield): Likewise.
72 (tdesc_add_bitfield): Likewise.
73 (tdesc_add_flag): Likewise.
74 (tdesc_add_enum_value): Likewise.
75 (print_c_tdesc) <visit>: Remove overload with tdesc_type
76 parameter, add overloads for tdesc_type_builtin,
77 tdesc_type_with_fields and tdesc_type_vector.
78 <m_printed_type>: Remove.
79 <m_printed_element_type, m_printed_type_with_fields>: Add.
80 * target-descriptions.h (tdesc_create_enum): Change return type.
81 (tdesc_add_typed_bitfield): Change parameter type.
82 (tdesc_add_enum_value): Change parameter type.
83 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
84 type to tdesc_type_with_fields.
85 (tdesc_start_struct): Adjust.
86 (tdesc_start_flags): Adjust.
87 (tdesc_start_enum): Adjust.
88 (tdesc_start_field): Adjust.
89 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
90 (struct tdesc_type_vector): Forward-declare.
91 (struct tdesc_type_with_fields): Forward-declare.
92 (tdesc_create_struct): Change return type.
93 (tdesc_create_union): Likewise.
94 (tdesc_create_flags): Likewise.
95 (tdesc_add_field): Change parameter type.
96 (tdesc_set_struct_size): Likewise.
97 (tdesc_add_bitfield): Likewise.
98 (tdesc_add_flag): Likewise.
99 * features: Re-generate C files.
101 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
103 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
104 (struct tdesc_arch_reg): Add constructor.
105 (DEF_VEC_O (tdesc_arch_reg)): Remove.
106 (struct tdesc_arch_data): Initialize fields.
107 <arch_regs>: Change type to std::vector.
108 (target_find_description): Adjust.
109 (tdesc_find_type): Adjust.
110 (tdesc_data_init): Call tdesc_arch_data constructor.
111 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
112 (tdesc_data_cleanup): Free data with delete.
113 (tdesc_numbered_register): Adjust.
114 (tdesc_find_arch_register): Adjust.
115 (tdesc_use_registers): Adjust.
117 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
119 * target-descriptions.c (tdesc_type_field): Remove typedef.
120 (DEF_VEC_O (tdesc_type_field)): Remove.
121 (struct tdesc_type_field): Add constructor.
122 <name>: Change type to std::string.
123 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
125 <~tdesc_type>: Destroy vector if the type kind uses it.
126 <u::u::fields>: Change type to std::vector.
127 (tdesc_gdb_type): Adjust.
128 (tdesc_add_field): Adjust.
129 (tdesc_add_typed_bitfield): Adjust.
130 (tdesc_add_field): Adjust.
131 (tdesc_add_enum_value): Adjust.
132 (class print_c_tdesc) <visit>: Adjust.
134 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
136 * target-descriptions.c (struct tdesc_type) <name>: Change type
138 <~tdesc_type>: Don't manually free name.
139 <operator==>: Adjust.
140 (tdesc_named_type): Adjust.
141 (tdesc_find_type): Adjust.
142 (tdesc_gdb_type): Adjust.
143 (class print_c_tdesc) <visit>: Adjust.
145 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
147 * target-descriptions.c (tdesc_type_p): Remove typedef.
148 (DEF_VEC_P (tdesc_type_p)): Remove.
149 (struct tdesc_feature) <types>: Change type to std::vector.
150 <~tdesc_feature>: Replace with default implementation.
152 (tdesc_named_type): Adjust.
153 (tdesc_create_vector): Adjust.
154 (tdesc_create_struct): Adjust.
155 (tdesc_create_union): Adjust.
156 (tdesc_create_flags): Adjust.
157 (tdesc_create_enum): Adjust.
159 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
161 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
162 type of name_ parameter, adjust to std::string change.
163 <name, group, type>: Change type to std::string.
164 <~tdesc_reg>: Replace with default implementation.
165 <operator==>: Adjust.
166 (tdesc_find_register_early): Adjust.
167 (tdesc_register_name): Adjust.
168 (tdesc_register_type): Adjust.
169 (tdesc_register_in_reggroup_p): Adjust.
170 (class print_c_tdesc) <visit>: Adjust.
171 (class print_c_feature) <visit>: Adjust.
172 * features/arc-arcompact.c: Re-generate.
173 * features/arc-v2.c: Re-generate.
175 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
177 * target-descriptions.c (tdesc_reg_p): Remove typedef.
178 (DEF_VEC_P (tdesc_reg_p)): Remove.
179 (struct tdesc_feature) <registers>: Change type to std::vector.
180 <~tdesc_feature>: Don't manually free registers.
182 <operator==>: Adjust.
183 (tdesc_has_registers): Adjust.
184 (tdesc_find_register_early): Adjust.
185 (tdesc_use_registers): Adjust.
186 (tdesc_create_reg): Adjust.
188 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
190 * target-descriptions.c (tdesc_feature) <name>: Change type to
192 <~tdesc_feature>: Don't manually free name.
193 <operator==>: Adjust.
194 (tdesc_find_feature): Adjust.
195 (tdesc_feature_name): Adjust.
196 (class print_c_tdesc) <visit_pre>: Adjust.
197 (class print_c_feature) <visit_pre>: Adjust.
199 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
201 * target-descriptions.c (tdesc_feature_p): Remove typedef.
202 (DEF_VEC_P (tdesc_feature_p)): Remove.
203 (struct target_desc) <features>: Change type to std::vector.
204 <~target_desc>: Replace with default implementation.
206 <operator==>: Adjust.
207 (tdesc_has_registers): Adjust.
208 (tdesc_find_feature): Adjust.
209 (tdesc_use_registers): Adjust.
210 (tdesc_create_feature): Adjust.
212 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
214 * target-descriptions.c (arch_p): Remove typedef.
215 (DEF_VEC_P (arch_p)): Remove.
216 (struct target_desc) <compatible>: Change type to std::vector.
217 <~target_desc>: Don't manually free compatible.
218 (tdesc_compatible_p): Adjust.
219 (tdesc_add_compatible): Adjust.
220 (class print_c_tdesc) <visit_pre>: Adjust.
222 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
224 * target-descriptions.c (property_s): Remove typedef.
225 (DEF_VEC_O (property_s)): Remove.
226 (struct target_desc) <properties>: Make an std::vector.
227 <~target_desc>: Don't manually free properties.
228 (tdesc_property): Adjust.
229 (set_tdesc_property): Adjust.
230 (class print_c_tdesc) <visit_pre>: Adjust.
232 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
234 * common/gdb_assert.h (gdb_static_assert): Redefine using
237 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
239 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
241 (ada_is_redundant_range_encoding): Likewise.
242 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
244 * alpha-tdep.c (alpha_software_single_step): Likewise.
245 * arm-tdep.c (_initialize_arm_tdep): Likewise.
246 * auto-load.c (info_auto_load_cmd): Likewise.
247 * break-catch-syscall.c (insert_catch_syscall): Likewise.
248 (remove_catch_syscall): Likewise.
249 * breakpoint.c (condition_completer): Likewise.
250 (clear_command): Likewise.
251 (update_breakpoint_locations): Likewise.
252 * btrace.c (btrace_disable): Likewise.
253 (btrace_teardown): Likewise.
254 (btrace_maint_update_pt_packets): Likewise.
255 (maint_btrace_clear_cmd): Likewise.
256 * cli/cli-decode.c (lookup_cmd_1): Likewise.
257 (lookup_cmd_composition): Likewise.
258 * cli/cli-dump.c (scan_filename): Likewise.
259 (restore_command): Likewise.
260 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
261 * compile/compile-object-load.c (compile_object_load): Likewise.
262 * compile/compile-object-run.c (compile_object_run): Likewise.
263 * compile/compile.c (compile_to_object): Likewise.
264 * completer.c (filename_completer): Likewise.
265 (complete_files_symbols): Likewise.
266 (complete_expression): Likewise.
267 * corelow.c (core_open): Likewise.
268 * ctf.c (ctf_start): Likewise.
269 (ctf_write_status): Likewise.
270 (ctf_write_uploaded_tsv): Likewise.
271 (ctf_write_definition_end): Likewise.
272 (ctf_open_dir): Likewise.
273 (ctf_xfer_partial): Likewise.
274 (ctf_trace_find): Likewise.
275 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
277 * dwarf2loc.c (allocate_piece_closure): Likewise.
278 (indirect_pieced_value): Likewise.
279 (dwarf2_evaluate_loc_desc_full): Likewise.
280 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
281 (dw2_expand_symtabs_matching): Likewise.
282 (dw2_map_symbol_filenames): Likewise.
283 (read_and_check_comp_unit_head): Likewise.
284 (read_cutu_die_from_dwo): Likewise.
285 (lookup_dwo_unit): Likewise.
286 (read_comp_units_from_section): Likewise.
287 (dwarf2_compute_name): Likewise.
288 (handle_DW_AT_stmt_list): Likewise.
289 (create_cus_hash_table): Likewise.
290 (create_dwp_v2_section): Likewise.
291 (dwarf2_rnglists_process): Likewise.
292 (dwarf2_ranges_process): Likewise.
293 (dwarf2_record_block_ranges): Likewise.
294 (is_vtable_name): Likewise.
295 (read_formatted_entries): Likewise.
296 (skip_form_bytes): Likewise.
297 * elfread.c (elf_symtab_read): Likewise.
298 * exec.c (exec_file_command): Likewise.
299 * f-valprint.c (f_val_print): Likewise.
300 (info_common_command_for_block): Likewise.
301 * guile/guile.c (initialize_scheme_side): Likewise.
302 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
303 * guile/scm-cmd.c (cmdscm_completer): Likewise.
304 (gdbscm_register_command_x): Likewise.
305 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
306 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
307 * guile/scm-ports.c (file_port_magic): Likewise.
308 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
309 (ppscm_pretty_print_one_value): Likewise.
310 (ppscm_print_children): Likewise.
311 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
312 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
313 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
314 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
315 * i386-tdep.c (i386_register_reggroup_p): Likewise.
316 * infcmd.c (run_command_1): Likewise.
317 (until_next_fsm_clean_up): Likewise.
318 * linespec.c (linespec_complete): Likewise.
319 (find_label_symbols): Likewise.
320 * m2-valprint.c (m2_val_print): Likewise.
321 * memattr.c (require_user_regions): Likewise.
322 (lookup_mem_region): Likewise.
323 (disable_mem_command): Likewise.
324 (mem_delete): Likewise.
325 * mep-tdep.c (mep_register_name): Likewise.
326 (mep_analyze_prologue): Likewise.
327 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
328 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
329 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
330 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
331 * minidebug.c (lzma_open): Likewise.
332 * minsyms.c (lookup_minimal_symbol): Likewise.
333 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
334 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
335 (mips_o64_return_value): Likewise.
336 (mips_single_step_through_delay): Likewise.
337 (_initialize_mips_tdep): Likewise.
338 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
339 (nios2_software_single_step): Likewise.
340 * parse.c (find_minsym_type_and_address): Likewise.
341 * psymtab.c (psym_relocate): Likewise.
342 * python/py-breakpoint.c (bppy_get_commands): Likewise.
343 (gdbpy_breakpoint_modified): Likewise.
344 * python/py-infevents.c (create_inferior_call_event_object):
346 * python/py-record-btrace.c (btpy_list_item): Likewise.
347 * python/py-type.c (typy_str): Likewise.
348 * python/py-value.c (valpy_call): Likewise.
349 * python/python.c (do_start_initialization): Likewise.
350 * record-btrace.c (record_btrace_insn_history_range): Likewise.
351 (record_btrace_call_history_range): Likewise.
352 (record_btrace_record_method): Likewise.
353 (record_btrace_xfer_partial): Likewise.
354 (btrace_get_frame_function): Likewise.
355 * record-full.c (record_full_open): Likewise.
356 * record.c (get_context_size): Likewise.
357 * registry.h (DEFINE_REGISTRY): Likewise.
358 * remote-fileio.c (remote_fileio_request): Likewise.
359 * remote.c (remote_update_thread_list): Likewise.
360 (remote_check_symbols): Likewise.
361 (remote_commit_resume): Likewise.
362 (remote_interrupt): Likewise.
363 (remote_insert_breakpoint): Likewise.
364 (compare_sections_command): Likewise.
365 * rust-exp.y (super_name): Likewise.
366 (lex_string): Likewise.
367 (convert_ast_to_type): Likewise.
368 (convert_ast_to_expression): Likewise.
369 * rust-lang.c (rust_print_struct_def): Likewise.
370 (rust_print_type): Likewise.
371 (rust_evaluate_subexp): Likewise.
372 * rx-tdep.c (rx_register_type): Likewise.
373 * ser-event.c (serial_event_clear): Likewise.
374 * serial.c (serial_open): Likewise.
375 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
376 * symfile.c (section_is_overlay): Likewise.
377 (overlay_unmapped_address): Likewise.
378 (overlay_mapped_address): Likewise.
379 (simple_overlay_update_1): Likewise.
380 (simple_overlay_update): Likewise.
381 * symtab.c (symbol_find_demangled_name): Likewise.
382 (search_symbols): Likewise.
383 * target-descriptions.c (tdesc_predefined_type): Likewise.
384 * target.c (target_commit_resume): Likewise.
385 * thread.c (print_selected_thread_frame): Likewise.
386 * top.c (new_ui_command): Likewise.
387 (gdb_readline_no_editing): Likewise.
388 * tracefile-tfile.c (tfile_open): Likewise.
389 * tracepoint.c (create_tsv_from_upload): Likewise.
390 * utils.c (quit): Likewise.
391 (defaulted_query): Likewise.
392 * valarith.c (value_concat): Likewise.
393 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
394 * xml-tdesc.c (target_fetch_description_xml): Likewise.
395 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
396 (xtensa_pseudo_register_write): Likewise.
398 2017-12-04 Tom Tromey <tom@tromey.com>
400 * NEWS: Mention Rust trait object inspection.
402 2017-12-04 Pedro Alves <palves@redhat.com>
405 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
406 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
407 (vex2_prefix_p, vex3_prefix_p): New functions.
408 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
410 (fixup_riprel): Set VEX3.!B.
412 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
414 * target.h (mem_region_vector): Remove.
415 (struct target_ops) <to_memory_map>: Change return type to
416 std::vector<mem_region>.
417 * target-debug.h (target_debug_print_mem_region_vector): Rename
419 (target_debug_print_std_vector_mem_region): ... this.
420 * target-delegates.c: Re-generate.
422 2017-12-03 Pedro Alves <palves@redhat.com>
424 * make-target-delegates (munge_type): Also munge '<', '>', and
425 ':'. Avoid double underscores in identifiers, and trailing
428 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
430 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
431 * target-delegates.c: Regenerate.
433 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
435 * common/poison.h (XDELETE): Fix typo.
437 2017-12-01 Andrew Cagney <cagney@redhat.com>
438 Joel Brobecker <brobecker@adacore.com>
439 Sergio Durigan Junior <sergiodj@redhat.com>
441 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
443 * coffread.c (coff_symfile_read): Do not map over sections with
444 'coff_locate_sections' if readnever is on.
445 * dwarf2read.c (dwarf2_has_info): Return 0 if
447 * elfread.c (elf_symfile_read): Do not map over sections with
448 'elf_locate_sections' if readnever is on.
449 * main.c (validate_readnow_readnever): New function.
450 (captured_main_1): Add support for --readnever.
451 (print_gdb_help): Document --readnever.
452 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
454 * symfile.c (readnever_symbol_files): New global.
455 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
456 'READNEVER_SYMBOL_FILES' is set.
457 (validate_readnow_readnever): New function.
458 (symbol_file_command): Handle '-readnever' option.
459 Call 'validate_readnow_readnever'.
460 (add_symbol_file_command): Handle '-readnever' option.
461 Call 'validate_readnow_readnever'.
462 (_initialize_symfile): Document new '-readnever' option for
463 both 'symbol-file' and 'add-symbol-file' commands.
464 * top.h (readnever_symbol_files): New extern global.
465 * xcoffread.c (xcoff_initial_scan): Do not read debug
466 information if readnever is on.
468 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
470 * symfile.c (symbol_file_command): Call
471 'symbol_file_add_main_1' only after processing all command
473 (add_symbol_file_command): Modify logic to make arguments
474 position-independent.
476 2017-12-01 Joel Brobecker <brobecker@adacore.com>
478 * ada-lang.c (symbol_list_obstack): Delete.
479 (resolve_subexp): Make sure "candidates" gets xfree'ed.
480 (ada_lookup_symbol_list_worker): Remove the limitation that
481 the result is only good until the next call, now making it
482 the responsibility of the caller to free the result when no
483 longer needed. Adjust the function's intro comment accordingly.
484 (ada_lookup_symbol_list): Adjust the function's intro comment.
485 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
486 (ada_lookup_encoded_symbol, get_var_value): Likewise.
487 (_initialize_ada_language): Remove symbol_list_obstack
489 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
490 (write_var_or_type, write_name_assoc): Likewise.
492 2017-12-01 Tom Tromey <tom@tromey.com>
494 * Makefile.in (all_deps_files): New variable.
495 Include .Po files using all_deps_files.
497 2017-12-01 Joel Brobecker <brobecker@adacore.com>
499 * MAINTAINERS: Update list of maintainers, moving those who
500 stepped down or became inactive to the "Past Maintainers"
503 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
505 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
507 (NEW_PROC_API): Remove.
508 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
510 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
511 * configure: Regenerate.
512 * config.in: Regenerate.
513 * gdbserver/configure: Regenerate.
514 * gdbserver/config.in: Regenerate.
516 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
518 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
520 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
522 * proc-api.c: Remove !NEW_PROC_API support.
523 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
524 Remove tests for macros always defined on Solaris.
525 * proc-events.c: Remove !NEW_PROC_API support.
526 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
527 HAVE_SYS_USER_H tests.
528 (init_syscall_table): Remove non-Solaris syscalls.
529 Remove tests for syscalls present on all Solaris versions.
530 Add missing Solaris 10+ syscalls.
531 (signal_table): Remove non-Solaris signals.
532 Remove tests for signals present on all Solaris versions.
533 (fault_table): Remove non-Solaris faults.
534 Remove tests for faults present on all Solaris versions.
535 * proc-flags.c: Remove !NEW_PROC_API support.
536 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
537 Remove non-Solaris flags.
538 * proc-why.c: Remove !NEW_PROC_API support.
539 (pr_why_table): Remove meaningless comments.
540 Remove tests for reasons present on all Solaris versions.
542 (proc_prettyfprint_why): Likewise.
544 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
545 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
546 Remove WA_READ test, IRIX watchpoint support.
547 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
549 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
550 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
552 Remove CTL_PROC_NAME_FMT tests.
553 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
555 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
556 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
557 (proc_modify_flag): Replace GDBRESET by PCUNSET.
558 Remove PR_ASYNC, PR_KLC tests.
559 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
560 (proc_parent_pid): Remove PCWATCH etc. tests.
561 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
563 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
564 Remove SYS_lwpcreate || SYS_lwp_create test.
565 (proc_get_current_thread): Likewise.
566 [PIOCNTHR && PIOCTLIST]: Remove.
567 [PIOCLSTATUS]: Remove.
568 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
569 [PRFS_STOPEXEC]: Remove.
570 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
571 (syscall_is_exit): Likewise.
572 (syscall_is_exec): Likewise.
573 (syscall_is_lwp_create): Likewise.
574 Remove SYS_syssgi support.
575 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
576 [SYS_syssgi]: Remove.
577 Remove non-Solaris cases, conditionals.
578 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
580 (procfs_init_inferior) [SYS_syssgi]: Remove.
581 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
582 (procfs_inferior_created) [SYS_syssgi]: Remove.
583 (procfs_set_watchpoint): Remove !AIX5 test.
584 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
586 (mappingflags) [MA_PHYS]: Remove.
587 (info_mappings_callback): Remove PCAGENT test.
588 Remove PIOCOPENLWP || PCAGENT test.
590 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
592 * sol-thread.c (info_solthreads): Constify args.
595 2017-11-29 John Baldwin <jhb@FreeBSD.org>
597 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
599 2017-11-29 Joel Brobecker <brobecker@adacore.com>
601 * ada-lang.c (to_fixed_range_type): Make sure that the size
602 of the range type being returned is the same as the size
603 of the range type being fixed.
605 2017-11-29 Pedro Alves <palves@redhat.com>
608 * NEWS: Mention setting breakpoints on functions with C++ ABI
610 * completer.h (completion_match_for_lcd) <match,
611 mark_ignored_range>: New methods.
612 <finish>: Consider ignored ranges.
613 <clear>: Clear ignored ranges.
614 <m_ignored_ranges, m_finished_storage>: New fields.
615 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
616 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
617 completion_match_for_lcd pointer to strncmp_iw_with_mode.
618 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
619 * language.c (default_symbol_name_matcher): Pass the
620 completion_match_for_lcd pointer to strncmp_iw_with_mode.
621 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
622 * utils.c (skip_abi_tag): New function.
623 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
625 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
628 2017-11-29 Pedro Alves <palves@redhat.com>
631 * NEWS: Mention setting breakpoints on functions with C++ ABI
633 * completer.h (completion_match_for_lcd) <match,
634 mark_ignored_range>: New methods.
635 <finish>: Consider ignored ranges.
636 <clear>: Clear ignored ranges.
637 <m_ignored_ranges, m_finished_storage>: New fields.
638 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
639 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
640 completion_match_for_lcd pointer to strncmp_iw_with_mode.
641 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
642 * language.c (default_symbol_name_matcher): Pass the
643 completion_match_for_lcd pointer to strncmp_iw_with_mode.
644 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
645 * utils.c (skip_abi_tag): New function.
646 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
648 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
651 2017-11-29 Pedro Alves <palves@redhat.com>
653 * NEWS: Mention that breakpoints on C++ functions are now set on
654 on all namespaces/classes by default, and mention "break
656 * ax-gdb.c (agent_command_1): Adjust to pass a
657 symbol_name_match_type to new_linespec_location.
658 * breakpoint.c (parse_breakpoint_sals): Adjust to
659 get_linespec_location's return type change.
660 (strace_marker_create_sals_from_location): Adjust to pass a
661 symbol_name_match_type to new_linespec_location.
662 (strace_marker_decode_location): Adjust to get_linespec_location's
664 (strace_command): Adjust to pass a symbol_name_match_type to
665 new_linespec_location.
666 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
667 mention "-qualified".
668 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
669 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
671 (complete_address_and_linespec_locations): New parameter
672 'match_type'. Pass it down.
673 (explicit_options): Add "-qualified".
674 (collect_explicit_location_matches): Pass the requested match type
675 to the linespec completers. Handle MATCH_QUALIFIED.
676 (location_completer): Handle "-qualified" combined with linespecs.
677 * cp-support.c (cp_search_name_hash): New.
678 (cp_symbol_name_matches_1): Implement wild matching for C++.
679 (cp_fq_symbol_name_matches): Reimplement.
680 (cp_get_symbol_name_matcher): Return different matchers depending
681 on the lookup name's match type.
682 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
683 * cp-support.h (cp_search_name_hash): New declaration.
685 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
687 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
689 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
690 pass a symbol_name_match_type to new_linespec_location.
691 * linespec.c (linespec_parse_basic): Lookup function symbols using
692 the parser's symbol name match type.
693 (convert_explicit_location_to_linespec): New
694 symbol_name_match_type parameter. Pass it down to
695 find_linespec_symbols.
696 (convert_explicit_location_to_sals): Pass the location's name
697 match type to convert_explicit_location_to_linespec.
698 (parse_linespec): New match_type parameter. Save it in the
700 (linespec_parser_new): Default to symbol_name_match_type::WILD.
701 (linespec_complete_function): New symbol_name_match_type
703 (complete_linespec_component): Pass down the parser's recorded
705 (linespec_complete_label): New symbol_name_match_type parameter.
707 (linespec_complete): New symbol_name_match_type parameter. Save
708 it in the parser and pass it down. Adjust to
709 get_linespec_location's prototype change.
710 (find_function_symbols, find_linespec_symbols): New
711 symbol_name_match_type parameter. Pass it down instead of
712 assuming symbol_name_match_type::WILD.
713 * linespec.h (linespec_complete, linespec_complete_function)
714 (linespec_complete_label): New symbol_name_match_type parameter.
715 * location.c (event_location::linespec_location): Now a struct
717 (EL_LINESPEC): Adjust.
718 (initialize_explicit_location): Default to
719 symbol_name_match_type::WILD.
720 (new_linespec_location): New symbol_name_match_type parameter.
721 Record it in the location.
722 (get_linespec_location): Now returns a struct linespec_location.
723 (new_explicit_location): Also copy func_name_match_type.
724 (explicit_to_string_internal)
725 (string_to_explicit_location): Handle "-qualified".
726 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
727 Copy symbol_name_match_type fields.
728 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
730 (event_location_to_string): Adjust to LINESPEC_LOCATION type
731 change. Handle "-qualfied".
732 (string_to_explicit_location): Handle "-qualified".
733 (string_to_event_location_basic): New symbol_name_match_type
734 parameter. Pass it down.
735 (string_to_event_location): Handle "-qualified".
736 * location.h (struct linespec_location): New.
737 (explicit_location::func_name_match_type): New field.
738 (new_linespec_location): Now returns a const linespec_location *.
739 (string_to_event_location_basic): New symbol_name_match_type
741 (explicit_completion_info::saw_explicit_location_option): New
743 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
744 symbol_name_match_type to new_linespec_location.
745 * python/py-breakpoint.c (bppy_init): Likewise.
746 * python/python.c (gdbpy_decode_line): Likewise.
748 2017-11-29 Pedro Alves <palves@redhat.com>
750 * ada-lang.c (ada_lookup_name_info::matches): Change type of
751 parameter from completion_match to completion_match_result.
753 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
754 * completer.c (completion_tracker::maybe_add_completion): Add
755 match_for_lcd parameter and use it.
756 (completion_tracker::add_completion): Likewise.
757 * completer.h (class completion_match_for_lcd): New class.
758 (completion_match_result::match_for_lcd): New field.
759 (completion_match_result::set_match): New method.
760 (completion_tracker): Add comments.
761 (completion_tracker::add_completion): Add match_for_lcd parameter.
762 (completion_tracker::reset_completion_match_result): Reset
764 (completion_tracker::maybe_add_completion): Add match_for_lcd
766 (completion_tracker::m_lowest_common_denominator_unique): Extend
768 * cp-support.c (cp_symbol_name_matches_1)
769 (cp_fq_symbol_name_matches): Change type of parameter from
770 completion_match to completion_match_result. Adjust.
771 * language.c (default_symbol_name_matcher): Change type of
772 parameter from completion_match to completion_match_result.
774 * language.h (completion_match_for_lcd): Forward declare.
775 (default_symbol_name_matcher): Change type of parameter from
776 completion_match to completion_match_result.
777 * symtab.c (compare_symbol_name): Adjust.
778 (completion_list_add_name): Pass the match_for_lcd to the tracker.
779 * symtab.h (ada_lookup_name_info::matches): Change type of
780 parameter from completion_match to completion_match_result.
781 (symbol_name_matcher_ftype): Likewise, and update comments.
783 2017-11-29 Pedro Alves <palves@redhat.com>
785 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
786 * minsyms.c (msymbol_is_text): Delete.
787 (msymbol_is_function): New function.
788 * minsyms.h (msymbol_is_text): Delete.
789 (msymbol_is_function): New declaration.
790 * symtab.c (find_function_alias_target): Use msymbol_is_function.
792 2017-11-29 Tom Tromey <tom@tromey.com>
794 * Makefile.in (distclean): Handle the case where rmdir fails.
796 2017-11-29 Tom Tromey <tom@tromey.com>
798 * symfile.c (_initialize_symfile): Update usage text for
799 add-symbol-file, symbol-file, load.
801 2017-11-29 Tom Tromey <tom@tromey.com>
803 * symfile.c (add_symbol_file_command): Error if some arguments to
804 -s are missing. Change unrecognized-argument error message.
805 (_initialize_symfile): Fix usage text for add-symbol-file.
807 2017-11-27 Tom Tromey <tom@tromey.com>
809 * Makefile.in (REMOTE_OBS): Remove.
810 (SFILES): Remove remote sources.
811 (COMMON_SFILES): Add remote sources.
812 (ALLDEPFILES): Remove dcache.c.
814 2017-11-27 Tom Tromey <tom@tromey.com>
816 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
818 (SFILES): Use SUBDIR_TARGET_SRCS.
819 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
820 (CONFIG_SRC_SUBDIR): Add target.
821 (%.o): Remove target rule.
823 2017-11-27 Tom Tromey <tom@tromey.com>
825 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
826 registry.o, thread-fsm.o, debug.o.
827 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
828 thread-fsm.c, debug.c.
830 2017-11-27 Tom Tromey <tom@tromey.com>
832 * Makefile.in (COMMON_SFILES): New.
833 (SFILES): Move some entries to COMMON_SFILES.
834 (COMMON_OBS): Use COMMON_SFILES.
836 2017-11-27 Tom Tromey <tom@tromey.com>
838 * Makefile.in (YYFILES): Update comment.
841 2017-11-27 Tom Tromey <tom@tromey.com>
843 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
844 (CONFIG_SRC_SUBDIR): Add python.
845 (%.o): Remove python rule.
846 (python/%.o): New rule.
847 * configure: Rebuild.
848 * configure.ac (CONFIG_OBS): Refer to python/python.o
850 2017-11-27 Tom Tromey <tom@tromey.com>
852 * configure: Rebuild.
853 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
854 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
855 (CONFIG_SRC_SUBDIR): Add guile.
856 (%.o): Remove guile rule.
858 2017-11-27 Tom Tromey <tom@tromey.com>
860 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
861 (%.o): Remove unittests rule.
862 (CONFIG_SRC_SUBDIR): Add unittests.
864 2017-11-27 Tom Tromey <tom@tromey.com>
866 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
867 (CONFIG_SRC_SUBDIR): Add tui.
868 (%.o): Remove tui rule.
870 2017-11-27 Tom Tromey <tom@tromey.com>
872 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
873 (%.o): Remove compile rule.
874 (CONFIG_SRC_SUBDIR): Add compile.
876 2017-11-27 Tom Tromey <tom@tromey.com>
878 * Makefile.in (SUBDIR_MI_OBS): Redefine.
879 (%.o): Remove mi rule.
880 (CONFIG_SRC_SUBDIR): Add mi.
881 (COMMON_OBS): Use mi/mi-common.o
883 2017-11-27 Tom Tromey <tom@tromey.com>
885 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
886 (%.o): Remove cli rule.
887 (CONFIG_SRC_SUBDIR): Add cli.
889 2017-11-27 Tom Tromey <tom@tromey.com>
891 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
892 * configure: Rebuild.
893 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
894 (CONFIG_DEP_SUBDIR): New variable.
895 (%.o): Add order-only dependency.
896 ($(CONFIG_DEP_SUBDIR)): New target.
898 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
901 * findcmd.c (_initialize_mem_search): Update find command help
904 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
906 * python/python.c (do_start_initialization): Change progname
907 type to gdb::unique_xmalloc_ptr. Release the pointer when using
910 2017-11-26 Tom Tromey <tom@tromey.com>
912 * common/format.h: Add include guards.
914 2017-11-26 Tom Tromey <tom@tromey.com>
916 * nat/linux-personality.h (class
917 maybe_disable_address_space_randomization): New class.
918 (maybe_disable_address_space_randomization): Don't declare
920 * nat/linux-personality.c (restore_personality)
921 (make_disable_asr_cleanup): Remove.
922 (maybe_disable_address_space_randomization): Now a constructor.
923 (~maybe_disable_address_space_randomization): New destructor.
924 * linux-nat.c (linux_nat_create_inferior): Update.
926 2017-11-26 Tom Tromey <tom@tromey.com>
928 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
930 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
932 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
933 "cooked" register. Access only first four bytes of branch target
936 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
939 * stap-probe.c (relocate_address): New function.
940 (stap_probe::get_relocated_address): Use 'relocate_address'.
941 (stap_probe::set_semaphore): Use 'relocate_address' and pass
943 (stap_probe::clear_semaphore): Likewise.
945 2017-11-25 Pedro Alves <palves@redhat.com>
947 * dictionary.c: Include "safe-ctype.h".
948 * minsyms.c: Include "safe-ctype.h".
949 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
951 2017-11-25 Pedro Alves <palves@redhat.com>
953 * completer.c (complete_line_internal_1): Skip spaces until the
954 start of the command.
956 2017-11-24 Pedro Alves <palves@redhat.com>
958 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
959 cp_fq_symbol_name_matches. Pass language_cplus to
961 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
962 (selftests::test_cp_symbol_name_cmp): New.
963 (_initialize_cp_support): Register "cp_symbol_name_matches"
965 * language.c (default_symbol_name_matcher): Pass language_minimal
966 to strncmp_iw_with_mode.
967 * utils.c: Include "cp-support.h" and <algorithm>.
968 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
969 (cp_is_operator): New functions.
970 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
971 skip whitespace in the symbol name when the lookup name doesn't
972 have spaces, and vice versa.
973 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
974 * utils.h (strncmp_iw_with_mode): Add language parameter.
976 2017-11-24 Joel Brobecker <brobecker@adacore.com>
978 * ada-lang.c (ada_exception_message_1, ada_exception_message):
980 (print_it_exception): If available, display the exception
982 * NEWS: Document new feature.
984 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
986 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
988 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
990 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
991 (dtrace_probe::is_enabled, dtrace_probe::enable)
992 (dtrace_probe::disable): Remove keyword 'struct' at for-range
994 * probe.c (gen_ui_out_table_header_info)
995 (print_ui_out_not_applicables): Remove keyword 'struct' at
998 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1000 * configure.tgt: Add arch/aarch64.o
1002 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1004 * common/common-utils.h: Include poison.h.
1005 (xfree): Remove declaration, add definition with static_assert.
1006 * common/common-utils.c (xfree): Remove.
1007 * common/poison.h (IsMallocatable): Define.
1008 (IsFreeable): Define.
1009 (free): Delete for non-freeable types.
1011 (XNEW): Undef and redefine.
1013 (XCNEW): Undef and redefine.
1015 (XDELETE): Undef and redefine.
1017 (XNEWVEC): Undef and redefine.
1019 (XCNEWVEC): Undef and redefine.
1021 (XRESIZEVEC): Undef and redefine.
1023 (XDELETEVEC): Undef and redefine.
1025 (XNEWVAR): Undef and redefine.
1027 (XCNEWVAR): Undef and redefine.
1029 (XRESIZEVAR): Undef and redefine.
1031 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1033 * gdbthread.h (private_thread_info): Define structure type, add
1034 virtual pure destructor.
1035 (thread_info) <priv>: Change type to unique_ptr.
1036 <private_dtor>: Remove.
1037 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1038 (private_thread_info::~private_thread_info): Provide default
1040 (thread_info::~thread_info): Don't call private_dtor nor
1042 * aix-thread.c (private_thread_info): Rename to ...
1043 (aix_thread_info): ... this.
1044 (get_aix_thread_info): New.
1045 (sync_threadlists): Adjust.
1047 (aix_thread_resume): Adjust.
1048 (aix_thread_fetch_registers): Adjust.
1049 (aix_thread_store_registers): Adjust.
1050 (aix_thread_extra_thread_info): Adjust.
1051 * darwin-nat.h (private_thread_info): Rename to ...
1052 (darwin_thread_info): ... this.
1053 (get_darwin_thread_info): New.
1054 * darwin-nat.c (darwin_init_thread_list): Adjust.
1055 (darwin_check_new_threads): Adjust.
1056 (thread_info_from_private_thread_info): Adjust.
1057 * linux-thread-db.c (private_thread_info): Rename to ...
1058 (thread_db_thread_info): ... this, initialize fields.
1059 (get_thread_db_thread_info): New.
1060 <dying>: Change type to bool.
1061 (update_thread_state): Adjust to type rename.
1062 (record_thread): Adjust to type rename an use of unique_ptr.
1063 (thread_db_pid_to_str): Likewise.
1064 (thread_db_extra_thread_info): Likewise.
1065 (thread_db_thread_handle_to_thread_info): Likewise.
1066 (thread_db_get_thread_local_address): Likewise.
1067 * nto-tdep.h (private_thread_info): Rename to ...
1068 (nto_thread_info): ... this, initialize fields.
1069 (get_nto_thread_info): New.
1070 <name>: Change type to std::string.
1071 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1073 * nto-procfs.c (update_thread_private_data_name): Adjust to
1074 std::string change, allocate nto_private_thread_info with new.
1075 (update_thread_private_data): Adjust to unique_ptr.
1076 * remote.c (private_thread_info): Rename to ...
1077 (remote_thread_info): ... this, initialize data members with
1079 <extra, name>: Change type to std::string.
1080 <thread_handle>: Change type to non-pointer.
1081 (free_private_thread_info): Remove.
1082 (get_private_info_thread): Rename to...
1083 (get_remote_thread_info): ... this, change return type, adjust to
1084 use of unique_ptr, use remote_thread_info constructor.
1085 (remote_add_thread): Adjust.
1086 (get_private_info_ptid): Rename to...
1087 (get_remote_thread_info): ...this, change return type.
1088 (remote_thread_name): Use get_remote_thread_info, adjust to
1089 change to std::string.
1090 (struct thread_item) <~thread_item>: Remove.
1091 <thread_handle>: Make non pointer.
1092 (start_thread): Adjust to thread_item::thread_handle type
1094 (remote_update_thread_list): Adjust to type name change, move
1095 strings from temporary to long-lived object instead of
1097 (remote_threads_extra_info): Use get_remote_thread_info.
1098 (process_initial_stop_replies): Likewise.
1099 (resume_clear_thread_private_info): Likewise.
1100 (remote_resume): Adjust to type name change.
1101 (remote_commit_resume): Use get_remote_thread_info.
1102 (process_stop_reply): Adjust to type name change.
1103 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1104 (remote_stopped_by_hw_breakpoint): Likewise.
1105 (remote_stopped_by_watchpoint): Likewise.
1106 (remote_stopped_data_address): Likewise.
1107 (remote_core_of_thread): Likewise.
1108 (remote_thread_handle_to_thread_info): Use
1109 get_private_info_thread, adjust to thread_handle field type
1112 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1114 * remote.c (struct thread_item): Add constructor, disable copy
1115 construction and copy assignment, define default move
1116 construction and move assignment.
1117 <extra, name>: Change type to std::string.
1119 <thread_handle>: Make non-pointer.
1120 (thread_item_t): Remove typedef.
1121 (DEF_VEC_O(thread_item_t)): Remove.
1122 (threads_listing_context) <contains_thread>: New method.
1123 <remove_thread>: New method.
1124 <items>: Change type to std::vector.
1125 (clear_threads_listing_context): Remove.
1126 (threads_listing_context_remove): Remove.
1127 (remote_newthread_step): Use thread_item constructor, adjust to
1128 change to std::vector.
1129 (start_thread): Use thread_item constructor, adjust to change to
1131 (end_thread): Adjust to change to std::vector and std::string.
1132 (remote_get_threads_with_qthreadinfo): Use thread_item
1133 constructor, adjust to std::vector.
1134 (remote_update_thread_list): Adjust to change to std::vector and
1135 std::string, use threads_listing_context methods.
1136 (remove_child_of_pending_fork): Adjust.
1137 (remove_new_fork_children): Adjust.
1138 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1139 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1140 * unittests/rsp-low-selftests.c: New file.
1141 * common/rsp-low.h: Include common/byte-vector.h.
1142 (hex2bin): New overload.
1143 * common/rsp-low.c (hex2bin): New overload.
1145 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1147 * inferior.h (private_inferior): Define structure type, add
1148 virtual pure destructor.
1149 (inferior) <priv>: Change type to unique_ptr.
1150 * inferior.c (private_inferior::~private_inferior): Provide
1151 default implementation.
1152 (inferior::~inferior): Don't free priv field.
1153 (exit_inferior_1): Likewise.
1154 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1155 (darwin_exception_info): Remove typedef.
1156 (DEF_VEC_O (darwin_thread_t)); Remove.
1157 (private_inferior): Rename to ...
1158 (darwin_private_inferior): ... this, extend private_inferior.
1159 (get_darwin_inferior): New.
1160 <threads>: Change type to std::vector of darwin_thread_t pointers.
1161 * darwin-nat.c (darwin_check_new_threads): Adjust.
1162 (find_inferior_task_it): Adjust.
1163 (darwin_find_thread); Adjust.
1164 (darwin_suspend_inferior): Adjust.
1165 (darwin_resume_inferior): Adjust.
1166 (darwin_find_new_inferior): Adjust.
1167 (darwin_decode_notify_message): Adjust.
1168 (darwin_send_reply): Adjust.
1169 (darwin_resume_inferior_threads): Adjust.
1170 (darwin_suspend_inferior_threads): Adjust.
1171 (darwin_decode_message): Adjust.
1172 (darwin_wait): Adjust.
1173 (darwin_interrupt): Adjust.
1174 (darwin_deallocate_threads): Adjust.
1175 (darwin_mourn_inferior): Adjust, don't free private data.
1176 (darwin_reply_to_all_pending_messages): Adjust.
1177 (darwin_stop_inferior): Adjust.
1178 (darwin_setup_exceptions): Adjust.
1179 (darwin_kill_inferior): Adjust.
1180 (darwin_setup_request_notification): Adjust.
1181 (darwin_attach_pid): Adjust.
1182 (darwin_init_thread_list): Adjust.
1183 (darwin_setup_fake_stop_event): Adjust.
1184 (darwin_attach): Adjust.
1185 (darwin_detach): Adjust.
1186 (darwin_xfer_partial): Adjust.
1187 (set_enable_mach_exceptions): Adjust.
1188 (darwin_pid_to_exec_file): Adjust.
1189 (darwin_get_ada_task_ptid): Adjust.
1190 * darwin-nat-info.c (get_task_from_args): Adjust.
1191 (info_mach_ports_command): Adjust.
1192 (info_mach_region_command): Adjust.
1193 (info_mach_exceptions_command): Adjust.
1194 * remote.c (private_inferior): Rename to ...
1195 (remote_private_inferior): ... this, initialize fields.
1196 (get_remote_inferior); New.
1197 (remote_commit_resume): Use get_remote_inferior.
1198 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1200 2017-11-24 Pedro Alves <palves@redhat.com>
1202 * NEWS: Mention linespecs and explicit locations, and completion
1205 2017-11-24 Yao Qi <yao.qi@linaro.org>
1207 * regcache.c (regcache::dump): Remove footnote_register_size.
1209 2017-11-24 Yao Qi <yao.qi@linaro.org>
1211 * regcache.c (cooked_read_test): Add more test for readonly
1214 2017-11-24 Yao Qi <yao.qi@linaro.org>
1216 * gdbarch-selftests.c (test_target_has_registers): Move it to
1218 (test_target_has_stack): Likewise.
1219 (test_target_has_memory): Likewise.
1220 (test_target_prepare_to_store): Likewise.
1221 (test_target_store_registers): Likewise.
1222 (test_target_ops): Likewise.
1223 * regcache.c: Include selftest-arch.h and gdbthread.h.
1224 (target_ops_no_register): New class.
1225 (test_target_fetch_registers): New.
1226 (test_target_store_registers): New.
1227 (test_target_xfer_partial): New.
1228 (readwrite_regcache): New.
1229 (cooked_read_test): New.
1230 (_initialize_regcache): Register the test.
1231 * target.c: (test_target_has_registers): Moved from
1232 gdbarch-selftests.c.
1233 (test_target_has_stack): Likewise.
1234 (test_target_has_memory): Likewise.
1235 (test_target_prepare_to_store): Likewise.
1236 (test_target_store_registers): Likewise.
1237 * target.h (test_target_ops): New class.
1239 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1241 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1244 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1246 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1247 * arch/aarch64.c (aarch64_create_target_description): Create
1248 new target description.
1249 * features/Makefile: Add new files.
1250 * features/aarch64.c: Remove file.
1251 * features/aarch64-core.c: New autogenerated file.
1252 * features/aarch64-fpu.c: New autogenerated file.
1253 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1255 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1257 * Makefile.in: Add new files.
1258 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1259 aarch64_read_description.
1260 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1261 Call aarch64_read_description.
1262 * aarch64-tdep.c (aarch64_read_description): New function.
1263 (aarch64_gdbarch_init): Call aarch64_read_description.
1264 * aarch64-tdep.h (aarch64_read_description): New function.
1265 * arch/aarch64.c: New file.
1266 * configure.tgt: Add new files.
1268 2017-11-24 Yao Qi <yao.qi@linaro.org>
1270 * mi/mi-main.c (register_changed_p): Update.
1271 * value.c (value_contents_bits_eq): Change return type.
1272 (value_contents_eq): Likewise.
1273 * value.h: Update comments.
1275 2017-11-24 Yao Qi <yao.qi@linaro.org>
1277 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1278 local 'changed'. Remove error.
1279 (register_changed_p): Change return type to bool.
1281 2017-11-24 Yao Qi <yao.qi@linaro.org>
1283 * arch/tic6x.c: New file.
1284 * arch/tic6x.h: New file.
1285 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1286 tic6x-core.xml and tic6x-gp.xml.
1287 * features/tic6x-c6xp.c: Generated.
1288 * features/tic6x-core.c: Generated.
1289 * features/tic6x-gp.c: Generated.
1290 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1293 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1295 * mi/mi-main.c (list_available_thread_groups): Change map value
1296 type to std::vector.
1298 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1300 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1302 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1304 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1306 <children_requested>: ... this.
1307 (varobj_get_num_children, varobj_update): Adjust.
1309 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1311 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1312 (ada_value_has_mutated): Likewise.
1313 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1314 (c_is_path_expr_parent): Likewise.
1315 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1316 (mi_cmd_var_set_frozen): Likewise.
1317 (mi_cmd_var_update_iter): Likewise.
1318 (mi_cmd_var_update): Likewise.
1319 * varobj.c (pretty_printing): Likewise.
1320 (varobj_enable_pretty_printing): Likewise.
1321 (struct varobj_root) <floating, is_valid>: Likewise.
1322 (struct varobj_dynamic) <children_requested>: Likewise.
1323 (delete_variable): Likewise.
1324 (delete_variable_1): Likewise.
1325 (install_variable): Likewise.
1326 (update_type_if_necessary): Likewise.
1327 (install_new_value): Likewise.
1328 (value_of_root): Likewise.
1329 (is_root_p): Likewise.
1330 (varobj_create): Likewise.
1331 (varobj_delete): Likewise.
1332 (varobj_has_more): Likewise.
1333 (varobj_set_frozen): Likewise.
1334 (varobj_get_frozen): Likewise.
1335 (install_dynamic_child): Likewise.
1336 (dynamic_varobj_has_child_method): Likewise.
1337 (update_dynamic_varobj_children): Likewise.
1338 (varobj_get_num_children): Likewise.
1339 (varobj_list_children): Likewise.
1340 (is_path_expr_parent): Likewise.
1341 (varobj_default_is_path_expr_parent): Likewise.
1342 (varobj_is_dynamic_p): Likewise.
1343 (varobj_set_value): Likewise.
1344 (varobj_value_has_mutated): Likewise.
1345 (varobj_update): Likewise.
1346 (check_scope): Likewise.
1347 (value_of_root_1): Likewise.
1348 (varobj_value_get_print_value): Likewise.
1349 (varobj_editable_p): Likewise.
1350 (varobj_value_is_changeable_p): Likewise.
1351 (varobj_floating_p): Likewise.
1352 (varobj_default_value_is_changeable_p): Likewise.
1353 (varobj_invalidate_iter): Likewise.
1354 * varobj.h (struct varobj_update_result) <type_changed,
1355 children_changed, changed, value_installed>: Likewise.
1356 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1357 (struct lang_varobj_ops) <value_is_changeable_p,
1358 value_has_mutated, is_path_expr_parent>: Likewise.
1359 (varobj_delete): Likewise.
1360 (varobj_set_frozen): Likewise.
1361 (varobj_get_frozen): Likewise.
1362 (varobj_set_value): Likewise.
1363 (varobj_update): Likewise.
1364 (varobj_editable_p): Likewise.
1365 (varobj_floating_p): Likewise.
1366 (varobj_has_more): Likewise.
1367 (varobj_is_dynamic_p): Likewise.
1368 (varobj_default_value_is_changeable_p): Likewise.
1369 (varobj_value_is_changeable_p): Likewise.
1370 (varobj_is_anonymous_child): Likewise.
1371 (varobj_default_is_path_expr_parent): Likewise.
1373 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1375 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1376 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1377 <type_str>: Convert to 'std::string'.
1378 <expr>: Convert to 'expression_up'.
1379 (dtrace_probe_arg_s): Delete type and VEC.
1380 (dtrace_probe_enabler_s): Likewise.
1381 (struct dtrace_probe): Replace by...
1382 (class dtrace_static_probe_ops): ...this and...
1383 (class dtrace_probe): ...this.
1384 (dtrace_probe_is_linespec): Rename to...
1385 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1387 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1388 Adjust code. Create new instance of 'dtrace_probe'.
1389 (dtrace_build_arg_exprs): Rename to...
1390 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1392 (dtrace_get_probes): Rename to...
1393 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1395 (dtrace_get_arg): Rename to...
1396 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1398 (dtrace_probe_is_enabled): Rename to...
1399 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1401 (dtrace_get_probe_address): Rename to...
1402 (dtrace_probe::get_relocated_address): ...this. Adjust code
1404 (dtrace_get_probe_argument_count): Rename to...
1405 (dtrace_probe::get_argument_count): ...this. Adjust code to
1407 (dtrace_can_evaluate_probe_arguments): Rename to...
1408 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1410 (dtrace_evaluate_probe_argument): Rename to...
1411 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1413 (dtrace_compile_to_ax): Rename to...
1414 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1416 (dtrace_probe_destroy): Delete.
1417 (dtrace_type_name): Rename to...
1418 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1420 (dtrace_probe::get_static_ops): New method.
1421 (dtrace_gen_info_probes_table_header): Rename to...
1422 (dtrace_static_probe_ops::gen_info_probes_table_header):
1423 ...this. Adjust code to reflect change.
1424 (dtrace_gen_info_probes_table_values): Rename to...
1425 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1426 code to reflect change.
1427 (dtrace_enable_probe): Rename to...
1428 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1430 (dtrace_disable_probe): Rename to...
1431 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1433 (struct probe_ops dtrace_probe_ops): Delete.
1434 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1435 instead of 'info_probes_for_ops'.
1436 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1439 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1440 Simon Marchi <simark@simark.ca>
1442 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1444 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1445 <aexpr>: Change type to 'expression_up'.
1446 (stap_probe_arg_s): Delete type and VEC.
1447 (struct stap_probe): Delete. Replace by...
1448 (class stap_static_probe_ops): ...this and...
1449 (class stap_probe): ...this. Rename variables to add 'm_'
1450 prefix. Do not use 'union' for arguments anymore.
1451 (stap_get_expected_argument_type): Receive probe name instead
1452 of 'struct stap_probe'. Adjust code.
1453 (stap_parse_probe_arguments): Rename to...
1454 (stap_probe::parse_arguments): ...this. Adjust code to
1456 (stap_get_probe_address): Rename to...
1457 (stap_probe::get_relocated_address): ...this. Adjust code
1459 (stap_get_probe_argument_count): Rename to...
1460 (stap_probe::get_argument_count): ...this. Adjust code
1462 (stap_get_arg): Rename to...
1463 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1465 (can_evaluate_probe_arguments): Rename to...
1466 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1468 (stap_evaluate_probe_argument): Rename to...
1469 (stap_probe::evaluate_argument): ...this. Adjust code
1471 (stap_compile_to_ax): Rename to...
1472 (stap_probe::compile_to_ax): ...this. Adjust code to
1474 (stap_probe_destroy): Delete.
1475 (stap_modify_semaphore): Adjust comment.
1476 (stap_set_semaphore): Rename to...
1477 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1479 (stap_clear_semaphore): Rename to...
1480 (stap_probe::clear_semaphore): ...this. Adjust code to
1482 (stap_probe::get_static_ops): New method.
1483 (handle_stap_probe): Adjust code to create instance of
1485 (stap_get_probes): Rename to...
1486 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1488 (stap_probe_is_linespec): Rename to...
1489 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1491 (stap_type_name): Rename to...
1492 (stap_static_probe_ops::type_name): ...this. Adjust code to
1494 (stap_gen_info_probes_table_header): Rename to...
1495 (stap_static_probe_ops::gen_info_probes_table_header):
1496 ...this. Adjust code to reflect change.
1497 (stap_gen_info_probes_table_values): Rename to...
1498 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1499 code to reflect change.
1500 (struct probe_ops stap_probe_ops): Delete.
1501 (info_probes_stap_command): Use 'info_probes_for_spops'
1502 instead of 'info_probes_for_ops'.
1503 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1506 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1508 * break-catch-throw.c (fetch_probe_arguments): Use
1509 'probe.prob' instead of 'probe.probe'.
1510 * breakpoint.c (create_longjmp_master_breakpoint): Call
1511 'can_evaluate_arguments' and 'get_relocated_address' methods
1513 (create_exception_master_breakpoint): Likewise.
1514 (add_location_to_breakpoint): Use 'sal->prob' instead of
1516 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1518 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1519 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1521 (probe_key_free): Call 'delete' on probe.
1522 (check_exception_resume): Use 'probe.prob' instead of
1524 * location.c (string_to_event_location_basic): Call
1525 'probe_linespec_to_static_ops'.
1526 * probe.c (class any_static_probe_ops): New class.
1527 (any_static_probe_ops any_static_probe_ops): New variable.
1528 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1529 argument. Adjust code to reflect change.
1530 (parse_probes): Use 'static_probe_ops' instead of
1531 'probe_ops'. Adjust code to reflect change.
1532 (find_probes_in_objfile): Call methods to get name and
1533 provider from probe.
1534 (find_probe_by_pc): Use 'result.prob' instead of
1535 'result.probe'. Call 'get_relocated_address' method from
1537 (collect_probes): Adjust comment and argument list to receive
1538 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1539 reflect change. Call necessary methods from probe.
1540 (compare_probes): Call methods to get name and provider from
1542 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1543 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1544 adjust code accordingly.
1545 (print_ui_out_not_applicables): Likewise.
1546 (info_probes_for_ops): Rename to...
1547 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1548 as argument instead of 'probe_ops'. Adjust code. Call
1549 necessary methods from probe.
1550 (info_probes_command): Use 'info_probes_for_spops'.
1551 (enable_probes_command): Pass correct argument to
1552 'collect_probes'. Call methods from probe.
1553 (disable_probes_command): Likewise.
1554 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1555 (get_probe_argument_count): Move to
1556 'any_static_probe_ops::get_argument_count'.
1557 (can_evaluate_probe_arguments): Move to
1558 'any_static_probe_ops::can_evaluate_arguments'.
1559 (evaluate_probe_argument): Move to
1560 'any_static_probe_ops::evaluate_argument'.
1561 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1563 (probe_linespec_to_ops): Rename to...
1564 (probe_linespec_to_static_ops): ...this. Adjust code.
1565 (probe_any_is_linespec): Rename to...
1566 (any_static_probe_ops::is_linespec): ...this.
1567 (probe_any_get_probes): Rename to...
1568 (any_static_probe_ops::get_probes): ...this.
1569 (any_static_probe_ops::type_name): New method.
1570 (any_static_probe_ops::gen_info_probes_table_header): New
1572 (compute_probe_arg): Use 'pc_probe.prob' instead of
1573 'pc_probe.probe'. Call methods from probe.
1574 (compile_probe_arg): Likewise.
1575 (std::vector<const probe_ops *> all_probe_ops): Delete.
1576 (std::vector<const static_probe_ops *> all_static_probe_ops):
1578 (_initialize_probe): Use 'all_static_probe_ops' instead of
1580 * probe.h (struct info_probe_column) <field_name>: Delete
1582 (info_probe_column_s): Delete type and VEC.
1583 (struct probe_ops): Delete. Replace with...
1584 (class static_probe_ops): ...this and...
1585 (clas probe): ...this.
1586 (struct bound_probe) <bound_probe>: Delete extraneous
1587 newline. Adjust constructor to receive 'probe' instead of
1589 <probe>: Rename to...
1590 <prob>: ...this. Delete extraneous newline.
1591 <objfile>: Delete extraneous newline.
1592 (register_probe_ops): Delete unused prototype.
1593 (info_probes_for_ops): Rename to...
1594 (info_probes_for_spops): ...this. Adjust comment.
1595 (get_probe_address): Move to 'probe::get_address'.
1596 (get_probe_argument_count): Move to
1597 'probe::get_argument_count'.
1598 (can_evaluate_probe_arguments): Move to
1599 'probe::can_evaluate_arguments'.
1600 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1601 * solib-svr4.c (struct svr4_info): Adjust comment.
1602 (struct probe_and_action) <probe>: Rename to...
1604 (register_solib_event_probe): Receive 'probe' instead of
1605 'struct probe' as argument. Use 'prob' instead of 'probe'
1607 (solib_event_probe_action): Call 'get_argument_count' method
1608 from probe. Adjust comment.
1609 (svr4_handle_solib_event): Adjust comment. Call
1610 'evaluate_argument' method from probe.
1611 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1613 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1614 'struct probe'. Call 'can_evaluate_arguments' from probe.
1615 * symfile.h: Forward declare 'class probe' instead of 'struct
1617 * symtab.h: Likewise.
1618 (struct symtab_and_line) <probe>: Rename to...
1620 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1622 (stop_tracing): Likewise.
1624 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1626 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1627 trailing newline at end of string in call to warning.
1629 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1631 * osdata.h: Include vector isntead of vec.h.
1632 (osdata_column_s): Remove typedef.
1633 (struct osdata_column): Add constructor.
1634 <name, value>: Change type to std::string.
1635 (DEF_VEC_O (osdata_column_s)): Remove.
1636 (osdata_item_s): Remove typedef.
1637 (struct osdata_item) <columns>: Change type to std::vector.
1638 (DEF_VEC_O (osdata_item_s)): Remove.
1639 (struct osdata): Add constructor.
1640 <type>: Change type to std::string.
1641 <items>: Change type to std::vector.
1642 (osdata_p): Remove typedef.
1643 (DEF_VEC_P (osdata_p)): Remove.
1644 (osdata_parse): Return a unique_ptr.
1645 (osdata_free): Remove.
1646 (make_cleanup_osdata_free): Remove.
1647 (get_osdata): Return a unique_ptr.
1648 (get_osdata_column): Return pointer to std::string, take a
1649 reference to osdata_item as parameter.
1650 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1652 <property_name>: Change type to std::string.
1653 (osdata_start_osdata): Allocate osdata with new and adjust.
1654 (osdata_start_item): Adjust.
1655 (osdata_start_column): Adjust.
1656 (osdata_end_column): Adjust.
1657 (clear_parsing_data): Remove.
1658 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1659 (osdata_item_clear): Remove.
1660 (get_osdata): return a unique_ptr and adjust.
1661 (get_osdata_column): Return a pointer to std::string and adjust.
1662 (info_osdata): Adjust.
1663 * mi/mi-main.c: Include <map>.
1664 (free_vector_of_osdata_items): Remove.
1665 (list_available_thread_groups): Adjust, use std::map instead of
1668 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1670 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1673 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1675 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1677 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1679 * varobj.h (struct varobj_update_result): Add constructor, add
1680 move constructor, disable copy and assign, initialize fields.
1681 <newobj>: Change type to std::vector.
1682 (varobj_update): Return std::vector.
1683 * varobj.c (install_dynamic_child): Change VEC parameters to
1684 std::vector and adjust.
1685 (update_dynamic_varobj_children): Likewise.
1686 (varobj_update): Return std::vector and adjust.
1687 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1689 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1691 * varobj.h (struct varobj) <parent>: Remove const.
1692 <children>: Change type to std::vector.
1693 (varobj_list_children): Return std::vector const reference.
1694 (varobj_restrict_range): Change parameter type to std::vector
1696 * varobj.c (varobj_has_more): Adjust.
1697 (varobj_restrict_range): Change parameter type to std::vector
1698 const reference and adjust.
1699 (install_dynamic_child): Adjust.
1700 (update_dynamic_varobj_children): Adjust.
1701 (varobj_list_children): Return std::vector const reference and
1703 (varobj_add_child): Adjust.
1704 (update_type_if_necessary): Adjust.
1705 (varobj_update): Adjust.
1706 (delete_variable_1): Adjust.
1707 * ada-varobj.c (ada_value_has_mutated): Adjust.
1708 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1710 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1712 * varobj.h (struct varobj): Add constructor and destructor,
1714 * varobj.c (struct varobj_root): Initialize fields.
1715 (struct varobj_dynamic): Initialize fields.
1716 (varobj_create): Use unique_ptr instead of cleanup. Create
1717 varobj with new instead of new_root_variable.
1718 (delete_variable_1): Free variable with delete instead of
1720 (create_child_with_value): Create variable with new instead of
1722 (varobj::varobj): New.
1723 (varobj::~varobj): New (body mostly coming from free_variable).
1724 (new_variable): Remove.
1725 (free_variable): Remove.
1726 (do_free_variable_cleanup): Remove.
1727 (make_cleanup_free_variable): Remove.
1729 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1731 * core-regset.c: Remove file.
1732 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1734 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1736 * NEWS: Document use of GNU MPFR.
1739 * Makefile.in (LIBMPFR): Add define.
1740 (CLIBS): Add $(LIBMPFR).
1741 * configure.ac: Add --with-mpfr configure option.
1742 * configure: Regenerate.
1743 * config.in: Regenerate.
1745 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1746 (class mpfr_float_ops): New type.
1747 (mpfr_float_ops::from_target): Two new overloaded functions.
1748 (mpfr_float_ops::to_target): Likewise.
1749 (mpfr_float_ops::to_string): New function.
1750 (mpfr_float_ops::from_string): Likewise.
1751 (mpfr_float_ops::to_longest): Likewise.
1752 (mpfr_float_ops::from_longest): Likewise.
1753 (mpfr_float_ops::from_ulongest): Likewise.
1754 (mpfr_float_ops::to_host_double): Likewise.
1755 (mpfr_float_ops::from_host_double): Likewise.
1756 (mpfr_float_ops::convert): Likewise.
1757 (mpfr_float_ops::binop): Likewise.
1758 (mpfr_float_ops::compare): Likewise.
1759 (get_target_float_ops): Use mpfr_float_ops if available.
1761 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1763 * target-float.c: Do not include <math.h>.
1764 Include <cmath> and <limits>.
1765 (DOUBLEST): Do not define.
1766 (class target_float_ops): New type.
1767 (class host_float_ops): New templated type.
1768 (class decimal_float_ops): New type.
1770 (floatformat_to_doublest): Rename to ...
1771 (host_float_ops<T>::from_target): ... this. Use template type T
1772 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1773 (host_float_ops<T>::from_target): New overload using a type argument.
1774 (floatformat_from_doublest): Rename to ...
1775 (host_float_ops<T>::to_target): ... this. Use template type T
1776 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1777 (host_float_ops<T>::to_target): New overload using a type argument.
1778 (floatformat_printf_format): New function.
1779 (struct printf_length_modifier): New templated type.
1780 (floatformat_to_string): Rename to ...
1781 (host_float_ops<T>::to_string): ... this. Use type instead of
1782 floatformat argument. Use floatformat_printf_format and
1783 printf_length_modifier. Remove special handling of invalid numbers,
1784 infinities and NaN (moved to target_float_to_string).
1785 (struct scanf_length_modifier): New templated type.
1786 (floatformat_from_string): Rename to ...
1787 (host_float_ops<T>::from_string): ... this. Use type instead of
1788 floatformat argument. Use scanf_length_modifier.
1789 (floatformat_to_longest): Rename to ...
1790 (host_float_ops<T>::to_longest): ... this. Use type instead of
1791 floatformat argument. Handle out-of-range values deterministically.
1792 (floatformat_from_longest): Rename to ...
1793 (host_float_ops<T>::from_longest): ... this. Use type instead of
1794 floatformat argument.
1795 (floatformat_from_ulongest): Rename to ...
1796 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1797 floatformat argument.
1798 (floatformat_to_host_double): Rename to ...
1799 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1800 floatformat argument.
1801 (floatformat_from_host_double): Rename to ...
1802 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1803 floatformat argument.
1804 (floatformat_convert): Rename to ...
1805 (host_float_ops<T>::convert): ... this. Use type instead of
1806 floatformat arguments. Remove handling of no-op conversions.
1807 (floatformat_binop): Rename to ...
1808 (host_float_ops<T>::binop): ... this. Use type instead of
1809 floatformat arguments.
1810 (floatformat_compare): Rename to ...
1811 (host_float_ops<T>::compare): ... this. Use type instead of
1812 floatformat arguments.
1814 (match_endianness): Use type instead of length/byte_order arguments.
1815 (set_decnumber_context): Likewise.
1816 (decimal_from_number): Likewise. Update calls.
1817 (decimal_to_number): Likewise.
1818 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1819 (decimal_float_ops::to_host_double): New dummy function.
1820 (decimal_float_ops::from_host_double): Likewise.
1821 (decimal_to_string): Rename to ...
1822 (decimal_float_ops::to_string): ... this. Use type instead of
1823 length/byte_order arguments. Update calls.
1824 (decimal_from_string): Rename to ...
1825 (decimal_float_ops::from_string): ... this. Use type instead of
1826 length/byte_order arguments. Update calls.
1827 (decimal_from_longest): Rename to ...
1828 (decimal_float_ops::from_longest): ... this. Use type instead of
1829 length/byte_order arguments. Update calls.
1830 (decimal_from_ulongest): Rename to ...
1831 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1832 length/byte_order arguments. Update calls.
1833 (decimal_to_longest): Rename to ...
1834 (decimal_float_ops::to_longest): ... this. Use type instead of
1835 length/byte_order arguments. Update calls.
1836 (decimal_binop): Rename to ...
1837 (decimal_float_ops::binop): ... this. Use type instead of
1838 length/byte_order arguments. Update calls.
1839 (decimal_compare): Rename to ...
1840 (decimal_float_ops::compare): ... this. Use type instead of
1841 length/byte_order arguments. Update calls.
1842 (decimal_convert): Rename to ...
1843 (decimal_float_ops::convert): ... this. Use type instead of
1844 length/byte_order arguments. Update calls.
1846 (target_float_same_category_p): New function.
1847 (target_float_same_format_p): Likewise.
1848 (target_float_format_length): Likewise.
1849 (enum target_float_ops_kind): New type.
1850 (get_target_float_ops_kind): New function.
1851 (get_target_float_ops): Three new overloaded functions.
1853 (target_float_is_zero): Update call.
1854 (target_float_to_string): Add special handling of invalid numbers,
1855 infinities and NaN (moved from floatformat_to_string). Use
1856 target_float_ops callback.
1857 (target_float_from_string): Use target_float_ops callback.
1858 (target_float_to_longest): Likewise.
1859 (target_float_from_longest): Likewise.
1860 (target_float_from_ulongest): Likewise.
1861 (target_float_to_host_double): Likewise.
1862 (target_float_from_host_double): Likewise.
1863 (target_float_convert): Add special case for no-op conversions.
1864 Use target_float_ops callback.
1865 (target_float_binop): Use target_float_ops callback.
1866 (target_float_compare): Likewise.
1868 2017-11-22 Yao Qi <yao.qi@linaro.org>
1870 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1872 2017-11-22 Yao Qi <yao.qi@linaro.org>
1874 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1875 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1877 2017-11-21 Jerome Guitton <guitton@adacore.com>
1879 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1880 with event ptid from the lower layer before doing the
1881 ravenscar-specific update.
1883 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1885 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1886 the ptid's TID is nonzero.
1888 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1890 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1891 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1892 Make non-static. Change return type to char *. Adjust code
1893 accordingly. Rewrite the function's documentation.
1894 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1895 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1896 we have enough debugging information in the runtime to support
1897 Ada task debugging before we enable the ravenscar-thread layer.
1899 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1901 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1902 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1903 * ravenscar-thread.c: Add into comment.
1904 (base_magic_null_ptid): Delete.
1905 (base_ptid): Change documentation.
1906 (ravenscar_active_task): Renames ravenscar_running_thread.
1907 All callers updated throughout.
1908 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1909 (ravenscar_task_is_currently_active): Likewise.
1910 (get_base_thread_from_ravenscar_task): Ditto.
1911 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1912 (ravenscar_runtime_initialized): Likewise.
1913 (get_running_thread_id): Add new parameter "cpu". Adjust
1914 implementation to handle this new parameter.
1915 (ravenscar_fetch_registers): Small adjustment to use
1916 is_ravenscar_task and ravenscar_task_is_currently_active in
1917 order to decide whether to use the target beneath or this
1919 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1920 (ravenscar_stopped_by_sw_breakpoint): Use
1921 get_base_thread_from_ravenscar_task to get the underlying
1922 thread, rather than using base_ptid.
1923 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1924 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1926 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1928 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1930 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1931 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1932 (get_tcb_types_info): Set fieldnos.base_cpu.
1933 (read_atcb): Set task_info->base_cpu.
1934 (info_task): Print "Base CPU" info if set by runtime.
1936 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1938 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1939 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1940 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1942 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1943 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1944 to_stopped_data_address and to_core_of_thread fields of
1947 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1949 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1950 (struct gdbarch_tdep): New member long_double_abi.
1951 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1952 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1953 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1954 format depending on long_double_abi tdep member.
1955 (ppc_floatformat_for_type): Handle __ibm128 type.
1957 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1959 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1961 2017-11-21 Pedro Alves <palves@redhat.com>
1963 * dwarf2read.c (mapped_index::find_name_components_bounds)
1964 <completion mode, upper bound>: Use std::lower_bound instead of
1966 (test_mapped_index_find_name_component_bounds): Remove incorrect
1967 "t1_fund" from expected symbols.
1969 2017-11-21 Pedro Alves <palves@redhat.com>
1971 * dwarf2read.c (mapped_index::name_components_casing): New field.
1972 (mapped_index) <build_name_components,
1973 find_name_components_bounds): Declare new methods.
1974 (mapped_index::find_name_components_bounds)
1975 (mapped_index::build_name_components): New methods, factored out
1976 from dw2_expand_symtabs_matching_symbol.
1977 (check_find_bounds_finds)
1978 (test_mapped_index_find_name_component_bounds): New.
1979 (run_test): Rename to ...
1980 (test_dw2_expand_symtabs_matching_symbol): ... this.
1981 (run_test): Reimplement.
1983 2017-11-21 Pedro Alves <palves@redhat.com>
1985 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1986 (symbol_end): Use cp_ident_is_alnum.
1987 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1988 * dwarf2read.c (make_sort_after_prefix_name): New function.
1989 (dw2_expand_symtabs_matching_symbol): Use it.
1990 (test_symbols): Add more symbols.
1991 (run_test): Add tests.
1993 2017-11-17 Tom Tromey <tom@tromey.com>
1995 * symtab.h (enum symbol_subclass_kind): New.
1996 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1998 <subclass>: New member.
1999 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2000 * rust-lang.c (rust_get_trait_object_pointer): Update.
2001 * dwarf2read.c (read_func_scope): Update.
2002 (read_variable): Update.
2004 2017-11-17 Tom Tromey <tom@tromey.com>
2006 * dwarf2read.c (read_func_scope): Update.
2007 * symtab.h (struct template_symbol): Derive from symbol.
2010 2017-11-17 Tom Tromey <tom@tromey.com>
2012 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2013 (struct rust_vtable_symbol): New.
2014 (find_symbol_at_address): Declare.
2015 * symtab.c (find_symbol_at_address): New function.
2016 * symfile.h (struct quick_symbol_functions)
2017 <find_compunit_symtab_by_address>: New member.
2018 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2020 (debug_sym_quick_functions): Link to
2021 debug_qf_find_compunit_symtab_by_address.
2022 * rust-lang.c (rust_get_trait_object_pointer): New function.
2023 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2024 rust_get_trait_object_pointer.
2025 * psymtab.c (psym_relocate): Clear psymbol_map.
2026 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2028 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2029 * objfiles.h (struct objfile) <psymbol_map>: New member.
2030 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2031 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2032 (rust_containing_type, read_variable): New functions.
2034 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2036 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2038 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2040 * common/filestuff.c: Include <algorithm>.
2041 (open_fds): Change type to std::vector<int>.
2042 (do_mark_open_fd): Adjust.
2043 (unmark_fd_no_cloexec): Adjust.
2046 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2048 * breakpoint.c (output_thread_groups): Take an std::vector.
2049 (print_one_breakpoint_location): Adjust.
2051 2017-11-17 Joel Brobecker <brobecker@adacore.com>
2053 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2054 (ada_evaluate_subexp_for_cast): New function.
2055 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2056 ada_evaluate_subexp_for_cast.
2057 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2059 * eval.c (evaluate_var_value): Make non-static.
2060 (evaluate_var_msym_value, eval_skip_value): Likewise.
2061 * value.h (evaluate_var_value, evaluate_var_msym_value)
2062 (eval_skip_value): Declare.
2064 2017-11-16 Joel Brobecker <brobecker@adacore.com>
2066 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2069 2017-11-16 Pedro Alves <palves@redhat.com>
2071 * python/py-unwind.c (pyuw_sniffer): Translate
2072 PyExc_KeyboardInterrupt to a GDB Quit exception.
2074 2017-11-16 Pedro Alves <palves@redhat.com>
2076 * infrun.c (resume_cleanups): Delete.
2077 (resume): No longer install a resume_cleanups cleanup nor call
2079 (proceed): Pass the terminal to the inferior.
2080 (keep_going_pass_signal): No longer install a resume_cleanups
2083 2017-11-16 Pedro Alves <palves@redhat.com>
2085 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2086 if the prompt is blocked.
2088 2017-11-16 Pedro Alves <palves@redhat.com>
2090 * breakpoint.c (insert_bp_location): Replace bp_err and
2091 bp_err_message locals by a gdb_exception local.
2093 2017-11-16 Pedro Alves <palves@redhat.com>
2095 * inflow.c (scoped_ignore_sigttou): New class.
2096 (child_terminal_ours_1, new_tty): Use it.
2098 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2100 * target-float.c (decimal_from_number): Add byte_order argument and
2101 call match_endianness. Error if unknown floating-point type.
2102 (decimal_to_number): Add byte_order argument and call match_endianness.
2103 (decimal_from_longest): Update call. Do not call match_endianness.
2104 (decimal_from_ulongest): Likewise.
2105 (decimal_binop): Likewise.
2106 (decimal_is_zero): Likewise.
2107 (decimal_compare): Likewise.
2108 (decimal_convert): Likewise.
2110 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2112 * python/python.c (gdbpy_rbreak): New function.
2113 * NEWS: Document Python rbreak feature.
2115 2017-11-16 Yao Qi <yao.qi@linaro.org>
2117 * features/tic6x-c62x.xml: Remove.
2118 * features/tic6x-c64x.xml: Remove.
2119 * features/tic6x-c64xp.xml: Remove.
2121 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2123 * symtab.h: Include <array>.
2125 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2127 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2128 (bsd_kvm_proc_cmd): Likewise.
2130 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2132 * tui/tui-win.c (window_name_completer): Replace VEC with
2135 2017-11-15 Andrew Cagney <cagney@gnu.org>
2137 * MAINTAINERS: Remove no-longer applicable entries.
2139 2017-11-15 Andrew Cagney <cagney@gnu.org>
2141 * MAINTAINERS: Move self to Past Maintainers.
2143 2017-11-15 Yao Qi <yao.qi@linaro.org>
2145 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2146 * features/nios2-linux.c: Remove.
2147 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2148 initialize_tdesc_nios2_linux.
2150 2017-11-15 Yao Qi <yao.qi@linaro.org>
2152 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2153 M68HC11_LAST_HARD_REG + 1.
2155 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2158 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2159 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2160 Return TARGET_XFER_EOF if size of returned data is 0.
2162 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2164 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2165 memory-map-selftests.c.
2166 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2167 * memory-map.c (memory_map_start_memory): Fix computation of hi
2169 * unittests/memory-map-selftests.c: New file.
2171 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2173 * ada-lang.c: Fix some typos in the general command documenting
2174 how Ada expressions are being evaluated and how their result
2177 2017-11-09 Tom Tromey <tom@tromey.com>
2179 * psymtab.c (psymbol_hash): Do not hash string contents.
2180 (psymbol_compare): Add comment.
2182 2017-11-09 Tom Tromey <tom@tromey.com>
2184 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2186 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2188 * ada-exp.y (write_var_from_sym): Remove parameter
2189 "orig_left_context". Update all callers.
2191 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2193 * tracepoint.h (class collection_list) <stringify>: Return
2194 std::vector<std::string>.
2195 (encode_actions_rsp): Change parameters to
2196 std::vector<std::string> *.
2197 * tracepoint.c (collection_list::stringify): Return
2198 std::vector<std::string> and adjust accordingly.
2199 (encode_actions_rsp): Changee parameters to
2200 std::vector<std::string> and adjust accordingly.
2201 * remote.c (free_actions_list),
2202 free_actions_list_cleanup_wrapper): Remove.
2203 (remote_download_tracepoint): Adjust to std::vector.
2205 2017-11-08 Tom Tromey <tom@tromey.com>
2207 * dwarf2read.c (symbolp): Remove typedef.
2208 (read_func_scope): Use std::vector.
2209 (process_structure_scope): Use std::vector.
2211 2017-11-08 Pedro Alves <palves@redhat.com>
2213 * ada-lang.c (ada_make_symbol_completion_list): Use
2214 completion_skip_symbol.
2215 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2216 (symbol_is_function_or_method(symbol*)): New.
2217 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2218 completion_skip_symbol.
2219 (default_collect_symbol_completion_matches_break_on): Use
2220 completion_skip_symbol. Pass down mode.
2221 (collect_file_symbol_completion_matches): Pass down mode.
2222 * symtab.h (symbol_is_function_or_method): New declarations.
2223 (completion_skip_symbol): New template function.
2225 2017-11-08 Pedro Alves <palves@redhat.com>
2227 * linespec.c (iterate_over_all_matching_symtabs): Add
2228 search_domain parameter. Pass it down to expand_symtabs_matching.
2229 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2230 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2232 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2234 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2236 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2239 2017-11-08 Pedro Alves <palves@redhat.com>
2241 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2242 text_len locals and don't pass them down.
2243 * symtab.c (completion_list_add_name): Remove
2244 sym_text/sym_text_len parameters and adjust.
2245 (completion_list_add_symbol, completion_list_add_msymbol)
2246 (completion_list_objc_symbol, completion_list_add_fields)
2247 (add_symtab_completions): Likewise.
2248 (default_collect_symbol_completion_matches_break_on)
2249 (collect_file_symbol_completion_matches): Remove sym_text_len
2250 local and don't pass it down.
2251 * symtab.h (completion_list_add_name): Remove
2252 sym_text/sym_text_len parameters.
2254 2017-11-08 Pedro Alves <palves@redhat.com>
2256 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2257 unittests/lookup_name_info-selftests.c.
2258 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2259 * cp-support.c: Include "selftest.h".
2260 (cp_remove_params_1): Rename from cp_remove_params. Add
2261 'require_param' parameter, and handle it.
2262 (cp_remove_params): Reimplement.
2263 (cp_remove_params_if_any): New.
2264 (selftests::quote): New.
2265 (selftests::check_remove_params): New.
2266 (selftests::test_cp_remove_params): New.
2267 (_initialize_cp_support): Install
2268 selftests::test_cp_remove_params.
2269 * cp-support.h (cp_remove_params_if_any): Declare.
2270 * dwarf2read.c :Include "selftest.h".
2271 (dw2_expand_symtabs_matching_symbol): Use
2272 lookup_name_info::make_ignore_params.
2273 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2274 (selftests::dw2_expand_symtabs_matching::string_or_null)
2275 (selftests::dw2_expand_symtabs_matching::check_match)
2276 (selftests::dw2_expand_symtabs_matching::test_symbols)
2277 (selftests::dw2_expand_symtabs_matching::run_test): New.
2278 (_initialize_dwarf2_read): Register
2279 selftests::dw2_expand_symtabs_matching::run_test.
2280 * psymtab.c (psym_expand_symtabs_matching): Use
2281 lookup_name_info::make_ignore_params.
2282 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2283 If the lookup name wants to ignore parameters, strip them.
2284 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2286 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2287 (default_collect_symbol_completion_matches_break_on): Don't try to
2289 * symtab.h (lookup_name_info::lookup_name_info): Add
2290 'ignore_parameters' parameter.
2291 (lookup_name_info::ignore_parameters)
2292 (lookup_name_info::make_ignore_params): New methods.
2293 (lookup_name_info::m_ignore_parameters): New field.
2294 * unittests/lookup_name_info-selftests.c: New file.
2296 2017-11-08 Pedro Alves <palves@redhat.com>
2298 * dwarf2read.c (dw2_expand_marked_cus)
2299 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2300 (dw2_expand_symtabs_matching): Move further below.
2301 (dw2_expand_marked_cus): Reindent.
2303 2017-11-08 Pedro Alves <palves@redhat.com>
2305 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2306 (struct name_component): New.
2307 (mapped_index::name_components): New field.
2308 (mapped_index::symbol_name_at): New method.
2309 (dwarf2_read_index): Call mapped_index ctor.
2310 (dw2_map_matching_symbols): Add comment about name_components
2312 (dw2_expand_symtabs_matching): Factor part to...
2313 (dw2_expand_symtabs_matching_symbol): ... this new function.
2314 Build name components table, and lookup symbols in it before
2315 calling the name matcher.
2316 (dw2_expand_marked_cus): New, factored out from
2317 dw2_expand_symtabs_matching.
2318 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2320 2017-11-08 Pedro Alves <palves@redhat.com>
2322 * ada-lang.c (ada_encode): Rename to ..
2323 (ada_encode_1): ... this. Add throw_errors parameter and handle
2325 (ada_encode): Reimplement.
2326 (match_name): Delete, folded into full_name.
2327 (resolve_subexp): No longer pass the encoded name to
2328 ada_lookup_symbol_list.
2329 (should_use_wild_match): Delete.
2330 (name_match_type_from_name): New.
2331 (ada_lookup_simple_minsym): Use lookup_name_info and the
2332 language's symbol_name_matcher_ftype.
2333 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2334 (ada_add_block_renamings): Adjust to use lookup_name_info.
2335 (ada_lookup_name): New.
2336 (add_nonlocal_symbols, ada_add_all_symbols)
2337 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2338 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2339 (ada_name_for_lookup): Delete.
2340 (ada_lookup_encoded_symbol): Construct a verbatim name.
2341 (wild_match): Reverse sense of return type. Use bool.
2342 (full_match): Reverse sense of return type. Inline bits of old
2344 (ada_add_block_symbols): Adjust to use lookup_name_info.
2345 (symbol_completion_match): Delete, folded into...
2346 (ada_lookup_name_info::matches): ... .this new method.
2347 (symbol_completion_add): Delete.
2348 (ada_collect_symbol_completion_matches): Add name_match_type
2349 parameter. Adjust to use lookup_name_info and
2350 completion_list_add_name.
2351 (get_var_value, ada_add_global_exceptions): Adjust to use
2353 (ada_get_symbol_name_cmp): Delete.
2354 (do_wild_match, do_full_match): New functions.
2355 (ada_lookup_name_info::ada_lookup_name_info): New method.
2356 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2358 (ada_language_defn): Install ada_get_symbol_name_matcher.
2359 * ada-lex.l (processId): If name starts with '<', copy it
2361 * block.c (block_iter_match_step, block_iter_match_first)
2362 (block_iter_match_next, block_lookup_symbol)
2363 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2365 * block.h (block_iter_match_first, block_iter_match_next)
2366 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2367 * c-lang.c (c_language_defn, cplus_language_defn)
2368 (asm_language_defn, minimal_language_defn): Adjust comments to
2369 refer to la_get_symbol_name_matcher.
2370 * completer.c (complete_files_symbols)
2371 (collect_explicit_location_matches, symbol_completer): Pass a
2372 symbol_name_match_type down.
2373 * completer.h (class completion_match, completion_match_result):
2375 (completion_tracker::reset_completion_match_result): New method.
2376 (completion_tracker::m_completion_match_result): New field.
2377 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2379 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2381 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2382 * d-lang.c: Adjust comments to refer to
2383 la_get_symbol_name_matcher.
2384 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2385 Adjust to use lookup_name_info.
2386 (dict_iter_match_first, dict_iter_match_next)
2387 (iter_match_first_hashed, iter_match_next_hashed)
2388 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2389 with a lookup_name_info.
2390 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2392 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2393 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2394 (gdb_index_symbol_name_matcher): New class.
2395 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2396 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2397 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2398 with a symbol_name_match_type.
2399 (f_language_defn): Adjust comments to refer to
2400 la_get_symbol_name_matcher.
2401 * go-lang.c (go_language_defn): Adjust comments to refer to
2402 la_get_symbol_name_matcher.
2403 * language.c (default_symbol_name_matcher)
2404 (language_get_symbol_name_matcher): New functions.
2405 (unknown_language_defn, auto_language_defn): Adjust comments to
2406 refer to la_get_symbol_name_matcher.
2407 * language.h (symbol_name_cmp_ftype): Delete.
2408 (language_defn) <la_collect_symbol_completion_matches>: Add match
2410 <la_get_symbol_name_cmp>: Delete field.
2411 <la_get_symbol_name_matcher>: New field.
2412 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2413 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2415 * linespec.c (iterate_over_all_matching_symtabs)
2416 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2417 (find_methods): Add language parameter, and use lookup_name_info
2418 and the language's symbol_name_matcher_ftype.
2419 (linespec_complete_function): Adjust.
2420 (lookup_prefix_sym): Use lookup_name_info.
2421 (add_all_symbol_names_from_pspace): Adjust.
2422 (find_superclass_methods): Add language parameter and pass it
2424 (find_method): Pass symbol language down.
2425 (find_linespec_symbols): Don't demangle or Ada encode here.
2426 (search_minsyms_for_name): Add lookup_name_info parameter.
2427 (add_matching_symbols_to_info): Add name_match_type parameter.
2428 Use lookup_name_info.
2429 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2430 la_get_symbol_name_matcher.
2431 * minsyms.c: Include <algorithm>.
2432 (add_minsym_to_demangled_hash_table): Remove table parameter and
2433 add objfile parameter. Use search_name_hash, and add language to
2434 demangled languages vector.
2435 (struct found_minimal_symbols): New struct.
2436 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2438 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2439 input names here. Use lookup_name_info instead. Lookup up
2440 demangled names once for each language in the demangled names
2442 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2443 demangled names once for each language in the demangled names
2445 (build_minimal_symbol_hash_tables): Adjust.
2446 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2448 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2449 la_get_symbol_name_matcher.
2450 * objfiles.h: Include <vector>.
2451 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2452 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2453 la_get_symbol_name_matcher.
2454 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2455 la_get_symbol_name_matcher.
2456 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2457 (match_partial_symbol): Use symbol_name_match_type,
2458 lookup_name_info and psymbol_name_matches.
2459 (lookup_partial_symbol): Use lookup_name_info.
2460 (map_block): Use symbol_name_match_type and lookup_name_info.
2461 (psym_map_matching_symbols): Use symbol_name_match_type.
2462 (psymbol_name_matches): New.
2463 (recursively_search_psymtabs): Use lookup_name_info and
2464 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2465 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2466 'kind' parameter to 'domain'.
2467 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2468 la_get_symbol_name_matcher.
2469 * symfile-debug.c (debug_qf_map_matching_symbols)
2470 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2471 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2472 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2473 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2474 Adjust to use symbol_name_match_type.
2475 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2476 (expand_symtabs_matching): Adjust to use lookup_name_info.
2477 * symmisc.c (maintenance_expand_symtabs): Use
2478 lookup_name_info::match_any ().
2479 * symtab.c (symbol_matches_search_name): New.
2480 (eq_symbol_entry): Adjust to use lookup_name_info and the
2482 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2483 (lookup_name_info::match_any): New.
2484 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2485 (compare_symbol_name): Add language, lookup_name_info and
2486 completion_match_result parameters, and use them.
2487 (completion_list_add_name): Make extern. Add language and
2488 lookup_name_info parameters. Use them.
2489 (completion_list_add_symbol, completion_list_add_msymbol)
2490 (completion_list_objc_symbol): Add lookup_name_info parameters and
2491 adjust. Pass down language.
2492 (completion_list_add_fields): Add lookup_name_info parameters and
2493 adjust. Pass down language.
2494 (add_symtab_completions): Add lookup_name_info parameters and
2496 (default_collect_symbol_completion_matches_break_on): Add
2497 name_match_type parameter, and use it. Use lookup_name_info.
2498 (default_collect_symbol_completion_matches)
2499 (collect_symbol_completion_matches): Add name_match_type
2500 parameter, and pass it down.
2501 (collect_symbol_completion_matches_type): Adjust.
2502 (collect_file_symbol_completion_matches): Add name_match_type
2503 parameter, and use lookup_name_info.
2504 * symtab.h: Include <string> and "common/gdb_optional.h".
2505 (enum class symbol_name_match_type): New.
2506 (class ada_lookup_name_info): New.
2507 (struct demangle_for_lookup_info): New.
2508 (class lookup_name_info): New.
2509 (symbol_name_matcher_ftype): New.
2510 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2511 (symbol_matches_search_name): Declare.
2512 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2513 (default_collect_symbol_completion_matches)
2514 (collect_symbol_completion_matches)
2515 (collect_file_symbol_completion_matches): Add name_match_type
2517 (iterate_over_symbols): Use lookup_name_info.
2518 (completion_list_add_name): Declare.
2519 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2520 (strncmp_iw_with_mode): Now extern.
2521 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2522 (strncmp_iw_with_mode): Declare.
2524 2017-11-08 Keith Seitz <keiths@redhat.com>
2525 Pedro Alves <palves@redhat.com>
2527 * ada-lang.c (ada_language_defn): Install
2528 default_search_name_hash.
2529 * buildsym.c (struct buildsym_compunit): <language>: New field.
2530 (finish_block_internal): Pass language when creating dictionaries.
2531 (start_buildsym_compunit, start_symtab): New language parameters.
2533 (restart_symtab): Pass down compilation unit's language.
2534 * buildsym.h (enum language): Forward declare.
2535 (start_symtab): New 'language' parameter.
2536 * c-lang.c (c_language_defn, cplus_language_defn)
2537 (asm_language_defn, minimal_language_defn): Install
2538 default_search_name_hash.
2539 * coffread.c (coff_start_symtab): Adjust.
2540 * d-lang.c (d_language_defn): Install default_search_name_hash.
2541 * dbxread.c (struct symloc): Add 'pst_language' field.
2542 (PST_LANGUAGE): Define.
2543 (start_psymtab, read_ofile_symtab): Use it.
2544 (process_one_symbol): New 'language' parameter. Pass it down.
2545 * dictionary.c (struct dictionary) <language>: New field.
2546 (DICT_LANGUAGE): Define.
2547 (dict_create_hashed, dict_create_hashed_expandable)
2548 (dict_create_linear, dict_create_linear_expandable): New parameter
2549 'language'. Set the dictionary's language.
2550 (iter_match_first_hashed): Adjust to rename.
2551 (insert_symbol_hashed): Assert we don't see mismatching
2552 languages. Adjust to rename.
2553 (dict_hash): Rename to ...
2554 (default_search_name_hash): ... this and make extern.
2555 * dictionary.h (struct language_defn): Forward declare.
2556 (dict_create_hashed): New parameter 'language'.
2557 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2558 * f-lang.c (f_language_defn): Install default_search_name_hash.
2559 * go-lang.c (go_language_defn): Install default_search_name_hash.
2560 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2562 * language.c (unknown_language_defn, auto_language_defn):
2563 * language.h (language_defn::la_search_name_hash): New field.
2564 (default_search_name_hash): Declare.
2565 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2566 * mdebugread.c (new_block): New parameter 'language'.
2567 * mdebugread.c (parse_symbol): Pass symbol language to block
2569 (psymtab_to_symtab_1): Pass down language.
2570 (new_symtab): Pass compunit's language to block allocation.
2571 * objc-lang.c (objc_language_defn): Install
2572 default_search_name_hash.
2573 * opencl-lang.c (opencl_language_defn):
2574 * p-lang.c (pascal_language_defn): Install
2575 default_search_name_hash.
2576 * rust-lang.c (rust_language_defn): Install
2577 default_search_name_hash.
2578 * stabsread.h (enum language): Forward declare.
2579 (process_one_symbol): Add 'language' parameter.
2580 * symtab.c (search_name_hash): New function.
2581 * symtab.h (search_name_hash): Declare.
2582 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2584 2017-11-08 Pedro Alves <palves@redhat.com>
2586 * cp-name-parser.y (main): Don't initialize extra_chars.
2588 2017-11-07 Tom Tromey <tom@tromey.com>
2590 * event-top.h (command_handler): Constify.
2591 * record-full.c (cmd_record_full_start): Update.
2592 * thread.c (thread_apply_all_command): Update.
2593 * printcmd.c (eval_command): Update.
2594 * mi/mi-main.c (mi_execute_cli_command): Update.
2595 (mi_execute_async_cli_command): Update.
2596 * tui/tui-stack.c (tui_update_command): Update.
2597 * cli/cli-interp.c (safe_execute_command): Constify.
2598 * record.c (record_start): Update.
2599 (record_start, record_stop, cmd_record_start): Update.
2600 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2601 (cmd_record_btrace_pt_start): Update.
2602 (cmd_record_btrace_start): Update.
2603 (cmd_record_btrace_start): Update.
2604 * reverse.c (exec_reverse_once): Update.
2605 * python/python.c (execute_gdb_command): Don't copy the command.
2606 * event-top.c (command_line_handler): Update.
2607 (command_handler): Constify.
2608 * defs.h (deprecated_call_command_hook): Constify.
2609 * cli/cli-script.h (execute_user_command): Constify.
2610 * cli/cli-script.c (execute_user_command): Constify.
2611 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2612 (enum command_control_type): Update.
2613 * main.c (catch_command_errors): Remove non-const overload.
2614 (catch_command_errors_ftype): Remove.
2615 * python/py-cmd.c (cmdpy_function): Constify.
2616 * guile/scm-cmd.c (cmdscm_function): Constify.
2617 * cli/cli-dump.c (call_dump_func): Constify.
2618 * cli/cli-decode.c (do_const_cfunc): Constify.
2619 (do_sfunc): Constify.
2620 (cmd_func): Constify.
2621 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2622 * top.h (execute_command): Constify.
2623 * top.c (execute_command): Constify.
2624 (execute_command_to_string): Constify.
2625 (deprecated_call_command_hook): Constify.
2626 * command.h (cmd_func): Constify.
2627 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2629 2017-11-07 Tom Tromey <tom@tromey.com>
2631 * ada-lang.c (catch_ada_exception_command): Constify.
2632 (catch_assert_command): Constify.
2633 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2634 (catch_rethrow_command): Constify.
2635 (catch_exception_command_1): Constify.
2636 * breakpoint.h (add_catch_command): Constify.
2637 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2638 (catch_syscall_split_args): Constify.
2639 * break-catch-sig.c (catch_signal_command): Constify.
2640 (catch_signal_split_args): Constify.
2641 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2642 cmd_const_sfunc_ftype.
2643 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2644 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2645 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2646 (add_setshow_string_cmd, struct cmd_list_element)
2647 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2648 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2649 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2651 (set_cmd_sfunc): Constify.
2652 (empty_sfunc): Constify.
2653 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2654 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2655 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2656 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2657 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2658 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2660 (set_cmd_sfunc): Constify.
2661 (cmd_sfunc_ftype): Remove.
2662 * compile/compile.c (set_compile_args): Constify.
2663 * infrun.c (set_disable_randomization): Constify.
2664 * infcmd.c (set_args_command, set_cwd_command): Constify.
2665 * breakpoint.c (set_condition_evaluation_mode): Constify.
2666 (add_catch_command): Constify.
2667 (catch_fork_command_1, catch_exec_command_1)
2668 (catch_load_command_1, catch_unload_command_1): Constify.
2669 (catch_load_or_unload): Constify.
2670 * guile/scm-param.c (pascm_set_func): Constify.
2671 (add_setshow_generic): Constify.
2672 * python/py-param.c (get_set_value): Constify.
2673 * top.h (set_verbose): Constify.
2674 * tui/tui-win.c (tui_set_var_cmd): Constify.
2675 * mi/mi-main.c (set_mi_async_command): Constify.
2676 * cli/cli-logging.c (set_logging_overwrite)
2677 (set_logging_redirect): Constify.
2678 * value.c (set_max_value_size): Constify.
2679 * valprint.c (set_input_radix, set_output_radix): Constify.
2680 * utils.c (set_width_command, set_height_command): Constify.
2681 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2682 * tracepoint.c (set_disconnected_tracing)
2683 (set_circular_trace_buffer, set_trace_buffer_size)
2684 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2685 * top.c (set_history_size_command, set_verbose, set_editing)
2686 (set_gdb_datadir, set_history_filename): Constify.
2687 * target.c (set_targetdebug, maint_set_target_async_command)
2688 (maint_set_target_non_stop_command, set_target_permissions)
2689 (set_write_memory_permission): Constify.
2690 (open_target): Constify.
2691 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2692 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2693 * symtab.c (set_symbol_cache_size_handler): Constify.
2694 * symfile.c (set_ext_lang_command): Constify.
2695 * symfile-debug.c (set_debug_symfile): Constify.
2696 * source.c (set_directories_command): Constify.
2697 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2698 * serial.c (set_parity): Constify.
2699 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2700 * remote.c (set_remote_exec_file, set_remotebreak)
2701 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2702 * record.c (set_record_insn_history_size)
2703 (set_record_call_history_size): Constify.
2704 * record-full.c (set_record_full_insn_max_num): Constify.
2705 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2706 * osabi.c (set_osabi): Constify.
2707 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2708 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2709 * maint.c (maintenance_set_profile_cmd): Constify.
2710 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2711 * language.c (set_language_command, set_range_command)
2712 (set_case_command): Constify.
2713 * infrun.c (set_non_stop, set_observer_mode)
2714 (set_stop_on_solib_events, set_schedlock_func)
2715 (set_exec_direction_func): Constify.
2716 * infcmd.c (set_inferior_tty_command): Constify.
2717 * disasm.c (set_disassembler_options_sfunc): Constify.
2718 * demangle.c (set_demangling_command): Constify.
2719 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2720 * cris-tdep.c (set_cris_version, set_cris_mode)
2721 (set_cris_dwarf2_cfi): Constify.
2722 * corefile.c (set_gnutarget_command): Constify.
2723 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2724 (set_target_wide_charset_sfunc): Constify.
2725 * breakpoint.c (update_dprintf_commands): Constify.
2726 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2727 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2728 (set_disassembly_style_sfunc): Constify.
2729 * arch-utils.c (set_endian, set_architecture): Constify.
2730 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2731 * agent.c (set_can_use_agent): Constify.
2733 2017-11-07 Tom Tromey <tom@tromey.com>
2735 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2736 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2737 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2738 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2739 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2740 (parse_int_arg, show_thread_default_detach_sc_cmd)
2741 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2742 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2743 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2744 (show_task_pause_cmd, set_task_detach_sc_cmd)
2745 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2746 (set_noninvasive_cmd, set_thread_pause_cmd)
2747 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2748 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2749 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2750 * windows-nat.c (display_selectors): Constify.
2751 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2753 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2754 (cmd_cfunc_eq): Likewise.
2755 (struct cmd_list_element): Likewise.
2757 (cli_user_command_p): Update.
2758 * command.h (add_cmd): Remove non-const overload.
2759 (cmd_cfunc_ftype): Remove typedef.
2760 (cmd_cfunc_eq): Remove non-const overload.
2761 * value.c (show_values): Constify.
2762 * thread.c (thread_apply_all_command): Constify.
2763 * symfile.c (load_command): Constify.
2764 * source.c (directory_command): Constify.
2765 * maint.c (maintenance_internal_error)
2766 (maintenance_demangler_warning, maintenance_space_display)
2767 (maintenance_print_architecture, maintenance_translate_address)
2768 (maintenance_info_selftests, maintenance_internal_warning):
2770 * breakpoint.c (disable_trace_command, enable_trace_command):
2772 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2774 (add_auto_load_safe_path): Constify.
2775 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2776 * top.h (show_commands): Constify.
2777 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2778 * sparc64-tdep.c (adi_examine_command): Constify.
2779 (adi_assign_command): Constify.
2781 2017-11-07 Tom Tromey <tom@tromey.com>
2783 * frame.h (info_locals_command, info_args_command): Constify.
2784 * auto-load.h (auto_load_info_scripts): Constify.
2785 * inferior.h (registers_info): Constify.
2786 * copying.c: Rebuild.
2787 * copying.awk: Constify generated commands.
2788 * auto-load.c (auto_load_info_scripts)
2789 (info_auto_load_gdb_scripts): Constify.
2790 * cli/cli-decode.c (struct cmd_list_element): Take a
2791 cmd_const_cfunc_ftype.
2792 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2793 * tui/tui-win.c (tui_all_windows_info): Constify.
2794 * python/py-auto-load.c (info_auto_load_python_scripts):
2796 * cli/cli-cmds.c (show_command): Remove non-const overload.
2797 * tracepoint.c (info_tvariables_command, info_scope_command):
2799 (info_static_tracepoint_markers_command): Constify.
2800 * thread.c (info_threads_command): Constify.
2801 (print_thread_info_1): Constify.
2802 * target.c (info_target_command): Constify.
2803 * symtab.c (info_sources_command, info_functions_command)
2804 (info_types_command): Constify.
2805 (info_variables_command): Remove non-const overload.
2806 * symfile.c (info_ext_lang_command): Constify.
2807 * stack.c (info_frame_command, info_locals_command)
2808 (info_args_command): Constify.
2809 (backtrace_command): Remove non-const overload.
2810 * source.c (info_source_command, info_line_command): Constify.
2811 * solib.c (info_sharedlibrary_command): Constify.
2812 * skip.c (info_skip_command): Constify.
2813 * ser-go32.c (info_serial_command): Constify.
2814 * reverse.c (info_bookmarks_command): Constify.
2815 * printcmd.c (info_symbol_command, info_address_command)
2816 (info_display_command): Constify.
2817 * osdata.c (info_osdata_command): Constify.
2818 * objc-lang.c (info_selectors_command, info_classes_command):
2820 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2821 * memattr.c (info_mem_command): Constify.
2822 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2823 * linux-fork.c (info_checkpoints_command): Constify.
2824 * infrun.c (info_signals_command): Constify.
2825 * inflow.c (info_terminal_command): Constify.
2826 * inferior.c (info_inferiors_command): Constify.
2827 (print_inferior): Constify.
2828 * infcmd.c (info_program_command, info_all_registers_command)
2829 (info_registers_command, info_vector_command)
2830 (info_float_command): Constify.
2831 (registers_info): Constify.
2832 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2833 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2835 * f-valprint.c (info_common_command): Constify.
2836 * dcache.c (info_dcache_command): Constify.
2837 (dcache_info_1): Constify.
2838 * darwin-nat-info.c (info_mach_tasks_command)
2839 (info_mach_task_command, info_mach_ports_command)
2840 (info_mach_port_command, info_mach_threads_command)
2841 (info_mach_thread_command, info_mach_regions_command)
2842 (info_mach_regions_recurse_command, info_mach_region_command)
2843 (info_mach_exceptions_command): Constify.
2844 (get_task_from_args): Constify.
2845 * cp-support.c (info_vtbl_command): Constify.
2846 * breakpoint.c (info_watchpoints_command)
2847 (info_tracepoints_command): Constify.
2848 (info_breakpoints_command): Remove non-const overload.
2849 * avr-tdep.c (avr_io_reg_read_command): Constify.
2850 * auxv.c (info_auxv_command): Constify.
2851 * ada-tasks.c (info_tasks_command): Constify.
2852 (info_task): Constify.
2853 * ada-lang.c (info_exceptions_command): Constify.
2855 2017-11-07 Tom Tromey <tom@tromey.com>
2857 * solib.h (no_shared_libraries): Constify.
2858 * frame.h (return_command): Constify.
2859 * cli/cli-cmds.h (quit_command): Constify.
2860 * top.h (quit_command, execute_command): Constify.
2861 * target.h (flash_erase_command): Constify.
2862 * inferior.h (set_inferior_args, attach_command): Constify.
2863 * tracepoint.h (start_tracing, stop_tracing): Constify.
2864 * breakpoint.h (break_command, tbreak_command)
2865 (hbreak_command_wrapper, thbreak_command_wrapper)
2866 (rbreak_command_wrapper, watch_command_wrapper)
2867 (awatch_command_wrapper, rwatch_command_wrapper)
2868 (get_tracepoint_by_number): Constify.
2869 * symtab.c (info_variables_command, rbreak_command)
2870 (symtab_symbol_info): Constify.
2871 (info_variables_command): Add non-const overload.
2872 * top.c (dont_repeat_command): Constify.
2873 * breakpoint.c (ignore_command, commands_command)
2874 (condition_command, tbreak_command, hbreak_command)
2875 (thbreak_command, clear_command, break_command)
2876 (info_breakpoints_command, watch_command, rwatch_command)
2877 (awatch_command, trace_command, ftrace_command, strace_command)
2878 (trace_pass_command, break_range_command, dprintf_command)
2879 (agent_printf_command, get_tracepoint_by_number)
2880 (watch_maybe_just_location, trace_pass_command): Constify.
2881 (info_breakpoints_command): Add non-const overload.
2882 * tracefile.c (tsave_command): Constify.
2883 * infcmd.c (attach_command, disconnect_command, signal_command)
2884 (queue_signal_command, stepi_command, nexti_command)
2885 (finish_command, next_command, step_command, until_command)
2886 (advance_command, jump_command, continue_command, run_command)
2887 (start_command, starti_command, interrupt_command)
2888 (run_command_1, set_inferior_args, step_1): Constify.
2889 * inferior.c (add_inferior_command, remove_inferior_command)
2890 (clone_inferior_command): Constify.
2891 * linux-fork.c (checkpoint_command, restart_command): Constify.
2892 * windows-nat.c (signal_event_command): Constify.
2893 * guile/guile.c (guile_repl_command, guile_command): Constify.
2894 * printcmd.c (x_command, display_command, printf_command)
2895 (output_command, set_command, call_command, print_command)
2896 (eval_command): Constify.
2897 (non_const_set_command): Remove.
2898 (_initialize_printcmd): Update.
2899 * source.c (forward_search_command, reverse_search_command):
2901 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2903 * infrun.c (handle_command): Constify.
2904 * memattr.c (mem_command): Constify.
2905 * stack.c (return_command, up_command, up_silently_command)
2906 (down_command, down_silently_command, frame_command)
2907 (backtrace_command, func_command, backtrace_command_1): Constify.
2908 (backtrace_command): Add non-const overload.
2909 * remote-sim.c (simulator_command): Constify.
2910 * exec.c (set_section_command): Constify.
2911 * tracepoint.c (tdump_command, trace_variable_command)
2912 (tstatus_command, tstop_command, tstart_command)
2913 (end_actions_pseudocommand, while_stepping_pseudocommand)
2914 (collect_pseudocommand, teval_pseudocommand, actions_command)
2915 (start_tracing, stop_tracing): Constify.
2916 * value.c (init_if_undefined_command): Constify.
2917 * tui/tui-stack.c (tui_update_command): Constify.
2918 * tui/tui-win.c (tui_refresh_all_command)
2919 (tui_set_tab_width_command, tui_set_win_height_command)
2920 (tui_set_focus_command, tui_scroll_forward_command)
2921 (tui_scroll_backward_command, tui_scroll_left_command)
2922 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2923 (tui_set_win_height): Constify.
2924 * tui/tui-layout.c (tui_layout_command): Constify.
2925 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2926 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2927 (proc_untrace_sysexit_cmd): Constify.
2928 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2929 (threadset_test_cmd, threadlist_update_test_cmd)
2930 (threadalive_test): Constify.
2931 * objc-lang.c (print_object_command): Constify.
2932 * command.h (add_com): Constify.
2933 * cli/cli-dump.c (restore_command): Constify.
2934 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2935 (help_command, complete_command, shell_command, edit_command)
2936 (list_command, disassemble_command, make_command)
2937 (apropos_command, alias_command): Constify.
2938 * cli/cli-script.c (document_command, define_command)
2939 (while_command, if_command, validate_comname): Constify.
2940 * cli/cli-decode.c (struct cmd_list_element): Change type of
2942 * target.c (do_monitor_command, flash_erase_command): Constify.
2943 * regcache.c (reg_flush_command): Constify.
2944 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2945 (reverse_nexti, reverse_continue, reverse_finish)
2946 (save_bookmark_command, goto_bookmark_command)
2947 (exec_reverse_once): Constify.
2948 * python/python.c (python_interactive_command, python_command):
2950 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2952 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2953 * gcore.c (gcore_command): Constify.
2955 2017-11-07 Tom Tromey <tom@tromey.com>
2957 * printcmd.c (x_command): Call set_repeat_arguments.
2958 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2959 * top.c (repeat_arguments): New global.
2960 (set_repeat_arguments): New function.
2961 (execute_command): Handle repeat_arguments.
2962 (show_commands): Calls set_repeat_arguments.
2963 * command.h (set_repeat_arguments): Declare.
2965 2017-11-07 Tom Tromey <tom@tromey.com>
2967 * stack.c (backtrace_command): Use std::string.
2968 (backtrace_command_1): Make "count_exp" const.
2970 2017-11-07 Tom Tromey <tom@tromey.com>
2972 * source.c (directory_switch, mod_path, add_path): Constify.
2973 * defs.h (add_path, mod_path, directory_switch): Constify.
2974 * mi/mi-cmd-env.c (env_mod_path): Constify.
2976 2017-11-07 Tom Tromey <tom@tromey.com>
2978 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2979 (run_command_1, continue_command, step_1, jump_command)
2980 (signal_command, until_command, advance_command, finish_command)
2981 (attach_command): Update.
2983 2017-11-07 Tom Tromey <tom@tromey.com>
2985 * command.h (set_cmd_cfunc): Don't declare.
2986 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2988 2017-11-07 Tom Tromey <tom@tromey.com>
2990 * stack.c (select_frame_command): Constify.
2991 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2992 * command.h (add_com_suppress_notification): Constify.
2994 2017-11-07 Tom Tromey <tom@tromey.com>
2996 * breakpoint.c (stop_command): Constify.
2997 * cli/cli-decode.c (struct cmd_list_element): Constify.
2998 * command.h (add_abbrev_prefix_cmd): Constify.
3000 2017-11-07 Pedro Alves <palves@redhat.com>
3002 * breakpoint.c (extract_bp_kind): New enum.
3003 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3004 factored out from ...
3005 (extract_bp_number_and_location): ... here.
3006 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3008 2017-11-07 Pedro Alves <palves@redhat.com>
3010 * breakpoint.c (extract_bp_number_and_location): Change return
3011 type to void. Throw error instead of warning.
3012 (enable_disable_command): Adjust.
3014 2017-11-07 Xavier Roirand <roirand@adacore.com>
3015 Pedro Alves <palves@redhat.com>
3017 * breakpoint.c (map_breakpoint_number_range): New, factored out
3019 (map_breakpoint_numbers): ... here.
3020 (find_location_by_number): Change parameters from string to
3021 breakpoint number and location.
3022 (extract_bp_number_and_location): New function.
3023 (enable_disable_bp_num_loc)
3024 (enable_disable_breakpoint_location_range)
3025 (enable_disable_command): New functions, factored out ...
3026 (enable_command, disable_command): ... these functions, and
3027 adjusted to support ranges.
3028 * NEWS: Document enable/disable breakpoint location range feature.
3030 2017-11-06 Luis Machado <luis.machado@linaro.org>
3032 * MAINTAINERS (Write After Approval): Update my e-mail address.
3034 2017-11-06 Pedro Alves <palves@redhat.com>
3036 * gnu-nat.c (gnu_terminal_init): Delete.
3037 (gnu_target): Don't install gnu_terminal_init.
3038 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3039 (child_terminal_init): ... this function.
3041 2017-11-06 Pedro Alves <palves@redhat.com>
3043 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3045 * config.in, configure: Regenerate.
3047 2017-11-06 Pedro Alves <palves@redhat.com>
3049 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3050 (async_init_signals): Adjust.
3051 (handle_stop_sig): Rename to ...
3052 (handle_sigtstp): ... this.
3053 (async_stop_sig): Rename to ...
3054 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3056 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3057 instead of STOP_SIGNAL thoughout.
3058 (handle_stop_sig): Rename to ...
3059 (handle_sigtstp): ... this.
3060 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3062 2017-11-06 Pedro Alves <palves@redhat.com>
3064 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3065 longer set flags twice in row.
3067 2017-11-06 Pedro Alves <palves@redhat.com>
3069 * Makefile.in (SER_HARDWIRE): Update comment.
3070 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3071 * common/gdb_termios.h: Delete file.
3072 * common/job-control.c: Include termios.h and unistd.h instead of
3074 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3076 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3078 * configure.ac: No longer check for termio.h and sgtty.h.
3079 * configure: Regenerate.
3080 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3081 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3082 Replace PROCESS_GROUP_TYPE references with pid_t references
3084 (gdb_getpgrp): Delete.
3085 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3086 (child_terminal_inferior): Remove comment. Remove sgtty code.
3087 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3088 gdb_getpgrp. Use serial_set_tty_state instead aof
3089 serial_noflush_set_tty_state. Remove sgtty code.
3090 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3091 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3092 (inferior_process_group): Now returns pid_t.
3093 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3094 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3095 * ser-event.c (serial_event_ops): Update.
3096 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3098 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3099 * ser-pipe.c (pipe_ops): Update.
3100 * ser-tcp.c (tcp_ops): Update.
3101 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3102 HAVE_TERMIOS checks.
3103 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3104 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3105 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3107 (hardwire_noflush_set_tty_state): Delete.
3108 (hardwire_print_tty_state, hardwire_drain_output)
3109 (hardwire_flush_output, hardwire_flush_input)
3110 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3111 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3112 code, and assume termios.
3113 (hardwire_ops): Update.
3114 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3115 * serial.c (serial_noflush_set_tty_state): Delete.
3116 * serial.h (serial_noflush_set_tty_state): Delete.
3117 (serial_ops::noflush_set_tty_state): Delete.
3119 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3121 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3122 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3123 (COMMON_OBS): Remove doublest.o and dfp.o.
3124 Do not build target-float.c (instead of doublest.c)
3125 with -Wformat-nonliteral.
3127 * doublest.c: Remove file.
3128 * doublest.h: Remove file.
3129 * dfp.c: Remove file.
3130 * dfp.h: Remove file.
3132 * target-float.c: Do not include "doublest.h" and "dfp.h".
3133 (DOUBLEST): Move here from doublest.h.
3134 (enum float_kind): Likewise.
3135 (FLOATFORMAT_CHAR_BIT): Likewise.
3136 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3137 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3138 (floatformat_precision): Likewise.
3139 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3140 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3142 (host_float_format, host_double_format, host_long_double_format):
3144 (floatformat_to_string, floatformat_from_string): Likewise.
3145 (floatformat_to_doublest): Likewise. Also, inline the original
3146 convert_floatformat_to_doublest.
3147 (floatformat_from_doublest): Likewise. Also, inline the original
3148 convert_floatformat_from_doublest.
3150 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3151 (MAX_DECIMAL_STRING): Move here from dfp.c.
3152 (match_endianness): Likewise.
3153 (set_decnumber_context, decimal_check_errors): Likewise.
3154 (decimal_from_number, decimal_to_number): Likewise.
3155 (decimal_to_string, decimal_from_string): Likewise. Make static.
3156 (decimal_from_longest, decimal_from_ulongest): Likewise.
3157 (decimal_to_longest): Likewise.
3158 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3159 (decimal_convert): Likewise.
3161 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3163 * doublest.c: Do not include "gdbtypes.h".
3164 (extract_typed_floating): Remove.
3165 (store_typed_floating): Remove.
3166 (convert_typed_floating): Remove.
3167 * doublest.h (struct type): Remove.
3168 (DOUBLEST_PRINT_FORMAT): Remove.
3169 (DOUBLEST_SCAN_FORMAT): Remove.
3170 (extract_typed_floating): Remove.
3171 (store_typed_floating): Remove.
3172 (convert_typed_floating): Remove.
3174 * dfp.c (decimal_from_doublest): Remove.
3175 (decimal_to_doublest): Remove.
3176 * dfp.h: Do not include "doublest.h".
3177 (decimal_from_doublest): Remove.
3178 (decimal_to_doublest): Remove.
3180 * value.c: Do not include "doublest.h" and "dfp.h".
3181 (value_as_double): Remove.
3182 (unpack_double): Remove.
3183 (value_from_double): Remove.
3184 (value_from_decfloat): Remove.
3185 * value.h: Do not include "doublest.h".
3186 (value_as_double): Remove.
3187 (unpack_double): Remove.
3188 (value_from_double): Remove.
3189 (value_from_decfloat): Remove.
3191 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3193 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3194 (i386_extract_return_value): Use target_float_convert.
3195 (i386_store_return_value): Likewise.
3196 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3197 (i387_value_to_register): Likewise.
3198 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3199 (ia64_register_to_value): Use target_float_convert.
3200 (ia64_value_to_register): Likewise.
3201 (ia64_extract_return_value): Likewise.
3202 (ia64_store_return_value): Likewise.
3203 (ia64_push_dummy_call): Likewise.
3204 * m68k-tdep.c: Include "target-float.h".
3205 (m68k_register_to_value): Use target_float_convert.
3206 (m68k_value_to_register): Likewise.
3207 (m68k_svr4_extract_return_value): Likewise.
3208 (m68k_svr4_store_return_value): Likewise.
3209 * ppc-sysv-tdep.c: Include "target-float.h".
3210 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3211 (do_ppc_sysv_return_value): Likewise.
3212 (ppc64_sysv_abi_push_freg): Likewise.
3213 (ppc64_sysv_abi_return_value_base): Likewise.
3214 * rs6000-aix-tdep.c: Include "target-float.h".
3215 (rs6000_push_dummy_call): Use target_float_convert.
3216 (rs6000_return_value): Likewise.
3217 * rs6000-lynx178-tdep.c: Include "target-float.h".
3218 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3219 (rs6000_lynx178_return_value): Likewise.
3220 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3221 (rs6000_register_to_value): Use target_float_convert.
3222 (rs6000_value_to_register): Likewise.
3223 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3224 (arm_extract_return_value): Use target_float_convert.
3225 (arm_store_return_value): Likewise.
3226 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3227 (sh_register_convert_to_virtual): Use target_float_convert.
3228 (sh_register_convert_to_raw): Likewise.
3229 * sh64-tdep.c: Include "target-float.h".
3230 (sh64_extract_return_value): Use target_float_convert.
3231 (sh64_register_convert_to_virtual): Likewise.
3232 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3234 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3236 * target-float.c (floatformat_to_host_double): New function.
3237 (floatformat_from_host_double): Likewise.
3238 (target_float_to_host_double): Likewise.
3239 (target_float_from_host_double): Likewise.
3240 * target-float.h (target_float_to_host_double): Add prototype.
3241 (target_float_from_host_double): Likewise.
3243 * guile/scm-value.c: Include "target-float.h".
3244 (gdbscm_value_to_real): Use target_float_to_host_double.
3245 Handle integer source values via value_as_long.
3246 * guile/scm-math.c: Include "target-float.h". Do not include
3247 "doublest.h", "dfp.h", and "expression.h".
3248 (vlscm_convert_typed_number): Use target_float_from_host_double.
3249 (vlscm_convert_number): Likewise.
3251 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3252 (convert_value_from_python): Use target_float_from_host_double.
3254 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3256 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3257 (cast_from_fixed): Likewise.
3258 (ada_scaling_type): New function.
3259 (ada_delta): Return value instead of DOUBLEST. Perform target
3260 arithmetic instead of host arithmetic.
3261 (scaling_factor): Rename to ...
3262 (ada_scaling_factor) ... this. Make non-static. Return value instead
3263 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3264 (ada_fixed_to_float): Remove.
3265 (ada_float_to_fixed): Remove.
3266 * ada-lang.h (ada_fixed_to_float): Remove.
3267 (ada_float_to_fixed): Remove.
3268 (ada_delta): Return value instead of DOUBLEST.
3269 (ada_scaling_factor): Add prototype.
3271 * ada-typeprint.c: Include "target-float.h".
3272 (print_fixed_point_type): Perform target arithmetic instead of
3274 * ada-valprint.c: Include "target-float.h".
3275 (ada_val_print_num): Perform target arithmetic instead of
3276 host arithmetic for fixed-point types.
3278 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3280 * target-float.c: Include <math.h>.
3281 (floatformat_binop): New function.
3282 (floatformat_compare): Likewise.
3283 (target_float_binop): Likewise.
3284 (target_float_compare): Likewise.
3285 * target-float.h: Include "expression.h".
3286 (target_float_binop): Add prototype.
3287 (target_float_compare): Likewise.
3289 * valarith.c: Do not include "doublest.h" and "dfp.h".
3290 Include "common/byte-vector.h".
3291 (value_args_as_decimal): Remove, replace by ...
3292 (value_args_as_target_float): ... this function. Handle both
3293 binary and decimal target floating-point formats.
3294 (scalar_binop): Handle both binary and decimal FP using
3295 value_args_as_target_float and target_float_binop.
3296 (value_equal): Handle both binary and decimal FP using
3297 value_args_as_target_float and target_float_compare.
3298 (value_less): Likewise.
3299 (value_pos): Handle all scalar types as simple copy.
3300 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3301 * dfp.c (decimal_binop): Throw error instead of internal_error
3302 when called with an unsupported operation code.
3304 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3306 * target-float.c (target_float_to_string): New function.
3307 (target_float_from_string): New function.
3308 * target-float.h (target_float_to_string): Add prototype.
3309 (target_float_from_string): Add prototype.
3311 * valprint.c: Include "target-float.h". Do not include
3312 "doublest.h" and "dfp.h".
3313 (print_floating): Use target_float_to_string.
3314 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3315 (printf_floating): Use target_float_to_string.
3316 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3317 (print_i387_value): Use target_float_to_string.
3318 * mips-tdep.c: Include "target-float.h".
3319 (mips_print_fp_register): Use target_float_to_string.
3320 * sh64-tdep.c: Include "target-float.h".
3321 (sh64_do_fp_register): Use target_float_to_string.
3323 * parse.c: Include "target-float.h". Do not include
3324 "doublest.h" and "dfp.h".
3325 (parse_float): Use target_float_from_string.
3326 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3327 (define_symbol): Use target_float_from_string.
3328 * gdbarch-selftests.c: Include "target-float.h".
3329 (register_to_value_test): Use target_float_from_string.
3331 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3333 * Makefile.c (SFILES): Add target-float.c.
3334 (HFILES_NO_SRCDIR): Add target-float.h.
3335 (COMMON_OBS): Add target-float.o.
3336 * target-float.h: New file.
3337 * target-float.c: New file.
3339 * doublest.c (floatformat_classify): Fix detection of float_zero.
3341 * gdbtypes.c (is_floating_type): New function.
3342 * gdbtypes.h (is_floating_type): Add prototype.
3344 * value.c: Do not include "floatformat.h".
3345 (unpack_double): Use target_float_is_valid.
3346 (is_floating_value): New function.
3347 * value.h (is_floating_value): Add prototype-
3349 * valarith.c: Include "target-float.h".
3350 (value_logical_not): Use target_float_is_zero.
3352 * python/py-value.c: Include "target-float.h".
3353 (valpy_nonzero): Use target_float_is_zero.
3355 2017-11-04 Tom Tromey <tom@tromey.com>
3357 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3359 2017-11-04 Tom Tromey <tom@tromey.com>
3361 * breakpoint.c (set_momentary_breakpoint): Return
3363 (until_break_command): Update.
3364 (new_until_break_fsm): Change argument types to
3366 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3367 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3369 * infcmd.c (finish_forward): Update.
3370 * breakpoint.h (set_momentary_breakpoint)
3371 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3372 (make_cleanup_delete_breakpoint): Remove.
3373 (struct breakpoint_deleter): New.
3374 (breakpoint_up): New typedef.
3375 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3376 (insert_exception_resume_breakpoint): Update.
3377 (insert_exception_resume_from_probe): Update.
3378 (insert_longjmp_resume_breakpoint): Update.
3379 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3380 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3381 * infcall.c (call_function_by_hand_dummy): Update
3383 2017-11-04 Tom Tromey <tom@tromey.com>
3385 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3387 2017-11-04 Tom Tromey <tom@tromey.com>
3389 * linux-tdep.c (linux_core_info_proc_mappings): Use
3391 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3393 (linux_corefile_thread): Update.
3394 (linux_make_corefile_notes): Remove unused variable.
3396 2017-11-04 Tom Tromey <tom@tromey.com>
3398 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3401 2017-11-04 Tom Tromey <tom@tromey.com>
3403 * objfiles.c (do_free_objfile_cleanup): Remove.
3404 * compile/compile-object-load.c (compile_object_load): Update.
3405 * objfiles.h (make_cleanup_free_objfile): Remove.
3407 2017-11-04 Tom Tromey <tom@tromey.com>
3409 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3410 (adi_read_versions): Change "tags" to "gdb_byte *".
3411 (adi_print_versions): Likewise.
3413 2017-11-04 Tom Tromey <tom@tromey.com>
3416 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3417 from start_rbreak_breakpoints.
3418 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3419 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3420 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3421 * symtab.c (do_end_rbreak_breakpoints): Remove.
3422 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3424 2017-11-04 Tom Tromey <tom@tromey.com>
3426 * cp-namespace.c (reset_directive_searched): Remove.
3427 (cp_lookup_symbol_via_imports): Use scoped_restore.
3428 * cp-support.c (reset_directive_searched): Remove.
3429 (make_symbol_overload_list_using): Use scoped_restore.
3430 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3431 (reset_directive_searched): Remove.
3433 2017-11-04 Tom Tromey <tom@tromey.com>
3435 * symfile.c (find_separate_debug_file_by_debuglink): Use
3438 2017-11-04 Tom Tromey <tom@tromey.com>
3440 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3442 (compute_stack_depth): Likewise.
3443 (do_compile_dwarf_expr_to_c): Use std::vector.
3445 2017-11-04 Tom Tromey <tom@tromey.com>
3447 * compile/compile-object-load.c (link_callbacks_einfo): Use
3450 2017-11-04 Tom Tromey <tom@tromey.com>
3452 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3453 Use scoped_free_pendings.
3454 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3455 scoped_free_pendings.
3456 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3457 (xcoff_initial_scan): Likewise.
3458 * buildsym.c (reset_symtab_globals): Update comment.
3459 (scoped_free_pendings): Rename from really_free_pendings.
3460 (prepare_for_building): Update comment.
3461 (buildsym_init): Likewise.
3462 * buildsym.h (class scoped_free_pendings): New class.
3463 (really_free_pendings): Don't declare.
3465 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3467 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3468 output when converting a zero value to a special byteorder format.
3470 2017-11-02 Yao Qi <yao.qi@linaro.org>
3472 * frame.c (do_frame_register_read): Remove aspace.
3473 * jit.c (jit_frame_sniffer): Likwise.
3474 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3475 * regcache.c (regcache::regcache): Pass nullptr.
3476 (regcache_print): Caller updated.
3477 * regcache.h (regcache::regcache): Remove one constructor
3480 2017-11-02 Yao Qi <yao.qi@linaro.org>
3482 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3484 2017-11-02 Yao Qi <yao.qi@linaro.org>
3486 * breakpoint.c (insert_single_step_breakpoints): Update.
3487 * frame.c (struct frame_info) <aspace>: Add const.
3488 (frame_save_as_regcache): Add const.
3489 (get_frame_address_space): Return const address_space *.
3490 * frame.h (get_frame_address_space): Update declaration.
3491 * infrun.c (struct step_over_info) <aspace>: Add const.
3492 (set_step_over_info): Make aspace const.
3493 (displaced_step_prepare_throw): Change variable const.
3495 (proceed): Likewise.
3496 (adjust_pc_after_break): Likewise.
3497 (save_waitstatus): Likewise.
3498 (handle_signal_stop): Likewise.
3499 (keep_going_pass_signal): Likewise.
3500 * jit.c (jit_frame_sniffer): Add const.
3501 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3502 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3503 * record-full.c (record_full_wait_1): Likewise.
3504 * regcache.c (regcache::regcache): Change parameter to const.
3505 * regcache.h (regcache::regcache): Likewise.
3506 (regcache::aspace): Return const address_space *.
3507 (regcache) <m_aspace>: Add const.
3509 2017-11-02 Yao Qi <yao.qi@linaro.org>
3511 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3512 * frame.c (create_sentinel_frame): Likewise.
3513 * infrun.c (displaced_step_prepare_throw): Likewise.
3515 (thread_still_needs_step_over_bp): Likewise.
3516 (proceed): Likewise.
3517 (do_target_wait): Likewise.
3518 (adjust_pc_after_break): Likewise.
3519 (handle_syscall_event): Likewise.
3520 (save_waitstatus): Likewise.
3521 (handle_inferior_event_1): Likewise.
3522 (handle_signal_stop): Likewise.
3523 (keep_going_pass_signal): Likewise.
3524 * linux-nat.c (status_callback): Likewise.
3525 (save_stop_reason): Likewise.
3526 (resume_stopped_resumed_lwps): Likewise.
3527 * record-full.c (record_full_exec_insn): Likewise.
3528 (record_full_wait_1): Likewise.
3529 * regcache.c (get_regcache_aspace): Remove.
3530 * regcache.h (get_regcache_aspace): Remove.
3532 2017-11-02 Yao Qi <yao.qi@linaro.org>
3534 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3535 (init_regcache_descr): Use gdbarch_num_regs.
3536 (regcache::regcache): Likewise.
3537 (regcache::get_register_status): Likewise.
3538 (regcache::assert_raw_regnum): Likewise.
3539 (regcache::cooked_read): Likewise.
3540 (regcache::cooked_read_value): Likewise.
3541 (regcache::cooked_write): Likewise.
3542 (regcache::dump): Likewise.
3543 (regcache::num_raw_registers): New method.
3544 * regcache.h (class regcache) <num_raw_registers>: New.
3546 2017-11-02 Yao Qi <yao.qi@linaro.org>
3548 * regcache.c (regcache::assert_regnum): New method.
3549 (regcache::invalidate): Call assert_regnum.
3550 (regcache::raw_update): Likewise.
3551 (regcache::raw_write): Likewise.
3552 (regcache::raw_read_part): Likewise.
3553 (regcache::raw_write_part): Likewise.
3554 (regcache::raw_supply): Likewise.
3555 (regcache::raw_supply_integer): Likewise.
3556 (regcache::raw_supply_zeroed): Likewise.
3557 (regcache::raw_collect): Likewise.
3558 (regcache::raw_collect_integer): Likewise.
3559 * regcache.h (regcache::assert_regnum): Declare.
3561 2017-11-02 Yao Qi <yao.qi@linaro.org>
3563 * regcache.c (regcache::dump): Remove code.
3565 2017-11-02 Yao Qi <yao.qi@linaro.org>
3567 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3569 <sizeof_cooked_register_status>: Remove.
3570 (init_regcache_descr): Update.
3571 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3572 (regcache::save): Likewise.
3573 (regcache::dump): Likewise.
3575 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3577 * ft32-tdep.c (ft32_fetch_instruction): New function.
3578 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3580 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3582 * cli/cli-script.c (execute_control_command): Rename to ...
3583 (execute_control_command_1): ... this.
3584 (execute_control_command): New function.
3586 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3588 * tracepoint.c (tfind_command): Remove const_cast.
3590 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3592 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3594 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3596 * common/common-utils.h (in_inclusive_range): New function.
3597 * arm-tdep.c (arm_record_extension_space): Use
3599 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3600 * cris-tdep.c (cris_spec_reg_applicable): Use
3603 2017-10-30 Pedro Alves <palves@redhat.com>
3604 Simon Marchi <simon.marchi@ericsson.com>
3606 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3607 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3609 2017-10-30 Pedro Alves <palves@redhat.com>
3611 * common/common-utils.c (string_appendf, string_vappendf): New
3613 * common/common-utils.h (string_appendf, string_vappendf): New
3615 * unittests/common-utils-selftests.c (string_appendf_func)
3616 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3617 (string_vappendf_tests): New functions.
3618 (_initialize_common_utils_selftests): Register "string_appendf" and
3619 "string_vappendf tests".
3621 2017-10-30 Pedro Alves <palves@redhat.com>
3623 * unittests/common-utils-selftests.c (format_func): New typedef.
3624 (string_printf_tests, string_vprintf_tests): Tests factored out
3626 (test_format_func): ... this new function.
3627 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3630 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3632 * darwin-nat.c: Remove include of gdb.h.
3634 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3636 * xtensa-xtregs.c: Fix formatting issues.
3638 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3640 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3642 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3645 * python/py-infthread.c (thpy_get_inferior): Increment reference
3646 of inferior before returning it.
3648 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3650 * unittests/common-utils-selftests.c (format): Add
3653 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3655 * xml-syscall.c (struct syscall_desc): Add constructor.
3656 <name>: Change type to std::string.
3657 (syscall_desc_up): New typedef.
3658 (syscall_desc_p): Remove typeder.
3659 (DEF_VEC_P(syscall_desc_p)): Remove.
3660 (struct syscall_group_desc): Add constructor.
3661 <name>: Change type to std::string.
3662 <syscalls>: Change type to std::vector.
3663 (syscall_group_desc_up): New typedef.
3664 (syscall_group_desc_p): Remove typedef.
3665 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3666 (struct syscalls_info) <syscalls>: Change type to std::vector of
3669 <my_gdb_datadir>: Change type to std::string.
3670 (syscalls_info_up): New typedef.
3671 (allocate_syscalls_info): Remove.
3672 (syscalls_info_free_syscalls_desc): Remove.
3673 (syscalls_info_free_syscall_group_desc): Remove.
3674 (free_syscalls_info): Remove.
3675 (make_cleanup_free_syscalls_info): Remove.
3676 (syscall_group_create_syscall_group_desc): Adjust.
3677 (syscall_group_add_syscall): Adjust.
3678 (syscall_create_syscall_desc): Adjust.
3679 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3680 (init_syscalls_info): Adjust.
3681 (syscall_group_get_group_by_name): Adjust.
3682 (xml_get_syscall_number): Adjust.
3683 (xml_get_syscall_name): Adjust.
3684 (xml_list_of_syscalls): Adjust.
3685 (xml_list_syscalls_by_group): Adjust.
3686 (xml_list_of_groups): Adjust.
3688 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3690 * probe.h: Don't include gdb_vecs.h.
3691 (DEF_VEC_P (probe_p)): Remove.
3692 (find_probes_in_objfile): Return an std::vector.
3693 * probe.c (find_probes_in_objfile): Likewise.
3694 * breakpoint.c (breakpoint_objfile_data)
3695 <longjmp_probes>: Change type to std::vector.
3696 <exception_probes>: Likewise.
3697 (free_breakpoint_probes): Don't manually free vectors.
3698 (create_longjmp_master_breakpoint): Adjust.
3699 (create_exception_master_breakpoint): Adjust.
3700 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3701 parameter type, adjust.
3702 (svr4_create_solib_event_breakpoints): Adjust.
3704 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3706 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3707 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3709 (free_breakpoint_probes): Rename to ...
3710 (free_breakpoint_objfile_data): ... this, and call delete on
3713 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3715 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3716 (loaded_script_ptr): Remove typedef.
3717 (DEF_VEC_P (loaded_script_ptr)): Remove.
3718 (struct collect_matching_scripts_data): Add constructor.
3719 <scripts_p>: Change type to (pointer to) std::vector.
3720 (collect_matching_scripts_data): Adjust.
3721 (sort_scripts_by_name): Make suitable for std::sort.
3722 (print_scripts): Don't sort vector, adjust to std::vector.
3723 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3725 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3727 * symfile.c (filename_language): Make struct, not typedef. Add
3729 <ext>: Change type to std::string.
3730 (DEF_VEC_O (filename_language)): Remove.
3731 (filename_language_table): Change type to std::vector.
3732 (add_filename_language): Adjust.
3733 (set_ext_lang_command): Adjust.
3734 (info_ext_lang_command): Adjust.
3735 (deduce_language_from_filename): Adjust.
3736 (class scoped_restore_filename_language_table): Remove.
3737 (test_filename_language): Use scoped_restore.
3738 (test_set_ext_lang_command): Use scoped_restore, adjust to
3741 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3743 * symfile.c: Include selftest.h.
3744 (class scoped_restore_filename_language_table): New.
3745 (test_filename_language): New test.
3746 (test_set_ext_lang_command): New test.
3747 (_initialize_symfile): Register tests.
3749 2017-10-27 Keith Seitz <keiths@redhat.com>
3751 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3752 in the bp_location, falling back to find_pc_sect_function when
3754 (add_location_to_breakpoint): Save sal->symbol.
3755 * breakpoint.h (struct bp_location) <symbol>: New field.
3756 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3757 * symtab.h (struct symtab_and_line) <symbol>: New field.
3759 2017-10-26 Patrick Frants <osscontribute@gmail.com>
3762 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3765 2017-10-26 Pedro Alves <palves@redhat.com>
3767 * remote.c (remote_async_terminal_ours_p): Delete.
3768 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3769 Remove references to 'remote_async_terminal_ours_p'.
3771 2017-10-26 Yao Qi <yao.qi@linaro.org>
3773 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3775 2017-10-26 Yao Qi <yao.qi@linaro.org>
3777 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3779 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3781 * breakpoint.c (bpstat_check_location): Remove cast.
3782 (breakpoint_hit_catch_fork): Make aspce const.
3783 (breakpoint_hit_catch_solib): Likewise.
3784 (breakpoint_hit_catch_exec): Likewise.
3785 (breakpoint_hit_ranged_breakpoint): Likewise.
3786 (breakpoint_hit_watchpoint): Likewise.
3787 (base_breakpoint_breakpoint_hit): Likewise.
3788 (bkpt_breakpoint_hit): Likewise.
3789 (dprintf_breakpoint_hit): Likewise.
3790 (tracepoint_breakpoint_hit): Likewise.
3791 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3793 2017-10-26 Yao Qi <yao.qi@linaro.org>
3795 * breakpoint.c (breakpoint_location_address_match): Change
3796 "struct address_space *" to "const address_space".
3797 (breakpoint_location_address_range_overlap): Likewise.
3798 (breakpoint_here_p): Likewise.
3799 (breakpoint_in_range_p): Likewise.
3800 (moribund_breakpoint_here_p): Likewise.
3801 (bp_location_inserted_here_p): Likewise.
3802 (software_breakpoint_inserted_here_p): Likewise.
3803 (hardware_breakpoint_inserted_here_p): Likewise.
3804 (hardware_watchpoint_inserted_in_range): Likewise.
3805 (bpstat_check_location): Likewise.
3806 (bpstat_stop_status): Likewise.
3807 (breakpoint_address_match): Likewise.
3808 (breakpoint_address_match_range): Likewise.
3809 (breakpoint_location_address_match): Likewise.
3810 (breakpoint_location_address_range_overlap): Likewise.
3811 (insert_single_step_breakpoint): Likewise.
3812 (breakpoint_has_location_inserted_here): Likewise.
3813 (single_step_breakpoint_inserted_here_p): Likewise.
3814 (pc_at_non_inline_function): Likewise.
3815 * breakpoint.h (bpstat_stop_status): Update declaration.
3816 (breakpoint_here_p): Likewise.
3817 (breakpoint_in_range_p): Likewise.
3818 (moribund_breakpoint_here_p): Likewise.
3819 (breakpoint_inserted_here_p): Likewise.
3820 (software_breakpoint_inserted_here_p): Likewise.
3821 (hardware_breakpoint_inserted_here_p): Likewise.
3822 (breakpoint_has_location_inserted_here): Likewise.
3823 (single_step_breakpoint_inserted_here_p): Likewise.
3824 (hardware_watchpoint_inserted_in_range): Likewise.
3825 (breakpoint_address_match): Likewise.
3826 (insert_single_step_breakpoint): Likewise.
3827 (pc_at_non_inline_function): Likewise.
3828 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3829 * record.c (record_check_stopped_by_breakpoint): Likewise.
3830 * record.h (record_check_stopped_by_breakpoint): Likewise.
3831 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3833 2017-10-25 Yao Qi <yao.qi@linaro.org>
3835 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3836 regcache->arch () instead get_regcache_arch.
3837 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3839 (aarch64_fbsd_store_inferior_registers): Likewise.
3840 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3841 (store_gregs_to_thread): Likewise.
3842 (fetch_fpregs_from_thread): Likewise.
3843 (store_fpregs_to_thread): Likewise.
3844 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3845 (aarch64_store_return_value): Likewise.
3846 (aarch64_software_single_step): Likewise.
3847 * aix-thread.c (aix_thread_wait): Likewise.
3848 (supply_reg32): Likewise.
3849 (supply_sprs64): Likewise.
3850 (supply_sprs32): Likewise.
3851 (fill_gprs64): Likewise.
3852 (fill_gprs32): Likewise.
3853 (fill_sprs64): Likewise.
3854 (fill_sprs32): Likewise.
3855 (store_regs_user_thread): Likewise.
3856 (store_regs_kernel_thread): Likewise.
3857 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3858 (alphabsd_store_inferior_registers): Likewise.
3859 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3860 (alpha_store_return_value): Likewise.
3861 (alpha_deal_with_atomic_sequence): Likewise.
3862 (alpha_next_pc): Likewise.
3863 (alpha_software_single_step): Likewise.
3864 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3865 (amd64bsd_store_inferior_registers): Likewise.
3866 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3868 (amd64_linux_store_inferior_registers): Likewise.
3869 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3870 (amd64_collect_native_gregset): Likewise.
3871 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3872 (amd64obsd_collect_uthread): Likewise.
3873 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3874 (amd64_collect_fpregset): Likewise.
3875 (amd64_supply_fxsave): Likewise.
3876 (amd64_supply_xsave): Likewise.
3877 (amd64_collect_fxsave): Likewise.
3878 (amd64_collect_xsave): Likewise.
3879 * arc-tdep.c (arc_write_pc): Likewise.
3880 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3881 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3882 (arm_fbsd_store_inferior_registers): Likewise.
3883 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3884 (store_vfp_regs): Likewise.
3885 (arm_linux_fetch_inferior_registers): Likewise.
3886 (arm_linux_store_inferior_registers): Likewise.
3887 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3888 (arm_linux_sigreturn_next_pc): Likewise.
3889 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3890 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3891 (fetch_register): Likewise.
3892 (store_register): Likewise.
3893 * arm-tdep.c (arm_is_thumb): Likewise.
3894 (displaced_in_arm_mode): Likewise.
3895 (bx_write_pc): Likewise.
3896 (arm_get_next_pcs_addr_bits_remove): Likewise.
3897 (arm_software_single_step): Likewise.
3898 (arm_extract_return_value): Likewise.
3899 (arm_store_return_value): Likewise.
3900 (arm_write_pc): Likewise.
3901 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3902 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3903 (bsd_uthread_store_registers): Likewise.
3904 * core-regset.c (fetch_core_registers): Likewise.
3905 * corelow.c (get_core_registers): Likewise.
3906 * cris-tdep.c (cris_store_return_value): Likewise.
3907 (cris_extract_return_value): Likewise.
3908 (find_step_target): Likewise.
3909 (find_step_target): Likewise.
3910 (cris_software_single_step): Likewise.
3911 * ctf.c (ctf_fetch_registers): Likewise.
3912 * darwin-nat.c (cancel_breakpoint): Likewise.
3913 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3914 * frv-tdep.c (frv_extract_return_value): Likewise.
3915 * ft32-tdep.c (ft32_store_return_value): Likewise.
3916 (ft32_extract_return_value): Likewise.
3917 * go32-nat.c (fetch_register): Likewise.
3918 (go32_fetch_registers): Likewise.
3919 (go32_store_registers): Likewise.
3920 (store_register): Likewise.
3921 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3922 (h8300_store_return_value): Likewise.
3923 * hppa-linux-nat.c (fetch_register): Likewise.
3924 (store_register): Likewise.
3925 (hppa_linux_fetch_inferior_registers): Likewise.
3926 (hppa_linux_store_inferior_registers): Likewise.
3927 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3928 (i386_darwin_store_inferior_registers): Likewise.
3929 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3930 (gnu_store_registers): Likewise.
3931 * i386-linux-nat.c (fetch_register): Likewise.
3932 (store_register): Likewise.
3933 (supply_gregset): Likewise.
3934 (fill_gregset): Likewise.
3935 (i386_linux_fetch_inferior_registers): Likewise.
3936 (i386_linux_store_inferior_registers): Likewise.
3937 (i386_linux_resume): Likewise.
3938 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3940 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3941 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3942 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3943 (i386obsd_collect_uthread): Likewise.
3944 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3945 (i386_supply_gregset): Likewise.
3946 (i386_collect_gregset): Likewise.
3947 (i386_supply_fpregset): Likewise.
3948 (i386_collect_fpregset): Likewise.
3949 (i386_mpx_bd_base): Likewise.
3950 * i386-v4-nat.c (supply_fpregset): Likewise.
3951 (fill_fpregset): Likewise.
3952 * i387-tdep.c (i387_supply_fsave): Likewise.
3953 (i387_collect_fsave): Likewise.
3954 (i387_supply_fxsave): Likewise.
3955 (i387_collect_fxsave): Likewise.
3956 (i387_supply_xsave): Likewise.
3957 (i387_collect_xsave): Likewise.
3958 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3959 (ia64_linux_store_registers): Likewise.
3960 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3961 (ia64_extract_return_value): Likewise.
3962 (ia64_store_return_value): Likewise.
3963 (find_func_descr): Likewise.
3964 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3965 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3966 (inf_ptrace_store_registers): Likewise.
3967 * infrun.c (use_displaced_stepping): Likewise.
3968 (displaced_step_prepare_throw): Likewise.
3970 (proceed): Likewise.
3971 (do_target_wait): Likewise.
3972 (adjust_pc_after_break): Likewise.
3973 (handle_inferior_event_1): Likewise.
3974 (handle_signal_stop): Likewise.
3975 (save_infcall_suspend_state): Likewise.
3976 (restore_infcall_suspend_state): Likewise.
3977 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3978 * jit.c (jit_frame_prev_register): Likewise.
3979 * linux-nat.c (save_stop_reason): Likewise.
3980 (linux_nat_wait_1): Likewise.
3981 (resume_stopped_resumed_lwps): Likewise.
3982 * linux-record.c (record_linux_sockaddr): Likewise.
3983 (record_linux_msghdr): Likewise.
3984 (record_linux_system_call): Likewise.
3985 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3986 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3987 (lm32_store_return_value): Likewise.
3988 * m32c-tdep.c (m32c_read_flg): Likewise.
3989 (m32c_pseudo_register_read): Likewise.
3990 (m32c_pseudo_register_write): Likewise.
3991 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3992 (m32r_linux_collect_gregset): Likewise.
3993 * m32r-tdep.c (m32r_store_return_value): Likewise.
3994 (m32r_extract_return_value): Likewise.
3995 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3996 (m68kbsd_collect_fpregset): Likewise.
3997 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3998 * m68k-linux-nat.c (fetch_register): Likewise.
3999 (old_fetch_inferior_registers): Likewise.
4000 (old_store_inferior_registers): Likewise.
4001 (store_regs): Likewise.
4002 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4003 (m68k_svr4_store_return_value): Likewise.
4004 * m88k-tdep.c (m88k_store_arguments): Likewise.
4005 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4006 (mi_cmd_data_write_register_values): Likewise.
4007 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4008 (mips_fbsd_store_inferior_registers): Likewise.
4009 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4010 (mips_fbsd_supply_gregs): Likewise.
4011 (mips_fbsd_collect_fpregs): Likewise.
4012 (mips_fbsd_collect_gregs): Likewise.
4013 (mips_fbsd_supply_fpregset): Likewise.
4014 (mips_fbsd_collect_fpregset): Likewise.
4015 (mips_fbsd_supply_gregset): Likewise.
4016 (mips_fbsd_collect_gregset): Likewise.
4017 * mips-linux-nat.c (supply_gregset): Likewise.
4018 (fill_gregset): Likewise.
4019 (supply_fpregset): Likewise.
4020 (fill_fpregset): Likewise.
4021 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4022 (mips_fill_gregset): Likewise.
4023 (mips_supply_fpregset): Likewise.
4024 (mips_fill_fpregset): Likewise.
4025 (mips64_supply_gregset): Likewise.
4026 (micromips_linux_sigframe_validate): Likewise.
4027 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4028 (mipsnbsd_fetch_inferior_registers): Likewise.
4029 (mipsnbsd_store_inferior_registers): Likewise.
4030 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4031 (mipsnbsd_supply_gregset): Likewise.
4032 (mipsnbsd_iterate_over_regset_sections): Likewise.
4033 (mipsnbsd_supply_reg): Likewise.
4034 (mipsnbsd_supply_fpreg): Likewise.
4035 * mips-tdep.c (mips_in_frame_stub): Likewise.
4036 (mips_dummy_id): Likewise.
4037 (is_octeon_bbit_op): Likewise.
4038 (micromips_bc1_pc): Likewise.
4039 (extended_mips16_next_pc): Likewise.
4040 (mips16_next_pc): Likewise.
4041 (deal_with_atomic_sequence): Likewise.
4042 * moxie-tdep.c (moxie_process_readu): Likewise.
4043 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4044 * nto-procfs.c (procfs_store_registers): Likewise.
4045 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4046 (ppcfbsd_store_inferior_registers): Likewise.
4047 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4048 (fetch_altivec_register): Likewise.
4049 (get_spe_registers): Likewise.
4050 (fetch_spe_register): Likewise.
4051 (fetch_altivec_registers): Likewise.
4052 (fetch_all_gp_regs): Likewise.
4053 (fetch_all_fp_regs): Likewise.
4054 (store_vsx_register): Likewise.
4055 (store_altivec_register): Likewise.
4056 (set_spe_registers): Likewise.
4057 (store_spe_register): Likewise.
4058 (store_altivec_registers): Likewise.
4059 (store_all_gp_regs): Likewise.
4060 (store_all_fp_regs): Likewise.
4061 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4062 (ppc_linux_collect_gregset): Likewise.
4063 (ppc_canonicalize_syscall): Likewise.
4064 (ppc_linux_record_signal): Likewise.
4065 (ppu2spu_prev_register): Likewise.
4066 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4067 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4068 (ppcobsd_store_registers): Likewise.
4069 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4071 (ppc_ravenscar_generic_store_registers): Likewise.
4072 * procfs.c (procfs_fetch_registers): Likewise.
4073 (procfs_store_registers): Likewise.
4074 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4075 (ravenscar_store_registers): Likewise.
4076 (ravenscar_prepare_to_store): Likewise.
4077 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4078 * record-full.c (record_full_wait_1): Likewise.
4079 (record_full_registers_change): Likewise.
4080 (record_full_store_registers): Likewise.
4081 (record_full_core_fetch_registers): Likewise.
4082 (record_full_save): Likewise.
4083 (record_full_goto_insn): Likewise.
4084 * regcache.c (regcache_register_size): Likewise.
4085 (get_regcache_arch): Remove.
4086 (regcache_read_pc): Likewise.
4087 * regcache.h (get_regcache_arch): Remove.
4088 * remote-sim.c (gdbsim_fetch_register): Likewise.
4089 (gdbsim_store_register): Likewise.
4090 * remote.c (fetch_register_using_p): Likewise.
4091 (send_g_packet): Likewise.
4092 (remote_prepare_to_store): Likewise.
4093 (store_registers_using_G): Likewise.
4094 * reverse.c (save_bookmark_command): Likewise.
4095 (goto_bookmark_command): Likewise.
4096 * rs6000-aix-tdep.c (branch_dest): Likewise.
4097 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4098 (fetch_register): Likewise.
4099 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4100 (ppc_collect_reg): Likewise.
4101 (ppc_collect_gregset): Likewise.
4102 (ppc_collect_fpregset): Likewise.
4103 (ppc_collect_vsxregset): Likewise.
4104 (ppc_collect_vrregset): Likewise.
4105 (ppc_displaced_step_hw_singlestep): Likewise.
4106 (rs6000_pseudo_register_read): Likewise.
4107 (rs6000_pseudo_register_write): Likewise.
4108 * s390-linux-nat.c (supply_gregset): Likewise.
4109 (fill_gregset): Likewise.
4110 (s390_linux_fetch_inferior_registers): Likewise.
4111 * s390-linux-tdep.c (s390_write_pc): Likewise.
4112 (s390_software_single_step): Likewise.
4113 (s390_all_but_pc_registers_record): Likewise.
4114 (s390_linux_syscall_record): Likewise.
4115 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4116 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4117 (shnbsd_store_inferior_registers): Likewise.
4118 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4119 (sh_extract_return_value_fpu): Likewise.
4120 (sh_store_return_value_nofpu): Likewise.
4121 (sh_corefile_supply_regset): Likewise.
4122 (sh_corefile_collect_regset): Likewise.
4123 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4124 (sh64_store_return_value): Likewise.
4125 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4126 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4127 (sparc_store_inferior_registers): Likewise.
4128 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4129 (sparc_ravenscar_prepare_to_store): Likewise.
4130 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4131 (sparc_analyze_control_transfer): Likewise.
4132 (sparc_step_trap): Likewise.
4133 (sparc_software_single_step): Likewise.
4134 (sparc32_gdbarch_init): Likewise.
4135 (sparc_supply_rwindow): Likewise.
4136 (sparc_collect_rwindow): Likewise.
4137 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4138 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4139 (sparc64nbsd_collect_gregset): Likewise.
4140 (sparc64nbsd_supply_fpregset): Likewise.
4141 (sparc64nbsd_collect_fpregset): Likewise.
4142 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4143 (sparc64_supply_gregset): Likewise.
4144 (sparc64_collect_gregset): Likewise.
4145 (sparc64_supply_fpregset): Likewise.
4146 (sparc64_collect_fpregset): Likewise.
4147 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4148 * spu-tdep.c (spu_unwind_sp): Likewise.
4149 (spu2ppu_prev_register): Likewise.
4150 (spu_memory_remove_breakpoint): Likewise.
4151 * stack.c (return_command): Likewise.
4152 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4153 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4154 * tracefile.c (trace_save_ctf): Likewise.
4155 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4156 (do_windows_store_inferior_registers): Likewise.
4157 (windows_resume): Likewise.
4158 * xtensa-linux-nat.c (fill_gregset): Likewise.
4159 (supply_gregset_reg): Likewise.
4160 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4161 (xtensa_register_read_masked): Likewise.
4162 (xtensa_supply_gregset): Likewise.
4163 (xtensa_extract_return_value): Likewise.
4164 (xtensa_store_return_value): Likewise.
4166 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4168 * doublest.c (floatformat_from_string): New function.
4169 * doublest.h (floatformat_from_string): Add prototype.
4171 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4172 (OP_FLOAT): ... this.
4173 * expression.h: Do not include "doublest.h".
4174 (union exp_element): Replace doubleconst and decfloatconst by
4175 new element floatconst.
4176 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4177 (ada_evaluate_subexp): Likewise.
4178 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4179 OP_DOUBLE and OP_DECFLOAT.
4180 * expprint.c (print_subexp_standard): Likewise.
4181 (dump_subexp_body_standard): Likewise.
4182 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4184 * parse.c: Include "dfp.h".
4185 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4186 (write_exp_elt_floatcst): New function.
4187 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4189 (operator_check_standard): Likewise.
4190 (parse_float): Do not accept suffix. Take type as input. Return bool.
4191 Return target format buffer instead of host DOUBLEST.
4192 Use floatformat_from_string and decimal_from_string to parse
4193 either binary or decimal floating-point types.
4194 (parse_c_float): Remove.
4195 * parser-defs.h: Do not include "doublest.h".
4196 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4197 (write_exp_elt_floatcst): Add prototype.
4198 (parse_float): Update prototype.
4199 (parse_c_float): Remove.
4201 * c-exp.y: Do not include "dfp.h".
4202 (typed_val_float): Use byte buffer instead of DOUBLEST.
4203 (typed_val_decfloat): Remove.
4205 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4206 (parse_number): Update to new parse_float interface.
4207 Parse suffixes and determine type before calling parse_float.
4208 Handle decimal and binary FP types the same way.
4210 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4211 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4212 (parse_number): Update to new parse_float interface.
4213 Parse suffixes and determine type before calling parse_float.
4215 * f-exp.y: Replace dval by typed_val_float.
4216 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4217 (parse_number): Use parse_float instead of atof.
4219 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4220 (parse_go_float): Remove.
4221 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4222 (parse_number): Call parse_float instead of parse_go_float.
4223 Parse suffixes and determine type before calling parse_float.
4225 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4226 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4227 (parse_number): Update to new parse_float interface.
4228 Parse suffixes and determine type before calling parse_float.
4230 * m2-exp.y: Replace dval by byte buffer val.
4231 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4232 (parse_number): Call parse_float instead of atof.
4234 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4235 (lex_number): Call parse_float instead of strtod.
4236 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4237 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4238 Use write_exp_elt_floatcst.
4239 (unit_testing): Remove static variable.
4240 (rust_type): Do not check unit_testing.
4241 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4243 * ada-exp.y (type_float, type_double): Remove.
4244 (typed_val_float): Use byte buffer instead of DOUBLEST.
4245 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4246 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4248 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4250 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4251 * arch/aarch64.h: New file.
4253 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4255 * dfp.h (decimal_from_string): Use const reference for argument.
4256 * dfp.c (decimal_from_string): Likewise.
4258 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4260 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4261 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4262 * mips-tdep.c (mips_print_fp_register): Likewise.
4264 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4266 * common/format.h (enum argclass): Replace decfloat_arg by
4267 dec32float_arg, dec64float_arg, and dec128float_arg.
4268 * common/format.c (parse_format_string): Update to return
4269 new decimal float argument classes.
4271 * printcmd.c (printf_decfloat): Rename to ...
4272 (printf_floating): ... this. Add argclass argument, and use it
4273 instead of parsing the format string again. Add support for
4274 binary floating-point values, using floatformat_to_string.
4275 Convert value to the target format if it doesn't already match.
4276 (ui_printf): Call printf_floating instead of printf_decfloat,
4277 also for double_arg / long_double_arg. Pass argclass.
4279 * dfp.c (decimal_to_string): Add format string argument.
4280 * dfp.h (decimal_to_string): Likewise.
4282 * doublest.c (floatformat_to_string): Add format string argument.
4283 * doublest.h (floatformat_to_string): Likewise.
4285 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4287 * doublest.c (floatformat_precision): New routine.
4288 (floatformat_to_string): Likewise.
4289 * doublest.c (floatformat_to_string): Add prototype.
4291 * printcmd.c (print_scalar_formatted): Only call print_floating
4292 on floating-point types.
4293 * valprint.c: Do not include "floatformat.h".
4294 (generic_val_print_decfloat): Remove.
4295 (generic_val_print): Call generic_val_print_float for both
4296 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4297 (print_floating): Use floatformat_to_string. Handle decimal float.
4298 (print_decimal_floating): Remove, merge into floatformat_to_string.
4299 * value.h (print_decimal_floating): Remove.
4301 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4303 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4305 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4307 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4309 * memattr.h: Don't include vec.h.
4310 (struct mem_attrib): Initialize fields.
4311 <unknown>: New static method.
4312 (struct mem_region): Add constructors, operator<, initialize
4314 * memattr.c: Include algorithm.
4315 (default_mem_attrib, unknown_mem_attrib): Remove.
4316 (user_mem_region_list): New global.
4317 (target_mem_region_list, mem_region_list): Change type to
4318 std::vector<mem_region>.
4319 (mem_use_target): Now a function.
4320 (target_mem_regions_valid): Change type to bool.
4321 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4322 (require_user_regions): Adjust.
4323 (require_target_regions): Adjust.
4324 (create_mem_region): Adjust.
4325 (lookup_mem_region): Adjust.
4326 (invalidate_target_mem_regions): Adjust.
4327 (mem_clear): Rename to...
4328 (user_mem_clear): ... this, and adjust.
4329 (mem_command): Adjust.
4330 (info_mem_command): Adjust.
4331 (mem_enable, enable_mem_command, mem_disable,
4332 disable_mem_command): Adjust.
4333 (mem_delete): Adjust.
4334 (delete_mem_command): Adjust.
4335 * memory-map.h (parse_memory_map): Return an std::vector.
4336 * memory-map.c (parse_memory_map): Likewise.
4337 (struct memory_map_parsing_data): Add constructor.
4338 <memory_map>: Point to std::vector.
4339 (memory_map_start_memory): Adjust.
4340 (memory_map_end_memory): Adjust.
4341 (memory_map_end_property): Adjust.
4342 (clear_result): Remove.
4343 * remote.c (remote_memory_map): Return an std::vector.
4344 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4346 (target_debug_print_mem_region_vector): New.
4347 * target-delegates.c: Regenerate.
4348 * target.h (mem_region_vector): New typedef.
4349 (to_memory_map): Return mem_region_vector.
4350 (target_memory_map): Return an std::vector.
4351 * target.c (target_memory_map): Return an std::vector.
4352 (flash_erase_command): Adjust.
4354 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4356 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4357 Change type to std::string.
4358 (memory_map_start_property): Adjust.
4359 (memory_map_end_property): Adjust.
4361 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4363 * infrun.h: Include common/byte-vector.h.
4364 (struct displaced_step_closure): New struct.
4365 (struct buf_displaced_step_closure): New struct.
4366 * infrun.c (displaced_step_closure::~displaced_step_closure):
4367 Provide default implementation.
4368 (displaced_step_clear): Deallocate step closure with delete.
4369 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4370 (aarch64_displaced_step_closure): ... this, extend
4371 displaced_step_closure.
4372 (aarch64_displaced_step_data) <dsc>: Change type to
4373 aarch64_displaced_step_closure.
4374 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4376 (aarch64_displaced_step_fixup): Add cast for displaced step
4378 * amd64-tdep.c (displaced_step_closure): Rename to ...
4379 (amd64_displaced_step_closure): ... this, extend
4380 displaced_step_closure.
4381 <insn_buf>: Change type to std::vector<gdb_byte>.
4383 (fixup_riprel): Change type of DSC parameter, adjust to type
4385 (fixup_displaced_copy): Change type of DSC parameter.
4386 (amd64_displaced_step_copy_insn): Instantiate
4387 amd64_displaced_step_closure.
4388 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4389 to type change of insn_buf.
4390 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4392 (arm_linux_copy_svc): Likewise.
4393 (cleanup_kernel_helper_return): Likewise.
4394 (arm_catch_kernel_helper_return): Likewise.
4395 (arm_linux_displaced_step_copy_insn): Instantiate
4396 arm_displaced_step_closure.
4397 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4398 (displaced_read_reg): Change type of parameter DSC.
4399 (branch_write_pc): Likewise.
4400 (load_write_pc): Likewise.
4401 (alu_write_pc): Likewise.
4402 (displaced_write_reg): Likewise.
4403 (arm_copy_unmodified): Likewise.
4404 (thumb_copy_unmodified_32bit): Likewise.
4405 (thumb_copy_unmodified_16bit): Likewise.
4406 (cleanup_preload): Likewise.
4407 (install_preload): Likewise.
4408 (arm_copy_preload): Likewise.
4409 (thumb2_copy_preload): Likewise.
4410 (install_preload_reg): Likewise.
4411 (arm_copy_preload_reg): Likewise.
4412 (cleanup_copro_load_store): Likewise.
4413 (install_copro_load_store): Likewise.
4414 (arm_copy_copro_load_store) Likewise.
4415 (thumb2_copy_copro_load_store): Likewise.
4416 (cleanup_branch): Likewise.
4417 (install_b_bl_blx): Likewise.
4418 (arm_copy_b_bl_blx): Likewise.
4419 (thumb2_copy_b_bl_blx): Likewise.
4420 (thumb_copy_b): Likewise.
4421 (install_bx_blx_reg): Likewise.
4422 (arm_copy_bx_blx_reg): Likewise.
4423 (thumb_copy_bx_blx_reg): Likewise.
4424 (cleanup_alu_imm): Likewise.
4425 (arm_copy_alu_imm): Likewise.
4426 (thumb2_copy_alu_imm): Likewise.
4427 (cleanup_alu_reg): Likewise.
4428 (install_alu_reg): Likewise.
4429 (arm_copy_alu_reg): Likewise.
4430 (thumb_copy_alu_reg): Likewise.
4431 (cleanup_alu_shifted_reg): Likewise.
4432 (install_alu_shifted_reg): Likewise.
4433 (arm_copy_alu_shifted_reg): Likewise.
4434 (cleanup_load): Likewise.
4435 (cleanup_store): Likewise.
4436 (arm_copy_extra_ld_st): Likewise.
4437 (install_load_store): Likewise.
4438 (thumb2_copy_load_literal): Likewise.
4439 (thumb2_copy_load_reg_imm): Likewise.
4440 (arm_copy_ldr_str_ldrb_strb): Likewise.
4441 (cleanup_block_load_all): Likewise.
4442 (cleanup_block_store_pc): Likewise.
4443 (cleanup_block_load_pc): Likewise.
4444 (arm_copy_block_xfer): Likewise.
4445 (thumb2_copy_block_xfer): Likewise.
4446 (cleanup_svc): Likewise.
4447 (install_svc): Likewise.
4448 (arm_copy_svc): Likewise.
4449 (thumb_copy_svc): Likewise.
4450 (arm_copy_undef): Likewise.
4451 (thumb_32bit_copy_undef): Likewise.
4452 (arm_copy_unpred): Likewise.
4453 (arm_decode_misc_memhint_neon): Likewise.
4454 (arm_decode_unconditional): Likewise.
4455 (arm_decode_miscellaneous): Likewise.
4456 (arm_decode_dp_misc): Likewise.
4457 (arm_decode_ld_st_word_ubyte): Likewise.
4458 (arm_decode_media): Likewise.
4459 (arm_decode_b_bl_ldmstm): Likewise.
4460 (arm_decode_ext_reg_ld_st): Likewise.
4461 (thumb2_decode_dp_shift_reg): Likewise.
4462 (thumb2_decode_ext_reg_ld_st): Likewise.
4463 (arm_decode_svc_copro): Likewise.
4464 (thumb2_decode_svc_copro): Likewise.
4465 (install_pc_relative): Likewise.
4466 (thumb_copy_pc_relative_16bit): Likewise.
4467 (thumb_decode_pc_relative_16bit): Likewise.
4468 (thumb_copy_pc_relative_32bit): Likewise.
4469 (thumb_copy_16bit_ldr_literal): Likewise.
4470 (thumb_copy_cbnz_cbz): Likewise.
4471 (thumb2_copy_table_branch): Likewise.
4472 (cleanup_pop_pc_16bit_all): Likewise.
4473 (thumb_copy_pop_pc_16bit): Likewise.
4474 (thumb_process_displaced_16bit_insn): Likewise.
4475 (decode_thumb_32bit_ld_mem_hints): Likewise.
4476 (thumb_process_displaced_32bit_insn): Likewise.
4477 (thumb_process_displaced_insn): Likewise.
4478 (arm_process_displaced_insn): Likewise.
4479 (arm_displaced_init_closure): Likewise.
4480 (arm_displaced_step_fixup): Add cast for closure.
4481 * arm-tdep.h: Include infrun.h.
4482 (displaced_step_closure): Rename to ...
4483 (arm_displaced_step_closure): ... this, extend
4484 displaced_step_closure.
4485 <u::svc::copy_svc_os>: Change type of parameter DSC.
4486 <cleanup>: Likewise.
4487 (arm_process_displaced_insn): Likewise.
4488 (arm_displaced_init_closure): Likewise.
4489 (displaced_read_reg): Likewise.
4490 (displaced_write_reg): Likewise.
4491 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4493 * i386-tdep.h: Include infrun.h.
4494 (i386_displaced_step_closure): New typedef.
4495 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4496 i386_displaced_step_closure.
4497 (i386_displaced_step_fixup): Adjust.
4498 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4499 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4501 (ppc_displaced_step_fixup): Adjust.
4502 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4503 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4505 (s390_displaced_step_fixup): Adjust.
4507 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4509 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4510 Remove declarations.
4512 2017-10-20 Tom Tromey <tom@tromey.com>
4514 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4516 (gdb_bfd_record_inclusion): Update.
4517 (bfdp): Remove typedef.
4519 2017-10-20 Tom Tromey <tom@tromey.com>
4521 * gdb_bfd.c (gdb_bfd_ref): Use new.
4522 (struct gdb_bfd_data): Add constructor, destructor, and member
4524 (gdb_bfd_unref): Use delete.
4526 2017-10-20 Tom Tromey <tom@tromey.com>
4528 * exec.c (exec_file_attach): Use new_bfd_ref.
4529 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4530 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4531 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4533 * gdb_bfd.h (new_bfd_ref): New function.
4535 2017-10-20 Pedro Alves <palves@redhat.com>
4537 * main.c (captured_command_loop): Add attribute noinline.
4539 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4541 * interps.c (struct interp_factory): Add constructor.
4542 (interp_factory_p): Remove typedef.
4543 (DEF_VEC_P(interp_factory_p)): Remove.
4544 (interpreter_factories): Change type to std::vector.
4545 (interp_factory_register): Adjust.
4546 (interp_lookup): Adjust.
4547 (interpreter_completer): Adjust.
4549 2017-10-19 Tom Tromey <tom@tromey.com>
4551 * break-catch-syscall.c (catch_syscall_completer): Use
4552 std::string, gdb::unique_xmalloc_ptr.
4554 2017-10-19 Tom Tromey <tom@tromey.com>
4556 * infcall.c (call_function_by_hand_dummy): Use std::string.
4558 2017-10-19 Tom Tromey <tom@tromey.com>
4560 * mi/mi-main.c (mi_cmd_execute): Update.
4561 * top.h (prepare_execute_command): Return scoped_value_mark.
4562 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4563 Add move constructor.
4564 * top.c (prepare_execute_command): Return scoped_value_mark.
4565 (execute_command): Update.
4567 2017-10-19 Pedro Alves <palves@redhat.com>
4569 * xml-support.c (xml_fetch_content_from_file): Check fread's
4572 2017-10-19 Pedro Alves <palves@redhat.com>
4574 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4576 (handle_error_fd): New function.
4577 (ser_base_async): Add/delete an event loop file handler for
4580 2017-10-19 Pedro Alves <palves@redhat.com>
4582 * xml-support.c (xml_fetch_content_from_file): Don't read in
4583 chunks. Instead use fseek to determine the file's size, and read
4586 2017-11-18 Keith Seitz <keiths@redhat.com>
4588 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4590 Add whitespace to front of type name.
4592 2017-10-18 Keith Seitz <keiths@redhat.com>
4594 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4595 DW_AT_accessibility.
4597 2017-10-18 Yao Qi <yao.qi@linaro.org>
4599 * features/tic6x-c62x-linux.c: Remove.
4601 2017-10-17 Tom Tromey <tom@tromey.com>
4603 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4604 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4605 (do_mixed_source_and_assembly): Likewise.
4607 2017-10-17 Tom Tromey <tom@tromey.com>
4609 * regcache.c (regcache::xfer_part): Remove assertion.
4611 2017-10-17 Pedro Alves <palves@redhat.com>
4613 * xml-support.c (xml_fetch_content_from_file): Call
4614 unique_ptr::release() instead unique_ptr::get() when passing
4617 2017-10-17 Yao Qi <yao.qi@linaro.org>
4619 * regcache.c (regcache::xfer_part): Remove parameters read and
4620 write, add parameter is_raw. All callers are updated.
4622 2017-10-16 Keith Seitz <keiths@redhat.com>
4624 * c-typeprint.c (enum access_specifier): Moved here from
4626 (output_access_specifier): New function.
4627 (c_type_print_base): Consider typedefs when assessing
4628 whether access labels are needed.
4629 Use output_access_specifier as needed.
4630 Output access specifier for typedefs, if needed.
4631 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4632 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4634 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4637 2017-10-16 Tom Tromey <tom@tromey.com>
4639 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4640 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4641 * target.c (target_fileio_read_stralloc): Update.
4642 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4643 * target.h (target_fileio_read_stralloc): Return
4646 2017-10-16 Tom Tromey <tom@tromey.com>
4648 * xml-syscall.c (xml_init_syscalls_info): Update.
4649 * xml-support.c (xinclude_start_include): Update.
4650 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4651 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4652 (xml_fetch_content_from_file): Likewise.
4653 * osdata.c (get_osdata): Update.
4654 * target.h (target_read_stralloc, target_get_osdata): Return
4656 * solib-aix.c (solib_aix_get_library_list): Update.
4657 * solib-target.c (solib_target_current_sos): Update.
4658 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4659 * xml-tdesc.c (fetch_available_features_from_target): Update.
4660 (target_fetch_description_xml): Update.
4661 (file_read_description_xml): Update.
4662 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4663 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4664 (remote_pid_to_exec_file): Update.
4665 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4666 (target_get_osdata): Likewise.
4668 2017-10-16 Tom Tromey <tom@tromey.com>
4670 * remote.c (remote_register_number_and_offset): Use std::vector.
4671 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4672 (putpkt_binary): Use gdb::def_vector.
4673 (compare_sections_command): Use gdb::byte_vector.
4675 2017-10-16 Tom Tromey <tom@tromey.com>
4677 * ppc-linux-nat.c (hwdebug_insert_point): Use
4678 gdb::unique_xmalloc_ptr, XDUP.
4680 2017-10-16 Tom Tromey <tom@tromey.com>
4682 * probe.c (parse_probes): Use std::string.
4683 (info_probes_for_ops, enable_probes_command)
4684 (disable_probes_command): Remove cleanups.
4686 2017-10-16 Tom Tromey <tom@tromey.com>
4688 * buildsym.c (block_compar): Remove.
4689 (end_symtab_get_static_block): Use std::vector.
4691 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4693 * memrange.h (struct mem_range): Define operator< and operator==.
4694 (mem_range_s): Remove.
4695 (DEF_VEC_O (mem_range_s)): Remove.
4696 (normalize_mem_ranges): Change parameter type to std::vector.
4697 * memrange.c (compare_mem_ranges): Remove.
4698 (normalize_mem_ranges): Change parameter type to std::vector,
4699 adjust to vector change.
4700 * exec.c (section_table_available_memory): Return vector, remove
4702 (section_table_read_available_memory): Adjust to std::vector
4704 * remote.c (remote_read_bytes): Adjust to std::vector
4706 * tracepoint.h (traceframe_available_memory): Change parameter
4707 type to std::vector.
4708 * tracepoint.c (traceframe_available_memory): Change parameter
4709 type to std::vector, adjust.
4710 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4712 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4713 unittests/memrange-selftests.c.
4714 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4715 * gdb/unittests/memrange-selftests.c: New file.
4717 2017-10-16 Pedro Alves <palves@redhat.com>
4719 * elfread.c (probe_key_free): Rename range-for variable.
4720 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4721 (find_probe_by_pc, collect_probes): Rename range-for variable.
4723 2017-10-16 Yao Qi <yao.qi@linaro.org>
4725 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4726 * features/tic6x-c62x.c: Remove.
4727 * features/tic6x-c64x-linux.c: Remove.
4728 * features/tic6x-c64x.c: Remove.
4729 * features/tic6x-c64xp-linux.c: Remove.
4730 * features/tic6x-c64xp.c: Remove.
4731 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4732 initialize_tdesc_tic6x_*_linux functions.
4733 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4734 initialize_tdesc_tic6x_* functions.
4736 2017-10-16 Yao Qi <yao.qi@linaro.org>
4738 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4740 * regformats/tic6x-c62x.dat: Remove.
4741 * regformats/tic6x-c64x.dat: Remove.
4742 * regformats/tic6x-c64xp.dat: Remove.
4744 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4746 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4747 (the !HAVE_LIBEXPAT version).
4749 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4751 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4754 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4756 * target.h: Include tracepoint.h.
4757 (enum trace_find_type): Move to tracepoint.h.
4758 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4759 * tracepoint.h: Don't include target.h
4760 (enum trace_find_type): Move from target.h.
4761 (parse_traceframe_info): Return a unique ptr.
4762 * tracepoint.c (current_traceframe_info): Change type to unique
4764 (free_traceframe_info): Remove.
4765 (clear_traceframe_info): Don't manually free
4766 current_traceframe_info.
4767 (free_result): Remove.
4768 (parse_traceframe_info): Return a unique ptr.
4769 (get_traceframe_info): Adjust to unique ptr.
4770 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4771 * remote.c (remote_traceframe_info): Return a unique ptr.
4772 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4774 * target-debug.h (target_debug_print_traceframe_info_up): New
4776 * target-delegates.c: Regenerate.
4778 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4780 * memrange.h (struct mem_range): Add constructors.
4781 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4782 std::vector<mem_range>.
4783 * tracepoint.c (free_traceframe_info): Don't manually free
4785 (traceframe_info_start_memory): Adjust to vector change.
4786 (traceframe_available_memory): Likewise.
4787 * tracefile-tfile.c (build_traceframe_info): Likewise.
4788 * ctf.c (ctf_traceframe_info): Likewise.
4790 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4792 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4794 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4795 (traceframe_info_start_tvar): Adjust to vector change.
4796 (parse_traceframe_info): Allocate with new.
4797 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4799 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4801 tfile_traceframe_info): Allocate with new.
4802 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4805 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4807 * tracepoint.c (traceframe_info): Rename to...
4808 (current_traceframe_info): ...this.
4809 (clear_traceframe_info): Adjust.
4810 (get_traceframe_info): Adjust.
4812 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4814 * nat/linux-osdata.c: Include algorithm.
4815 (compare_processes): Remove.
4816 (struct pid_pgid_entry): New struct.
4817 (linux_xfer_osdata_processgroups): Use std::vector instead of
4820 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4822 * objfiles.h: Don't include symfile.h.
4823 (struct partial_symbol): Remove forward-declaration.
4824 (struct objfile) <global_psymbols, static_psymbols>: Change type
4825 to std::vector<partial_symbol *>.
4826 * objfiles.c (objfile::objfile): Don't memset those fields.
4827 (objfile::~objfile): Don't free those fields.
4828 * psympriv.h (struct psymbol_allocation_list): Remove
4829 forward-declaration.
4830 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4832 (start_psymtab_common): Change parameters to std::vector.
4833 * psymtab.c: Include algorithm.
4834 (require_partial_symbols): Call shrink_to_fit.
4835 (find_pc_sect_psymbol): Adjust to vector change.
4836 (match_partial_symbol): Likewise.
4837 (lookup_partial_symbol): Likewise.
4838 (psym_relocate): Likewise.
4839 (dump_psymtab): Likewise.
4840 (recursively_search_psymtabs): Likewise.
4841 (compare_psymbols): Remove.
4842 (sort_pst_symbols): Adjust to vector change.
4843 (start_psymtab_common): Likewise.
4844 (end_psymtab_common): Likewise.
4845 (psymbol_bcache_full): De-constify return value.
4846 (add_psymbol_to_bcache): Likewise.
4847 (extend_psymbol_list): Remove.
4848 (append_psymbol_to_list): Adjust to vector change.
4849 (add_psymbol_to_list): Likewise.
4850 (init_psymbol_list): Likewise.
4851 (maintenance_info_psymtabs): Likewise.
4852 (maintenance_check_psymtabs): Likewise.
4853 * symfile.h (struct psymbol_allocation_list): Remove.
4854 * symfile.c (reread_symbols): Adjust to vector change.
4855 * dbxread.c (start_psymtab): Change type of parameters.
4856 (dbx_symfile_read): Adjust to vector change.
4857 (read_dbx_symtab): Likewise.
4858 (start_psymtab): Change type of parameters.
4859 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4860 (create_partial_symtab): Likewise.
4861 (add_partial_symbol): Likewise.
4862 (write_one_signatured_type): Likewise.
4863 (recursively_write_psymbols): Likewise.
4864 * mdebugread.c (parse_partial_symbols): Likewise.
4865 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4866 (scan_xcoff_symtab): Adjust to vector change.
4867 (xcoff_initial_scan): Likewise.
4869 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4871 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4873 2017-10-13 Yao Qi <yao.qi@linaro.org>
4875 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4876 Remove s390x-*-expedite, add s390x-expedite.
4878 2017-10-13 Yao Qi <yao.qi@linaro.org>
4880 * features/s390-gs-linux64.c: Regenerated.
4881 * features/s390x-gs-linux64.c: Regenerated.
4883 2017-10-13 Tom Tromey <tom@tromey.com>
4885 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4886 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4888 * symfile.c (symbol_file_add_with_addrs): Use new.
4889 (symbol_file_add_separate): Update comment.
4890 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4891 * jit.c (jit_object_close_impl): Use new.
4892 (jit_unregister_code): Use delete.
4893 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4894 (~objfile): Rename from free_objfile.
4895 (free_objfile_separate_debug, do_free_objfile_cleanup)
4896 (free_all_objfiles, objfile_purge_solibs): Use delete.
4897 * objfiles.h (struct objfile): Add constructor and destructor.
4898 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4899 (allocate_objfile, free_objfile): Don't declare.
4900 (struct objstats): Add initializers.
4902 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4904 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4905 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4906 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4907 * gdbarch.h: Regenerate.
4908 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4910 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4911 (i386_displaced_step_fixup): Adjust comment.
4912 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4914 2017-10-12 Tom Tromey <tom@tromey.com>
4916 * prologue-value.h (pv_area::store_would_trash): Return bool.
4917 (pv_area::find_reg): Likewise.
4918 * prologue-value.c (pv_area::store_would_trash): Return bool.
4919 (pv_area::find_reg): Likewise.
4921 2017-10-12 Tom Tromey <tom@tromey.com>
4923 * s390-linux-tdep.c (s390_store, s390_load)
4924 (s390_check_for_saved, s390_analyze_prologue): Update.
4925 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4926 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4927 * prologue-value.h (class pv_area): Move from prologue-value.c.
4928 Change names of members. Add constructor, destructor, member
4930 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4931 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4932 (pv_area_fetch, pv_area_scan): Don't declare.
4933 * prologue-value.c (struct pv_area::area_entry): Now member of
4935 (struct pv_area): Move to prologue-value.h.
4936 (pv_area::pv_area): Rename from make_pv_area.
4937 (pv_area::~pv_area): Rename from free_pv_area.
4938 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4939 (clear_entries, find_entry, overlaps, store_would_trash, store)
4940 (fetch, find_reg, scan): Now member of pv_area.
4941 Remove "area" argument. Update.
4942 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4944 * mn10300-tdep.c (push_reg, check_for_saved)
4945 (mn10300_analyze_prologue): Update.
4946 * mep-tdep.c (is_arg_spill, check_for_saved)
4947 (mep_analyze_prologue): Update.
4948 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4949 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4950 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4951 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4953 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4954 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4956 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4958 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4959 * linux-nat.c (linux_nat_delete_thread): New variable.
4960 (lwp_free): Invoke linux_nat_delete_thread if set.
4961 (linux_nat_set_delete_thread): New function.
4962 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4963 thread delete callback.
4964 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4965 (_initialize_arm_linux_nat): Assign thread delete callback.
4966 * s390-linux-nat.c (s390_delete_thread): New function.
4967 (_initialize_s390_nat): Assign thread delete callback.
4968 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4969 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4971 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4973 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4974 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4976 2017-10-09 Tom Tromey <tom@tromey.com>
4978 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4980 * tui/tui-layout.c (enum tui_status): Use std::string.
4982 2017-10-11 Tom Tromey <tom@tromey.com>
4984 * gdbthread.h (thread_command): Constify.
4985 * inferior.h (detach_command): Constify.
4986 * top.h (set_history, show_history): Constify.
4987 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4988 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4989 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4990 * printcmd.c (set_command): Constify.
4991 (non_const_set_command): New function.
4992 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4993 * breakpoint.c (enable_command, disable_command, delete_command)
4994 (catch_command, tcatch_command, set_breakpoint_cmd)
4995 (show_breakpoint_cmd): Constify.
4996 * macrocmd.c (macro_command): Constify.
4997 * infcmd.c (unset_command, kill_command, detach_command)
4998 (info_proc_cmd): Constify.
4999 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5000 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5001 (info_auto_load_cmd): Constify.
5002 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5003 (unset_tdesc_cmd): Constify.
5004 * ada-lang.c (set_ada_command, show_ada_command)
5005 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5006 * guile/guile.c (set_guile_command, show_guile_command)
5007 (info_guile_command): Constify.
5008 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5010 * skip.c (skip_command): Constify.
5011 * compile/compile.c (_initialize_compile): Constify.
5012 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5013 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5014 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5015 (maint_btrace_pt_show_cmd): Constify.
5016 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5018 * python/python.c (user_show_python, user_set_python): Constify.
5019 * mips-tdep.c (set_mips_command, show_mips_command)
5020 (set_mipsfpu_command): Constify.
5021 * record-btrace.c (cmd_record_btrace_start)
5022 (cmd_set_record_btrace, cmd_show_record_btrace)
5023 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5024 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5025 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5027 * symfile.c (overlay_command): Constify.
5028 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5029 * cli/cli-logging.c (set_logging_command, show_logging_command):
5031 * cli/cli-dump.c (dump_command, append_command)
5032 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5033 (tekhex_dump_command, binary_dump_command)
5034 (binary_append_command): Constify.
5035 * cli/cli-decode.c (struct cmd_list_element): Change type of
5037 * cli/cli-cmds.c (info_command, show_command, set_debug)
5038 (show_debug): Constify.
5039 (show_command): Add non-const overload.
5040 * top.c (set_history, show_history): Constify.
5041 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5042 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5043 * target.c (target_command): Constify.
5044 * sparc64-tdep.c (info_adi_command): Constify.
5045 * record-full.c (cmd_record_full_start): Constify.
5046 (set_record_full_command): Constify. Fix typo.
5047 (show_record_full_command): Constify.
5048 * thread.c (thread_command, thread_apply_command): Constify.
5049 * memattr.c (dummy_cmd): Constify.
5050 * value.c (function_command): Constify.
5051 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5052 * probe.c (info_probes_command): Constify.
5053 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5054 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5055 (show_thread_cmd, set_thread_default_cmd)
5056 (show_thread_default_cmd): Constify.
5057 (check_empty): Constify.
5058 * tracepoint.c (tfind_command): Constify.
5059 * cp-support.c (maint_cplus_command): Constify.
5060 * windows-tdep.c (info_w32_command): Constify.
5061 * record.c (cmd_record_start, set_record_command)
5062 (show_record_command, info_record_command, cmd_record_goto):
5064 * ravenscar-thread.c (set_ravenscar_command)
5065 (show_ravenscar_command): Constify.
5066 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5068 (add_internal_problem_command): Remove casts.
5069 * arc-tdep.c (maintenance_print_arc_command): Constify.
5070 * valprint.c (set_print, show_print, set_print_raw)
5071 (show_print_raw): Constify.
5072 * maint.c (maintenance_command, maintenance_info_command)
5073 (maintenance_print_command, maintenance_set_cmd)
5074 (maintenance_show_cmd, set_per_command_cmd)
5075 (show_per_command_cmd, maintenance_check_command): Constify.
5076 * language.c (set_check, show_check): Constify.
5077 * typeprint.c (show_print_type, set_print_type): Constify.
5078 * go32-nat.c (go32_info_dos_command): Constify.
5080 2017-10-11 Tom Tromey <tom@tromey.com>
5082 * breakpoint.c (prepare_re_set_context): Remove.
5083 (breakpoint_re_set_one): Update. Don't use cleanups.
5084 (breakpoint_re_set): Use scoped_restore, std::string, and
5085 scoped_restore_current_language.
5087 2017-10-11 Tom Tromey <tom@tromey.com>
5089 * breakpoint.c (commands_command_1): Use std::string.
5090 (cleanup_executing_breakpoints): Remove.
5091 (bpstat_do_actions_1): Use scoped_restore.
5092 (bpstat_check_watchpoint): Use std::string.
5093 (decode_static_tracepoint_spec): Likewise.
5094 (break_range_command): Likewise.
5095 (watch_command_1): Likewise.
5096 (compare_breakpoints): Change argument types.
5097 (clear_command): Use std::vector.
5098 (cleanup_executing_breakpoints): Remove.
5099 (update_global_location_list): Use unique_xmalloc_ptr.
5100 (strace_command): Remove unused declaration.
5102 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5104 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5105 * NEWS: Mention new FreeBSD/arm native configuration.
5106 * configure.host: Add arm*-*-freebsd*.
5107 * configure.nat: Likewise.
5108 * arm-fbsd-nat.c: New file.
5110 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5112 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5113 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5114 * NEWS: Mention new FreeBSD/arm target.
5115 * configure.tgt: Add arm*-*-freebsd*.
5116 * arm-fbsd-tdep.c: New file.
5117 * arm-fbsd-tdep.h: New file.
5119 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5121 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5122 `gdbarch_elfcore_write_linux_prpsinfo'.
5123 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5125 (elf_internal_linux_prpsinfo): Remove declaration.
5126 * gdbarch.h: Regenerate.
5127 * gdbarch.c: Regenerate.
5129 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5131 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5132 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5134 2017-10-11 Pedro Alves <palves@redhat.com>
5136 * breakpoint.c (reattach_breakpoints): Delete.
5137 * breakpoint.h (reattach_breakpoints): Delete.
5139 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5141 * symfile.c (registered_sym_fns): Make struct, not typedef.
5142 (DEF_VEC_O (registered_sym_fns)): Remove.
5143 (symtab_fns): Change type to std::vector.
5144 (add_symtab_fns): Adjust.
5145 (find_sym_fns): Adjust.
5147 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5149 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5150 * arc-tdep.h (arc_arch_is_em): New function.
5151 (arc_arch_is_hs): Likewise.
5153 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5155 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5156 parentheses in the declaration.
5157 (macro_lookup_inclusion): Likewise.
5158 (macro_lookup_definition): Likewise.
5159 * p-lang.h (pascal_builtin_types): Likewise.
5160 * tui/tui-data.c (tui_win_list): Likewise.
5161 * tui/tui-data.h (tui_win_list): Likewise.
5162 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5164 2017-10-11 Mark Rages <markrages@gmail.com>
5166 * target-memory.c (block_boundaries): Fix for block address not
5167 aligned on block size.
5169 2017-10-10 Pedro Alves <palves@redhat.com>
5170 Tom Tromey <tom@tromey.com>
5172 * breakpoint.c (struct captured_breakpoint_query_args)
5173 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5174 (print_breakpoint): New.
5175 * breakpoint.h (print_breakpoint): Declare.
5176 * common/common-exceptions.h (enum return_reason): Remove
5177 references to catch_exceptions.
5178 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5180 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5181 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5183 * gdbthread.h (thread_select): Declare.
5184 * mi/mi-cmd-break.c: Don't include gdb.h.
5185 (breakpoint_notify): Use print_breakpoint.
5186 * mi/mi-cmd-catch.c: Don't include gdb.h.
5187 * mi/mi-interp.c: Don't include gdb.h.
5188 (mi_print_breakpoint_for_event): New.
5189 (mi_breakpoint_created, mi_breakpoint_modified): Use
5190 mi_print_breakpoint_for_event.
5191 * mi/mi-main.c: Don't include gdb.h.
5192 (mi_cmd_thread_select): Parse the global thread ID here. Use
5193 thread_select instead of gdb_thread_select.
5194 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5195 of using gdb_list_thread_ids.
5196 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5198 (remote_fileio_request): Use TRY/CATCH instead of
5200 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5201 (symbol_file_add_from_memory_wrapper): Delete.
5202 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5203 * thread.c: Don't include gdb.h.
5204 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5205 (thread_alive): Use thread_select.
5206 (do_captured_thread_select): Delete, parts salvaged as ...
5207 (thread_select): ... this new function.
5208 (gdb_thread_select): Delete.
5210 2017-10-10 Pedro Alves <palves@redhat.com>
5211 Tom Tromey <tom@tromey.com>
5213 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5215 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5216 No longer macros. Instead ...
5217 (enum wp_check_result): They're now values of this new
5219 (watchpoint_check): Change return type to wp_check_result and
5220 parameter type to bpstat.
5221 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5222 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5223 catch_errors. Reverse logic of watchpoint_check call.
5224 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5225 pointer as parameter.
5226 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5227 * common/common-exceptions.c (throw_exception_sjlj): Update
5228 comments to avoid mentioning catch_errors.
5229 * exceptions.c (catch_errors): Delete.
5230 * exceptions.h: Update comments to avoid mentioning catch_errors.
5231 (catch_errors_ftype, catch_errors): Delete.
5232 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5233 (hook_stop_stub): Delete.
5234 (restore_selected_frame): Change return type to void, and
5235 parameter type to const frame_id &.
5236 (restore_infcall_control_state): Use TRY/CATCH instead of
5238 * main.c (captured_command_loop): Return void and remove
5239 parameter. Remove references to catch_errors.
5240 (captured_main): Use TRY/CATCH instead of catch_errors.
5241 * objc-lang.c (objc_submethod_helper_data)
5242 (find_objc_msgcall_submethod_helper): Delete.
5243 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5245 * record-full.c (record_full_message): Return void.
5246 (record_full_message_args, record_full_message_wrapper): Delete.
5247 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5248 instead of catch_errors.
5249 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5250 parameter type to int.
5251 * solib-darwin.c (open_symbol_file_object): Ditto.
5252 * solib-dsbt.c (open_symbol_file_object): Ditto.
5253 * solib-frv.c (open_symbol_file_object): Ditto.
5254 * solib-svr4.c (open_symbol_file_object): Ditto.
5255 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5256 * solib.c (update_solib_list): Use TRY/CATCH instead of
5258 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5260 * symmisc.c (struct print_symbol_args): Remove.
5261 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5262 (print_symbol): Change type.
5263 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5264 and remove parameters.
5265 (catch_errors): New.
5266 (get_windows_debug_event): Adjust.
5268 2017-10-09 Tom Tromey <tom@tromey.com>
5270 * mi/mi-main.c (free_splay_tree): Remove.
5271 (list_available_thread_groups): Use splay_tree_up.
5272 * common/gdb_splay_tree.h: New file.
5274 2017-10-09 Tom Tromey <tom@tromey.com>
5276 * mi/mi-main.c (do_nothing): Remove.
5277 (list_available_thread_groups): Update.
5279 2017-10-09 Pedro Alves <palves@redhat.com>
5281 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5282 reading registers when switching context.
5284 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5286 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5287 (fbsd_convert_siginfo): Likewise.
5288 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5290 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5292 * configure.ac (try_guile_versions): Remove guile-2.2.
5293 * configure: Regenerate.
5295 2017-10-09 Tom Tromey <tom@tromey.com>
5297 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5298 (COMPILE.pre): Use $(CXX).
5300 2017-10-09 Pedro Alves <palves@redhat.com>
5302 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5304 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5305 * cp-support.h (cp_remove_params): Now returns a
5306 gdb::unique_xmalloc_ptr.
5307 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5308 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5309 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5310 returning a gdb::unique_xmalloc_ptr.
5311 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5312 * stack.c (find_frame_funname): Adjust to cp_remove_params
5313 returning a gdb::unique_xmalloc_ptr.
5315 2017-10-08 Tom Tromey <tom@tromey.com>
5317 * dwarf2read.c (dwarf2_get_dwz_file): Use
5318 gdb::unique_xmalloc_ptr.
5319 (find_slot_in_mapped_hash): Likewise.
5320 (dwarf2_physname): Likewise.
5321 (create_dwo_unit_in_dwp_v1): Use std::string.
5322 (create_dwo_unit_in_dwp_v2): Likewise.
5323 (lookup_dwo_cutu): Likewise.
5324 (inherit_abstract_dies): Use std::vector.
5325 (read_array_type): Likewise.
5326 (dwarf_decode_macros): Remove unused declaration.
5327 (unsigned_int_compar): Remove.
5328 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5329 (psymtabs_addrmap_cleanup): Remove.
5331 2017-10-08 Tom Tromey <tom@tromey.com>
5333 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5334 * frame.h (frame_cleanup_after_sniffer): Declare.
5335 (frame_prepare_for_sniffer): Return void.
5336 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5338 (frame_prepare_for_sniffer): Return void.
5340 2017-10-08 Tom Tromey <tom@tromey.com>
5342 * utils.h (make_cleanup_value_free): Remove.
5343 * utils.c (do_value_free, struct cleanup): Remove.
5344 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5346 * value.h (struct value_deleter): New.
5347 (gdb_value_up): New typedef.
5349 2017-10-08 Tom Tromey <tom@tromey.com>
5351 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5352 (make_cleanup_free_search_symbols): Remove.
5353 (search_symbols): Return std::vector.
5354 (symbol_search::compare_search_syms): Now member of
5355 symbol_search. Change arguments.
5356 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5357 (symtab_symbol_info, rbreak_command): Update.
5358 * symtab.h (struct symbol_search) <next>: Remove.
5360 (symbol_search::operator<): New function.
5361 (symbol_search::operator==): New function.
5362 (search_symbols): Remove std::vector.
5363 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5364 (symbol_search::compare_search_syms): Declare.
5366 2017-10-06 Yao Qi <yao.qi@linaro.org>
5368 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5369 arch/aarch64-insn.o.
5371 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5373 2017-10-06 Yao Qi <yao.qi@linaro.org>
5375 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5376 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5377 arch/arm-linux.o respectively.
5378 * configure.tgt: Likewise.
5380 2017-10-06 Yao Qi <yao.qi@linaro.org>
5382 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5383 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5385 2017-10-06 Pedro Alves <palves@redhat.com>
5387 * windows-nat.c: Include <algorithm>.
5389 2017-10-06 Yao Qi <yao.qi@linaro.org>
5391 * configure.tgt (i386_tobjs): New variable.
5392 (amd64_tobjs): New variable.
5393 Set $cpu_obs and $os_obs.
5395 2017-10-06 Yao Qi <yao.qi@linaro.org>
5397 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5398 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5399 (clean): Remove object files and dependency files.
5400 (distclean): Remove the directory.
5401 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5402 * configure: Re-generated.
5403 * configure.tgt: Replace amd64.o with arch/amd64.o.
5405 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5408 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5411 2017-10-05 Pedro Alves <palves@redhat.com>
5413 * linux-nat.c (linux_child_follow_fork): When following the parent
5414 and detaching the child, consult the parent thread's architecture
5415 instead of the child's.
5417 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5419 * ax.h: Do not include "doublest.h".
5420 (union agent_val): Remove.
5422 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5424 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5425 (decimal_to_string): Return std::string object.
5426 (decimal_from_string): Accept std::string object. Return bool.
5427 (decimal_from_integral, decimal_from_doublest): Remove.
5428 (decimal_from_longest): Add prototype.
5429 (decimal_from_ulongest): Likewise.
5430 (decimal_to_longest): Likewise.
5431 (decimal_from_doublest): Likewise.
5432 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5433 (MAX_DECIMAL_STRING): Move here.
5434 (decimal_to_string): Return std::string object.
5435 (decimal_from_string): Accept std::string object. Return bool.
5436 (decimal_from_integral): Remove, replace by ...
5437 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5438 (decimal_to_longest): New function.
5439 (decimal_from_floating): Remove, replace by ...
5440 (decimal_from_doublest): ... this new function.
5441 (decimal_to_doublest): Update to new decimal_to_string interface.
5443 * value.c (unpack_long): Use decimal_to_longest.
5444 * valops.c (value_cast): Use decimal_from_doublest instead of
5445 decimal_from_floating. Use decimal_from_[u]longest isntead of
5446 decimal_from_integral.
5447 * valarith.c (value_args_as_decimal): Likewise.
5448 * valprint.c (print_decimal_floating): Update to new
5449 decimal_to_string interface.
5450 * printcmd.c (printf_decfloat): Likewise.
5451 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5453 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5455 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5456 * gdbtypes.c: Include "floatformat.h".
5457 * value.c: Likewise.
5458 * m68k-tdep.c: Likewise.
5460 * findvar.c: Do not include "floatformat.h".
5461 * amd64-darwin-tdep.c: Likewise.
5462 * arm-linux-tdep.c: Likewise.
5463 * i386-darwin-tdep.c: Likewise.
5464 * i387-tdep.c: Likewise.
5465 * m68k-linux-tdep.c: Likewise.
5466 * mep-tdep.c: Likewise.
5467 * mips-tdep.c: Likewise.
5468 * nios2-tdep.c: Likewise.
5469 * s390-linux-tdep.c: Likewise.
5470 * sparc-obsd-tdep.c: Likewise.
5471 * sparc-tdep.c: Likewise.
5472 * sparc64-tdep.c: Likewise.
5473 * spu-tdep.c: Likewise.
5474 * tic6x-tdep.c: Likewise.
5475 * tilegx-tdep.c: Likewise.
5476 * vax-tdep.c: Likewise.
5477 * xstormy16-tdep.c: Likewise.
5478 * xtensa-tdep.c: Likewise.
5480 * top.c: Do not include "doublest.h".
5481 * aarch64-tdep.c: Likewise.
5482 * alpha-tdep.c: Likewise.
5483 * arm-linux-tdep.c: Likewise.
5484 * m68k-linux-tdep.c: Likewise.
5485 * tilegx-tdep.c: Likewise.
5486 * xstormy16-tdep.c: Likewise.
5488 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5490 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5491 (mipsn32_fbsd_sigframe): Define.
5492 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5493 for FreeBSD/mipsn32.
5495 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5497 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5500 2017-10-05 Tristan Gingold <tgingold@free.fr>
5502 * MAINTAINERS (Misc): Update my email address.
5504 2017-10-04 Pedro Alves <palves@redhat.com>
5506 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5507 it instead of target_gdbarch.
5508 (get_remote_state, get_remote_packet_size): Adjust
5509 get_remote_arch_state calls, passing down target_gdbarch
5511 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5512 'gdbarch' and use it instead of target_gdbarch.
5513 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5514 passing down target_gdbarch explicitly.
5515 (struct stop_reply) <arch>: New field.
5516 (remote_parse_stop_reply): Use the stopped thread's architecture,
5517 not the current inferior's. Save the architecture in the
5519 (process_stop_reply): Use the stop reply's architecture.
5520 (process_g_packet, remote_fetch_registers)
5521 (remote_prepare_to_store, store_registers_using_G)
5522 (remote_store_registers): Adjust get_remote_arch_state calls,
5523 using the regcache's architecture.
5524 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5525 passing down target_gdbarch explicitly.
5526 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5527 beneath instead of calling target_gdbarch.
5528 * target.c (default_thread_architecture): Use the specified
5529 inferior's architecture, instead of the current inferior's
5530 architecture (via target_gdbarch).
5532 2017-10-04 Pedro Alves <palves@redhat.com>
5534 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5536 (regcache_print): Handle !target_has_registers here instead.
5538 2017-10-04 Pedro Alves <palves@redhat.com>
5540 * frame.c (create_test_frame): Delete.
5541 * frame.h (create_test_frame): Delete.
5542 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5543 (class regcache_test): Delete.
5544 (test_target_has_registers, test_target_has_stack)
5545 (test_target_has_memory, test_target_prepare_to_store)
5546 (test_target_store_registers): New functions.
5547 (test_target_ops): New class.
5548 (register_to_value_test): Error out if there's already a
5549 process_stratum (or higher) target pushed. Create a fuller mock
5550 environment, with mock target_ops, inferior, address space, thread
5552 * progspace.c (struct address_space): Move to ...
5553 * progspace.h (struct address_space): ... here.
5554 * regcache.h (regcache::~regcache, regcache::raw_write)
5555 [GDB_SELF_TEST]: No longer virtual.
5557 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5559 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5561 2017-10-04 Pedro Alves <palves@redhat.com>
5563 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5564 out of 'between TRY and CATCH'.
5566 2017-10-04 Pedro Alves <palves@redhat.com>
5568 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5569 * common/common-exceptions.h (TRY): Open an outermost scope.
5570 Expand intro comment.
5572 (END_CATCH): Close the outermost scope.
5573 * completer.c (complete_line_internal): Add missing END_CATCH.
5575 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5577 * NEWS (Changes since GDB 8.0): Add entry about new
5578 'set-cwd-on-gdbserver' feature.
5579 (New remote packets): Add entry for QSetWorkingDir.
5580 * common/common-inferior.h (set_inferior_cwd): New prototype.
5581 * infcmd.c (set_inferior_cwd): Remove "static".
5582 (show_cwd_command): Expand text to include remote debugging.
5583 * remote.c: Add PACKET_QSetWorkingDir.
5584 (remote_protocol_features) <QSetWorkingDir>: New entry for
5585 PACKET_QSetWorkingDir.
5586 (extended_remote_set_inferior_cwd): New function.
5587 (extended_remote_create_inferior): Call
5588 "extended_remote_set_inferior_cwd".
5589 (_initialize_remote): Call "add_packet_config_cmd" for
5592 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5594 * NEWS (New commands): Mention "set/show cwd".
5595 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5596 "cd" command's help text.
5597 * common/common-inferior.h (get_inferior_cwd): New prototype.
5598 * infcmd.c (inferior_cwd_scratch): New global variable.
5599 (set_inferior_cwd): New function.
5600 (get_inferior_cwd): Likewise.
5601 (set_cwd_command): Likewise.
5602 (show_cwd_command): Likewise.
5603 (_initialize_infcmd): Add "set/show cwd" commands.
5604 * inferior.h (class inferior) <cwd>: New field.
5605 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5606 (fork_inferior): Change inferior's cwd before its execution.
5607 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5610 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5612 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5613 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5614 (COMMON_OBS): Add gdb_tilde_expand.o.
5615 * common/gdb_tilde_expand.c: New file.
5616 * common/gdb_tilde_expand.h: Likewise.
5618 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5620 * gdbarch.sh (objfile): Remove duplicate declaration.
5621 * gdbarch.h: Regenerate.
5623 2017-10-03 Tom Tromey <tom@tromey.com>
5625 * utils.c (internal_vproblem): Use string_vprintf.
5627 2017-10-03 Tom Tromey <tom@tromey.com>
5629 * printcmd.c (info_symbol_command): Use std::string.
5631 2017-10-03 Tom Tromey <tom@tromey.com>
5633 * top.c (gdb_safe_append_history): Use std::string.
5635 2017-10-03 Tom Tromey <tom@tromey.com>
5637 * event-top.c (stdin_event_handler): Update.
5638 * main.c (captured_main_1): Update.
5639 * top.h (make_delete_ui_cleanup): Remove.
5640 (struct ui): Add constructor and destructor.
5641 (new_ui, delete_ui): Remove.
5642 * top.c (make_delete_ui_cleanup): Remove.
5643 (new_ui_command): Use std::unique_ptr.
5644 (delete_ui_cleanup): Remove.
5645 (ui::ui): Rename from new_ui. Update.
5647 (ui::~ui): Rename from delete_ui. Update.
5649 2017-10-03 Tom Tromey <tom@tromey.com>
5651 * symfile.c (load_progress): Use gdb::byte_vector.
5653 2017-10-03 Tom Tromey <tom@tromey.com>
5655 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5657 * printcmd.c (x_command): Remove unused declaration.
5658 * symfile.c (symbol_file_command): Remove unused declaration.
5660 2017-10-03 Tom Tromey <tom@tromey.com>
5662 * utils.c (internal_vproblem): Use std::string.
5663 (defaulted_query): Likewise.
5665 2017-10-03 Tom Tromey <tom@tromey.com>
5667 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5668 * top.c (execute_command_to_string): Update.
5669 * utils.c (make_cleanup_restore_page_info): Remove.
5670 (do_restore_page_info_cleanup): Remove.
5671 (set_batch_flag_and_restore_page_info):
5673 (make_cleanup_restore_page_info): Remove.
5674 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5675 (~set_batch_flag_and_restore_page_info): New
5676 (make_cleanup_restore_uinteger): Remove.
5677 (make_cleanup_restore_integer): Remove.
5678 (struct restore_integer_closure): Remove.
5679 (restore_integer): Remove.
5680 * utils.h (struct set_batch_flag_and_restore_page_info): New
5682 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5683 (make_cleanup_restore_page_info): Remove.
5684 (make_cleanup_restore_uinteger) Remove.
5685 (make_cleanup_restore_integer) Remove.
5687 2017-10-03 Tom Tromey <tom@tromey.com>
5689 * record-full.h (record_full_gdb_operation_disable_set): Return
5690 scoped_restore_tmpl<int>.
5691 * infrun.c (adjust_pc_after_break): Update.
5692 (handle_signal_stop): Update.
5693 * record-full.c (record_full_gdb_operation_disable_set): Return
5694 scoped_restore_tmpl<int>.
5695 (record_full_wait_1, record_full_insert_breakpoint)
5696 (record_full_remove_breakpoint, record_full_save)
5697 (record_full_goto_insn): Update.
5699 2017-10-02 Tom Tromey <tom@tromey.com>
5702 * rust-lang.c (rust_val_print_str): New function.
5703 (val_print_struct): Call it.
5704 (rust_subscript): Preserve name of slice type.
5706 2017-10-02 Tom Tromey <tom@tromey.com>
5708 * rust-lang.c (rust_subscript): Handle slices in
5709 EVAL_AVOID_SIDE_EFFECTS case.
5711 2017-10-02 Tom Tromey <tom@tromey.com>
5713 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5715 2017-10-02 Tom Tromey <tom@tromey.com>
5717 * rust-lang.h (rust_slice_type): Add "extern".
5719 2017-10-02 Tom Tromey <tom@tromey.com>
5720 Pedro Alves <palves@redhat.com>
5722 * ada-lang.h (ada_exc_info::operator<): Make const.
5723 (ada_exc_info::operator==): Make const.
5724 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5727 2017-09-29 Tom Tromey <tom@tromey.com>
5729 * target.c (read_whatever_is_readable): Change type of "result".
5731 (free_memory_read_result_vector): Remove.
5732 (read_memory_robust): Change return type. Update.
5733 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5734 bin2hex, std::string.
5735 * target.h (memory_read_result_s): Remove typedef.
5736 (free_memory_read_result_vector): Remove.
5737 (read_memory_robust): Return std::vector.
5739 2017-09-29 Tom Tromey <tom@tromey.com>
5741 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5743 2017-09-29 Tom Tromey <tom@tromey.com>
5745 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5746 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5747 operator< and operator==.
5748 (ada_exceptions_list): Return a std::vector.
5749 * ada-lang.c (ada_exc_info::operator<): Rename from
5750 compare_ada_exception_info.
5751 (ada_exc_info::operator==): New.
5752 (sort_remove_dups_ada_exceptions_list): Change type of
5754 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5755 (ada_add_global_exceptions): Likewise.
5756 (ada_exceptions_list_1): Return a std::vector.
5757 (ada_exceptions_list): Likewise.
5759 2017-09-29 Tom Tromey <tom@tromey.com>
5761 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5763 (print_one_inferior): Update.
5764 (free_vector_of_ints): Remove.
5765 (list_available_thread_groups): Change "ids" to std::set.
5766 (mi_cmd_list_thread_groups): Update.
5767 (struct collect_cores_data) <core>: Now a std::set.
5768 (collect_cores): Update.
5770 (print_one_inferior): Update.
5772 2017-09-29 Tom Tromey <tom@tromey.com>
5774 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5775 (mi_execute_async_cli_command): Likewise.
5776 (mi_cmd_trace_frame_collected): Use field_fmt.
5778 2017-09-29 Tom Tromey <tom@tromey.com>
5780 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5783 2017-09-29 Tom Tromey <tom@tromey.com>
5785 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5787 2017-09-29 Tom Tromey <tom@tromey.com>
5789 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5791 2017-09-29 Tom Tromey <tom@tromey.com>
5793 * varobj.h (varobj_gen_name): Return std::string.
5794 * varobj.c (varobj_gen_name): Return std::string.
5795 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5796 (mi_cmd_var_delete): Don't copy "name".
5798 2017-09-29 Tom Tromey <tom@tromey.com>
5800 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5801 (mi_cmd_break_insert_1): Update.
5803 2017-09-29 Tom Tromey <tom@tromey.com>
5805 * target.h (make_scoped_defer_target_commit_resume): Update.
5806 * target.c (make_scoped_defer_target_commit_resume): Rename from
5807 make_cleanup_defer_target_commit_resume. Return a
5809 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5811 2017-09-29 Tom Tromey <tom@tromey.com>
5813 * main.c (captured_main_1): Remove unused declaration.
5814 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5816 2017-09-29 Tom Tromey <tom@tromey.com>
5818 * symtab.c (search_symbols): Remove unused outer cleanup.
5819 (make_source_files_completion_list): Remove unused declaration.
5821 2017-09-29 Tom Tromey <tom@tromey.com>
5823 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5825 2017-09-29 Tom Tromey <tom@tromey.com>
5827 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5830 2017-09-29 Tom Tromey <tom@tromey.com>
5832 * complaints.c (vcomplaint): Use std::string.
5834 2017-09-29 Tom Tromey <tom@tromey.com>
5836 * tracepoint.c (trace_variable_command): Use std::string.
5837 (encode_actions_1): Remove unused declarations.
5838 (create_tsv_from_upload): Use std::string.
5840 2017-09-29 Tom Tromey <tom@tromey.com>
5842 * cp-support.c (gdb_demangle): Use std::string.
5844 2017-09-29 Tom Tromey <tom@tromey.com>
5846 * stack.c (parse_frame_specification): Use std::string
5847 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5849 2017-09-29 Tom Tromey <tom@tromey.com>
5851 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5853 2017-09-29 Tom Tromey <tom@tromey.com>
5855 * utils.c (vfprintf_maybe_filtered): Use std::string.
5856 (vfprintf_unfiltered): Likewise.
5858 2017-09-29 Tom Tromey <tom@tromey.com>
5860 * event-top.c (top_level_prompt): Return std::string.
5861 (display_gdb_prompt): Update.
5863 2017-09-29 Tom Tromey <tom@tromey.com>
5865 * unittests/common-utils-selftests.c (format): New function.
5866 (string_vprintf_tests): New function.
5867 (_initialize_common_utils_selftests): Register new tests.
5868 * common/common-utils.c (string_vprintf): New function.
5869 * common/common-utils.h (string_vprintf): Declare.
5871 2017-09-29 Pedro Alves <palves@redhat.com>
5873 * common/rsp-low.c (unpack_varlen_hex): Constify.
5874 * common/rsp-low.h (unpack_varlen_hex): Constify.
5875 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5877 * remote.c (remote_set_permissions, read_ptid)
5878 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5879 (remote_static_tracepoint_marker_at)
5880 (remote_static_tracepoint_markers_by_strid)
5881 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5882 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5883 (parse_tracepoint_definition, parse_tsv_definition)
5884 (parse_static_tracepoint_marker_definition): Constify.
5885 * tracepoint.h (parse_static_tracepoint_marker_definition)
5886 (parse_trace_status, parse_tracepoint_status)
5887 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5889 2017-09-29 Pedro Alves <palves@redhat.com>
5891 * remote.c (target_buf, target_buf_size): Delete.
5892 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5893 Use the connection's packet buffer instead.
5894 All callers adjusted.
5895 (_initialize_remote): Remove references to target_buf and
5898 2017-09-28 Pedro Alves <palves@redhat.com>
5900 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5901 unittests/common-utils-selftests.c.
5902 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5903 (COMMON_OBS): Remove utils-selftests.o.
5904 * utils-selftests.c: Move to ...
5905 * unittests/common-utils-selftests.c: ... here and rename self
5906 test to "string_printf".
5908 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5910 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5911 having NULL cus or tus.
5913 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5915 * arm-tdep.c: (convert_from_extended): Remove.
5916 (convert_to_extended): Likewise.
5917 (arm_extract_return_value): Use convert_typed_floating.
5918 (arm_store_return_value): Likewise.
5920 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5921 * sh-tdep.c: Do not include "floatformat.h".
5922 (sh_littlebyte_bigword_type): New function.
5923 (sh_register_convert_to_virtual): Use convert_typed_floating.
5924 (sh_register_convert_to_raw): Likewise.
5925 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5926 (sh64_littlebyte_bigword_type): New function.
5927 (sh64_extract_return_value): Use convert_typed_floating.
5928 (sh64_register_convert_to_virtual): Likewise.
5929 (sh64_register_convert_to_raw): Likewise.
5931 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5933 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5934 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5936 * gdbtypes.h (union type_specific): Make field floatformat hold
5937 just a single struct floatformat, not an array.
5938 (floatformat_from_type): Move here.
5939 * gdbtypes.c (floatformat_from_type): Move here. Update to
5940 changed TYPE_FLOATFORMAT definition.
5941 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5942 (recursive_dump_type): Likewise.
5943 (init_float_type): Install correct floatformat for byte order.
5944 (arch_float_type): Likewise.
5946 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5948 * gdbtypes.c (init_type): Change incoming argument from
5949 length-in-bytes to length-in-bits. Assert length is a
5950 multiple of TARGET_CHAR_BITS.
5951 (arch_type, arch_flags_type): Likewise.
5952 (init_integer_type): Update call to init_type.
5953 (init_character_type): Likewise.
5954 (init_boolean_type): Likewise.
5955 (init_float_type): Likewise.
5956 (init_decfloat_type): Likewise.
5957 (init_complex_type): Likewise.
5958 (init_pointer_type): Likewise.
5959 (objfile_type): Likewise.
5960 (arch_integer_type): Update call to arch_type.
5961 (arch_character_type): Likewise.
5962 (arch_boolean_type): Likewise.
5963 (arch_float_type): Likewise.
5964 (arch_decfloat_type): Likewise.
5965 (arch_complex_type): Likewise.
5966 (arch_pointer_type): Likewise.
5967 (gdbtypes_post_init): Likewise.
5969 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5970 (read_base_type): Likewise.
5971 * mdebugread.c (basic_type): Likewise.
5972 * stabsread.c (dbx_init_float_type): Likewise.
5973 (rs6000_builtin_type): Likewise.
5974 (read_range_type): Likewise. Also, fix call to init_integer_type
5975 with erroneous length argument.
5977 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5978 * d-lang.c (build_d_types): Likewise.
5979 * f-lang.c (build_fortran_types): Likewise.
5980 * go-lang.c (build_go_types): Likewise.
5981 * opencl-lang.c (build_opencl_types): Likewise.
5982 * jit.c (finalize_symtab): Likewise.
5983 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5984 (build_std_type_info_type): Likewise.
5985 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5986 update call to arch_flags_type.
5988 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5990 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5991 * windows-tdep.c (windows_get_tlb_type): Likewise.
5993 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5994 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5995 * m32c-tdep.c (make_types): Likewise.
5996 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5997 (rl78_psw_type): Update call to arch_flags_type.
5998 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5999 * rx-tdep.c (rx_psw_type): Likewise.
6000 (rx_fpsw_type): Likewise.
6001 * sparc-tdep.c (sparc_psr_type): Likewise.
6002 (sparc_fsr_type): Likewise.
6003 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6004 (sparc64_ccr_type): Likewise.
6005 (sparc64_fsr_type): Likewise.
6006 (sparc64_fprs_type): Likewise.
6008 2017-09-27 Tom Tromey <tom@tromey.com>
6010 * findcmd.c (find_command): Constify.
6012 2017-09-27 Tom Tromey <tom@tromey.com>
6014 * ada-tasks.c (task_command_1, task_command): Constify.
6016 2017-09-27 Tom Tromey <tom@tromey.com>
6018 * symtab.c (maintenance_print_symbol_cache)
6019 (maintenance_flush_symbol_cache)
6020 (maintenance_print_symbol_cache_statistics): Constify.
6022 2017-09-27 Tom Tromey <tom@tromey.com>
6024 * inferior.c (detach_inferior_command, kill_inferior_command)
6025 (inferior_command): Constify.
6027 2017-09-27 Tom Tromey <tom@tromey.com>
6029 * regcache.c (regcache_print, maintenance_print_registers)
6030 (maintenance_print_raw_registers)
6031 (maintenance_print_cooked_registers)
6032 (maintenance_print_register_groups)
6033 (maintenance_print_remote_registers): Constify.
6035 2017-09-27 Tom Tromey <tom@tromey.com>
6037 * printcmd.c (map_display_numbers, undisplay_command)
6038 (enable_disable_display_command, enable_display_command)
6039 (disable_display_command): Constify.
6041 2017-09-27 Tom Tromey <tom@tromey.com>
6043 * breakpoint.h (delete_command): Don't declare.
6044 * breakpoint.c (delete_command, enable_once_command)
6045 (enable_count_command, enable_delete_command, breakpoint_1)
6046 (maintenance_info_breakpoints, stopin_command, stopat_command)
6047 (delete_command, delete_trace_command, save_breakpoints)
6048 (save_breakpoints_command, save_tracepoints_command): Constify.
6050 2017-09-27 Tom Tromey <tom@tromey.com>
6052 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6053 (skip_ws, extract_identifier, macro_define_command)
6054 (macro_undef_command, macro_list_command): Constify.
6056 2017-09-27 Tom Tromey <tom@tromey.com>
6058 * infcmd.c (environment_info, set_environment_command)
6059 (unset_environment_command, path_info, info_proc_cmd_1)
6060 (info_proc_cmd_mappings, info_proc_cmd_stat)
6061 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6062 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6064 2017-09-27 Tom Tromey <tom@tromey.com>
6066 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6069 2017-09-27 Tom Tromey <tom@tromey.com>
6071 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6073 2017-09-27 Tom Tromey <tom@tromey.com>
6075 * demangle.c (demangle_command): Constify.
6077 2017-09-27 Tom Tromey <tom@tromey.com>
6079 * progspace.c (maintenance_info_program_spaces_command):
6082 2017-09-27 Tom Tromey <tom@tromey.com>
6084 * compile/compile.c (check_raw_argument, compile_file_command)
6085 (compile_code_command, compile_print_command): Constify.
6087 2017-09-27 Tom Tromey <tom@tromey.com>
6089 * reggroups.c (maintenance_print_reggroups): Constify.
6091 2017-09-27 Tom Tromey <tom@tromey.com>
6093 * dwarf2read.c (save_gdb_index_command): Constify.
6095 2017-09-27 Tom Tromey <tom@tromey.com>
6097 * stap-probe.c (info_probes_stap_command): Constify.
6099 2017-09-27 Tom Tromey <tom@tromey.com>
6101 * fork-child.c (unset_exec_wrapper_command): Constify.
6103 2017-09-27 Tom Tromey <tom@tromey.com>
6105 * btrace.c (get_uint, get_context_size, no_chunk)
6106 (maint_btrace_packet_history_cmd)
6107 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6108 (maint_info_btrace_cmd): Constify.
6110 2017-09-27 Tom Tromey <tom@tromey.com>
6112 * reverse.c (delete_bookmark_command): Constify.
6114 2017-09-27 Tom Tromey <tom@tromey.com>
6116 * remote.c (set_memory_packet_size)
6117 (set_memory_write_packet_size, show_memory_write_packet_size)
6118 (set_memory_read_packet_size, show_memory_read_packet_size)
6119 (compare_sections_command, packet_command, remote_put_command)
6120 (remote_get_command, remote_delete_command): Constify.
6122 2017-09-27 Tom Tromey <tom@tromey.com>
6124 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6125 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6126 (set_mipsfpu_auto_command): Constify.
6128 2017-09-27 Tom Tromey <tom@tromey.com>
6130 * cli/cli-cmds.h (cd_command): Constify.
6131 * cli/cli-cmds.c (cd_command): Constify.
6133 2017-09-27 Tom Tromey <tom@tromey.com>
6135 * thread.c (thread_name_command, thread_find_command): Constify.
6137 2017-09-27 Tom Tromey <tom@tromey.com>
6139 * probe.c (enable_probes_command, disable_probes_command):
6142 2017-09-27 Tom Tromey <tom@tromey.com>
6144 * symfile.c (symbol_file_command): Constify.
6145 * gdbcore.h (deprecated_file_changed_hook): Constify.
6146 * exec.c (deprecated_file_changed_hook, exec_file_command)
6147 (file_command): Constify.
6148 * defs.h (symbol_file_command): Constify.
6150 2017-09-27 Tom Tromey <tom@tromey.com>
6152 * remote-fileio.c (set_system_call_allowed)
6153 (show_system_call_allowed): Constify.
6155 2017-09-27 Tom Tromey <tom@tromey.com>
6157 * tracepoint.c (delete_trace_variable_command)
6158 (tfind_end_command, tfind_start_command, tfind_pc_command)
6159 (tfind_tracepoint_command, tfind_line_command)
6160 (tfind_range_command, tfind_outside_command): Constify.
6162 2017-09-27 Tom Tromey <tom@tromey.com>
6164 * ax-gdb.c (maint_agent_printf_command, agent_command)
6165 (agent_eval_command): Constify.
6167 2017-09-27 Tom Tromey <tom@tromey.com>
6169 * tracepoint.c (info_scope_command): Constify.
6170 * python/python.c (gdbpy_decode_line): Constify.
6171 * python/py-breakpoint.c (bppy_init): Constify.
6172 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6173 * location.h: (new_linespec_location)
6174 (string_to_event_location_basic, string_to_event_location):
6176 * location.c (new_linespec_location)
6177 (string_to_event_location_basic, string_to_event_location):
6179 * linespec.h (decode_line_with_current_source)
6180 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6181 * linespec.c (linespec_lex_to_end)
6182 (decode_line_with_current_source)
6183 (decode_line_with_last_displayed): Constify.
6184 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6186 * cli/cli-cmds.c (edit_command, list_command): Constify.
6187 * breakpoint.h (until_break_command, watch_command_wrapper)
6188 (awatch_command_wrapper, rwatch_command_wrapper)
6189 (init_ada_exception_breakpoint): Constify.
6190 * breakpoint.c (break_command_1, dprintf_command)
6191 (break_range_command, watch_command_wrapper)
6192 (rwatch_command_wrapper, awatch_command_wrapper)
6193 (until_break_command, init_ada_exception_breakpoint)
6194 (strace_marker_create_sals_from_location, trace_command)
6195 (ftrace_command, strace_command, struct tracepoint): Constify.
6196 * ax-gdb.c (agent_command_1): Constify.
6197 * ada-lang.c (ada_exception_sal): Constify.
6199 2017-09-27 Tom Tromey <tom@tromey.com>
6201 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6202 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6203 (get_context_size, no_chunk, get_insn_history_modifiers)
6204 (cmd_record_insn_history, get_call_history_modifiers)
6205 (cmd_record_call_history): Constify.
6207 2017-09-27 Tom Tromey <tom@tromey.com>
6209 * source.c (show_substitute_path_command)
6210 (unset_substitute_path_command, set_substitute_path_command):
6213 2017-09-27 Tom Tromey <tom@tromey.com>
6215 * typeprint.c (maintenance_print_type): Constify.
6216 * maint.c (maintenance_dump_me, maintenance_demangle)
6217 (maintenance_time_display, maintenance_info_sections)
6218 (maintenance_print_statistics, maintenance_deprecate)
6219 (maintenance_undeprecate): Constify.
6220 (maintenance_do_deprecate): Constify. Use std::string.
6221 (maintenance_selftest): Constify.
6222 * gdbtypes.h (maintenance_print_type): Constify.
6224 2017-09-27 Tom Tromey <tom@tromey.com>
6226 * hppa-tdep.c (unwind_command): Constify.
6228 2017-09-27 Tom Tromey <tom@tromey.com>
6230 * target-descriptions.c (unset_tdesc_filename_cmd)
6231 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6234 2017-09-27 Tom Tromey <tom@tromey.com>
6236 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6238 2017-09-27 Tom Tromey <tom@tromey.com>
6240 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6242 2017-09-27 Tom Tromey <tom@tromey.com>
6244 * tui/tui-regs.c (tui_reg_command): Constify.
6246 2017-09-27 Tom Tromey <tom@tromey.com>
6248 * skip.c (skip_file_command, skip_function_command)
6249 (skip_enable_command, skip_disable_command, skip_delete_command):
6252 2017-09-27 Tom Tromey <tom@tromey.com>
6254 * record-btrace.c (cmd_record_btrace_bts_start)
6255 (cmd_record_btrace_pt_start): Constify.
6257 2017-09-27 Tom Tromey <tom@tromey.com>
6259 * symmisc.c (maintenance_print_symbols)
6260 (maintenance_print_msymbols, maintenance_print_objfiles)
6261 (maintenance_info_symtabs, maintenance_check_symtabs)
6262 (maintenance_expand_symtabs, maintenance_info_line_tables):
6265 2017-09-27 Tom Tromey <tom@tromey.com>
6267 * top.c (new_ui_command): Constify.
6269 2017-09-27 Tom Tromey <tom@tromey.com>
6271 * symfile.c (add_symbol_file_command)
6272 (remove_symbol_file_command, list_overlays_command)
6273 (map_overlay_command, unmap_overlay_command)
6274 (overlay_auto_command, overlay_manual_command)
6275 (overlay_off_command, overlay_load_command): Constify.
6277 2017-09-27 Tom Tromey <tom@tromey.com>
6279 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6280 (info_spu_mailbox_command, info_spu_dma_command)
6281 (info_spu_proxydma_command): Constify.
6283 2017-09-27 Tom Tromey <tom@tromey.com>
6285 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6287 2017-09-27 Tom Tromey <tom@tromey.com>
6289 * cli/cli-script.c (user_defined_command): Constify.
6291 2017-09-27 Tom Tromey <tom@tromey.com>
6293 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6294 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6295 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6296 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6297 (dump_binary_value, append_binary_memory, append_binary_value):
6299 (struct dump_context) <func>: Constify.
6300 (add_dump_command): Update.
6302 2017-09-27 Tom Tromey <tom@tromey.com>
6304 * cli/cli-cmds.c (show_version, show_configuration)
6305 (source_command, show_user): Constify.
6307 2017-09-27 Tom Tromey <tom@tromey.com>
6309 * target.c (maintenance_print_target_stack): Constify.
6311 2017-09-27 Tom Tromey <tom@tromey.com>
6313 * interps.c (interpreter_exec_cmd): Constify.
6315 2017-09-27 Tom Tromey <tom@tromey.com>
6317 * record-full.c (cmd_record_full_restore): Constify.
6319 2017-09-27 Tom Tromey <tom@tromey.com>
6321 * memattr.c (enable_mem_command, disable_mem_command)
6322 (delete_mem_command): Constify.
6324 2017-09-27 Tom Tromey <tom@tromey.com>
6326 * value.c (show_convenience): Constify.
6328 2017-09-27 Tom Tromey <tom@tromey.com>
6330 * gdbcore.h (core_file_command): Update.
6331 * corefile.c (core_file_command): Constify.
6333 2017-09-27 Tom Tromey <tom@tromey.com>
6335 * user-regs.c (maintenance_print_user_registers): Constify.
6337 2017-09-27 Tom Tromey <tom@tromey.com>
6339 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6341 2017-09-27 Tom Tromey <tom@tromey.com>
6343 * cp-support.c (first_component_command): Constify.
6345 2017-09-27 Tom Tromey <tom@tromey.com>
6347 * psymtab.c (maintenance_print_psymbols)
6348 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6351 2017-09-27 Tom Tromey <tom@tromey.com>
6353 * windows-tdep.c (display_tib): Constify.
6355 2017-09-27 Tom Tromey <tom@tromey.com>
6357 * linux-fork.c (delete_checkpoint_command)
6358 (detach_checkpoint_command): Constify.
6360 2017-09-27 Tom Tromey <tom@tromey.com>
6362 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6364 2017-09-27 Tom Tromey <tom@tromey.com>
6366 * arc-tdep.c (dump_arc_instruction_command): Constify.
6368 2017-09-27 Tom Tromey <tom@tromey.com>
6370 * valprint.c (set_radix, show_radix): Constify.
6372 2017-09-27 Tom Tromey <tom@tromey.com>
6374 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6376 2017-09-27 Tom Tromey <tom@tromey.com>
6378 * command.h (not_just_help_class_command): Update.
6379 * cli/cli-decode.h (not_just_help_class_command): Update.
6380 * cli/cli-decode.c (not_just_help_class_command): Constify.
6382 2017-09-27 Tom Tromey <tom@tromey.com>
6384 * gdb_bfd.c (maintenance_info_bfds): Constify.
6386 2017-09-27 Tom Tromey <tom@tromey.com>
6388 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6390 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6391 (do_const_cfunc): New function.
6392 (cmd_cfunc_eq): New overload.
6393 (cli_user_command_p): Check do_const_cfunc.
6394 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6396 * command.h (add_cmd): Add const overload and no-function
6398 (set_cmd_cfunc): Add const overload.
6399 (cmd_const_cfunc_ftype): Declare.
6400 (cmd_cfunc_eq): Add const overload.
6401 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6402 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6405 2017-09-27 Tom Tromey <tom@tromey.com>
6407 * macroexp.c (get_next_token_for_substitution): New function.
6408 (substitute_args): Call it. Check for __VA_OPT__.
6410 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6411 Pedro Alves <palves@redhat.com>
6413 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6414 producer_is_icc_lt_14.
6415 (producer_is_icc_lt_14): New function.
6416 (check_producer): Add code for checking version of ICC.
6417 (producer_is_icc): Move to producer.c.
6418 (read_structure_type): Restrict ICC workaround to ICC<14.
6419 * producer.c: Include selftest.h.
6420 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6422 * producer.h (producer_is_icc): New declaration.
6424 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6426 * Makefile.in (SFILES): Add producer.c.
6427 (COMMON_OBS): Add producer.o
6428 * amd64-tdep.c (producer.h): Add new include.
6429 * dwarf2read.c (producer.h): Add new include.
6430 * producer.c: New file.
6431 * producer.h: New file.
6432 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6434 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6437 2017-09-26 Matthias Klose <doko@ubuntu.com>
6439 * configure.ac: Search ncursesw before ncurses.
6440 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6441 * gdb_curses.h: Include <ncursesw/ncurses.h>
6442 * config.in, configure: Regenerate.
6444 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6447 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6449 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6450 Remove i386sol2 support.
6451 * configure.nat <i386sol2>: Remove.
6452 <sol2-64>: Fold into ...
6454 Move common settings to default section.
6456 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6457 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6458 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6459 <i[34567]86-*-solaris*>: Remove.
6460 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6462 * configure.ac: Remove wctype in libw check.
6463 (_MSE_INT_H): Don't define on Solaris 7-9.
6464 <solaris*>: Remove libthread_db.so.1 check.
6465 * configure: Regenerate.
6466 * config.in: Regenerate.
6468 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6469 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6470 (gdb_ps_size_t): Remove.
6471 Use base types in users.
6472 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6474 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6476 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6479 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6480 (adi_is_addr_mapped): Likewise.
6481 (PSR_ICC): Don't redefine.
6482 (PSR_IMPL): Likewise.
6484 2017-09-25 Tom Tromey <tom@tromey.com>
6486 * regcache.c (regcache::dump): Use string_printf.
6488 2017-09-25 Tom Tromey <tom@tromey.com>
6490 * regcache.c (class regcache_invalidator): New.
6491 (struct register_to_invalidate): Remove.
6492 (make_cleanup_regcache_invalidate): Remove.
6493 (regcache::raw_write): Use regcache_invalidator.
6495 2017-09-25 Tom Tromey <tom@tromey.com>
6497 * spu-tdep.c (spu2ppu_sniffer): Update.
6498 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6499 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6501 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6502 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6503 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6504 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6505 (frame_pop): Update.
6507 2017-09-25 Tom Tromey <tom@tromey.com>
6509 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6510 * regcache.h (regcache_xfree): Don't declare.
6511 * regcache.c (regcache_xfree): Remove.
6512 (do_regcache_xfree): Use delete.
6513 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6514 * linux-fork.c (free_fork): Use delete.
6515 (fork_save_infrun_state): Likewise.
6516 * jit.c (jit_dealloc_cache): Use delete.
6517 * infrun.c (discard_infcall_suspend_state): Use delete.
6519 2017-09-25 Tom Tromey <tom@tromey.com>
6521 * regcache.h (regcache_xmalloc): Don't declare.
6522 (regcache_raw_set_cached_value): Update comment.
6523 * regcache.c (regcache_xmalloc): Remove.
6524 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6525 * jit.c (jit_frame_sniffer): Use new.
6526 * frame.c (frame_save_as_regcache): Use new.
6528 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6530 * NEWS: Advertise support for guarded-storage registers on IBM z.
6532 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6534 * s390-linux-nat.c (have_regset_gs): New static variable.
6535 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6536 control block and guarded-storage broadcast control regsets.
6537 (s390_read_description): Detect whether the target has
6538 guarded-storage support, return appropriate tdesc.
6539 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6540 (features/s390x-gs-linux64.c): Likewise.
6541 (struct gdbarch_tdep) <have_gs>: New field.
6542 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6543 (s390_gsbc_regset): New variables.
6544 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6545 and s390_gsbc_regset, if applicable.
6546 (s390_core_read_description): Check whether core file was from a
6547 target with guarded-storage support; include appropriate regsets.
6548 (s390_gdbarch_init): Add registers for guarded-storage support.
6549 (_initialize_s390_tdep): Initialize new target descriptions that
6550 include registers for guarded-storage support.
6551 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6552 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6553 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6554 (S390_NUM_REGS): Adjust macro definition.
6555 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6556 (tdesc_s390x_gs_linux64): New declarations.
6558 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6560 * features/s390-gs-linux64.xml: New file.
6561 * features/s390-gs.xml: New file.
6562 * features/s390-gsbc.xml: New file.
6563 * features/s390x-gs-linux64.xml: New file.
6564 * features/Makefile (WHICH): Add s390-gs-linux64 and
6566 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6567 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6568 * features/s390-gs-linux64.c: New generated file.
6569 * features/s390x-gs-linux64.c: New file.
6570 * regformats/s390-gs-linux64.dat: New file.
6571 * regformats/s390x-gs-linux64.dat: New file.
6573 2017-09-23 Tom Tromey <tom@tromey.com>
6575 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6577 2017-09-22 Tom Tromey <tom@tromey.com>
6579 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6580 type to scoped_restore_tmpl.
6581 <scoped_input_handler>: Initialize m_quit_handler directly.
6583 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6585 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6586 (cd_command): Likewise. Free "current_directory" before
6588 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6589 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6590 * top.c (gdb_dirbuf): Remove global declaration.
6591 * top.h (gdb_dirbuf): Likewise.
6593 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6595 * gnulib/aclocal.m4: Regenerate.
6596 * gnulib/config.in: Regenerate.
6597 * gnulib/configure: Regenerate.
6598 * gnulib/import/Makefile.am: Regenerate.
6599 * gnulib/import/Makefile.in: Regenerate.
6600 * gnulib/import/assure.h: New file.
6601 * gnulib/import/at-func.c: Likewise
6602 * gnulib/import/chdir-long.c: New file.
6603 * gnulib/import/chdir-long.h: New file.
6604 * gnulib/import/cloexec.c: New file.
6605 * gnulib/import/cloexec.h: New file.
6606 * gnulib/import/close.c: New file.
6607 * gnulib/import/closedir.c: New file.
6608 * gnulib/import/dirent-private.h: New file.
6609 * gnulib/import/dup-safer.c: New file.
6610 * gnulib/import/dup.c: New file.
6611 * gnulib/import/dup2.c: New file.
6612 * gnulib/import/error.c: New file.
6613 * gnulib/import/error.h: New file.
6614 * gnulib/import/exitfail.c: New file.
6615 * gnulib/import/exitfail.h: New file.
6616 * gnulib/import/fchdir.c: New file.
6617 * gnulib/import/fcntl.c: New file.
6618 * gnulib/import/fcntl.in.h: New file.
6619 * gnulib/import/fd-hook.c: New file.
6620 * gnulib/import/fd-hook.h: New file.
6621 * gnulib/import/fd-safer.c: New file.
6622 * gnulib/import/fdopendir.c: New file.
6623 * gnulib/import/filename.h: New file.
6624 * gnulib/import/filenamecat-lgpl.c: New file.
6625 * gnulib/import/filenamecat.h: New file.
6626 * gnulib/import/fstat.c: New file.
6627 * gnulib/import/fstatat.c: New file.
6628 * gnulib/import/getcwd-lgpl.c: New file.
6629 * gnulib/import/getcwd.c: New file.
6630 * gnulib/import/getdtablesize.c: New file.
6631 * gnulib/import/getlogin_r.c: New file.
6632 * gnulib/import/getprogname.c: New file.
6633 * gnulib/import/getprogname.h: New file.
6634 * gnulib/import/gettext.h: New file.
6635 * gnulib/import/glob-libc.h: New file.
6636 * gnulib/import/glob.c: New file.
6637 * gnulib/import/glob.in.h: New file.
6638 * gnulib/import/intprops.h: New file.
6639 * gnulib/import/m4/chdir-long.m4: New file.
6640 * gnulib/import/m4/close.m4: New file.
6641 * gnulib/import/m4/closedir.m4: New file.
6642 * gnulib/import/m4/d-ino.m4: New file.
6643 * gnulib/import/m4/d-type.m4: New file.
6644 * gnulib/import/m4/dup.m4: New file.
6645 * gnulib/import/m4/dup2.m4: New file.
6646 * gnulib/import/m4/error.m4: New file.
6647 * gnulib/import/m4/fchdir.m4: New file.
6648 * gnulib/import/m4/fcntl.m4: New file.
6649 * gnulib/import/m4/fcntl_h.m4: New file.
6650 * gnulib/import/m4/fdopendir.m4: New file.
6651 * gnulib/import/m4/filenamecat.m4: New file.
6652 * gnulib/import/m4/fstat.m4: New file.
6653 * gnulib/import/m4/fstatat.m4: New file.
6654 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6655 * gnulib/import/m4/getcwd-path-max.m4: New file.
6656 * gnulib/import/m4/getcwd.m4: New file.
6657 * gnulib/import/m4/getdtablesize.m4: New file.
6658 * gnulib/import/m4/getlogin_r.m4: New file.
6659 * gnulib/import/m4/getprogname.m4: New file.
6660 * gnulib/import/m4/glob.m4: New file.
6661 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6662 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6663 * gnulib/import/m4/mempcpy.m4: New file.
6664 * gnulib/import/m4/memrchr.m4: New file.
6665 * gnulib/import/m4/mode_t.m4: New file.
6666 * gnulib/import/m4/msvc-inval.m4: New file.
6667 * gnulib/import/m4/msvc-nothrow.m4: New file.
6668 * gnulib/import/m4/open.m4: New file.
6669 * gnulib/import/m4/openat.m4: New file.
6670 * gnulib/import/m4/opendir.m4: New file.
6671 * gnulib/import/m4/readdir.m4: New file.
6672 * gnulib/import/m4/realloc.m4: New file.
6673 * gnulib/import/m4/rewinddir.m4: New file.
6674 * gnulib/import/m4/save-cwd.m4: New file.
6675 * gnulib/import/m4/strdup.m4: New file.
6676 * gnulib/import/m4/strerror.m4: New file.
6677 * gnulib/import/m4/unistd-safer.m4: New file.
6678 * gnulib/import/mempcpy.c: New file.
6679 * gnulib/import/memrchr.c: New file.
6680 * gnulib/import/msvc-inval.c: New file.
6681 * gnulib/import/msvc-inval.h: New file.
6682 * gnulib/import/msvc-nothrow.c: New file.
6683 * gnulib/import/msvc-nothrow.h: New file.
6684 * gnulib/import/open.c: New file.
6685 * gnulib/import/openat-die.c: New file.
6686 * gnulib/import/openat-priv.h: New file.
6687 * gnulib/import/openat-proc.c: New file.
6688 * gnulib/import/openat.c: New file.
6689 * gnulib/import/openat.h: New file.
6690 * gnulib/import/opendir.c: New file.
6691 * gnulib/import/pipe-safer.c: New file.
6692 * gnulib/import/readdir.c: New file.
6693 * gnulib/import/realloc.c: New file.
6694 * gnulib/import/rewinddir.c: New file.
6695 * gnulib/import/save-cwd.c: New file.
6696 * gnulib/import/save-cwd.h: New file.
6697 * gnulib/import/strdup.c: New file.
6698 * gnulib/import/strerror-override.c: New file.
6699 * gnulib/import/strerror-override.h: New file.
6700 * gnulib/import/strerror.c: New file.
6701 * gnulib/import/unistd--.h: New file.
6702 * gnulib/import/unistd-safer.h: New file.
6703 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6704 "getcwd" and "glob".
6705 * ser-tcp.c: Undefine "close" before redefining it.
6707 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6709 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6712 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6714 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6715 <sol2,sparc>: Likewise.
6716 <sol2-64,i386>: Likewise.
6718 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6719 -Wdeprecated-declarations on *-*-solaris*.
6720 * configure: Regenerate.
6722 * procfs.c: Include "nat/inferior.h".
6723 (procfs_info_proc): Fix typo.
6725 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6727 * remote.c (vector): Include.
6728 (struct private_thread_info): Add field, thread_handle.
6729 (free_private_thread_info): Deallocate storage associated with
6731 (get_private_info_thread): Initialize `thread_handle' field.
6732 (struct thread_item): Add field, thread_handle.
6733 (clear_threads_listing_context): Deallocate storage associated
6735 (start_thread): Add support for "handle" attribute.
6736 (thread_attributes): Add "handle".
6737 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6739 (remote_update_thread_list): Update thread_handle.
6740 (remote_thread_handle_to_thread_info): New function.
6741 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6743 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6745 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6747 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6748 * python/python-internal.h (thread_object_type): Declare.
6750 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6752 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6753 (target_thread_handle_to_thread_info): Declare.
6754 * target.c (target_thread_handle_to_thread_info): New function.
6755 * target-delegates.c: Regenerate.
6756 * gdbthread.h (find_thread_by_handle): Declare.
6757 * thread.c (find_thread_by_handle): New function.
6758 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6760 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6762 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6764 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6766 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6768 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6770 2017-09-21 Yao Qi <yao.qi@linaro.org>
6772 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6775 2017-09-20 Tom Tromey <tom@tromey.com>
6777 * breakpoint.c (struct counted_command_line): Remove.
6778 (breakpoint_commands): Update.
6779 (alloc_counted_command_line, incref_counted_command_line)
6780 (decref_counted_command_line, do_cleanup_counted_command_line)
6781 (make_cleanup_decref_counted_command_line): Remove.
6782 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6783 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6784 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6785 (save_breakpoints): Update.
6786 * breakpoint.h (counted_command_line): Now a typedef to
6788 (struct breakpoint) <commands>: Now a counted_command_line.
6789 (struct bpstats) <command>: Likewise.
6791 2017-09-20 Tom Tromey <tom@tromey.com>
6793 * breakpoint.c (struct commands_info, do_map_commands_command):
6795 (commands_command_1): Update.
6796 (iterate_over_related_breakpoints): Take a function_view.
6797 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6798 (delete_command): Update.
6799 (map_breakpoint_numbers): Take a function_view.
6800 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6801 (disable_command): Update.
6802 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6803 (enable_command): Update.
6804 (struct disp_data, do_enable_breakpoint_disp)
6805 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6806 (do_map_enable_delete_breakpoint): Remove.
6807 (enable_once_command, enable_count_command, enable_delete_command)
6808 (delete_trace_variable_command): Update.
6810 2017-09-20 Tom Tromey <tom@tromey.com>
6812 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6813 (bpstat_clear): Use delete.
6814 (bpstats): New constructors.
6815 (bpstat_copy, bpstat_stop_status): Use new.
6816 (dprintf_after_condition_true): Update.
6817 * breakpoint.h (bpstats::bpstats): Add constructors.
6818 (bpstats::~bpstats): Add destructor.
6820 2017-09-20 Pedro Alves <palves@redhat.com>
6822 * eval.c (make_params): Delete, refactored as ...
6823 (class fake_method): ... this new type's ctor.
6824 (fake_method::~fake_method): New.
6825 (evaluate_subexp_standard): Use 'fake_method'.
6827 2017-09-20 Tom Tromey <tom@tromey.com>
6829 * windows-nat.c (get_windows_debug_event, windows_wait)
6830 (do_initial_windows_stuff, windows_attach): Update.
6831 * utils.c (vwarning, internal_vproblem): Update.
6832 (ui_unregister_input_event_handler_cleanup)
6833 (prepare_to_handle_input): Remove.
6834 (class scoped_input_handler): New.
6835 (defaulted_query, prompt_for_continue): Update.
6836 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6838 * top.c (undo_terminal_modifications_before_exit): Update.
6839 * target/target.h (target_terminal_init, target_terminal_inferior)
6840 (target_terminal_ours): Don't declare.
6841 (class target_terminal): New.
6842 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6843 (target_terminal_ours_for_output)
6844 (make_cleanup_restore_target_terminal): Don't declare.
6845 (target_terminal_info): Remove.
6846 * target.c (enum terminal_state, terminal_state): Remove.
6847 (target_terminal::terminal_state): Define.
6848 (target_terminal::init): Rename from target_terminal_init.
6849 (target_terminal::inferior): Rename from
6850 target_terminal_inferior.
6851 (target_terminal::ours): Rename from target_terminal_ours.
6852 (target_terminal::ours_for_output): Rename from
6853 target_terminal_ours_for_output.
6854 (target_terminal::info): New method.
6855 (cleanup_restore_target_terminal)
6856 (make_cleanup_restore_target_terminal): Remove.
6857 * solib.c (handle_solib_event): Update.
6858 * remote.c (remote_serial_quit_handler): Update.
6859 (remote_terminal_inferior, remote_wait_as): Update.
6860 * record-full.c (record_full_wait_1): Update.
6861 * nto-procfs.c (procfs_create_inferior): Update.
6862 * nat/fork-inferior.c (startup_inferior): Update.
6863 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6864 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6865 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6866 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6867 (mi_breakpoint_created, mi_breakpoint_deleted)
6868 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6869 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6870 (mi_user_selected_context_changed, report_initial_inferior):
6872 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6873 (linux_nat_terminal_inferior): Update.
6874 * infrun.c (follow_fork_inferior)
6875 (handle_vfork_child_exec_or_exit, do_target_resume)
6876 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6877 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6879 * inflow.c (child_terminal_init, info_terminal_command): Update.
6880 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6881 (attach_command): Update.
6882 * infcall.c (call_thread_fsm_should_stop): Update.
6883 * gnu-nat.c (gnu_attach): Update.
6884 * extension.c (struct active_ext_lang_state)
6885 (restore_active_ext_lang): Update.
6886 * exceptions.c (print_flush): Update.
6887 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6888 (struct quit_handler_cleanup_data, restore_quit_handler)
6889 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6891 * cp-support.c (gdb_demangle): Update.
6892 * breakpoint.c (update_inserted_breakpoint_locations)
6893 (insert_breakpoint_locations, handle_jit_event)
6894 (disable_breakpoints_in_unloaded_shlib): Update.
6895 * annotate.c (annotate_breakpoints_invalid)
6896 (annotate_frames_invalid): Update.
6898 2017-09-20 Tom Tromey <tom@tromey.com>
6900 * main.c (catch_command_errors): Rename from
6901 catch_command_errors_const.
6902 (captured_main_1): Update.
6904 2017-09-20 Pedro Alves <palves@redhat.com>
6906 * cli/cli-cmds.c (list_command): Use print_sal_location.
6907 (print_sal_location): New function.
6908 (ambiguous_line_spec): Use print_sal_location.
6909 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6910 * symtab.c (find_function_start_sal): Likewise.
6911 * symtab.h (symtab_and_line::symbol): New field.
6913 2017-09-20 Pedro Alves <palves@redhat.com>
6915 * linespec.c (minsym_found): Handle non-text minsyms.
6916 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6918 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6920 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6923 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6925 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6926 vmovups instead vmovaps.
6927 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6929 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6931 * NEWS (Changes since GDB 8.0): Add starti.
6932 * infcmd.c (enum run_break): New.
6933 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6935 (run_command): Use enum run_how.
6936 (start_command): Likewise.
6937 (starti_command): New function.
6938 (RUN_ARGS_HELP): New macro.
6939 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6940 commands. Add starti command.
6942 2017-09-19 Yao Qi <yao.qi@linaro.org>
6944 * Makefile.in (monitor.o): Remove the rule.
6946 2017-09-19 Yao Qi <yao.qi@linaro.org>
6948 * annotate.h (struct annotate_arg_emitter): Use
6949 DISABLE_COPY_AND_ASSIGN.
6950 * common/refcounted-object.h (refcounted_object): Likewise.
6951 * completer.h (struct completion_result): Likewise.
6952 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6953 * filename-seen-cache.h (filename_seen_cache): Likewise.
6954 * gdbcore.h (thread_section_name): Likewise.
6955 * gdb_regex.h (compiled_regex): Likewise.
6956 * gdbthread.h (scoped_restore_current_thread): Likewise.
6957 * inferior.h (scoped_restore_current_inferior): Likewise.
6958 * jit.c (jit_reader): Likewise.
6959 * linespec.h (struct linespec_result): Likewise.
6960 * mi/mi-parse.h (struct mi_parse): Likewise.
6961 * nat/fork-inferior.c (execv_argv): Likewise.
6962 * progspace.h (scoped_restore_current_program_space): Likewise.
6963 * python/python-internal.h (class gdbpy_enter): Likewise.
6964 * regcache.h (regcache): Likewise.
6965 * target-descriptions.c (struct tdesc_reg): Likewise.
6966 (struct tdesc_type): Likewise.
6967 (struct tdesc_feature): Likewise.
6968 * ui-out.h (ui_out_emit_type): Likewise.
6970 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6972 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6973 label abort_expression.
6975 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6977 * common/buffer.c (buffer_xml_printf): Adjust.
6978 * common/xml-utils.c (xml_escape_text): Change return type to
6979 std::string, update code accordingly.
6980 * common/xml-utils.h (xml_escape_text): Change return type to
6982 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6983 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6984 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6987 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6989 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6990 (SUBDIR_UNITTESTS_OBS): Add new object file.
6991 * unittests/xml-utils-selftests.c: New file.
6993 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6995 * common/selftest.h (selftest): New struct/interface.
6996 (register_test): Add name parameter, add new overload.
6997 (run_tests): Add filter parameter.
6998 (for_each_selftest_ftype): New typedef.
6999 (for_each_selftest): New declaration.
7000 * common/selftest.c (tests): Change type to
7001 map<string, unique_ptr<selftest>>.
7002 (simple_selftest): New struct.
7003 (register_test): New function.
7004 (register_test): Add name parameter and use it.
7005 (run_tests): Add filter parameter and use it. Add prints.
7006 Adjust to vector -> map change.
7007 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7008 registering selftests.
7009 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7010 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7011 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7012 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7013 * findvar.c (_initialize_findvar): Likewise.
7014 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7015 * maint.c (maintenance_selftest): Update call to run_tests.
7016 (maintenance_info_selftests): New function.
7017 (_initialize_maint_cmds): Register "maintenance info selftests"
7018 command. Update "maintenance selftest" doc.
7019 * regcache.c (_initialize_regcache): Add names when registering
7021 * rust-exp.y (_initialize_rust_exp): Likewise.
7022 * selftest-arch.c (gdbarch_selftest): New struct.
7023 (gdbarch_tests): Remove.
7024 (register_test_foreach_arch): Add name parameter. Call
7026 (tests_with_arch): Remove, move most content to
7027 gdbarch_selftest::operator().
7028 (_initialize_selftests_foreach_arch): Remove.
7029 * selftest-arch.h (register_test_foreach_arch): Add name
7031 (run_tests_with_arch): New declaration.
7032 * utils-selftests.c (_initialize_utils_selftests): Add names
7033 when registering selftests.
7034 * utils.c (_initialize_utils): Likewise.
7035 * unittests/array-view-selftests.c
7036 (_initialize_array_view_selftests): Likewise.
7037 * unittests/environ-selftests.c (_initialize_environ_selftests):
7039 * unittests/function-view-selftests.c
7040 (_initialize_function_view_selftests): Likewise.
7041 * unittests/offset-type-selftests.c
7042 (_initialize_offset_type_selftests): Likewise.
7043 * unittests/optional-selftests.c
7044 (_initialize_optional_selftests): Likewise.
7045 * unittests/scoped_restore-selftests.c
7046 (_initialize_scoped_restore_selftests): Likewise.
7047 * NEWS: Document "maintenance selftest" and "maint info
7050 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7052 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7055 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7057 * mi/mi-main.c (mi_load_progress): Make uiout variable
7060 2017-09-15 Pedro Alves <palves@redhat.com>
7062 * compile/compile-c-types.c (convert_enum, convert_int)
7063 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7065 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7067 * dwarf2read.c (copy_string): Remove.
7068 (parse_macro_definition): Replace copy_string with savestring.
7070 2017-09-15 Yao Qi <yao.qi@linaro.org>
7072 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7074 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7076 (i[34567]86-*-linux*): Likewise.
7078 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7080 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7081 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7082 <stack>: Change type to std::vector.
7083 <stack_len, stack_allocated>: Remove.
7084 <grow_stack>: Remove.
7085 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7086 (dwarf_expr_context::~dwarf_expr_context): Remove.
7087 (dwarf_expr_context::grow_stack): Remove.
7088 (dwarf_expr_context::push): Adjust.
7089 (dwarf_expr_context::pop): Adjust.
7090 (dwarf_expr_context::fetch): Adjust.
7091 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7092 (dwarf_expr_context::stack_empty_p): Adjust.
7093 (dwarf_expr_context::execute_stack_op): Adjust.
7095 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7097 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7098 return type to bool.
7099 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7101 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7103 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7104 Change type to bool.
7105 (dwarf_stack_value) <in_stack_memory>: Likewise.
7106 (dwarf_expr_context) <push_address>: Change parameter type to
7108 <fetch_in_stack_memory>: Change return type to bool.
7109 <push>: Change parameter type to bool.
7110 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7112 (dwarf_expr_context::push_address): Likewise.
7113 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7115 (dwarf_expr_context::execute_stack_op): Adjust.
7116 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7118 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7120 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7121 (struct dwarf_expr_context) <n_pieces>: Remove.
7122 <pieces>: Change type to std::vector.
7123 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7124 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7126 (dwarf_expr_context::add_piece): Adjust.
7127 * dwarf2loc.c (struct piece_closure): Initialize fields.
7129 <pieces>: Change type to std::vector.
7130 (allocate_piece_closure): Adjust, change parameter to
7131 std::vector rvalue and std::move it to piece_closure.
7132 (rw_pieced_value): Adjust.
7133 (check_pieced_synthetic_pointer): Adjust.
7134 (indirect_synthetic_pointer): Adjust.
7135 (coerce_pieced_ref): Adjust.
7136 (free_pieced_value_closure): Adjust. Use delete to free
7138 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7139 to allocate_piece_closure.
7140 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7142 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7144 * probe.h (probe_ops_cp): Remove typedef.
7145 (DEF_VEC_P (probe_ops_cp)): Remove.
7146 (all_probe_ops): Change type to std::vector.
7147 * probe.c (info_probes_for_ops): Adjust to vector change.
7148 (probe_linespec_to_ops): Likewise.
7149 (all_probe_ops): Change type to std::vector.
7150 (_initialize_probe): Adjust to vector change.
7151 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7152 * elfread.c (elf_get_probes): Likewise.
7153 * stap-probe.c (_initialize_stap_probe): Likewise.
7155 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7157 * probe.h (struct bound_probe): Define constructors.
7158 * probe.c (bound_probe_s): Remove typedef.
7159 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7160 (collect_probes): Change return type to std::vector, remove
7162 (compare_probes): Return bool, change parameter type. Change
7163 semantic to "less than".
7164 (gen_ui_out_table_header_info): Change parameter to std::vector
7166 (exists_probe_with_pops): Likewise.
7167 (info_probes_for_ops): Update to std::vector change.
7168 (enable_probes_command): Likewise.
7169 (disable_probes_command): Likewise.
7171 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7173 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7175 * probe.c (parse_probes_in_pspace): Update.
7176 (find_probes_in_objfile): Update.
7177 (find_probe_by_pc): Update.
7178 (collect_probes): Update.
7179 (probe_any_get_probes): Update.
7180 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7181 return type to reference to std::vector.
7182 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7183 std::vector and update.
7184 (dtrace_process_dof): Likewise.
7185 (dtrace_get_probes): Likewise.
7186 * elfread.c (elf_get_probes): Change return type to std::vector,
7187 store an std::vector in bfd_data.
7188 (probe_key_free): Update to std::vector.
7189 * stap-probe.c (handle_stap_probe): Change parameter to
7190 std::vector and update.
7191 (stap_get_probes): Likewise.
7192 * symfile-debug.c (debug_sym_get_probes): Change return type to
7193 std::vector and update.
7195 2017-09-11 Tom Tromey <tom@tromey.com>
7197 * breakpoint.c (program_breakpoint_here_p): Update.
7198 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7199 from make_show_memory_breakpoints_cleanup. Return a
7200 scoped_restore_tmpl<int>.
7201 (restore_show_memory_breakpoints): Remove.
7202 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7203 * mem-break.c (memory_validate_breakpoint): Update.
7204 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7205 (ia64_memory_remove_breakpoint): Update.
7206 (ia64_breakpoint_from_pc): Update.
7207 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7208 from make_show_memory_breakpoints_cleanup.
7210 2017-09-11 Tom Tromey <tom@tromey.com>
7212 * d-namespace.c (d_lookup_symbol): Use std::string.
7213 (find_symbol_in_baseclass): Likewise.
7215 2017-09-11 Tom Tromey <tom@tromey.com>
7217 * ctf.c (ctf_start): Use std::string.
7219 2017-09-11 Tom Tromey <tom@tromey.com>
7221 * ada-lang.c (is_known_support_routine): Update.
7222 (ada_unhandled_exception_name_addr_from_raise): Update.
7223 * guile/scm-frame.c (gdbscm_frame_name): Update.
7224 * python/py-frame.c (frapy_name): Update.
7225 (frapy_function): Update.
7226 * stack.h (find_frame_funname): Update.
7227 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7228 (print_frame): Update.
7230 2017-09-11 Tom Tromey <tom@tromey.com>
7232 * findcmd.c (put_bits): Take a gdb::byte_vector.
7233 (parse_find_args): Return gdb::byte_vector. "args" now const.
7234 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7236 (find_command): Update.
7238 2017-09-11 Tom Tromey <tom@tromey.com>
7240 * cli/cli-script.c (class scoped_restore_hook_in): New.
7241 (clear_hook_in_cleanup): Remove.
7242 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7243 scoped_restore_hook_in.
7245 2017-09-11 Tom Tromey <tom@tromey.com>
7247 * cli/cli-script.c (restore_interp): Remove.
7248 (read_command_lines): Use scoped_restore_interp.
7249 * interps.c (scoped_restore_interp::set_temp): Rename from
7251 * interps.h (class scoped_restore_interp): New.
7252 (interp_set_temp): Remove.
7254 2017-09-11 Tom Tromey <tom@tromey.com>
7256 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7257 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7258 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7260 (mi_cmd_break_insert_1): Update.
7261 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7264 2017-09-11 Tom Tromey <tom@tromey.com>
7266 * demangle.c (demangle_command): Update.
7267 * breakpoint.c (disable_command): Update.
7268 (enable_command): Update.
7269 (find_location_by_number): Make "number" const. Use
7271 * cli/cli-utils.c (extract_arg): Return std::string.
7272 * probe.c (parse_probe_linespec): Update. Change types.
7273 (collect_probes): Take string arguments.
7274 (parse_probe_linespec): Likewise.
7275 (info_probes_for_ops): Update.
7276 (enable_probes_command): Update.
7277 (disable_probes_command): Update.
7278 * break-catch-sig.c (catch_signal_split_args): Update.
7279 * mi/mi-parse.c (mi_parse): Update.
7281 2017-09-11 Tom Tromey <tom@tromey.com>
7283 * language.h (language_enum): Make argument const.
7284 * language.c (language_enum): Make argument const.
7286 2017-09-11 Tom Tromey <tom@tromey.com>
7288 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7290 (skip_to_space): Rename from skip_to_space_const.
7291 * common/common-utils.c (skip_to_space): New function.
7292 (skip_to_space): Rename from skip_to_space_const.
7293 * cli/cli-utils.h (get_number): Rename from get_number_const.
7294 (extract_arg): Rename from extract_arg_const.
7295 * cli/cli-utils.c (get_number): Rename from get_number_const.
7296 (extract_arg): Rename from extract_arg_const.
7297 (number_or_range_parser::get_number): Use ::get_number.
7298 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7299 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7300 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7301 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7302 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7303 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7304 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7305 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7307 2017-09-11 Tom Tromey <tom@tromey.com>
7309 * python/python.c (do_start_initialization): Use
7310 py-event-types.def to initialize types.
7311 Define all object type structures.
7312 * python/python-internal.h: Don't declare event initialization
7314 * python/py-threadevent.c (thread_event_object_type): Don't
7316 * python/py-stopevent.c (stop_event_object_type): Don't define.
7317 * python/py-signalevent.c (signal_event_object_type): Don't
7319 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7320 (clear_objfiles_event_object_type): Don't declare or define.
7321 * python/py-infevents.c (inferior_call_pre_event_object_type)
7322 (inferior_call_post_event_object_type)
7323 (register_changed_event_object_type)
7324 (memory_changed_event_object_type): Don't declare or define.
7325 * python/py-inferior.c (new_thread_event_object_type)
7326 (new_inferior_event_object_type)
7327 (inferior_deleted_event_object_type): Don't declare or define.
7328 * python/py-exitedevent.c (exited_event_object_type): Don't
7330 * python/py-evts.c (gdbpy_initialize_py_events): Use
7332 * python/py-events.h (thread_event_object_type): Don't declare.
7333 (events_object): Use py-all-events.def.
7334 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7336 * python/py-event-types.def: New file.
7337 * python/py-continueevent.c (create_continue_event_object): Don't
7339 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7341 * python/py-all-events.def: New file.
7343 2017-09-11 Tom Tromey <tom@tromey.com>
7345 * python/py-threadevent.c (create_thread_event_object): Return
7347 * python/py-stopevent.h (create_stop_event_object)
7348 (create_breakpoint_event_object, create_signal_event_object):
7350 * python/py-stopevent.c (create_stop_event_object): Return
7352 (emit_stop_event): Update.
7353 * python/py-signalevent.c (create_signal_event_object): Return
7355 * python/py-infevents.c (create_inferior_call_event_object):
7357 * python/py-event.h (create_event_object)
7358 (create_thread_event_object): Update.
7359 * python/py-event.c (create_event_object): Return gdbpy_ref.
7360 * python/py-continueevent.c: Return gdbpy_ref.
7361 * python/py-bpevent.c (create_breakpoint_event_object): Return
7364 2017-09-11 Tom Tromey <tom@tromey.com>
7368 * python/python.c (do_start_initialization): Initialize new event
7370 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7371 (gdbpy_initialize_inferior_deleted_event)
7372 (gdbpy_initialize_new_thread_event): Declare.
7373 * python/py-threadevent.c (create_thread_event_object): Add option
7375 * python/py-inferior.c (new_thread_event_object_type)
7376 (new_inferior_event_object_type)
7377 (inferior_deleted_event_object_type): Declare.
7378 (python_new_inferior, python_inferior_deleted): New functions.
7379 (add_thread_object): Emit new_thread event.
7380 (gdbpy_initialize_inferior): Attach new functions to corresponding
7382 (new_thread, new_inferior, inferior_deleted): Define new event
7384 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7386 * python/py-events.h (events_object) <new_inferior,
7387 inferior_deleted, new_thread>: New fields.
7388 * python/py-event.h (create_thread_event_breakpoint): Add optional
7391 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7393 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7394 check current_ui instead.
7395 (internal_vproblem): Likewise.
7397 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7399 * thread.c (print_thread_info_1): Remove unnecessary calls to
7400 uiout->is_mi_like_p.
7402 2017-09-09 Tom Tromey <tom@tromey.com>
7404 * namespace.h (add_using_directive): Update.
7405 * namespace.c (add_using_directive): Change type of excludes to
7407 * dwarf2read.c (read_import_statement): Use std::vector.
7408 (read_namespace): Update.
7409 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7411 2017-09-09 Tom Tromey <tom@tromey.com>
7413 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7415 2017-09-09 Tom Tromey <tom@tromey.com>
7417 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7419 2017-09-09 Tom Tromey <tom@tromey.com>
7421 * stack.c (func_command): Use gdb::def_vector.
7423 2017-09-09 Tom Tromey <tom@tromey.com>
7425 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7426 ui_out_emit_list, ui_out_emit_tuple.
7427 (mi_cmd_var_update): Likewise.
7429 2017-09-09 Tom Tromey <tom@tromey.com>
7431 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7432 ui_out_redirect_pop.
7433 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7434 ui_out_redirect_pop.
7435 * utils.c (do_ui_out_redirect_pop)
7436 (make_cleanup_ui_out_redirect_pop): Remove.
7437 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7438 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7439 * ui-out.h (ui_out_redirect_pop): New class.
7441 2017-09-09 Tom Tromey <tom@tromey.com>
7443 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7444 (list_available_thread_groups, mi_cmd_list_thread_groups)
7445 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7446 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7449 2017-09-09 Tom Tromey <tom@tromey.com>
7451 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7454 2017-09-09 Tom Tromey <tom@tromey.com>
7456 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7457 * stack.c (print_frame): Use ui_out_emit_tuple.
7458 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7459 (info_spu_mailbox_command, info_spu_dma_command)
7460 (info_spu_proxydma_command): Likewise.
7461 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7462 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7463 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7465 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7467 2017-09-09 Tom Tromey <tom@tromey.com>
7469 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7470 (class ui_out_emit_table): Update comment.
7471 * ui-out.c (do_cleanup_table_end)
7472 (make_cleanup_ui_out_table_begin_end): Remove.
7473 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7474 (info_spu_dma_cmdlist): Likewise.
7475 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7476 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7479 2017-09-09 Tom Tromey <tom@tromey.com>
7481 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7482 ui_out_emit_list, gdb::optional.
7484 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7486 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7488 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7490 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7492 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7493 * ada-exp.y: Remove _initialize_ada_exp prototype.
7494 * ada-lang.c: Remove _initialize_ada_language prototype.
7495 * ada-tasks.c: Remove _initialize_tasks prototype.
7496 * addrmap.c: Remove _initialize_addrmap prototype.
7497 * agent.c: Remove _initialize_agent prototype.
7498 * aix-thread.c: Remove _initialize_aix_thread prototype.
7499 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7500 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7501 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7503 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7504 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7505 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7506 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7508 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7510 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7511 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7512 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7513 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7515 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7516 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7517 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7518 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7519 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7520 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7521 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7523 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7525 * annotate.c: Remove _initialize_annotate prototype.
7526 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7527 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7528 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7529 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7530 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7531 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7532 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7533 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7535 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7536 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7537 * auto-load.c: Remove _initialize_auto_load prototype.
7538 * auxv.c: Remove _initialize_auxv prototype.
7539 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7540 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7541 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7542 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7543 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7544 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7546 * break-catch-throw.c: Remove _initialize_break_catch_throw
7548 * breakpoint.c: Remove _initialize_breakpoint prototype.
7549 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7550 * btrace.c: Remove _initialize_btrace prototype.
7551 * charset.c: Remove _initialize_charset prototype.
7552 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7553 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7554 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7555 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7556 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7557 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7558 * coffread.c: Remove _initialize_coffread prototype.
7559 * compile/compile.c: Remove _initialize_compile prototype.
7560 * complaints.c: Remove _initialize_complaints prototype.
7561 * completer.c: Remove _initialize_completer prototype.
7562 * copying.awk: Remove _initialize_copying prototype.
7563 * copying.c: Regenerate.
7564 * core-regset.c: Remove _initialize_core_regset prototype.
7565 * corefile.c: Remove _initialize_core prototype.
7566 * corelow.c: Remove _initialize_corelow prototype.
7567 * cp-abi.c: Remove _initialize_cp_abi prototype.
7568 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7569 * cp-support.c: Remove _initialize_cp_support prototype.
7570 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7571 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7572 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7573 * ctf.c: Remove _initialize_ctf prototype.
7574 * d-lang.c: Remove _initialize_d_language prototype.
7575 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7577 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7578 * dbxread.c: Remove _initialize_dbxread prototype.
7579 * dcache.c: Remove _initialize_dcache prototype.
7580 * demangle.c: Remove _initialize_demangler prototype.
7581 * disasm-selftests.c: Remove _initialize_disasm_selftests
7583 * disasm.c: Remove _initialize_disasm prototype.
7584 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7585 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7586 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7588 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7589 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7590 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7591 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7592 * elfread.c: Remove _initialize_elfread prototype.
7593 * exec.c: Remove _initialize_exec prototype.
7594 * extension.c: Remove _initialize_extension prototype.
7595 * f-lang.c: Remove _initialize_f_language prototype.
7596 * f-valprint.c: Remove _initialize_f_valprint prototype.
7597 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7598 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7599 * filesystem.c: Remove _initialize_filesystem prototype.
7600 * findcmd.c: Remove _initialize_mem_search prototype.
7601 * fork-child.c: Remove _initialize_fork_child prototype.
7602 * frame-base.c: Remove _initialize_frame_base prototype.
7603 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7604 * frame.c: Remove _initialize_frame prototype.
7605 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7606 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7607 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7608 * gcore.c: Remove _initialize_gcore prototype.
7609 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7610 * gdbarch.c: Regenerate.
7611 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7612 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7613 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7614 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7615 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7616 * go-lang.c: Remove _initialize_go_language prototype.
7617 * go32-nat.c: Remove _initialize_go32_nat prototype.
7618 * guile/guile.c: Remove _initialize_guile prototype.
7619 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7620 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7621 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7622 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7623 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7624 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7625 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7626 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7627 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7628 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7630 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7632 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7633 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7634 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7635 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7636 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7637 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7638 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7639 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7640 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7641 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7642 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7643 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7644 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7645 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7646 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7647 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7649 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7651 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7652 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7653 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7654 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7655 * infcall.c: Remove _initialize_infcall prototype.
7656 * infcmd.c: Remove _initialize_infcmd prototype.
7657 * inferior.c: Remove _initialize_inferiors prototype.
7658 * inflow.c: Remove _initialize_inflow prototype.
7659 * infrun.c: Remove _initialize_infrun prototype.
7660 * interps.c: Remove _initialize_interpreter prototype.
7661 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7662 * jit.c: Remove _initialize_jit prototype.
7663 * language.c: Remove _initialize_language prototype.
7664 * linux-fork.c: Remove _initialize_linux_fork prototype.
7665 * linux-nat.c: Remove _initialize_linux_nat prototype.
7666 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7667 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7668 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7669 * m2-lang.c: Remove _initialize_m2_language prototype.
7670 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7671 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7672 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7673 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7674 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7675 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7676 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7677 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7678 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7679 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7680 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7681 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7682 * machoread.c: Remove _initialize_machoread prototype.
7683 * macrocmd.c: Remove _initialize_macrocmd prototype.
7684 * macroscope.c: Remove _initialize_macroscope prototype.
7685 * maint.c: Remove _initialize_maint_cmds prototype.
7686 * mdebugread.c: Remove _initialize_mdebugread prototype.
7687 * memattr.c: Remove _initialize_mem prototype.
7688 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7689 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7690 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7691 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7692 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7693 * microblaze-linux-tdep.c: Remove
7694 _initialize_microblaze_linux_tdep prototype.
7695 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7696 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7697 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7698 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7699 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7700 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7701 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7702 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7703 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7704 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7705 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7707 * mipsread.c: Remove _initialize_mipsread prototype.
7708 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7710 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7711 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7712 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7713 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7714 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7715 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7717 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7718 * nto-procfs.c: Remove _initialize_procfs prototype.
7719 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7720 * objc-lang.c: Remove _initialize_objc_language prototype.
7721 * objfiles.c: Remove _initialize_objfiles prototype.
7722 * observer.c: Remove observer_test_first_notification_function,
7723 observer_test_second_notification_function,
7724 observer_test_third_notification_function, and
7725 _initialize_observer prototypes.
7726 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7727 * osabi.c: Remove _initialize_gdb_osabi prototype.
7728 * osdata.c: Remove _initialize_osdata prototype.
7729 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7730 * parse.c: Remove _initialize_parse prototype.
7731 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7732 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7733 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7734 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7735 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7736 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7737 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7738 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7739 * printcmd.c: Remove _initialize_printcmd prototype.
7740 * probe.c: Remove _initialize_probe prototype.
7741 * proc-api.c: Remove _initialize_proc_api prototype.
7742 * proc-events.c: Remove _initialize_proc_events prototype.
7743 * proc-service.c: Remove _initialize_proc_service prototype.
7744 * procfs.c: Remove _initialize_procfs prototype.
7745 * psymtab.c: Remove _initialize_psymtab prototype.
7746 * python/python.c: Remove _initialize_python prototype.
7747 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7748 * record-btrace.c: Remove _initialize_record_btrace prototype.
7749 * record-full.c: Remove _initialize_record_full prototype.
7750 * record.c: Remove _initialize_record prototype.
7751 * regcache.c: Remove _initialize_regcache prototype.
7752 * reggroups.c: Remove _initialize_reggroup prototype.
7753 * remote-notif.c: Remove _initialize_notif prototype.
7754 * remote-sim.c: Remove _initialize_remote_sim prototype.
7755 * remote.c: Remove _initialize_remote prototype.
7756 * reverse.c: Remove _initialize_reverse prototype.
7757 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7758 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7759 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7761 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7762 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7763 * rust-exp.y: Remove _initialize_rust_exp prototype.
7764 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7765 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7766 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7767 * score-tdep.c: Remove _initialize_score_tdep prototype.
7768 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7770 * ser-go32.c: Remove _initialize_ser_dos prototype.
7771 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7772 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7773 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7774 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7775 * serial.c: Remove _initialize_serial prototype.
7776 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7777 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7778 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7779 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7780 * skip.c: Remove _initialize_step_skip prototype.
7781 * sol-thread.c: Remove _initialize_sol_thread prototype.
7782 * solib-aix.c: Remove _initialize_solib_aix prototype.
7783 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7784 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7785 * solib-frv.c: Remove _initialize_frv_solib prototype.
7786 * solib-spu.c: Remove _initialize_spu_solib prototype.
7787 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7788 * solib-target.c: Remove _initialize_solib_target prototype.
7789 * solib.c: Remove _initialize_solib prototype.
7790 * source.c: Remove _initialize_source prototype.
7791 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7792 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7794 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7795 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7796 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7797 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7799 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7800 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7801 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7802 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7804 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7806 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7808 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7810 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7811 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7813 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7815 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7817 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7819 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7821 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7822 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7823 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7824 * stabsread.c: Remove _initialize_stabsread prototype.
7825 * stack.c: Remove _initialize_stack prototype.
7826 * stap-probe.c: Remove _initialize_stap_probe prototype.
7827 * std-regs.c: Remove _initialize_frame_reg prototype.
7828 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7829 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7830 * symfile.c: Remove _initialize_symfile prototype.
7831 * symmisc.c: Remove _initialize_symmisc prototype.
7832 * symtab.c: Remove _initialize_symtab prototype.
7833 * target-dcache.c: Remove _initialize_target_dcache prototype.
7834 * target-descriptions.c: Remove _initialize_target_descriptions
7836 * thread.c: Remove _initialize_thread prototype.
7837 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7839 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7840 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7841 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7843 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7844 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7845 * tracefile.c: Remove _initialize_tracefile prototype.
7846 * tracepoint.c: Remove _initialize_tracepoint prototype.
7847 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7848 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7849 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7850 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7851 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7852 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7853 * tui/tui.c: Remove _initialize_tui prototype.
7854 * typeprint.c: Remove _initialize_typeprint prototype.
7855 * user-regs.c: Remove _initialize_user_regs prototype.
7856 * utils.c: Remove _initialize_utils prototype.
7857 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7858 * valarith.c: Remove _initialize_valarith prototype.
7859 * valops.c: Remove _initialize_valops prototype.
7860 * valprint.c: Remove _initialize_valprint prototype.
7861 * value.c: Remove _initialize_values prototype.
7862 * varobj.c: Remove _initialize_varobj prototype.
7863 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7864 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7865 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7866 * windows-nat.c: Remove _initialize_windows_nat,
7867 _initialize_check_for_gdb_ini, and _initialize_loadable
7869 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7870 * xcoffread.c: Remove _initialize_xcoffread prototype.
7871 * xml-support.c: Remove _initialize_xml_support prototype.
7872 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7873 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7875 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7877 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7879 2017-09-08 Keith Seitz <keiths@redhat.com>
7881 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7884 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7886 * f-valprint.c (f_val_print): Remove check for one byte
7887 sized integers. Remove printing of character type.
7889 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7890 Christoph Weinmann <christoph.t.weinmann@intel.com>
7891 Bernhard Heckel <bernhard.heckel@intel.com>
7893 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7894 to maintain proper indentation when printing pointers/refs.
7896 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7900 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7902 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7904 2017-09-05 Tom Tromey <tom@tromey.com>
7906 * parse.c (funcall_chain): Now a std::vector.
7907 (start_arglist, end_arglist): Simplify.
7908 (free_funcalls): Remove.
7909 (parse_exp_in_context_1): Remove cleanup.
7911 2017-09-05 Tom Tromey <tom@tromey.com>
7913 * go-exp.y (go_parse): Don't create a cleanup.
7915 2017-09-05 Tom Tromey <tom@tromey.com>
7917 * d-exp.y (PrimaryExpression): Use std::string.
7918 (d_parse): Don't create a cleanup.
7920 2017-09-05 Tom Tromey <tom@tromey.com>
7922 * utils.c (do_clear_parser_state): Remove.
7923 (make_cleanup_clear_parser_state): Remove.
7924 * p-exp.y (pascal_parse): Use scoped_restore.
7925 * m2-exp.y (m2_parse): Use scoped_restore.
7926 * f-exp.y (f_parse): Use scoped_restore.
7927 * d-exp.y (d_parse): Use scoped_restore.
7928 * c-exp.y (c_parse): Use scoped_restore.
7929 * ada-exp.y (ada_parse): Use scoped_restore.
7930 * utils.h (make_cleanup_clear_parser_state): Remove.
7932 2017-09-06 Keith Seitz <keiths@redhat.com>
7934 * dwarf2read.c (dw2_linkage_name_attr): New function.
7935 (dw2_linkage_name): New function.
7936 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7937 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7938 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7940 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7942 * config/djgpp/djconfig.sh: Correct shell portability issue.
7944 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7946 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7948 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7950 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7951 * NEWS: Mention new FreeBSD/mips native configuration.
7952 * configure.host: Add aarch64*-*-freebsd*.
7953 * configure.nat: Likewise.
7954 * aarch64-fbsd-nat.c: New file.
7956 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7958 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7959 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7960 * NEWS: Mention new FreeBSD/aarch64 target.
7961 * configure.tgt: Add aarch64*-*-freebsd*.
7962 * aarch64-fbsd-tdep.c: New file.
7963 * aarch64-fbsd-tdep.h: New file.
7965 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7967 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7969 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7971 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7974 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7976 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7979 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7981 * infrun.c (follow_exec): Call add_thread after
7982 target_find_description.
7984 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7986 * infrun.c (handle_inferior_event_1): When exec'ing, read
7987 stop_pc after follow_exec.
7989 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7991 * remote.c (process_g_packet): Update error message.
7993 2017-09-05 Yao Qi <yao.qi@linaro.org>
7995 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7998 2017-09-05 Pedro Alves <palves@redhat.com>
8000 * eval.c (eval_call, evaluate_funcall): New functions, factored
8002 (evaluate_subexp_standard): ... this.
8004 2017-09-05 Yao Qi <yao.qi@linaro.org>
8006 * amd64-tdep.c (amd64_target_description): Create target
8008 (_initialize_amd64_tdep): Don't call functions
8009 initialize_tdesc_amd64_*. Add self tests.
8010 * arch/amd64.c (amd64_create_target_description): Add parameter
8011 is_linux. Call set_tdesc_osabi if is_linux is true.
8012 * arch/amd64.h (amd64_create_target_description): Update the
8014 * arch/i386.c (i386_create_target_description): Add parameter
8015 is_linux. Call set_tdesc_osabi if is_linux is true.
8016 * arch/i386.h (i386_create_target_description): Update
8018 * configure.tgt: Add i386.o to gdb_target_obs.
8019 * features/Makefile (XMLTOC): Remove i386/*.xml.
8020 * features/i386/amd64-avx-avx512.c: Remove.
8021 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8022 * features/i386/amd64-avx-mpx.c: Remove.
8023 * features/i386/amd64-avx.c: Remove.
8024 * features/i386/amd64-mpx.c: Remove.
8025 * features/i386/amd64.c: Remove.
8026 * features/i386/i386-avx-avx512.c: Remove.
8027 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8028 * features/i386/i386-avx-mpx.c: Remove.
8029 * features/i386/i386-avx.c: Remove.
8030 * features/i386/i386-mmx.c: Remove.
8031 * features/i386/i386-mpx.c: Remove.
8032 * features/i386/i386.c: Remove.
8033 * i386-tdep.c: Don't include features/i386/i386*.c., include
8034 target-descriptions.h and arch/i386.h.
8035 (i386_target_description): Create target descriptions.
8036 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8037 functions. Do self tests.
8039 2017-09-05 Yao Qi <yao.qi@linaro.org>
8041 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8042 * features/i386/amd64-avx-avx512-linux.c: Removed.
8043 * features/i386/amd64-avx-linux.c: Removed.
8044 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8045 * features/i386/amd64-avx-mpx-linux.c: Removed.
8046 * features/i386/amd64-linux.c: Removed.
8047 * features/i386/amd64-mpx-linux.c: Removed.
8048 * features/i386/x32-avx-avx512-linux.c: Removed.
8049 * features/i386/x32-avx-linux.c: Removed.
8050 * features/i386/x32-linux.c: Removed.
8052 2017-09-05 Yao Qi <yao.qi@linaro.org>
8054 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8056 (amd64_linux_read_description): Call
8057 amd64_create_target_description.
8058 * arch/amd64.c: New file.
8059 * arch/amd64.h: New file.
8060 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8061 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8063 2017-09-05 Yao Qi <yao.qi@linaro.org>
8065 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8066 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8067 (amd64_linux_read_description): Create target descriptions.
8068 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8069 functions. Add unit tests.
8070 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8072 * features/i386/64bit-avx.c: Generated.
8073 * features/i386/64bit-avx512.c: Generated.
8074 * features/i386/64bit-core.c: Generated.
8075 * features/i386/64bit-linux.c: Generated.
8076 * features/i386/64bit-mpx.c: Generated.
8077 * features/i386/64bit-pkeys.c: Generated.
8078 * features/i386/64bit-segments.c: Generated.
8079 * features/i386/64bit-sse.c: Generated.
8080 * features/i386/x32-core.c: Generated.
8081 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8082 c files for amd64-linux and x32-linux.
8084 2017-09-05 Yao Qi <yao.qi@linaro.org>
8086 * amd64-linux-tdep.c (amd64_linux_read_description): New
8088 (amd64_linux_core_read_description): Call
8089 amd64_linux_read_description.
8090 (amd64_linux_init_abi): Likewise.
8091 (amd64_x32_linux_init_abi): Likewise.
8092 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8093 * x86-linux-nat.c (x86_linux_read_description): Call
8094 amd64_linux_read_description.
8096 2017-09-05 Yao Qi <yao.qi@linaro.org>
8098 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8101 2017-09-05 Yao Qi <yao.qi@linaro.org>
8103 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8104 * features/i386/i386-avx-avx512-linux.c: Remove.
8105 * features/i386/i386-avx-linux.c: Remove.
8106 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8107 * features/i386/i386-avx-mpx-linux.c: Remove.
8108 * features/i386/i386-linux.c: Remove.
8109 * features/i386/i386-mmx-linux.c: Remove.
8110 * features/i386/i386-mpx-linux.c: Remove.
8112 2017-09-05 Yao Qi <yao.qi@linaro.org>
8114 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8115 (SFILES): Add arch/i386.c.
8116 (HFILES_NO_SRCDIR): Add arch/i386.h.
8117 * arch/i386.c: New file.
8118 * arch/i386.h: New file.
8119 * arch/tdesc.h (allocate_target_description): Declare.
8120 (set_tdesc_architecture): Declare.
8121 (set_tdesc_osabi): Declare.
8122 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8123 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8124 include arch/i386.h.
8125 (i386_linux_read_description): Remove code and call
8126 i386_create_target_description.
8127 (set_tdesc_architecture): New function.
8128 (set_tdesc_osabi): New function.
8129 * target-descriptions.h (allocate_target_description): Remove.
8131 2017-09-05 Yao Qi <yao.qi@linaro.org>
8133 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8134 * target-descriptions.c (tdesc_create_feature): Likewise, and
8136 * features/i386/32bit-avx.c: Re-generated.
8137 * features/i386/32bit-avx512.c: Re-generated.
8138 * features/i386/32bit-core.c: Re-generated.
8139 * features/i386/32bit-linux.c: Re-generated.
8140 * features/i386/32bit-mpx.c: Re-generated.
8141 * features/i386/32bit-pkeys.c: Re-generated.
8142 * features/i386/32bit-sse.c: Re-generated.
8144 2017-09-05 Yao Qi <yao.qi@linaro.org>
8146 * regformats/regdef.h (struct reg): Override operator == and !=.
8148 2017-09-05 Yao Qi <yao.qi@linaro.org>
8150 * arch/tdesc.h: New file.
8151 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8152 * target-descriptions.c: Update comments.
8153 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8155 * features/i386/32bit-avx.c: Re-generated.
8156 * features/i386/32bit-avx512.c: Re-generated.
8157 * features/i386/32bit-core.c: Re-generated.
8158 * features/i386/32bit-linux.c: Re-generated.
8159 * features/i386/32bit-mpx.c: Re-generated.
8160 * features/i386/32bit-pkeys.c: Re-generated.
8161 * features/i386/32bit-sse.c: Re-generated.
8163 2017-09-05 Yao Qi <yao.qi@linaro.org>
8165 * regformats/regdat.sh: Update generated code.
8167 2017-09-05 Yao Qi <yao.qi@linaro.org>
8169 * regformats/regdat.sh: Adjust code order.
8171 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8173 * expprint.c (dump_subexp_body_standard): Use constant format
8174 string in fprintf_filtered call.
8176 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8178 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8180 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8182 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8184 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8186 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8188 * bsd-kvm.o: Define _KMEMUSER.
8189 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8190 * configure: Regenerate.
8192 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8194 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8195 * i386-fbsd-nat.c: Likewise.
8197 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8199 * unittests/array-view-selftests.c: Add include of <array>.
8201 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8203 * spu-tdep.c (flush_ea_cache): Add missing argument to
8204 call_function_by_hand.
8206 2017-09-04 Pedro Alves <palves@redhat.com>
8208 * NEWS (Safer support for debugging with no debug info): New.
8210 2017-09-04 Pedro Alves <palves@redhat.com>
8212 * c-exp.y (function_method, function_method_void): Add current
8213 instance flags to TYPE_INSTANCE.
8214 * dwarf2read.c (check_modifier): New.
8215 (compute_delayed_physnames): Assert that only C++ adds delayed
8216 physnames. Mark fn_fields as const/volatile depending on
8218 * eval.c (make_params): New type_instance_flags parameter. Use
8219 it as the new type's instance flags.
8220 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8221 flags element and pass it to make_params.
8222 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8223 instance flags element.
8224 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8225 * gdbtypes.h: Include "enum-flags.h".
8226 (type_instance_flags): New enum-flags type.
8227 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8228 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8229 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8230 (follow_type_instance_flags): New function.
8231 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8232 * parser-defs.h (follow_type_instance_flags): Declare.
8233 * valops.c (value_struct_elt_for_reference): const/volatile must
8236 2017-09-04 Pedro Alves <palves@redhat.com>
8238 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8239 function/method scopes; lookup the nested name as a function local
8242 2017-09-04 Pedro Alves <palves@redhat.com>
8244 (%type <voidval>): Add function_method.
8245 * c-exp.y (exp): New production for calls with no arguments.
8246 (function_method, function_method_void_or_typelist): New
8248 (exp): New production for "method()::static_var".
8249 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8250 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8251 Handle OP_FUNC_STATIC_VAR.
8252 * parse.c (operator_length_standard):
8253 Handle OP_FUNC_STATIC_VAR.
8255 2017-09-04 Pedro Alves <palves@redhat.com>
8257 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8259 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8261 * parse.c (operator_length_standard, operator_check_standard):
8263 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8265 2017-09-04 Pedro Alves <palves@redhat.com>
8267 * ax-gdb.c: Include "typeprint.h".
8268 (gen_expr_for_cast): New function.
8269 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8270 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8272 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8273 nodebug_data_symbol.
8274 * eval.c: Include "typeprint.h".
8275 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8276 Error out if symbol has unknown type.
8277 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8278 evaluate_subexp_for_cast.
8279 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8281 (evaluate_subexp_for_cast): New function.
8282 * gdbtypes.c (init_nodebug_var_type): New function.
8283 (objfile_type): Use it to initialize types of variables with no
8285 * typeprint.c (error_unknown_type): New.
8286 * typeprint.h (error_unknown_type): New declaration.
8287 * compile/compile-c-types.c (convert_type_basic): Handle
8288 TYPE_CODE_ERROR; warn and fallback to int for variables with
8291 2017-09-04 Pedro Alves <palves@redhat.com>
8293 * eval.c (evaluate_var_value): New function, factored out from ...
8294 (evaluate_subexp_standard): ... here.
8296 2017-09-04 Pedro Alves <palves@redhat.com>
8298 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8299 Remove useless assignments to 'op'.
8301 2017-09-04 Pedro Alves <palves@redhat.com>
8303 * eval.c (eval_skip_value): New function.
8304 (evaluate_subexp_standard): Use it.
8306 2017-09-04 Pedro Alves <palves@redhat.com>
8308 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8309 function name from symbol/minsym and pass it to
8310 error_call_unknown_return_type.
8312 2017-09-04 Pedro Alves <palves@redhat.com>
8314 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8315 * ax-gdb.c (gen_msym_var_ref): New function.
8316 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8317 * eval.c (evaluate_var_msym_value): New function.
8318 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8319 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8320 to call_function_by_hand.
8321 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8322 Handle OP_VAR_MSYM_VALUE.
8323 (union exp_element) <msymbol>: New field.
8324 * minsyms.h (struct type): Forward declare.
8325 (find_minsym_type_and_address): Declare.
8326 * parse.c (write_exp_elt_msym): New function.
8327 (write_exp_msymbol): Delete, refactored as ...
8328 (find_minsym_type_and_address): ... this new function.
8329 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8330 (operator_length_standard, operator_check_standard): Handle
8332 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8334 2017-09-04 Pedro Alves <palves@redhat.com>
8336 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8337 TYPE_GNU_IFUNC specially here. Throw error if return type is
8339 * ada-typeprint.c (print_func_type): Handle functions with unknown
8341 * c-typeprint.c (c_type_print_base): Handle functions and methods
8342 with unknown return type.
8343 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8344 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8345 * compile/compile-c-types.c: Include "objfiles.h".
8346 (convert_func): For functions with unknown return type, warn and
8348 * compile/compile-object-run.c (compile_object_run): Adjust call
8349 to call_function_by_hand_dummy.
8350 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8351 call_function_by_hand.
8352 * eval.c (evaluate_subexp_standard): Adjust calls to
8353 call_function_by_hand. Handle functions and methods with unknown
8354 return type. Pass expect_type to call_function_by_hand.
8355 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8357 * gcore.c (call_target_sbrk): Adjust call to
8358 call_function_by_hand.
8359 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8360 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8361 an integer address type instead of nodebug.
8362 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8363 call_function_by_hand.
8364 * infcall.c (error_call_unknown_return_type): New function.
8365 (call_function_by_hand): New "default_return_type" parameter.
8367 (call_function_by_hand_dummy): New "default_return_type"
8368 parameter. Use it instead of defaulting to int. If there's no
8369 default and the return type is unknown, throw an error. If
8370 there's a default return type, and the called function has no
8371 debug info, then assume the function is prototyped.
8372 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8373 New "default_return_type" parameter.
8374 (error_call_unknown_return_type): New declaration.
8375 * linux-fork.c (call_lseek): Cast return type of lseek.
8376 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8377 call_function_by_hand.
8378 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8379 calls to call_function_by_hand.
8380 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8382 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8383 (value_nsstring, print_object_command): Adjust calls to
8384 call_function_by_hand.
8385 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8386 functions with unknown return type.
8387 (pascal_type_print_func_varspec_suffix): New function.
8388 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8389 TYPE_CODE_METHOD>: Use it.
8390 * python/py-value.c (valpy_call): Adjust call to
8391 call_function_by_hand.
8392 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8393 call_function_by_hand.
8394 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8395 call_function_by_hand.
8396 * valops.c (value_allocate_space_in_inferior): Adjust call to
8397 call_function_by_hand.
8398 * typeprint.c (type_print_unknown_return_type): New function.
8399 * typeprint.h (type_print_unknown_return_type): New declaration.
8401 2017-09-04 Pedro Alves <palves@redhat.com>
8403 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8404 types with more than one parameter as prototyped.
8406 2017-09-04 Pedro Alves <palves@redhat.com>
8408 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8409 (disassemble_command): Use gdb_disassembly_flags instead of bare
8411 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8412 (dump_insns, do_mixed_source_and_assembly_deprecated)
8413 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8414 Use gdb_disassembly_flags instead of bare int.
8415 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8416 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8417 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8418 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8419 (enum gdb_disassembly_flag): ... values of this new enumeration.
8420 (gdb_disassembly_flags): Define.
8422 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8423 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8424 gdb_disassembly_flags instead of bare int.
8425 * record-btrace.c (btrace_insn_history)
8426 (record_btrace_insn_history, record_btrace_insn_history_range)
8427 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8428 instead of bare int.
8429 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8430 Use gdb_disassembly_flags instead of bare int.
8431 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8433 * target-delegates.c: Regenerate.
8434 * target.c (target_insn_history, target_insn_history_from)
8435 (target_insn_history_range): Use gdb_disassembly_flags instead of
8437 * target.h: Include "disasm.h".
8438 (struct target_ops) <to_insn_history, to_insn_history_from,
8439 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8441 (target_insn_history, target_insn_history_from)
8442 (target_insn_history_range): Use gdb_disassembly_flags instead of
8445 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8447 * cli/cli-script.c (build_command_line): For if/while commands,
8448 check whether args is empty.
8450 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8452 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8453 (enum command_control_type): Likewise.
8454 (struct command_line): Likewise.
8455 (free_command_lines): Likewise.
8456 (struct command_lines_deleter): Likewise.
8457 (command_line_up): Likewise.
8458 (read_command_lines): Likewise.
8459 (read_command_lines_1): Likewise.
8460 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8461 (enum command_control_type): Likewise.
8462 (struct command_line): Likewise.
8463 (free_command_lines): Likewise.
8464 (struct command_lines_deleter): Likewise.
8465 (command_line_up): Likewise.
8466 (read_command_lines): Likewise.
8467 (read_command_lines_1): Likewise.
8468 * breakpoint.h: Include cli/cli-script.h.
8469 * extension-priv.h: Likewise.
8470 * gdbcmd.h: Likewise.
8472 2017-09-04 Pedro Alves <palves@redhat.com>
8474 * ada-lang.c (is_known_support_routine): Move sal declaration to
8475 where it is initialized.
8476 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8477 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8478 (clear_command, update_static_tracepoint): Remove init_sal
8479 references. Move declarations closer to initializations.
8480 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8482 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8483 references. Move sal declarations closer to initializations.
8484 * frame.c (find_frame_sal): Return a symtab_and_line via function
8485 return instead of output parameter. Remove init_sal references.
8486 * frame.h (find_frame_sal): Return a symtab_and_line via function
8487 return instead of output parameter.
8488 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8489 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8491 (gdbscm_find_pc_line): Remove init_sal reference.
8492 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8493 references. Move declarations closer to initializations.
8494 * infcmd.c (set_step_frame): Update. Move declarations closer to
8496 (finish_backward): Remove init_sal references. Move declarations
8497 closer to initializations.
8498 * infrun.c (process_event_stop_test, handle_step_into_function)
8499 (insert_hp_step_resume_breakpoint_at_frame)
8500 (insert_step_resume_breakpoint_at_caller): Likewise.
8501 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8502 (symbol_to_sal): Likewise.
8503 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8504 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8505 to its initialization.
8506 * reverse.c (save_bookmark_command): Use new/delete. Remove
8507 init_sal references. Move declarations closer to initializations.
8508 * source.c (get_current_source_symtab_and_line): Remove brace
8510 (set_current_source_symtab_and_line): Now takes the sal by const
8511 reference. Remove brace initialization.
8512 (line_info): Remove init_sal reference.
8513 * source.h (set_current_source_symtab_and_line): Now takes a
8514 symtab_and_line via const reference.
8515 * stack.c (set_current_sal_from_frame): Adjust.
8516 (print_frame_info): Adjust.
8517 (get_last_displayed_sal): Return the sal via function return
8518 instead of via output parameter. Simplify.
8519 (frame_info): Adjust.
8520 * stack.h (get_last_displayed_sal): Return the sal via function
8521 return instead of via output parameter.
8522 * symtab.c (init_sal): Delete.
8523 (find_pc_sect_line): Remove init_sal references. Move
8524 declarations closer to initializations.
8525 (find_function_start_sal): Remove init_sal references. Move
8526 declarations closer to initializations.
8527 * symtab.h (struct symtab_and_line): In-class initialize all
8529 * tracepoint.c (set_traceframe_context)
8530 (print_one_static_tracepoint_marker): Remove init_sal references.
8531 Move declarations closer to initializations.
8532 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8533 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8534 declarations closer to initializations.
8535 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8536 init_sal references. Adjust.
8538 2017-09-04 Pedro Alves <palves@redhat.com>
8540 * ax-gdb.c (agent_command_1): Use range-for.
8541 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8542 * breakpoint.c: Include "common/array-view.h".
8543 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8544 parameter from struct symtabs_and_lines to
8545 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8546 (breakpoint_sals_to_pc): Change sals parameter from struct
8547 symtabs_and_lines to std::vector reference.
8548 (check_fast_tracepoint_sals): Change sals parameter from struct
8549 symtabs_and_lines to std::array_view. Use range-for.
8550 (decode_static_tracepoint_spec): Return a std::vector instead of
8551 symtabs_and_lines. Update.
8552 (create_breakpoint): Update.
8553 (break_range_command, until_break_command, clear_command): Update.
8554 (base_breakpoint_decode_location, bkpt_decode_location)
8555 (bkpt_probe_create_sals_from_location)
8556 (bkpt_probe_decode_location, tracepoint_decode_location)
8557 (tracepoint_probe_decode_location)
8558 (strace_marker_create_sals_from_location): Return a std::vector
8559 instead of symtabs_and_lines.
8560 (strace_marker_create_breakpoints_sal): Update.
8561 (strace_marker_decode_location): Return a std::vector instead of
8562 symtabs_and_lines. Update.
8563 (update_breakpoint_locations): Change struct symtabs_and_lines
8564 parameters to gdb::array_view. Adjust.
8565 (location_to_sals): Return a std::vector instead of
8566 symtabs_and_lines. Update.
8567 (breakpoint_re_set_default): Use std::vector instead of struct
8569 (decode_location_default): Return a std::vector instead of
8570 symtabs_and_lines. Update.
8571 * breakpoint.h: Include "common/array-view.h".
8572 (struct breakpoint_ops) <decode_location>: Now returns a
8573 std::vector instead of returning a symtabs_and_lines via output
8575 (update_breakpoint_locations): Change sals parameters to use
8577 * cli/cli-cmds.c (edit_command, list_command): Update to use
8578 std::vector and gdb::array_view.
8579 (ambiguous_line_spec): Adjust to use gdb::array_view and
8581 (compare_symtabs): Rename to ...
8582 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8583 const reference and adjust.
8584 (filter_sals): Rewrite using std::vector and standard algorithms.
8585 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8586 (jump_command): Update to use std::vector.
8587 * linespec.c (struct linespec_state) <canonical_names>: Update
8589 (add_sal_to_sals_basic): Delete.
8590 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8591 (decode_line_2, create_sals_line_offset)
8592 (convert_address_location_to_sals, convert_linespec_to_sals)
8593 (convert_explicit_location_to_sals, parse_linespec)
8594 (event_location_to_sals, decode_line_full, decode_line_1)
8595 (decode_line_with_current_source)
8596 (decode_line_with_last_displayed, decode_objc)
8597 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8598 (linespec_result::~linespec_result): Adjust to use std::vector
8599 instead of symtabs_and_lines.
8600 * linespec.h (linespec_sals::sals): Now a std::vector.
8601 (struct linespec_result): Use std::vector, bool, and in-class
8603 (decode_line_1, decode_line_with_current_source)
8604 (decode_line_with_last_displayed): Return std::vector.
8605 * macrocmd.c (info_macros_command): Use std::vector.
8606 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8607 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8609 * probe.h (parse_probes): Return a std::vector.
8610 * python/python.c (gdbpy_decode_line): Use std::vector and
8612 * source.c (select_source_symtab, line_info): Use std::vector.
8613 * stack.c (func_command): Use std::vector.
8614 * symtab.h (struct symtabs_and_lines): Delete.
8615 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8617 2017-09-04 Pedro Alves <palves@redhat.com>
8619 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8620 unittests/array-view-selftests.c.
8621 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8622 * common/array-view.h: New file.
8623 * unittests/array-view-selftests.c: New file.
8625 2017-09-04 Pedro Alves <palves@redhat.com>
8627 * cli/cli-cmds.c (edit_command): Pass message to
8628 ambiguous_line_spec.
8629 (list_command): Pass message to ambiguous_line_spec. Say
8630 "first"/"last" instead of "start" and "end" to be consistent with
8632 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8633 them to print formatted message.
8635 2017-09-04 Pedro Alves <palves@redhat.com>
8637 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8638 ftrace_update_insns by reference instead of pointer.
8640 2017-09-04 Yao Qi <yao.qi@linaro.org>
8642 * i386-go32-tdep.c: Include x86-xstate.h.
8643 (i386_go32_init_abi): Call i386_target_description.
8644 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8645 if xcr0 is X86_XSTATE_X87_MASK.
8646 * i386-tdep.h (tdesc_i386): Remove the declaration.
8647 (tdesc_i386_mmx): Likewise.
8649 2017-09-04 Yao Qi <yao.qi@linaro.org>
8651 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8652 X86_XSTATE_SSE_MASK instead of 0.
8654 2017-09-04 Yao Qi <yao.qi@linaro.org>
8656 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8657 i386_target_description.
8658 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8659 i386_target_description.
8660 * i386-tdep.c (i386_gdbarch_init): Likewise.
8662 2017-09-04 Yao Qi <yao.qi@linaro.org>
8664 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8665 (x86_darwin_init_abi_64): Call amd64_target_description.
8666 * amd64-dicos-tdep.c: Likewise.
8667 * amd64-fbsd-nat.c: Likewise.
8668 * amd64-fbsd-tdep.c: Likewise.
8669 * amd64-nbsd-tdep.c: Likewise.
8670 * amd64-obsd-tdep.c: Likewise.
8671 * amd64-sol2-tdep.c: Likewise.
8672 * amd64-windows-tdep.c: Likewise.
8673 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8675 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8677 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8678 (btrace_function) <insn>: Change type to use std::vector.
8679 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8680 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8681 ftrace_update_insns, ftrace_compute_global_level_offset,
8682 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8683 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8684 change to std::vector.
8685 (ftrace_update_insns): Adjust to change to std::vector, change
8686 type of INSN parameter.
8687 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8688 * record-btrace.c (btrace_call_history_insn_range,
8689 btrace_compute_src_line_range,
8690 record_btrace_frame_prev_register): Adjust to change to
8692 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8693 to change to std::vector.
8695 2017-09-03 Tom Tromey <tom@tromey.com>
8697 * corefile.c (reopen_exec_file): Use std::string.
8699 2017-09-03 Tom Tromey <tom@tromey.com>
8701 * compile/compile.c (compile_register_name_mangled): Return
8703 * compile/compile-loc2c.c (pushf_register_address): Update.
8704 (pushf_register): Update.
8705 * compile/compile-c-types.c (convert_array): Update.
8706 * compile/compile-c-symbols.c (generate_vla_size): Update.
8707 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8708 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8709 (convert_one_symbol): Update.
8710 (generate_c_for_for_one_variable): Update.
8711 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8713 (generate_register_struct): Update.
8714 * compile/compile-internal.h (c_get_range_decl_name): Return a
8716 (compile_register_name_mangled): Return std::string.
8718 2017-09-03 Tom Tromey <tom@tromey.com>
8720 * utils.c (perror_string): Return a std::string.
8721 (throw_perror_with_name, perror_warning_with_name): Update.
8723 2017-09-03 Tom Tromey <tom@tromey.com>
8725 * demangle.c (demangle_command): Use std::string,
8728 2017-09-03 Tom Tromey <tom@tromey.com>
8730 * cli/cli-setshow.c (do_set_command): Use std::string.
8732 2017-09-03 Tom Tromey <tom@tromey.com>
8734 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8736 2017-09-03 Tom Tromey <tom@tromey.com>
8738 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8740 2017-09-03 Tom Tromey <tom@tromey.com>
8742 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8743 gdb::unique_xmalloc_ptr.
8745 2017-09-03 Tom Tromey <tom@tromey.com>
8747 * thread.c (print_thread_info_1): Use string_printf.
8748 (thread_apply_command, thread_apply_all_command): Use
8751 2017-09-03 Tom Tromey <tom@tromey.com>
8753 * valprint.c (val_print_string): Update.
8754 * gdbcore.h (memory_error_message): Return std::string.
8755 * corefile.c (memory_error_message): Return std::string.
8756 (memory_error): Update.
8757 * breakpoint.c (insert_bp_location): Update.
8759 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8761 * target/waitstatus.h (target_waitstatus_to_string): Change
8762 return type to std::string.
8763 * target/waitstatus.c (target_waitstatus_to_string): Return
8765 * target.h (target_waitstatus_to_string): Remove declaration.
8766 * infrun.c (resume, clear_proceed_status_thread,
8767 print_target_wait_results, do_target_wait, save_waitstatus,
8768 stop_all_threads): Adjust.
8769 * record-btrace.c (record_btrace_wait): Adjust.
8771 (target_debug_print_struct_target_waitstatus_p): Adjust.
8773 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8776 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8779 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8781 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8782 for setting/unsetting environment variables on the remote target.
8783 (New remote packets): Add entries for QEnvironmentHexEncoded,
8784 QEnvironmentUnset and QEnvironmentReset.
8785 * common/environ.c (gdb_environ::operator=): Extend method to
8786 handle m_user_set_env_list and m_user_unset_env_list.
8787 (gdb_environ::clear): Likewise.
8788 (match_var_in_string): Change type of first parameter from 'char
8789 *' to 'const char *'.
8790 (gdb_environ::set): Extend method to handle
8791 m_user_set_env_list and m_user_unset_env_list.
8792 (gdb_environ::unset): Likewise.
8793 (gdb_environ::clear_user_set_env): New method.
8794 (gdb_environ::user_set_envp): Likewise.
8795 (gdb_environ::user_unset_envp): Likewise.
8796 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8797 m_user_unset_env_list on move constructor/assignment.
8798 (unset): Add new default parameter 'update_unset_list = true'.
8799 (clear_user_set_env): New method.
8800 (user_set_envp): Likewise.
8801 (user_unset_envp): Likewise.
8802 (m_user_set_env_list): New std::set.
8803 (m_user_unset_env_list): Likewise.
8804 * common/rsp-low.c (hex2str): New function.
8805 (bin2hex): New overload for bin2hex function.
8806 * common/rsp-low.c (hex2str): New prototype.
8807 (str2hex): New overload prototype.
8808 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8809 QEnvironmentUnset and QEnvironmentReset.
8810 (remote_protocol_features): Add QEnvironmentHexEncoded,
8811 QEnvironmentUnset and QEnvironmentReset packets.
8812 (send_environment_packet): New function.
8813 (extended_remote_environment_support): Likewise.
8814 (extended_remote_create_inferior): Call
8815 extended_remote_environment_support.
8816 (_initialize_remote): Add QEnvironmentHexEncoded,
8817 QEnvironmentUnset and QEnvironmentReset packet configs.
8818 * unittests/environ-selftests.c (gdb_selftest_env_var):
8820 (test_vector_initialization): New function.
8821 (test_init_from_host_environ): Likewise.
8822 (test_reinit_from_host_environ): Likewise.
8823 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8825 (test_unset_set_empty_vector): Likewise.
8826 (test_vector_clear): Likewise.
8827 (test_std_move): Likewise.
8828 (test_move_constructor):
8829 (test_self_move): Likewise.
8830 (test_set_unset_reset): Likewise.
8831 (run_tests): Rewrite in terms of the functions above.
8833 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8835 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8836 (adi_available): Use a temp variable of type CORE_ADDR as argument
8837 3 when calling target_auxv_search.
8838 (adi_normalize_address): Use masks and xor operators to calculate
8840 (adi_read_versions, adi_write_versions, adi_print_versions)
8841 (do_examine, do_assign): Use paddress.
8843 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8845 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8846 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8847 out of loop and add supply of FIR.
8848 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8851 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8854 * cli/cli-script.c (define_command): Don't convert command name
8857 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8859 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8860 Update all callers accordingly. Remove all code blocks handling
8861 the case where DISPP is not NULL.
8863 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8866 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8867 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8868 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8870 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8872 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8873 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8874 (read_comp_units_from_section): New parameter abbrev_section, use
8875 read_and_check_comp_unit_head, allocate signatured_type if needed.
8876 (create_all_comp_units): Update read_comp_units_from_section caller.
8878 2017-08-23 Pedro Alves <palves@redhat.com>
8881 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8882 to null_ptid and switch to thread without reading the registers
8883 after adding the inferior.
8885 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8887 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8889 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8890 (compile_to_object): Implement compile_gcc.
8891 (_initialize_compile): Install "set compile-gcc". Initialize
8894 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8896 * compile/compile.c (compile_to_object): Conditionally call
8897 set_verbose. Conditionally call compile or compile_v0.
8899 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8901 * sparc64-tdep.h: (adi_normalize_address): New export.
8902 * sparc-nat.h: (open_adi_tag_fd): New export.
8903 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8904 * sparc64-linux-tdep.c:
8905 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8906 (sparc64_linux_handle_segmentation_fault): New function.
8907 (sparc64_linux_init_abi): Register
8908 sparc64_linux_handle_segmentation_fault
8909 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8910 (sparc64_addr_bits_remove): New function.
8911 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8912 (MAX_PROC_NAME_SIZE): New macro.
8913 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8914 (sparc64adilist): New variable.
8915 (adi_proc_list): New variable.
8916 (find_adi_info): New function.
8917 (add_adi_info): New function.
8918 (get_adi_info_proc): New function.
8919 (get_adi_info): New function.
8920 (info_adi_command): New function.
8921 (read_maps_entry): New function.
8922 (adi_available): New function.
8923 (adi_normalize_address): New function.
8924 (adi_align_address): New function.
8925 (adi_convert_byte_count): New function.
8926 (adi_tag_fd): New function.
8927 (adi_is_addr_mapped): New function.
8928 (adi_read_versions): New function.
8929 (adi_write_versions): New function.
8930 (adi_print_versions): New function.
8931 (do_examine): New function.
8932 (do_assign): New function.
8933 (adi_examine_command): New function.
8934 (adi_assign_command): New function.
8935 (_initialize_sparc64_adi_tdep): New function.
8937 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8939 * breakpoint.c (breakpoints_info): Rename to ...
8940 (info_breakpoints_command): ... this.
8941 (watchpoints_info): Rename to ...
8942 (info_watchpoints_command): ... this.
8943 (tracepoints_info): Rename to ...
8944 (info_tracepoints_command): ... this.
8945 (_initialize_breakpoint): Adjust.
8946 * dcache.c (dcache_info): Rename to ...
8947 (info_display_command): ... this.
8948 (_initialize_dcache): Adjust.
8949 * frame.h (args_info): Rename to ...
8950 (info_args_command): ... this.
8951 (locals_info): Rename to ...
8952 (info_locals_command): ... this.
8953 * infcmd.c (nofp_registers_info): Rename to ...
8954 (info_registers_command): ... this.
8955 (float_info): Rename to ...
8956 (info_float_command): ... this.
8957 (program_info): Rename to ...
8958 (info_program_command): ... this.
8959 (all_registers_info): Rename to ...
8960 (info_all_registers_command): ... this.
8961 (vector_info): Rename to ...
8962 (info_vector_command): ... this.
8963 (float_info): Rename to ...
8964 (info_float_command): ... this.
8965 (_initialize_infcmd): Adjust.
8966 * inferior.h (term_info): Rename to ...
8967 (info_terminal_command): ... this.
8968 * inflow.c (term_info): Rename to ...
8969 (info_terminal_command): ... this.
8970 (_initialize_inflow): Adjust.
8971 * infrun.c (signals_info): Rename to ...
8972 (info_signals_command): ... this.
8973 (_initialize_infrun): Adjust.
8974 * objc-lang.c (classes_info): Rename to ...
8975 (info_classes_command): ... this.
8976 (selectors_info): Rename to ...
8977 (info_selectors_command): ... this.
8978 (_initialize_objc_language): Adjust.
8979 * printcmd.c (sym_info): Rename to ...
8980 (info_symbol_command): ... this.
8981 (address_info): Rename to ...
8982 (info_address_command): ... this.
8983 (display_info): Rename to ...
8984 (info_display_command): ... this.
8985 (_initialize_printcmd): Adjust.
8986 * reverse.c (bookmarks_info): Rename to ...
8987 (info_breakpoints_command): ... this.
8988 (_initialize_reverse): Adjust.
8989 * ser-go32.c (dos_info): Rename to ...
8990 (info_serial_command): ... this.
8991 (_initialize_ser_dos): Adjust.
8992 * skip.c (skip_info): Rename to ...
8993 (info_skip_command): ... this.
8994 (_initialize_step_skip): Adjust.
8995 * source.c (line_info): Rename to ...
8996 (info_line_command): ... this.
8997 (source_info): Rename to ...
8998 (info_source_command)
8999 * stack.c (frame_info): Rename to ...
9000 (info_frame_command): ... this.
9001 (locals_info): Rename to ...
9002 (info_locals_command): ... this.
9003 (args_info): Rename to ...
9004 (info_args_command): ... this.
9005 (_initialize_stack): Adjust.
9006 * symtab.c (sources_info): Rename to ...
9007 (info_sources_command): ... this.
9008 (variables_info): Rename to ...
9009 (info_variables_command): ... this.
9010 (functions_info): Rename to ...
9011 (info_functions_command): ... this.
9012 (types_info): Rename to ...
9013 (info_types_command): ... this.
9014 (_initialize_symtab): Adjust.
9015 * target.c (target_info): Rename to ...
9016 (info_target_command): ... this.
9017 (initialize_targets): Adjust.
9018 * tracepoint.c (tvariables_info): Rename to ...
9019 (info_tvariables_command): ... this.
9020 (scope_info): Rename to ...
9021 (info_scope_command): ... this.
9022 (trace_dump_actions): Adjust.
9023 (_initialize_tracepoint): Adjust.
9025 2017-08-22 Tom Tromey <tom@tromey.com>
9027 * breakpoint.h (install_breakpoint): Update.
9028 * breakpoint.c (add_solib_catchpoint): Update.
9029 (install_breakpoint): Change argument to a std::unique_ptr.
9030 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9031 (create_breakpoint_sal, create_breakpoint): Update.
9032 (watch_command_1, catch_exec_command_1)
9033 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9034 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9035 Return the breakpoint.
9036 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9037 (new_single_step_breakpoint): Update.
9038 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9040 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9042 * break-catch-sig.c (create_signal_catchpoint): Use
9044 * ada-lang.c (create_ada_exception_catchpoint): Use
9047 2017-08-22 Tom Tromey <tom@tromey.com>
9049 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9051 2017-08-22 Tom Tromey <tom@tromey.com>
9053 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9054 (lookup_partial_symbol): Update.
9056 2017-08-22 Tom Tromey <tom@tromey.com>
9058 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9059 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9060 (find_and_open_source, symtab_to_fullname): Update.
9061 * psymtab.c (psymtab_to_fullname): Update.
9063 2017-08-22 Tom Tromey <tom@tromey.com>
9065 * exec.c (exec_file_attach): Update.
9066 * linux-thread-db.c (try_thread_db_load): Update.
9067 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9068 * utils.c (gdb_realpath): Change return type.
9069 (gdb_realpath_keepfile): Update.
9070 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9071 (_initialize_utils): Register the new self test.
9072 * source.c (openp): Update.
9073 (find_and_open_source): Update.
9074 * nto-tdep.c (nto_find_and_open_solib): Update.
9075 * main.c (set_gdb_data_directory): Update.
9076 (captured_main_1): Update.
9077 * dwarf2read.c (dwarf2_get_dwz_file): Update
9078 (dw2_map_symbol_filenames): Update.
9079 * auto-load.c (auto_load_safe_path_vec_update): Update.
9080 (filename_is_in_auto_load_safe_path_vec): Change type of
9082 (auto_load_objfile_script): Update.
9083 (file_is_auto_load_safe): Update. Use std::string.
9084 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9086 2017-08-22 Tom Tromey <tom@tromey.com>
9088 * utils.c (gdb_realpath_keepfile): Return a
9089 gdb::unique_xmalloc_ptr.
9090 * exec.c (exec_file_attach): Update.
9091 * utils.h (gdb_realpath_keepfile): Return a
9092 gdb::unique_xmalloc_ptr.
9094 2017-08-22 Tom Tromey <tom@tromey.com>
9096 * compile/compile.c (compile_file_command): Use
9097 gdb::unique_xmalloc_ptr, std::string.
9098 * utils.c (gdb_abspath): Change return type.
9099 * source.c (openp): Update.
9100 * objfiles.c (allocate_objfile): Update.
9101 * main.c (set_gdb_data_directory): Update.
9102 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9104 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9106 * cli-cmds.c (list_commands): List actual code around more than
9109 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9111 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9113 2017-08-21 Pedro Alves <palves@redhat.com>
9116 * c-exp.y (variable production): Handle function aliases.
9117 * minsyms.c (msymbol_is_text): New function.
9118 * minsyms.h (msymbol_is_text): Declare.
9119 * symtab.c (find_function_alias_target): New function.
9120 * symtab.h (find_function_alias_target): Declare.
9122 2017-08-21 Pedro Alves <palves@redhat.com>
9124 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9126 * typeprint.c (whatis_exp): If handling "whatis", and expression
9127 is OP_TYPE, strip one typedef level. Otherwise don't strip
9129 * valops.c (value_cast): Save "to" type before resolving
9130 stubs/typedefs. Use that type as resulting value's type.
9132 2017-08-18 Tom Tromey <tom@tromey.com>
9133 Pedro Alves <palves@redhat.com>
9135 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9136 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9137 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9138 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9139 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9140 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9141 (linux_get_siginfo_data): Add "thread" argument. Use
9143 * linux-nat.c (linux_child_follow_fork)
9144 (check_stopped_by_watchpoint): Use scoped_restore.
9145 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9146 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9147 (restore_inferior_ptid, save_inferior_ptid): Remove.
9148 * btrace.c (btrace_fetch): Use scoped_restore.
9149 * bsd-uthread.c (bsd_uthread_fetch_registers)
9150 (bsd_uthread_store_registers): Use scoped_restore.
9151 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9153 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9154 (aix_thread_xfer_partial): Use scoped_restore.
9155 * inferior.h (save_inferior_ptid): Remove.
9157 2017-08-18 Yao Qi <yao.qi@linaro.org>
9160 * arm-tdep.c (gdb_print_insn_arm): Mark
9161 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9163 2017-08-18 Yao Qi <yao.qi@linaro.org>
9165 * NEWS: Mention GDBserver's new option "--selftest".
9166 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9167 * selftest.c: Move it to common/selftest.c.
9168 * selftest.h: Move it to common/selftest.h.
9169 * selftest-arch.c (reset): New function.
9170 (tests_with_arch): Call reset.
9172 2017-08-18 Yao Qi <yao.qi@linaro.org>
9174 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9175 instead of exception_fprintf and printf_filtered.
9177 2017-08-18 Yao Qi <yao.qi@linaro.org>
9179 * selftest.c (register_self_test): Rename it to
9180 selftests::register_test.
9181 (run_self_tests): selftest::run_tests.
9182 * selftest.h: Update declarations.
9183 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9184 selftests::register_test_foreach_arch.
9185 * selftest-arch.h: Update declaration.
9186 * aarch64-tdep.c: Update.
9187 * arm-tdep.c: Likewise.
9188 * disasm-selftests.c: Likewise.
9189 * dwarf2loc.c: Likewise.
9190 * dwarf2-frame.c: Likewise.
9191 * findvar.c: Likewise.
9192 * gdbarch-selftests.c: Likewise.
9193 * maint.c (maintenance_selftest): Likewise.
9194 * regcache.c: Likewise.
9195 * rust-exp.y: Likewise.
9196 * selftest-arch.c: Likewise.
9197 * unittests/environ-selftests.c: Likewise.
9198 * unittests/function-view-selftests.c: Likewise.
9199 * unittests/offset-type-selftests.c: Likewise.
9200 * unittests/optional-selftests.c: Likewise.
9201 * unittests/scoped_restore-selftests.c: Likewise.
9202 * utils-selftests.c: Likewise.
9204 2017-08-17 Pedro Alves <palves@redhat.com>
9206 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9209 2017-08-17 Pedro Alves <palves@redhat.com>
9211 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9213 (reset_die_in_process): Delete, replaced by ...
9214 (process_die_scope): ... this new class. Make it responsible for
9215 freeing cu->line_header too.
9216 (process_die): Use process_die_scope.
9217 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9218 cu->line_header_die_owner. Don't release the line header if it's
9220 (setup_type_unit_groups): Make the CU/DIE own the line header.
9221 Don't release the line header here.
9223 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9225 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9227 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9229 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9232 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9234 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9237 2017-08-15 Stafford Horne <shorne@gmail.com>
9239 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9241 2017-08-15 Stafford Horne <shorne@gmail.com>
9243 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9245 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9248 * infcmd.c (unset_environment_command): Use the 'clear' method on
9249 the environment instead of resetting it.
9251 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9253 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9256 2017-08-14 Tom Tromey <tom@tromey.com>
9258 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9259 (print_binary_chars): Likewise.
9260 (BITS_IN_BYTES): Remove.
9262 2017-08-14 Tom Tromey <tom@tromey.com>
9265 * valprint.c (LOW_ZERO): Change value to 034.
9266 (print_octal_chars): Add static_asserts for octal constants.
9267 * printcmd.c (print_scalar_formatted): Add 'd' case.
9269 2017-08-11 Tom Tromey <tom@tromey.com>
9271 * symfile.c (add_symbol_file_command): Use std::vector.
9273 2017-08-14 Tom Tromey <tom@tromey.com>
9275 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9276 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9278 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9280 2017-08-11 Pedro Alves <palves@redhat.com>
9282 * infrun.c (process_event_stop_test): Adjust
9283 function_name_is_marked_for_skip call.
9284 * skip.c: Include <list>.
9285 (skiplist_entry): Make it a class with private fields, and
9287 (skiplist_entry_chain): Delete.
9288 (skiplist_entries): New.
9289 (skiplist_entry_count): Delete.
9290 (highest_skiplist_entry_num): New.
9291 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9292 (add_skiplist_entry): Delete.
9293 (skiplist_entry::skiplist_entry): New.
9294 (skiplist_entry::add_entry): New.
9295 (skip_file_command, skip_function): Adjust.
9296 (compile_skip_regexp): Delete.
9297 (skip_command): Don't compile regexp here. Adjust to use
9298 skiplist_entry::add_entry.
9299 (skip_info): Adjust to use range-for and getters.
9300 (skip_enable_command, skip_disable_command): Adjust to use
9301 range-for and setters.
9302 (skip_delete_command): Adjust to use std::list.
9303 (add_skiplist_entry): Delete.
9304 (skip_file_p): Delete, refactored as ...
9305 (skiplist_entry::do_skip_file_p): ... this new method.
9306 (skip_gfile_p): Delete, refactored as ...
9307 (skiplist_entry::do_gskip_file_p): ... this new method.
9308 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9309 (skiplist_entry::skip_function_p): ... this new method.
9310 (function_name_is_marked_for_skip): Now returns bool, and takes
9311 the function sal by const reference. Adjust to use range-for and
9312 skiplist_entry methods.
9313 (_initialize_step_skip): Remove references to
9314 skiplist_entry_chain, skiplist_entry_count.
9315 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9316 takes the function sal by const reference.
9318 2017-08-11 Yao Qi <yao.qi@linaro.org>
9320 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9321 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9322 (dwarf2_frame_cache):
9323 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9324 RETURN_MASK_ALL and set *this_case to NULL.
9325 * frame-unwind.h: Update comments.
9327 2017-08-11 Yao Qi <yao.qi@linaro.org>
9329 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9330 (dwarf2_frame_state_copy_regs): Remove.
9331 (dwarf2_frame_state_free_regs): Remove.
9332 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9333 (dwarf2_restore_rule): Call method .alloc_regs instead of
9334 dwarf2_frame_state_alloc_regs.
9335 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9336 constructor. Call std::move.
9337 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9338 (dwarf2_frame_cache): Likewise.
9340 [GDB_SELF_TEST]: Include selftest.h and
9342 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9343 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9344 execute_cfa_program_test.
9346 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9347 copy ctor, assignment operator, move assignment.
9348 <alloc_regs>: New method.
9350 (struct dwarf2_frame_state): Delete dtor.
9351 (dwarf2_frame_state_alloc_regs): Remove declaration.
9352 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9353 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9355 2017-08-11 Yao Qi <yao.qi@linaro.org>
9357 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9358 (dwarf2_frame_state::dwarf2_frame_state): New.
9359 (dwarf2_frame_state::~dwarf2_frame_state): New.
9360 (dwarf2_fetch_cfa_info): Update.
9361 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9362 rather than a pointer. Update code.
9363 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9365 <data_align, code_align, retaddr_column>: Change them to const.
9366 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9369 2017-08-11 Yao Qi <yao.qi@linaro.org>
9371 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9372 <loc.exp>: New field.
9373 * dwarf2-frame.c (execute_cfa_program): Update.
9374 (dwarf2_frame_prev_register): Update.
9376 2017-08-10 Pedro Alves <palves@redhat.com>
9378 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9380 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9382 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9383 (fbsd_pending_children): Use std::list.
9384 (fbsd_remember_child): Likewise.
9385 (fbsd_is_child_pending): Likewise.
9386 (fbsd_pending_vfork_done): Use std::forward_list.
9387 (fbsd_add_vfork_done): Likewise.
9388 (fbsd_is_vfork_done_pending): Likewise.
9389 (fbsd_next_vfork_done): Likewise.
9391 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9393 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9394 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9395 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9397 (fbsd_xfer_partial): Use gdb::byte_vector.
9398 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9400 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9402 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9404 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9406 2017-08-09 Tom Tromey <tom@tromey.com>
9408 * skip.c (skiplist_entry): New constructor.
9409 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9410 (skiplist_entry::file_is_glob): Now bool.
9411 (skiplist_entry::file, skiplist_entry::function): Now
9413 (make_skip_entry): Return a unique_ptr. Use new.
9414 (free_skiplist_entry, free_skiplist_entry_cleanup)
9415 (make_free_skiplist_entry_cleanup): Remove.
9416 (skip_command, skip_disable_command, add_skiplist_entry)
9417 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9418 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9419 (function_name_is_marked_for_skip): Update.
9420 (skip_delete_command): Update. Use delete.
9422 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9424 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9425 (aarch64_linux_core_read_description): New function.
9426 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9428 2017-08-09 Pedro Alves <palves@redhat.com>
9430 * cp-name-parser.y (cp_comp_to_string): Return a
9431 gdb::unique_xmalloc_ptr<char>.
9432 * cp-support.c (replace_typedefs_qualified_name)
9433 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9434 (cp_canonicalize_string_full): Use op= instead of explicit
9436 (cp_class_name_from_physname, method_name_from_physname)
9437 (cp_func_name, cp_remove_params): Adjust to use
9438 gdb::unique_xmalloc_ptr<char>.
9439 * cp-support.h (cp_comp_to_string): Return a
9440 gdb::unique_xmalloc_ptr<char>.
9441 * python/py-type.c (typy_lookup_type): Adjust to use
9442 gdb::unique_xmalloc_ptr<char>.
9444 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9446 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9448 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9449 Yao Qi <yao.qi@linaro.org>
9451 * cp-support.c (cp_canonicalize_string_full): Use
9452 gdb::unique_xmalloc_ptr<char>.
9453 (cp_canonicalize_string): Likewise.
9455 2017-08-09 Yao Qi <yao.qi@linaro.org>
9457 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9458 * regformats/i386/amd64-avx-avx512.dat: Remove.
9459 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9460 * regformats/i386/amd64-avx-mpx.dat:Remove.
9461 * regformats/i386/amd64-avx.dat: Remove.
9462 * regformats/i386/amd64-mpx.dat: Remove.
9463 * regformats/i386/i386-avx-avx512.dat: Remove.
9464 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9465 * regformats/i386/i386-avx-mpx.dat: Remove.
9466 * regformats/i386/i386-mmx.dat: Remove.
9467 * regformats/i386/i386-mpx.dat: Remove.
9469 2017-08-09 Yao Qi <yao.qi@linaro.org>
9471 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9472 * amd64-tdep.c: Don't include features/i386/x32*.c.
9473 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9475 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9476 and i386/x32-avx-avx512.
9477 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9479 * features/i386/x32-avx-avx512.c: Removed.
9480 * features/i386/x32-avx-avx512.xml: Removed.
9481 * features/i386/x32-avx.c: Removed.
9482 * features/i386/x32-avx.xml: Removed.
9483 * features/i386/x32.c: Removed.
9484 * features/i386/x32.xml: Removed.
9485 * regformats/i386/x32-avx-avx512.dat: Removed.
9486 * regformats/i386/x32-avx.dat: Removed.
9487 * regformats/i386/x32.dat: Removed.
9489 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9491 PR breakpoints/21886
9492 * mem-break.c (default_memory_insert_breakpoint): Use
9493 `->placed_address' rather than `->reqstd_address' for the
9494 breakpoint location.
9496 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9498 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9501 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9503 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9504 a union of `tdep_info', `tdesc_data' and `id'.
9505 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9506 rather than `info.tdep_info'.
9507 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9508 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9509 * i386-tdep.c (i386_gdbarch_init): Likewise.
9510 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9511 * mips-tdep.c (mips_gdbarch_init): Likewise.
9512 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9513 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9514 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9516 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9518 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9519 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9521 * spu-tdep.c (spu_gdbarch_init): Likewise.
9522 * gdbarch.h: Regenerate.
9524 2017-08-07 Leszek Swirski <leszeks@google.com>
9527 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9529 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9531 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9532 (gdbsim_open): Rename gdb_argv args object to argv.
9534 2017-08-05 Tom Tromey <tom@tromey.com>
9536 * compile/compile-object-load.c (compile_object_load): Use
9537 gdb::unique_xmalloc_ptr.
9538 * cli/cli-dump.c (scan_filename): Rename from
9539 scan_filename_with_cleanup. Change return type.
9540 (scan_expression): Rename from scan_expression_with_cleanup.
9542 (dump_memory_to_file, dump_value_to_file, restore_command):
9543 Use gdb::unique_xmalloc_ptr. Update.
9544 * cli/cli-cmds.c (find_and_open_script): Use
9545 gdb::unique_xmalloc_ptr.
9546 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9547 * symmisc.c (maintenance_print_symbols)
9548 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9549 * symfile.c (symfile_bfd_open, generic_load)
9550 (add_symbol_file_command, remove_symbol_file_command): Use
9551 gdb::unique_xmalloc_ptr.
9552 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9553 * psymtab.c (maintenance_print_psymbols): Use
9554 gdb::unique_xmalloc_ptr.
9555 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9556 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9557 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9558 (reload_shared_libraries_1): Likewise.
9560 2017-08-05 Tom Tromey <tom@tromey.com>
9562 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9563 (rust_op_vector, rust_set_vector): New typedefs.
9564 (current_parser): New global.
9565 (work_obstack): Change to pointer type. Update all users.
9566 (rust_ast, pstate): Remove globals.
9567 (struct rust_parser): New.
9568 (%union) <params, field_inits>: Change type.
9569 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9570 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9571 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9572 (convert_params_to_types, convert_params_to_expression): Change
9574 (ast_string): Change type of "fields".
9575 (rust_parse): Make a rust_parser. Remove cleanups.
9576 (rust_lex_tests): Make and install an auto_obstack.
9578 2017-08-04 Yao Qi <yao.qi@linaro.org>
9580 * configure.srv (ipa_x32_linux_regobj): New.
9581 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9582 instead of X86_TDESC_AVX512.
9583 (initialize_low_tracepoint): Call
9584 init_registers_x32_avx_avx512_linux.
9586 2017-08-04 Yao Qi <yao.qi@linaro.org>
9588 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9590 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9592 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9594 2017-08-03 Tom Tromey <tom@tromey.com>
9596 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9598 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9600 2017-08-03 Tom Tromey <tom@tromey.com>
9602 * python/py-param.c (compute_enum_values): Use gdb_argv.
9604 2017-08-03 Tom Tromey <tom@tromey.com>
9606 * utils.h (struct gdb_argv_deleter): New.
9607 (gdb_argv): New class.
9608 * utils.c (gdb_argv::reset): New method.
9609 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9610 * tracefile.c (tsave_command): Use gdb_argv.
9611 * top.c (new_ui_command): Use gdb_argv.
9612 * symmisc.c (maintenance_print_symbols)
9613 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9614 * symfile.c (symbol_file_command, generic_load)
9615 (remove_symbol_file_command): Use gdb_argv.
9616 * stack.c (backtrace_command): Use gdb_argv.
9617 * source.c (add_path, show_substitute_path_command)
9618 (unset_substitute_path_command, set_substitute_path_command):
9620 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9621 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9622 * remote.c (extended_remote_run, remote_put_command)
9623 (remote_get_command, remote_delete_command): Use gdb_argv.
9624 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9625 (gdbsim_open): Use gdb_argv.
9626 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9627 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9628 * procfs.c (procfs_info_proc): Use gdb_argv.
9629 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9630 * infrun.c (handle_command): Use gdb_argv.
9631 * inferior.c (add_inferior_command, clone_inferior_command):
9633 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9634 * exec.c (exec_file_command): Use gdb_argv.
9635 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9636 * compile/compile.c (build_argc_argv): Use gdb_argv.
9638 2017-08-03 Tom Tromey <tom@tromey.com>
9640 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9642 2017-08-03 Tom Tromey <tom@tromey.com>
9644 * python/python.c (compute_python_string): Return std::string.
9645 (gdbpy_eval_from_control_command): Update.
9646 (do_start_initialization): Use std::string.
9647 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9649 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9652 2017-08-03 Tom Tromey <tom@tromey.com>
9654 * top.h (do_restore_instream_cleanup): Remove.
9655 * top.c (do_restore_instream_cleanup): Remove.
9656 (read_command_file): Use scoped_restore.
9657 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9659 2017-08-03 Tom Tromey <tom@tromey.com>
9661 * cli/cli-script.c (execute_user_command)
9662 (execute_control_command): Use scoped_restore.
9664 2017-08-03 Tom Tromey <tom@tromey.com>
9666 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9667 (execute_user_command): Remove user_call_depth; use
9668 user_args_stack's size instead.
9670 2017-08-03 Tom Tromey <tom@tromey.com>
9672 * top.h (in_user_command): Remove.
9673 * top.c (in_user_command): Remove.
9674 * cli/cli-script.c (do_restore_user_call_depth)
9675 (execute_user_command): Update.
9677 2017-08-03 Tom Tromey <tom@tromey.com>
9679 * valops.c (search_struct_method): Use gdb::byte_vector.
9680 * valarith.c (value_concat): Use std::vector.
9681 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9682 (simple_search_memory): Likewise.
9683 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9684 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9685 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9686 * elfread.c (elf_rel_plt_read): Use std::string.
9687 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9688 * cli/cli-dump.c (restore_section_callback): Use
9691 2017-08-03 Tom Tromey <tom@tromey.com>
9693 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9695 2017-08-03 Tom Tromey <tom@tromey.com>
9697 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9698 (tui_register_format): Use scoped_restore.
9700 2017-08-03 Tom Tromey <tom@tromey.com>
9702 * reverse.c (exec_direction_default): Remove.
9703 (exec_reverse_once): Use scoped_restore.
9704 * remote.c (restore_remote_timeout): Remove.
9705 (remote_flash_erase, remote_flash_write, remote_flash_done)
9706 (readchar, remote_serial_write): Use scoped_restore.
9707 * cli/cli-script.c (struct source_cleanup_lines_args)
9708 (source_cleanup_lines): Remove.
9709 (script_from_file): Use scoped_restore.
9710 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9711 (source_command): Use scoped_restore.
9713 2017-08-03 Tom Tromey <tom@tromey.com>
9715 * utils.h (make_cleanup_free_so): Remove.
9716 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9717 * solist.h (struct so_deleter): New.
9718 (so_list_up): New typedef.
9719 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9721 2017-08-03 Tom Tromey <tom@tromey.com>
9723 * utils.h (make_cleanup_restore_current_language): Remove.
9724 * utils.c (do_restore_current_language)
9725 (make_cleanup_restore_current_language): Remove.
9726 * parse.c (parse_exp_in_context_1)
9727 (parse_expression_with_language): Use
9728 scoped_restore_current_language.
9729 * mi/mi-main.c (mi_cmd_execute): Use
9730 scoped_restore_current_language.
9731 * language.h (scoped_restore_current_language): New class.
9733 2017-08-03 Tom Tromey <tom@tromey.com>
9735 * compile/compile.c (cleanup_unlink_file): Remove.
9736 (compile_to_object): Use gdb::unlinker.
9737 (eval_compile_command): Likewise.
9739 2017-08-03 Tom Tromey <tom@tromey.com>
9741 * utils.h (make_cleanup_fclose): Remove.
9742 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9744 2017-08-03 Tom Tromey <tom@tromey.com>
9746 * top.c (open_terminal_stream): Return gdb_file_up.
9747 (new_ui_command): Update.
9749 2017-08-03 Tom Tromey <tom@tromey.com>
9751 * source.c (print_source_lines_base, forward_search_command)
9752 (reverse_search_command): Use gdb_file_up.
9754 2017-08-03 Tom Tromey <tom@tromey.com>
9756 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9758 2017-08-03 Tom Tromey <tom@tromey.com>
9760 * cli/cli-cmds.c (find_and_open_script): Change return type.
9761 Remove "streamp" and "full_path" parameters.
9762 (source_script_with_search): Update.
9763 * auto-load.c (source_script_file): Update.
9764 * cli/cli-cmds.h (find_and_open_script): Change type.
9765 (open_script): New struct.
9767 2017-08-03 Tom Tromey <tom@tromey.com>
9769 * xml-support.c (xml_fetch_content_from_file): Update.
9770 * ui-file.c (stdio_file::open): Update.
9771 * tracefile-tfile.c (tfile_start): Update.
9772 * remote.c (remote_file_put, remote_file_get): Update.
9773 * nat/linux-procfs.c (linux_proc_get_int)
9774 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9775 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9776 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9777 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9778 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9779 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9780 * linux-nat.c (linux_proc_pending_signals): Update.
9781 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9782 (file_closer): Remove.
9783 * compile/compile.c (compile_to_object): Update.
9784 * common/filestuff.h (struct gdb_file_deleter): New.
9785 (gdb_file_up): New typedef.
9786 (gdb_fopen_cloexec): Change return type.
9787 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9788 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9789 (dump_binary_file, restore_binary_file): Update.
9790 * auto-load.c (auto_load_objfile_script_1): Update.
9792 2017-08-03 Tom Tromey <tom@tromey.com>
9794 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9795 (info_static_tracepoint_markers_command): Likewise.
9796 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9797 * skip.c (skip_info): Use ui_out_emit_table.
9798 * progspace.c (print_program_space): Use ui_out_emit_table.
9799 * osdata.c (info_osdata): Use ui_out_emit_table.
9800 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9802 * linux-thread-db.c (info_auto_load_libthread_db): Use
9804 * inferior.c (print_inferior): Use ui_out_emit_table.
9805 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9806 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9807 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9808 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9809 * ui-out.h (class ui_out_emit_table): New.
9811 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9813 * mips-tdep.c (mips_fpu_type_str): New function.
9814 (mips_dump_tdep): Call it.
9816 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9818 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9821 2017-07-31 Xavier Roirand <roirand@adacore.com>
9823 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9825 2017-07-27 Xavier Roirand <roirand@adacore.com>
9827 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9829 2017-07-26 Yao Qi <yao.qi@linaro.org>
9831 * cli/cli-cmds.c (maintenancechecklist): New variable.
9832 * gdbcmd.h (maintenancechecklist): Declare it.
9833 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9834 Call i386_linux_read_description with different masks.
9835 * maint.c (maintenance_check_command): New function.
9836 (_initialize_maint_cmds): Call add_prefix_cmd.
9837 * target-descriptions.c (tdesc_reg): override operator != and ==.
9838 (tdesc_type): Likewise.
9839 (tdesc_feature): Likewise.
9840 (target_desc): Likewise.
9841 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9842 (maintenance_check_xml_descriptions): New function.
9843 (_initialize_target_descriptions) Add command "xml-descriptions".
9844 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9846 2017-07-26 Yao Qi <yao.qi@linaro.org>
9848 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9849 Include features/i386/32bit-*.c.
9850 (i386_linux_read_description): Generate target description if it
9852 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9854 * features/i386/32bit-linux.c: Re-generated.
9855 * features/i386/32bit-sse.c: Likewise.
9856 * target-descriptions.c (print_c_feature::visit): Print code to
9857 set register number if needed.
9858 (print_c_feature) <m_next_regnum>: New field.
9860 2017-07-26 Yao Qi <yao.qi@linaro.org>
9862 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9863 (FEATURE_XMLFILES): New.
9864 (FEATURE_CFILES): New.
9866 (clean-cfiles): Remove generated c files.
9867 * features/i386/32bit-avx.c: Generated.
9868 * features/i386/32bit-avx512.c: Generated.
9869 * features/i386/32bit-core.c: Generated.
9870 * features/i386/32bit-linux.c: Generated.
9871 * features/i386/32bit-mpx.c: Generated.
9872 * features/i386/32bit-pkeys.c: Generated.
9873 * features/i386/32bit-sse.c: Generated.
9874 * target-descriptions.c: Include algorithm.
9875 (tdesc_element_visitor): Add method visit_end.
9876 (print_c_tdesc): Implement visit_end.
9877 (print_c_tdesc:: m_filename_after_features): Move it to
9879 (print_c_feature): New class.
9880 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9881 name starts with "i386/32bit-".
9883 2017-07-26 Yao Qi <yao.qi@linaro.org>
9885 * target-descriptions.c (tdesc_element_visitor): New class.
9886 (tdesc_element): New class.
9887 (tdesc_reg): Inherit from tdesc_element.
9888 (tdesc_reg::accept): New function.
9889 (tdesc_type): Inherit from tdesc_element.
9890 (tdesc_type::accept): New function.
9891 (tdesc_feature): Inherit from tdesc_element.
9892 (tdesc_feature::accept): New function.
9893 (target_desc): Inherit from tdesc_element.
9894 (target_desc::target_desc): New.
9895 (target_desc::~target_desc): New.
9896 (target_desc::accept): New.
9897 (allocate_target_description): Use new.
9898 (free_target_description): Use delete.
9899 (print_c_tdesc): New class.
9900 (maint_print_c_tdesc_cmd): Adjust.
9902 * features/aarch64.c: Re-generated.
9903 * features/arc-arcompact.c: Re-generated.
9904 * features/arc-v2.c: Re-generated.
9905 * features/arm/arm-with-iwmmxt.c: Re-generated.
9906 * features/arm/arm-with-m.c: Re-generated.
9907 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9908 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9909 * features/arm/arm-with-neon.c: Re-generated.
9910 * features/arm/arm-with-vfpv2.c: Re-generated.
9911 * features/arm/arm-with-vfpv3.c: Re-generated.
9912 * features/i386/amd64-avx-avx512.c: Re-generated.
9913 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9914 * features/i386/amd64-avx.c: Re-generated.
9915 * features/i386/amd64-avx-linux.c: Re-generated.
9916 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9917 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9918 * features/i386/amd64-avx-mpx.c: Re-generated.
9919 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9920 * features/i386/amd64.c: Re-generated.
9921 * features/i386/amd64-linux.c: Re-generated.
9922 * features/i386/amd64-mpx.c: Re-generated.
9923 * features/i386/amd64-mpx-linux.c: Re-generated.
9924 * features/i386/i386-avx-avx512.c: Re-generated.
9925 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9926 * features/i386/i386-avx.c: Re-generated.
9927 * features/i386/i386-avx-linux.c: Re-generated.
9928 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9929 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9930 * features/i386/i386-avx-mpx.c: Re-generated.
9931 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9932 * features/i386/i386.c: Re-generated.
9933 * features/i386/i386-linux.c: Re-generated.
9934 * features/i386/i386-mmx.c: Re-generated.
9935 * features/i386/i386-mmx-linux.c: Re-generated.
9936 * features/i386/i386-mpx.c: Re-generated.
9937 * features/i386/i386-mpx-linux.c: Re-generated.
9938 * features/i386/x32-avx-avx512.c: Re-generated.
9939 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9940 * features/i386/x32-avx.c: Re-generated.
9941 * features/i386/x32-avx-linux.c: Re-generated.
9942 * features/i386/x32.c: Re-generated.
9943 * features/i386/x32-linux.c: Re-generated.
9944 * features/microblaze.c: Re-generated.
9945 * features/microblaze-with-stack-protect.c: Re-generated.
9946 * features/mips64-dsp-linux.c: Re-generated.
9947 * features/mips64-linux.c: Re-generated.
9948 * features/mips-dsp-linux.c: Re-generated.
9949 * features/mips-linux.c: Re-generated.
9950 * features/nds32.c: Re-generated.
9951 * features/nios2.c: Re-generated.
9952 * features/nios2-linux.c: Re-generated.
9953 * features/rs6000/powerpc-32.c: Re-generated.
9954 * features/rs6000/powerpc-32l.c: Re-generated.
9955 * features/rs6000/powerpc-403.c: Re-generated.
9956 * features/rs6000/powerpc-403gc.c : Re-generated.
9957 * features/rs6000/powerpc-405.c: Re-generated.
9958 * features/rs6000/powerpc-505.c: Re-generated.
9959 * features/rs6000/powerpc-601.c: Re-generated.
9960 * features/rs6000/powerpc-602.c: Re-generated.
9961 * features/rs6000/powerpc-603.c: Re-generated.
9962 * features/rs6000/powerpc-604.c: Re-generated.
9963 * features/rs6000/powerpc-64.c: Re-generated.
9964 * features/rs6000/powerpc-64l.c: Re-generated.
9965 * features/rs6000/powerpc-7400.c: Re-generated.
9966 * features/rs6000/powerpc-750.c: Re-generated.
9967 * features/rs6000/powerpc-860.c: Re-generated.
9968 * features/rs6000/powerpc-altivec32.c: Re-generated.
9969 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9970 * features/rs6000/powerpc-altivec64.c: Re-generated.
9971 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9972 * features/rs6000/powerpc-cell32l.c: Re-generated.
9973 * features/rs6000/powerpc-cell64l.c: Re-generated.
9974 * features/rs6000/powerpc-e500.c: Re-generated.
9975 * features/rs6000/powerpc-e500l.c: Re-generated.
9976 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9977 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9978 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9979 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9980 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9981 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9982 * features/rs6000/powerpc-vsx32.c: Re-generated.
9983 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9984 * features/rs6000/powerpc-vsx64.c: Re-generated.
9985 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9986 * features/rs6000/rs6000.c: Re-generated.
9987 * features/s390-linux32.c: Re-generated.
9988 * features/s390-linux32v1.c: Re-generated.
9989 * features/s390-linux32v2.c: Re-generated.
9990 * features/s390-linux64.c: Re-generated.
9991 * features/s390-linux64v1.c: Re-generated.
9992 * features/s390-linux64v2.c: Re-generated.
9993 * features/s390-te-linux64.c: Re-generated.
9994 * features/s390-tevx-linux64.c: Re-generated.
9995 * features/s390-vx-linux64.c: Re-generated.
9996 * features/s390x-linux64.c: Re-generated.
9997 * features/s390x-linux64v1.c: Re-generated.
9998 * features/s390x-linux64v2.c: Re-generated.
9999 * features/s390x-te-linux64.c: Re-generated.
10000 * features/s390x-tevx-linux64.c: Re-generated.
10001 * features/s390x-vx-linux64.c: Re-generated.
10002 * features/sparc/sparc32-solaris.c: Re-generated.
10003 * features/sparc/sparc64-solaris.c: Re-generated.
10004 * features/tic6x-c62x.c: Re-generated.
10005 * features/tic6x-c62x-linux.c: Re-generated.
10006 * features/tic6x-c64x.c: Re-generated.
10007 * features/tic6x-c64x-linux.c: Re-generated.
10008 * features/tic6x-c64xp.c: Re-generated.
10009 * features/tic6x-c64xp-linux.c: Re-generated.
10011 2017-07-26 Yao Qi <yao.qi@linaro.org>
10013 * i386-linux-tdep.c (i386_linux_read_description): New function.
10014 (i386_linux_core_read_description): Call
10015 i386_linux_read_description.
10016 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10017 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10018 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10019 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10020 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10021 * x86-linux-nat.c (x86_linux_read_description): Call
10022 i386_linux_read_description.
10024 2017-07-26 Yao Qi <yao.qi@linaro.org>
10026 * NEWS: Mention it.
10027 * features/Makefile (%.c: %.xml): Pass the xml file name to
10028 command "maint print c-tdesc".
10029 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10032 2017-07-26 Yao Qi <yao.qi@linaro.org>
10034 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10035 in-class initialization.
10036 (tdesc_create_feature): Call new instead of XCNEW.
10037 (free_target_description): Ue delete.
10039 2017-07-25 John Baldwin <jhb@FreeBSD.org>
10041 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10043 2017-07-25 Yao Qi <yao.qi@linaro.org>
10045 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10047 (amd64_x32_init_abi): Likewise.
10048 * amd64-tdep.h (amd64_init_abi): Update declaration.
10049 (amd64_x32_init_abi): Likewise.
10051 2017-07-25 Yao Qi <yao.qi@linaro.org>
10054 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10055 condition for FPSCR.
10056 (arm_linux_store_inferior_registers): Likewise.
10058 2017-07-22 Tom Tromey <tom@tromey.com>
10060 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10061 <syscalls_counts>: Now a std::vector.
10062 (get_catch_syscall_inferior_data): Use "new".
10063 (catch_syscall_inferior_data_cleanup): Use "delete".
10064 (insert_catch_syscall, remove_catch_syscall)
10065 (clear_syscall_counts): Update.
10067 2017-07-22 Tom Tromey <tom@tromey.com>
10069 * break-catch-syscall.c (syscall_catchpoint)
10070 <syscalls_to_be_caught>: Now a std::vector<int>
10071 (~syscall_catchpoint): Remove.
10072 (insert_catch_syscall, remove_catch_syscall)
10073 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10074 (print_mention_catch_syscall, print_recreate_catch_syscall):
10076 (create_syscall_event_catchpoint): Change type of "filter"
10078 (catch_syscall_split_args): Return a std::vector.
10079 (catch_syscall_command_1, catching_syscall_number_1): Update.
10081 2017-07-22 Tom Tromey <tom@tromey.com>
10083 * break-catch-throw.c (struct exception_catchpoint)
10084 <exception_rx>: Now a std::string.
10085 (~exception_catchpoint): Remove.
10086 (print_one_detail_exception_catchpoint): Update.
10087 (handle_gnu_v3_exceptions): Change type of except_rx.
10088 (extract_exception_regexp): Return a std::string.
10089 (catch_exception_command_1): Update.
10091 2017-07-22 Tom Tromey <tom@tromey.com>
10093 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10094 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10096 <catch_all>: Now a bool.
10097 (~signal_catchpoint): Remove.
10098 (signal_catchpoint_insert_location)
10099 (signal_catchpoint_remove_location)
10100 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10101 (signal_catchpoint_print_mention)
10102 (signal_catchpoint_print_recreate)
10103 (signal_catchpoint_explains_signal): Update.
10104 (create_signal_catchpoint): Change type of "filter" and
10106 (catch_signal_split_args): Return a std::vector. Change type of
10108 (catch_signal_command): Update.
10110 2017-07-20 Pedro Alves <palves@redhat.com>
10112 * ada-lang.c (ada_language_defn): Make extern.
10113 (_initialize_ada_language): Remove add_language call.
10114 * c-lang.c (c_language_defn, cplus_language_defn)
10115 (asm_language_defn, minimal_language_defn): Make extern.
10116 (_initialize_c_language): Delete.
10117 * completer.c (compare_cstrings): Delete, moved to utils.h.
10118 * d-lang.c (d_language_defn): Make extern.
10119 (_initialize_d_language): Remove add_language calls.
10120 * defs.h (enum language): Add comment.
10121 * f-lang.c (f_language_defn): Make extern.
10122 (_initialize_f_language): Remove add_language call.
10123 * go-lang.c (go_language_defn): Make extern.
10124 (_initialize_go_language): Remove add_language call.
10125 * language.c: Include <algorithm>.
10126 (languages): Redefine as const array.
10127 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10128 (set_language_command): Handle "local". Use for-range loop.
10129 (set_language): Remove loop.
10130 (language_enum): Rewrite.
10131 (language_def, language_str): Remove loops.
10132 (add_language): Delete.
10133 (add_set_language_command): New, based on add_languages.
10134 (skip_language_trampoline): Adjust.
10135 (local_language_defn): Delete.
10136 (language_gdbarch_post_init): Adjust.
10137 (_initialize_language): Remove add_language calls. Call
10138 add_set_language_command.
10139 * language.h (add_language): Delete.
10140 (auto_language_defn)
10141 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10142 (asm_language_defn, c_language_defn, cplus_language_defn)
10143 (d_language_defn, f_language_defn, go_language_defn)
10144 (m2_language_defn, objc_language_defn, opencl_language_defn)
10145 (pascal_language_defn, rust_language_defn): Declare.
10146 * m2-lang.c (m2_language_defn): Make extern.
10147 (_initialize_m2_language): Remove add_language call.
10148 * objc-lang.c (objc_language_defn): Make extern.
10149 (_initialize_objc_language): Remove add_language call.
10150 * opencl-lang.c (opencl_language_defn): Make extern.
10151 (_initialize_opencl_language): Remove add_language call.
10152 * p-lang.c (pascal_language_defn): Make extern.
10153 (_initialize_pascal_language): Delete.
10154 * rust-lang.c (rust_language_defn): Make extern.
10155 (_initialize_rust_language): Delete.
10156 * utils.h (compare_cstrings): New static inline function.
10158 2017-07-20 Pedro Alves <palves@redhat.com>
10160 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10161 (get_var_value): Constify parameters.
10162 (get_int_var_value): Change prototype.
10163 (to_fixed_range_type): Adjust.
10164 * ada-lang.h (get_int_var_value): Change prototype.
10166 2017-07-20 Pedro Alves <palves@redhat.com>
10168 * dwarf2read.c (dw2_lookup_symbol): Use
10169 SYMBOL_MATCHES_SEARCH_NAME.
10170 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10172 2017-07-20 Pedro Alves <palves@redhat.com>
10174 * block.c (block_iter_name_step, block_iter_name_first)
10175 (block_iter_name_next): Delete.
10176 (block_lookup_symbol_primary): Adjust to use
10177 dict_iter_match_first/dict_iter_match_next.
10178 * block.h (block_iter_name_first, block_iter_name_next): Delete
10180 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10181 dict_iter_match_first/dict_iter_match_next.
10183 2017-07-20 Pedro Alves <palves@redhat.com>
10185 * cp-support.c (cp_find_first_component_aux): Add missing case for
10188 2017-07-18 David Blaikie <dblaikie@gmail.com>
10190 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10191 of dwo_cu's dwo_file.
10193 2017-07-18 Yao Qi <yao.qi@linaro.org>
10195 * remote.c (store_registers_using_G): Remove one line comment.
10197 2017-07-18 Yao Qi <yao.qi@linaro.org>
10199 * regcache.c (regcache_cpy): Simplify it.
10200 (regcache::cpy_no_passthrough): Remove it.
10201 * regcache.h (cpy_no_passthrough): Remove it.
10202 (regcache_dup, regcache_cpy): Update comments.
10204 2017-07-18 Pedro Alves <palves@redhat.com>
10206 * remote-sim.c (sim_command_completer): Adjust to work with a
10207 completion_tracker instead of a VEC.
10209 2017-07-17 Pedro Alves <palves@redhat.com>
10211 * completer.c (complete_source_filenames): New function.
10212 (complete_address_and_linespec_locations): New function.
10213 (location_completer): Use complete_address_and_linespec_locations.
10214 (completion_tracker::build_completion_result): Honor the tracker's
10215 request to suppress append.
10216 * completer.h (completion_tracker::suppress_append_ws)
10217 (completion_tracker::set_suppress_append_ws): New methods.
10218 (completion_tracker::m_suppress_append_ws): New field.
10219 (complete_source_filenames): New declaration.
10220 * linespec.c (linespec_complete_what): New.
10221 (struct ls_parser) <complete_what, completion_word,
10222 completion_quote_char, completion_quote_end, completion_tracker>:
10224 (string_find_incomplete_keyword_at_end): New.
10225 (linespec_lexer_lex_string): Record quote char. If in completion
10227 (linespec_lexer_consume_token): Advance the completion word point.
10228 (linespec_lexer_peek_token): Save/restore completion info.
10229 (save_stream_and_consume_token): New.
10230 (set_completion_after_number): New.
10231 (linespec_parse_basic): Set what to complete next depending on
10232 token. Handle function and label completions specially.
10233 (parse_linespec): Disable objc shortcut in completion mode. Set
10234 what to complete next depending on token type. Skip keyword if in
10236 (complete_linespec_component, linespec_complete): New.
10237 * linespec.h (linespec_complete): Declare.
10239 2017-07-17 Pedro Alves <palves@redhat.com>
10241 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10242 Handle 'operator<' / 'operator<<'.
10244 2017-07-17 Pedro Alves <palves@redhat.com>
10246 * completer.c (collect_explicit_location_matches): Handle
10248 (convert_explicit_location_to_linespec): New, factored out from
10250 (convert_explicit_location_to_sals): ... this.
10251 (complete_label): New.
10252 (linespec_complete_label, find_label_symbols_in_block): New.
10253 (find_label_symbols): Add completion_mode parameter and adjust to
10254 call find_label_symbols_in_block.
10255 * linespec.h (linespec_complete_label): Declare.
10257 2017-07-17 Pedro Alves <palves@redhat.com>
10259 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10260 complete_symbol_mode parameter.
10261 * cli/cli-cmds.c (complete_command): Get the completion result out
10262 of the handle_brkchars tracker if used a custom word point.
10263 * completer.c: Include "linespec.h".
10264 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10265 (advance_to_expression_complete_word_point): New.
10266 (completion_tracker::completes_to_completion_word): New.
10267 (complete_files_symbols): Pass down
10268 complete_symbol_mode::EXPRESSION.
10269 (explicit_options, probe_options): New.
10270 (collect_explicit_location_matches): Complete on the
10271 explictit_loc->foo instead of word. Use
10272 linespec_complete_function. Handle MATCH_LINE. Handle offering
10273 keyword and options completions.
10274 (backup_text_ptr): Delete.
10275 (skip_keyword): New.
10276 (complete_explicit_location): Remove 'word' parameter. Add
10277 language, quoted_arg_start and quoted_arg_end parameters.
10278 Rewrite, parsing left to right.
10279 (location_completer): Rewrite.
10280 (location_completer_handle_brkchars): New function.
10281 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10282 (enum complete_line_internal_reason): Adjust comments.
10283 (completion_tracker::discard_completions): New.
10284 (completer_handle_brkchars_func_for_completer): Handle
10285 location_completer.
10286 (gdb_custom_word_point_brkchars)
10287 (gdb_org_rl_basic_quote_characters): New.
10288 (gdb_completion_word_break_characters_throw)
10289 (completion_find_completion_word): Handle trackers that use a
10291 (completion_tracker::advance_custom_word_point_by): New.
10292 (completion_tracker::build_completion_result): Don't rely on
10293 readline appending the quote char.
10294 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10295 use a custom word point.
10296 (gdb_rl_attempted_completion_function): Restore
10297 rl_basic_quote_characters.
10298 * completer.h (class completion_tracker): Extend intro comment.
10299 (completion_tracker::set_quote_char)
10300 (completion_tracker::quote_char)
10301 (completion_tracker::set_use_custom_word_point)
10302 (completion_tracker::use_custom_word_point)
10303 (completion_tracker::custom_word_point)
10304 (completion_tracker::set_custom_word_point)
10305 (completion_tracker::advance_custom_word_point_by)
10306 (completion_tracker::completes_to_completion_word)
10307 (completion_tracker::discard_completions): New methods.
10308 (completion_tracker::m_quote_char)
10309 (completion_tracker::m_use_custom_word_point)
10310 (completion_tracker::m_custom_word_point): New fields.
10311 (advance_to_expression_complete_word_point): Declare.
10312 * f-lang.c (f_collect_symbol_completion_matches): Add
10313 complete_symbol_mode parameter.
10314 * language.h (struct language_defn)
10315 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10317 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10318 (linespec_complete_function): New function.
10319 (linespec_lexer_lex_keyword): Adjust.
10320 * linespec.h (linespec_keywords, linespec_complete_function): New
10322 * location.c (find_end_quote): New function.
10323 (explicit_location_lex_one): Add explicit_completion_info
10324 parameter. Save quoting info. Don't throw if being called for
10325 completion. Don't handle Ada operators here.
10326 (is_cp_operator, skip_op_false_positives, first_of)
10327 (explicit_location_lex_one_function): New function.
10328 (string_to_explicit_location): Replace 'dont_throw' parameter with
10329 an explicit_completion_info pointer parameter. Handle it. Don't
10330 use explicit_location_lex_one to lex function names. Use
10331 explicit_location_lex_one_function instead.
10332 * location.h (struct explicit_completion_info): New.
10333 (string_to_explicit_location): Replace 'dont_throw' parameter with
10334 an explicit_completion_info pointer parameter.
10335 * symtab.c (default_collect_symbol_completion_matches_break_on):
10336 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10337 (default_collect_symbol_completion_matches)
10338 (collect_symbol_completion_matches): Add complete_symbol_mode
10340 (collect_symbol_completion_matches_type): Pass down
10341 complete_symbol_mode::EXPRESSION.
10342 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10343 parameter. Handle LINESPEC mode.
10344 * symtab.h (complete_symbol_mode): New.
10345 (default_collect_symbol_completion_matches_break_on)
10346 (default_collect_symbol_completion_matches)
10347 (collect_symbol_completion_matches)
10348 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10351 2017-07-17 Pedro Alves <palves@redhat.com>
10353 * utils.c (enum class strncmp_iw_mode): New.
10354 (strcmp_iw): Rename to ...
10355 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10356 parameters. Handle them.
10358 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10359 * utils.h (strncmp_iw): Declare.
10360 (strcmp_iw): Move describing comments here.
10362 2017-07-17 Pedro Alves <palves@redhat.com>
10364 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10366 * c-typeprint.c (is_type_conversion_operator): Use
10368 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10369 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10371 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10372 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10373 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10374 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10376 * location.c: Include "cp-support.h".
10377 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10379 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10382 2017-07-17 Pedro Alves <palves@redhat.com>
10384 * cli/cli-cmds.c (complete_command): Use a completion tracker
10385 along with completion_find_completion_word for handle_brkchars
10387 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10388 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10389 (struct gdb_rl_completion_word_info): New.
10390 (gdb_rl_find_completion_word): New.
10391 (completion_find_completion_word): New.
10392 * completer.h (completion_find_completion_word): Declare.
10394 2017-07-17 Pedro Alves <palves@redhat.com>
10396 * ada-lang.c (symbol_completion_match): Adjust comments.
10397 (symbol_completion_add): Replace vector parameter with
10398 completion_tracker parameter. Use it.
10399 (ada_make_symbol_completion_list): Rename to...
10400 (ada_collect_symbol_completion_matches): ... this. Add
10401 completion_tracker parameter and use it.
10402 (ada_language_defn): Adjust.
10403 * break-catch-syscall.c (catch_syscall_completer): Adjust
10404 prototype and work with completion_tracker instead of VEC.
10405 * breakpoint.c (condition_completer): Adjust prototype and work
10406 with completion_tracker instead of VEC.
10407 * c-lang.c (c_language_defn, cplus_language_defn)
10408 (asm_language_defn, minimal_language_defn): Adjust to renames.
10409 * cli/cli-cmds.c (complete_command): Rework using
10410 completion_tracker. Catch exceptions when completing.
10411 * cli/cli-decode.c (integer_unlimited_completer)
10412 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10413 with completion_tracker instead of VEC.
10414 * command.h (struct completion_tracker): Forward declare.
10415 (completer_ftype, completer_handle_brkchars_ftype): Change
10417 (complete_on_cmdlist, complete_on_enum): Adjust.
10418 * completer.c: Include <algorithm>.
10419 (struct gdb_completer_state): New.
10420 (current_completion): New global.
10421 (readline_line_completion_function): Delete.
10422 (noop_completer, filename_completer)
10423 (filename_completer_handle_brkchars, complete_files_symbols)
10424 (linespec_location_completer): Adjust to work with a
10425 completion_tracker instead of a VEC.
10426 (string_or_empty): New.
10427 (collect_explicit_location_matches): Adjust to work with a
10428 completion_tracker instead of a VEC.
10429 (explicit_location_completer): Rename to ...
10430 (complete_explicit_location): ... this and adjust to work with a
10431 completion_tracker instead of a VEC.
10432 (location_completer): Adjust to work with a completion_tracker
10434 (add_struct_fields): Adjust to work with a completion_list instead
10436 (expression_completer): Rename to ...
10437 (complete_expression): ... this and adjust to work with a
10438 completion_tracker instead of a VEC. Use complete_files_symbols.
10439 (expression_completer): Reimplement on top of complete_expression.
10440 (symbol_completer): Adjust to work with a completion_tracker
10442 (enum complete_line_internal_reason): Add describing comments.
10443 (complete_line_internal_normal_command): Adjust to work with a
10444 completion_tracker instead of a VEC.
10445 (complete_line_internal): Rename to ...
10446 (complete_line_internal_1): ... this and adjust to work with a
10447 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10448 handle_brkchars phase.
10449 (new_completion_tracker): Delete.
10450 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10451 complete_line_internal_1.
10452 (free_completion_tracker): Delete.
10453 (INITIAL_COMPLETION_HTAB_SIZE): New.
10454 (completion_tracker::completion_tracker)
10455 (completion_tracker::~completion_tracker): New.
10456 (maybe_add_completion): Delete.
10457 (completion_tracker::maybe_add_completion)
10458 (completion_tracker::add_completion)
10459 (completion_tracker::add_completions): New.
10460 (throw_max_completions_reached_error): Delete.
10461 (complete_line): Adjust to work with a completion_tracker instead
10462 of a VEC. Don't create a completion_tracker_t or check for max
10464 (command_completer, command_completer_handle_brkchars)
10465 (signal_completer, reg_or_group_completer_1)
10466 (reg_or_group_completer, default_completer_handle_brkchars):
10467 Adjust to work with a completion_tracker.
10468 (gdb_completion_word_break_characters_throw): New.
10469 (gdb_completion_word_break_characters): Reimplement.
10470 (line_completion_function): Delete.
10471 (completion_tracker::recompute_lowest_common_denominator)
10472 (expand_preserving_ws)
10473 (completion_tracker::build_completion_result)
10474 (completion_result::completion_result)
10475 (completion_result::completion_result)
10476 (completion_result::~completion_result)
10477 (completion_result::completion_result)
10478 (completion_result::release_match_list, compare_cstrings)
10479 (completion_result::sort_match_list)
10480 (completion_result::reset_match_list)
10481 (gdb_rl_attempted_completion_function_throw)
10482 (gdb_rl_attempted_completion_function): New.
10483 * completer.h (completion_list, struct completion_result)
10484 (class completion_tracker): New.
10485 (complete_line): Add completion_tracker parameter.
10486 (readline_line_completion_function): Delete.
10487 (gdb_rl_attempted_completion_function): New.
10488 (noop_completer, filename_completer, expression_completer)
10489 (location_completer, symbol_completer, command_completer)
10490 (signal_completer, reg_or_group_completer): Update prototypes.
10491 (completion_tracker_t, new_completion_tracker)
10492 (make_cleanup_free_completion_tracker): Delete.
10493 (enum maybe_add_completion_enum): Delete.
10494 (maybe_add_completion): Delete.
10495 (throw_max_completions_reached_error): Delete.
10496 * corefile.c (complete_set_gnutarget): Adjust to work with a
10497 completion_tracker instead of a VEC.
10498 * cp-abi.c (cp_abi_completer): Adjust to work with a
10499 completion_tracker instead of a VEC.
10500 * d-lang.c (d_language_defn): Adjust.
10501 * disasm.c (disassembler_options_completer): Adjust to work with a
10502 completion_tracker instead of a VEC.
10503 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10504 (f_collect_symbol_completion_matches): ... this. Adjust to work
10505 with a completion_tracker instead of a VEC.
10506 (f_language_defn): Adjust.
10507 * go-lang.c (go_language_defn): Adjust.
10508 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10509 Adjust to work with a completion_tracker instead of a VEC.
10510 * infrun.c (handle_completer): Likewise.
10511 * interps.c (interpreter_completer): Likewise.
10512 * interps.h (interpreter_completer): Likewise.
10513 * language.c (unknown_language_defn, auto_language_defn)
10514 (local_language_defn): Adjust.
10515 * language.h (language_defn::la_make_symbol_completion_list):
10517 (language_defn::la_collect_symbol_completion_matches): ... this
10518 and adjust to work with a completion_tracker instead of a VEC.
10519 * m2-lang.c (m2_language_defn): Adjust.
10520 * objc-lang.c (objc_language_defn): Adjust.
10521 * opencl-lang.c (opencl_language_defn): Adjust.
10522 * p-lang.c (pascal_language_defn): Adjust.
10523 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10524 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10525 with a completion_tracker.
10526 * rust-lang.c (rust_language_defn): Adjust.
10527 * symtab.c (free_completion_list, do_free_completion_list)
10528 (return_val, completion_tracker): Delete.
10529 (completion_list_add_name, completion_list_add_symbol)
10530 (completion_list_add_msymbol, completion_list_objc_symbol)
10531 (completion_list_add_fields, add_symtab_completions): Add
10532 completion_tracker parameter and use it.
10533 (default_make_symbol_completion_list_break_on_1): Rename to...
10534 (default_collect_symbol_completion_matches_break_on): ... this.
10535 Add completion_tracker parameter and use it instead of allocating
10536 a completion tracker here.
10537 (default_make_symbol_completion_list_break_on): Delete old
10539 (default_make_symbol_completion_list): Delete.
10540 (default_collect_symbol_completion_matches): New.
10541 (make_symbol_completion_list): Delete.
10542 (collect_symbol_completion_matches): New.
10543 (make_symbol_completion_type): Rename to ...
10544 (collect_symbol_completion_matches_type): ... this. Add
10545 completion_tracker parameter and use it instead of VEC.
10546 (make_file_symbol_completion_list_1): Rename to...
10547 (collect_file_symbol_completion_matches): ... this. Add
10548 completion_tracker parameter and use it instead of VEC.
10549 (make_file_symbol_completion_list): Delete.
10550 (add_filename_to_list): Use completion_list instead of a VEC.
10551 (add_partial_filename_data::list): Now a completion_list.
10552 (make_source_files_completion_list): Work with a completion_list
10554 * symtab.h: Include "completer.h".
10555 (default_make_symbol_completion_list_break_on)
10556 (default_make_symbol_completion_list, make_symbol_completion_list)
10557 (make_symbol_completion_type, make_file_symbol_completion_list)
10558 (make_source_files_completion_list): Delete.
10559 (default_collect_symbol_completion_matches_break_on)
10560 (default_collect_symbol_completion_matches)
10561 (collect_symbol_completion_matches)
10562 (collect_symbol_completion_matches_type)
10563 (collect_file_symbol_completion_matches)
10564 (make_source_files_completion_list): New.
10565 * top.c (init_main): Don't install a rl_completion_entry_function
10566 hook. Install a rl_attempted_completion_function hook instead.
10567 * tui/tui-layout.c (layout_completer): Adjust to work with a
10568 completion_tracker.
10569 * tui/tui-regs.c (tui_reggroup_completer):
10570 * tui/tui-win.c (window_name_completer, focus_completer)
10571 (winheight_completer): Adjust to work with a completion_tracker.
10572 * value.c: Include "completer.h".
10573 (complete_internalvar): Adjust to work with a completion_tracker.
10574 * value.h (complete_internalvar): Likewise.
10576 2017-07-17 Pedro Alves <palves@redhat.com>
10578 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10580 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10581 comments to completer_ftype's declaration.
10582 <completer_handle_brkchars>: Change type to
10583 completer_handle_brkchars_ftype.
10584 * command.h (completer_ftype): Add describing comment and give
10585 names to parameters.
10586 (completer_ftype_void): Rename to ...
10587 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10588 (set_cmd_completer_handle_brkchars): Adjust.
10589 * completer.c (filename_completer_handle_brkchars): New function.
10590 (complete_line_internal_normal_command): New function, factored
10592 (complete_line_internal): ... here.
10593 (command_completer_handle_brkchars)
10594 (default_completer_handle_brkchars)
10595 (completer_handle_brkchars_func_for_completer): New functions.
10596 * completer.h (set_gdb_completion_word_break_characters): Delete
10598 (completer_handle_brkchars_func_for_completer): New declaration.
10599 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10600 completer_handle_brkchars_func_for_completer.
10602 2017-07-17 Pedro Alves <palves@redhat.com>
10604 * completer.c (symbol_completer): New function, based on
10605 make_symbol_completion_list_fn.
10606 * completer.h (symbol_completer): New declaration.
10607 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10608 * python/py-cmd.c (completers): Adjust.
10609 * symtab.c (make_symbol_completion_list_fn): Delete.
10610 * symtab.h (make_symbol_completion_list_fn): Delete.
10611 * cli/cli-decode.c (add_cmd): Adjust.
10613 2017-07-17 Pedro Alves <palves@redhat.com>
10615 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10616 * dwarf2read.c: Include "filename-seen-cache.h".
10617 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10618 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10619 * filename-seen-cache.c: New file.
10620 * filename-seen-cache.h: New file.
10621 * symtab.c: Include "filename-seen-cache.h".
10622 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10623 (create_filename_seen_cache, clear_filename_seen_cache)
10624 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10625 to filename-seen-cache.h/filename-seen-cache.c.
10626 (output_source_filename, sources_info)
10627 (maybe_add_partial_symtab_filename)
10628 (make_source_files_completion_list): Adjust to use
10629 filename_seen_cache.
10631 2017-07-17 Pedro Alves <palves@redhat.com>
10633 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10635 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10636 dwarf2_debug_sections*)): New.
10637 (dwarf2_per_objfile::dwarf2_per_objfile(const
10638 dwarf2_per_objfile&)): Declare as deleted.
10639 (dwarf2_per_objfile::operator=): Declare as deleted.
10640 (dwarf2_per_objfile::dwarf2_per_objfile)
10641 (dwarf2_per_objfile::~dwarf2_per_objfile)
10642 (dwarf2_per_objfile::free_cached_comp_units): New.
10643 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10644 ctor. Call dwarf2_per_objfile's ctor manually.
10645 (dwarf2_locate_sections): Deleted/refactored as ...
10646 (dwarf2_per_objfile::locate_sections): ... this new method.
10647 (free_cached_comp_units): Defer to
10648 dwarf2_per_objfile::free_cached_comp_units.
10649 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10651 2017-07-14 Tom Tromey <tom@tromey.com>
10654 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10656 <UNOP_SIZEOF>: Split into separate case.
10657 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10659 2017-07-14 Tom Tromey <tom@tromey.com>
10662 * symtab.c (symbol_matches_domain): Add language_rust to special
10664 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10665 treat LOC_TYPEDEF symbols as variables.
10667 2017-07-14 Pedro Alves <palves@redhat.com>
10669 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10670 symtabs matching all symtabs with SRCFILE as file name instead of
10671 only considering the first hit, with lookup_symtab.
10673 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10675 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10676 operator_name parameters.
10677 (gen_expr): Update function call.
10679 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10681 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10683 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10685 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10686 parameter, use agent_expr::gdbarch instead, update function
10688 (locexpr_tracepoint_var_ref): Likewise.
10689 (loclist_tracepoint_var_ref): Likewise.
10690 * ax-gdb.c (gen_trace_static_fields): Likewise.
10691 (gen_traced_pop): Likewise.
10692 (gen_frame_args_address): Likewise.
10693 (gen_frame_locals_address): Likewise.
10694 (gen_var_ref): Likewise.
10695 (gen_struct_ref_recursive): Likewise.
10696 (gen_static_field): Likewise.
10697 (gen_maybe_namespace_elt): Likewise.
10698 (gen_expr): Likewise.
10699 (gen_trace_for_var): Likewise.
10700 (gen_trace_for_expr): Likewise.
10701 (gen_trace_for_return_address): Likewise.
10703 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10705 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10707 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10709 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10711 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10712 from ax, update calls.
10713 (gen_usual_arithmetic): Likewise.
10714 (gen_integral_promotions): Likewise.
10715 (gen_bitfield_ref): Likewise.
10716 (gen_primitive_field): Likewise.
10717 (gen_struct_ref_recursive): Likewise.
10718 (gen_struct_ref): Likewise.
10719 (gen_maybe_namespace_elt): Likewise.
10720 (gen_struct_elt_for_reference): Likewise.
10721 (gen_namespace_elt): Likewise.
10722 (gen_aggregate_elt_ref): Likewise.
10723 (gen_expr): Get gdbarch from ax, update calls.
10724 (gen_expr_binop_rest): Likewise.
10726 2017-07-13 Pedro Alves <palves@redhat.com>
10728 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10730 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10731 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10732 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10733 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10735 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10736 Get final tdesc from the tdep.
10737 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10739 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10740 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10741 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10742 Use it as default tdesc.
10743 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10744 down to amd_init_abi. No longer handle fallback tdesc here.
10745 * amd64-tdep.h (tdesc_x32): Declare.
10746 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10748 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10751 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10753 * s390-linux-tdep.c (s390_process_record): Add support for
10754 instructions new in arch12.
10756 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10758 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10759 PT_GETFSBASE and PT_GETGSBASE.
10760 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10763 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10765 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10766 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10767 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10769 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10770 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10771 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10772 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10773 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10774 * features/i386/amd64.xml: Add 64bit-segments.xml.
10775 * features/i386/amd64-avx-avx512.c: Regenerated.
10776 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10777 * features/i386/amd64-avx-mpx.c: Regenerated.
10778 * features/i386/amd64-avx.c: Regenerated.
10779 * features/i386/amd64-mpx.c: Regenerated.
10780 * features/i386/amd64.c: Regenerated.
10781 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10782 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10783 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10784 * regformats/i386/amd64-avx.dat: Regenerated.
10785 * regformats/i386/amd64-mpx.dat: Regenerated.
10786 * regformats/i386/amd64.dat: Regenerated.
10788 2017-07-10 Yao Qi <yao.qi@linaro.org>
10790 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10791 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10793 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10795 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10797 * gnulib/aclocal.m4: Regenerate.
10798 * gnulib/config.in: Regenerate.
10799 * gnulib/configure: Regenerate.
10800 * gnulib/import/Makefile.am: Regenerate.
10801 * gnulib/import/Makefile.in: Regenerate.
10802 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10803 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10804 * gnulib/import/m4/environ.m4: New file.
10805 * gnulib/import/m4/setenv.m4: New file.
10806 * gnulib/import/setenv.c: New file.
10807 * gnulib/import/unsetenv.c: New file.
10809 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10811 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10812 address when op is DW_OP_addr.
10814 2017-07-09 Tom Tromey <tom@tromey.com>
10816 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10817 check and apply to outer type.
10819 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10821 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10822 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10823 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10824 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10826 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10828 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10830 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10832 * corelow.c (get_core_siginfo): Remove.
10833 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10834 instead of get_core_siginfo.
10835 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10836 * gdbarch.h: Re-generate.
10837 * gdbarch.c: Re-generate.
10838 * linux-tdep.c (linux_core_xfer_siginfo): New.
10839 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10841 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10843 * corelow.c (thread_section_name): Move to ...
10844 * gdbcore.h (thread_section_name): ... here.
10846 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10848 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10849 (struct siginfo32): New.
10850 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10851 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10852 via ptrace(PT_LWPINFO).
10854 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10856 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10857 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10858 (fbsd_get_siginfo_type): New.
10859 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10860 (_initialize_fbsd_tdep): New.
10862 2017-07-06 David Blaikie <dblaikie@gmail.com>
10864 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10865 a singular dwo_unit*) to support multiple CUs in the same way that
10866 multiple TUs are supported.
10867 (create_cus_hash_table): Replace create_dwo_cu with a function for
10868 parsing multiple CUs from a DWO file.
10869 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10871 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10872 htab_find, rather than comparing the signature to a singleton CU in
10875 2017-07-06 Pedro Alves <palves@redhat.com>
10877 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10879 2017-07-04 Pedro Alves <palves@redhat.com>
10881 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10882 * gdbtypes.h (TYPE_STATIC): Delete.
10883 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10884 is_synchronized, is_native>: Delete.
10886 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10887 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10888 (TYPE_FN_FIELD_ABSTRACT): Delete.
10890 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10892 * buffer.h (buffer_finish): Fix spelling mistakes.
10894 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10896 * .dir-locals.el: Automatically switch to C-style comments in
10897 versions of Emacs that support the feature.
10899 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10900 Pedro Alves <palves@redhat.com>
10903 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10904 (process_next_line): New variable 'inline_cmd'.
10905 Adjust 'if' clauses for "python", "compile" and "guile" to use
10906 'command_name_equals' and check for '!inline_cmd'.
10908 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10911 * cli/cli-script.c (command_name_equals_not_inline): New function.
10912 (process_next_line): Adjust 'if' clauses for "python", "compile"
10913 and "guile" to use command_name_equals_not_inline.
10915 2017-06-29 Pedro Alves <palves@redhat.com>
10917 * completer.c (expression_completer): Call
10918 linespec_location_completer instead of location_completer.
10920 2017-06-29 Pedro Alves <palves@redhat.com>
10922 * completer.c (expression_completer): Remove code that recomputes
10923 'text' from 'word'.
10925 2017-06-29 Yao Qi <yao.qi@linaro.org>
10927 * regformats/regdat.sh: Generate code with
10928 "ifndef IN_PROCESS_AGENT".
10930 2017-06-28 Pedro Alves <palves@redhat.com>
10932 * command.h: Include "common/scoped_restore.h".
10934 2017-06-28 Yao Qi <yao.qi@linaro.org>
10936 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10937 instead of obstack_grow.
10939 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10942 * symfile.c (reread_symbols): Call objfiles_changed just before
10945 2017-06-27 Pedro Alves <palves@redhat.com>
10947 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10948 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10949 (completion_list_add_symbol, completion_list_add_msymbol):
10950 ... these new functions.
10951 (add_symtab_completions)
10952 (default_make_symbol_completion_list_break_on_1): Adjust.
10954 2017-06-27 Pedro Alves <palves@redhat.com>
10956 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10957 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10958 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10960 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10961 'storage_obstack' field an auto_obstack. In-class initialize all
10962 non-bitfield fields. Make minsyms_read bool.
10963 * symfile.c (read_symbols): Adjust.
10965 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10967 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10968 (gdbsim_store_register): Likewise.
10970 2017-06-27 Pedro Alves <palves@redhat.com>
10972 * c-exp.y (name_obstack): Now an auto_obstack.
10973 (yylex): Use auto_obstack::clear.
10974 (c_parse): Use auto_obstack::clear instead of reinitializing and
10975 freeing the obstack.
10976 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10977 * d-exp.y (name_obstack): Now an auto_obstack.
10978 (yylex): Use auto_obstack::clear.
10979 (d_parse): Use auto_obstack::clear instead of reinitializing and
10980 freeing the obstack.
10981 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10983 * dwarf2read.c (create_addrmap_from_index)
10984 (dwarf2_build_psymtabs_hard)
10985 (update_enumeration_type_from_children): Likewise.
10986 * gdb_obstack.h (auto_obstack): New type.
10987 * go-exp.y (name_obstack): Now an auto_obstack.
10988 (build_packaged_name): Use auto_obstack::clear.
10989 (go_parse): Use auto_obstack::clear instead of reinitializing and
10990 freeing the obstack.
10991 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10993 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10994 * rust-exp.y (work_obstack): Now an auto_obstack.
10995 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10996 reinitializing and freeing the obstack.
10997 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10998 (host_char_to_target): Use auto_obstack.
10999 * utils.h (make_cleanup_obstack_free): Delete declaration.
11000 * valprint.c (generic_emit_char, generic_printstr): Use
11003 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11005 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11007 (darwin_init_thread_list): Don't update dummy thread.
11008 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11010 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11012 * record-full.c (netorder16): Remove.
11014 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11016 * common/diagnostics.h: Define macros for GCC.
11017 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11018 * common/vec.h: Include diagnostics.h.
11019 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11020 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11023 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11025 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11027 * ada-lex.l: Ignore deprecated register warnings.
11029 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11031 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11032 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11034 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11036 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11039 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11041 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11043 2017-06-23 Alan Hayward <alan.hayward@arm.com>
11045 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11046 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11047 (xtensa_register_read_masked): Likewise.
11049 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11051 * common/environ.c (gdb_environ::unset): Update comment.
11053 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11055 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11058 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11060 * record-full.c (record_full_exec_insn): Use byte_vector.
11062 2017-06-22 Yao Qi <yao.qi@linaro.org>
11064 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11065 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11067 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11069 * remote.c (cached_reg): Move from here...
11070 * regcache.h (cached_reg): ...to here.
11071 * python/py-unwind.c (struct reg_info): Remove.
11072 (cached_frame_info): Use cached_reg_t.
11073 (pyuw_prev_register): Likewise.
11074 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11075 (pyuw_dealloc_cache): Free all registers.
11077 2017-06-22 Pedro Alves <palves@redhat.com>
11078 Simon Marchi <simon.marchi@ericsson.com>
11080 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11082 * common/diagnostics.h: New file.
11084 2017-06-22 Pedro Alves <palves@redhat.com>
11086 * common/agent.h: Add include guards.
11088 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11090 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11091 talk about addressable units instead of bytes.
11093 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11095 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11096 of '::const_iterator'.
11098 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11100 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11101 'unittests/environ-selftests.c'.
11102 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11103 * charset.c (find_charset_names): Declare object 'iconv_env'.
11104 Update code to use 'iconv_env' object. Remove call to
11106 * common/environ.c: Include <utility>.
11107 (make_environ): Delete function.
11108 (free_environ): Delete function.
11109 (gdb_environ::clear): New function.
11110 (gdb_environ::operator=): New function.
11111 (gdb_environ::get): Likewise.
11112 (environ_vector): Delete function.
11113 (set_in_environ): Delete function.
11114 (gdb_environ::set): New function.
11115 (unset_in_environ): Delete function.
11116 (gdb_environ::unset): New function.
11117 (gdb_environ::envp): Likewise.
11118 * common/environ.h: Include <vector>.
11119 (struct gdb_environ): Delete; transform into...
11120 (class gdb_environ): ... this class.
11121 (free_environ): Delete prototype.
11122 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11123 environ_vector): Likewise.
11124 * infcmd.c (run_command_1): Update code to call
11125 'envp' from 'gdb_environ' class.
11126 (environment_info): Update code to call methods from 'gdb_environ'
11128 (unset_environment_command): Likewise.
11129 (path_info): Likewise.
11130 (path_command): Likewise.
11131 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11132 (inferior::inferior): Initialize 'environment' using the host's
11134 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11135 Include "environ.h".
11136 (class inferior) <environment>: Change type from 'struct
11137 gdb_environ' to 'gdb_environ'.
11138 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11139 methods from 'gdb_environ' class.
11140 * solib.c (solib_find_1): Likewise
11141 * unittests/environ-selftests.c: New file.
11143 2017-06-20 Yao Qi <yao.qi@linaro.org>
11145 * features/i386/i386-linux.xml: Exchange the order of including
11146 32bit-linux.xml and 32bit-sse.xml.
11147 * features/i386/i386-linux.c: Regenerated.
11149 2017-06-20 Yao Qi <yao.qi@linaro.org>
11151 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11152 Delete copy ctor and assignment operator.
11153 (tdesc_type): Likewise.
11154 (tdesc_feature): Likewise.
11155 (tdesc_free_reg): Remove.
11156 (tdesc_create_reg): Use new.
11157 (tdesc_free_type): Remove.
11158 (tdesc_create_vector): Use new.
11159 (tdesc_create_union): Likewise.
11160 (tdesc_create_flags): Likewise.
11161 (tdesc_create_enum): Likewise.
11162 (tdesc_free_feature): Delete.
11163 (free_target_description): Use delete.
11165 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11167 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11170 2017-06-19 Pedro Alves <palves@redhat.com>
11172 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11173 after gdb::unlinker.
11175 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11177 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11178 gdb_environ to access an environment variable.
11180 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11182 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11185 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11187 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11189 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11191 * configure: Re-generate.
11192 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11194 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11196 * configure: Re-generate.
11197 * warning.m4: Pass -Werror to compiler when checking for
11198 supported warning flags.
11200 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11202 * Makefile.in (COMPILE.pre): Add "-x c++".
11204 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11205 Pedro Alves <palves@redhat.com>
11206 Yao Qi <yao.qi@linaro.org>
11208 * defs.h (RequireLongest): New.
11209 (extract_integer): Declare function template.
11210 (extract_signed_integer): Remove the declaration, but define it
11212 (extract_unsigned_integer): Likewise.
11213 (store_integer): Declare function template.
11214 (store_signed_integer): Remove the declaration, but define it
11216 (store_unsigned_integer): Likewise.
11217 * findvar.c (extract_integer): New function template.
11218 (extract_signed_integer): Remove.
11219 (extract_unsigned_integer): Remove.
11220 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11222 (store_integer): New function template.
11223 (store_signed_integer): Remove.
11224 (store_unsigned_integer): Remove.
11225 (store_integer): Explicit instantiations.
11226 * regcache.c (regcache_raw_read_signed): Update.
11227 (regcache::raw_read): New function.
11228 (regcache::raw_read_signed): Remove.
11229 (regcache::raw_read_unsigned): Remove.
11230 (regcache_raw_read_unsigned): Update.
11231 (regcache_raw_write_unsigned): Update.
11232 (regcache::raw_write_signed): Remove.
11233 (regcache::raw_write): New function.
11234 (regcache_cooked_read_signed): Update.
11235 (regcache::raw_write_unsigned): Remove.
11236 (regcache::cooked_read_signed): Remove.
11237 (regcache_cooked_read_unsigned): Update.
11238 (regcache::cooked_read_unsigned): Remove.
11239 (regcache_cooked_write_signed): Update.
11240 (regcache_cooked_write_unsigned): Update.
11241 * regcache.h (regcache) <raw_read_signed>: Remove.
11242 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11243 <raw_read, raw_write>: New.
11244 <cooked_read_signed, cooked_write_signed>: Remove.
11245 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11246 <cooked_read, cooked_write>: New.
11247 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11248 (sh64_pseudo_register_write): Update.
11250 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11252 * arc-tdep.c (arc_disassembler_options): New variable.
11253 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11254 of default_print_insn.
11255 (arc_delayed_print_insn): Set info->section when needed,
11256 use default_print_insn to retrieve a disassembler.
11258 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11261 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11262 to mention $SHELL and startup-with-shell.
11264 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11266 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11268 2017-06-14 Yao Qi <yao.qi@linaro.org>
11270 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11271 default_print_insn instead of print_insn_aarch64.
11272 * arm-tdep.c (gdb_print_insn_arm): Call
11273 default_print_insn instead of print_insn_big_arm
11274 and print_insn_little_arm.
11275 * i386-tdep.c (i386_print_insn): Call default_print_insn
11276 instead of print_insn_i386.
11277 * ia64-tdep.c (ia64_print_insn): Call
11278 default_print_insn instead of print_insn_ia64.
11279 * mips-tdep.c (gdb_print_insn_mips): Call
11280 default_print_insn instead of print_insn_big_mips
11281 and print_insn_little_mips.
11282 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11283 instead of print_insn_spu.
11285 2017-06-14 Pedro Alves <palves@redhat.com>
11287 * ada-lang.c: Include "common/byte-vector.h".
11288 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11289 * charset.c (wchar_iterator::iterate): Resize the vector instead
11291 * common/byte-vector.h: Include "common/def-vector.h".
11292 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11293 * cli/cli-dump.c: Include "common/byte-vector.h".
11294 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11295 * common/byte-vector.h: New file.
11296 * common/def-vector.h: New file.
11297 * common/default-init-alloc.h: New file.
11298 * dwarf2loc.c: Include "common/byte-vector.h".
11299 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11300 instead of reserving it.
11301 * dwarf2read.c: Include "common/byte-vector.h".
11302 (data_buf::m_vec): Now a gdb::byte_vector.
11303 * gdb_regex.c: Include "common/def-vector.h".
11304 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11305 * mi/mi-main.c: Include "common/byte-vector.h".
11306 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11307 * printcmd.c: Include "common/byte-vector.h".
11308 (print_scalar_formatted): Use gdb::byte_vector.
11309 * valprint.c: Include "common/byte-vector.h".
11310 (maybe_negate_by_bytes, print_decimal_chars): Use
11313 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11315 * darwin-nat.c: Include "nat/fork-inferior.h".
11317 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11319 * configure.nat: Factor out Darwin bits that are not
11320 architecture-specific. Add fork-inferior.o.
11322 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11324 * configure.nat: Factor out AIX bits that are not
11325 architecture-specific. Add fork-inferior.o.
11327 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11329 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11330 (read_pieced_value, write_pieced_value): ...here. Reduce to
11331 wrappers that just call rw_pieced_value.
11333 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11335 * dwarf2loc.c (write_pieced_value): When writing the data for a
11336 memory piece, use write_memory_with_notification instead of
11339 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11341 * valops.c (read_value_memory): Change embedded_offset to
11342 represent a bit offset instead of a byte offset.
11343 * value.h (read_value_memory): Adjust comment.
11345 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11347 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11348 dest_offset_bits and source_offset_bits.
11349 (write_pieced_value): Likewise.
11351 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11353 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11354 given by DW_OP_bit_piece.
11355 (write_pieced_value): Likewise.
11357 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11359 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11360 some other preparations to the places where sufficient information
11362 (write_pieced_value): Likewise.
11364 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11366 * dwarf2loc.c (bits_to_bytes): New function.
11367 (read_pieced_value): Fix offset calculations for register pieces
11368 on big-endian targets.
11369 (write_pieced_value): Likewise.
11371 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11373 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11374 (write_pieced_value): Likewise.
11376 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11378 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11379 transfer the source value's least significant bits, instead of its
11380 lowest-addressed ones. Rename type_len to max_offset.
11381 (read_pieced_value): Mirror above changes to write_pieced_value as
11384 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11386 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11387 truncate full bytes from dest_offset_bits before using it as an
11388 offset into the buffer.
11390 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11392 * dwarf2loc.c (write_pieced_value): Include transfer size in
11395 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11397 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11398 calculation of this_size.
11400 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11402 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11403 when targeting a bit-field.
11404 (write_pieced_value): Likewise.
11406 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11408 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11409 (allocate_piece_closure): Drop addr_size parameter.
11410 (dwarf2_evaluate_loc_desc_full): Adjust call to
11411 allocate_piece_closure.
11413 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11416 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11417 the LSB end, independent of endianness.
11419 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11421 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11424 2017-06-13 Yao Qi <yao.qi@linaro.org>
11426 * mips-linux-nat.c: Move include features/mips*-linux.c to
11428 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11429 to mips-linux-tdep.c.
11430 * mips-linux-tdep.c: Include features/mips*-linux.c
11431 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11433 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11434 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11435 (tdesc_mips64_dsp_linux): Declare.
11437 2017-06-12 Tom Tromey <tom@tromey.com>
11439 * valprint.h (val_print_type_code_int): Remove.
11440 * valprint.c (generic_val_print_int): Always call
11441 val_print_scalar_formatted.
11442 (val_print_type_code_int): Remove.
11443 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11444 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11445 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11446 * ada-valprint.c (ada_val_print_num): Use
11447 val_print_scalar_formatted.
11449 2017-06-12 Tom Tromey <tom@tromey.com>
11451 * printcmd.c (print_scalar_formatted): Unify the two switches.
11452 Don't convert scalars to LONGEST.
11454 2017-06-12 Tom Tromey <tom@tromey.com>
11457 * valprint.h (print_decimal_chars): Update.
11458 * valprint.c (maybe_negate_by_bytes): New function.
11459 (print_decimal_chars): Add "is_signed" argument.
11460 * printcmd.c (print_scalar_formatted): Update.
11462 2017-06-12 Tom Tromey <tom@tromey.com>
11465 * valprint.h (print_binary_chars, print_hex_chars): Update.
11466 * valprint.c (val_print_type_code_int): Update.
11467 (print_binary_chars): Add "zero_pad" argument.
11468 (emit_octal_digit): New function.
11469 (print_octal_chars): Don't zero-pad.
11470 (print_decimal_chars): Likewise.
11471 (print_hex_chars): Add "zero_pad" argument.
11472 * sh64-tdep.c (sh64_do_fp_register): Update.
11473 * regcache.c (regcache::dump): Update.
11474 * printcmd.c (print_scalar_formatted): Update.
11475 * infcmd.c (default_print_one_register_info): Update.
11477 2017-06-12 Pedro Alves <palves@redhat.com>
11478 Alan Hayward <alan.hayward@arm.com>
11480 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11481 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11482 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11483 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11484 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11486 2017-06-12 Pedro Alves <palves@redhat.com>
11488 * dwarf2read.c (mapped_symtab::data): Now a vector of
11489 symtab_index_entry instead of vector of
11490 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11491 whether an element's name is NULL instead of checking whether the
11492 element itself is NULL.
11493 (find_slot): Change return type. Adjust.
11494 (hash_expand, , add_index_entry, uniquify_cu_indices)
11495 (write_hash_table): Adjust.
11497 2017-06-12 Pedro Alves <palves@redhat.com>
11499 * dwarf2read.c (recursively_count_psymbols): New function.
11500 (write_psymtabs_to_index): Call it to compute number of psyms and
11501 pass estimate size of psyms_seen to unordered_set's ctor.
11503 2017-06-12 Pedro Alves <palves@redhat.com>
11505 * dwarf2read.c (write_hash_table): Check if key already exists
11508 2017-06-12 Pedro Alves <palves@redhat.com>
11510 * dwarf2read.c (data_buf::append_space): Rename to...
11511 (data_buf::grow): ... this, and make private. Adjust all callers.
11512 (data_buf::append_uint): New method.
11513 (add_address_entry, write_one_signatured_type)
11514 (write_psymtabs_to_index): Use it.
11516 2017-06-12 Pedro Alves <palves@redhat.com>
11518 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11519 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11520 (data_buf::file_write): Call ::fwrite directly.
11522 2017-06-12 Pedro Alves <palves@redhat.com>
11524 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11525 std::vector::erase.
11527 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11529 Code cleanup: C++ify .gdb_index producer.
11530 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11531 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11532 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11533 (create_strtab, add_string): Remove.
11534 (file_write, data_buf): New.
11535 (struct symtab_index_entry): Use std::vector for cu_indices.
11536 (struct mapped_symtab): Use std::vector for data.
11537 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11538 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11540 (find_slot): Change return type. Update it to the new data structures.
11541 (hash_expand, add_index_entry): Update it to the new data structures.
11542 (offset_type_compare): Remove.
11543 (uniquify_cu_indices): Update it to the new data structures.
11544 (c_str_view, c_str_view_hasher, vector_hasher): New.
11545 (add_indices_to_cpool): Remove.
11546 (write_hash_table): Update it to the new data structures.
11547 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11548 (eq_psymtab_cu_index): Remove.
11549 (psym_index_map): New typedef.
11550 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11551 reference and std::unordered_map for cu_index_htab.
11552 (add_address_entry, add_address_entry_worker, write_address_map)
11553 (write_psymbols): Update it to the new data structures.
11554 (write_obstack): Remove.
11555 (struct signatured_type_index_data): Change types_list to a data_buf
11556 reference and psyms_seen to a std::unordered_set reference.
11557 (write_one_signatured_type, recursively_write_psymbols)
11558 (write_psymtabs_to_index): Update it to the new data structures.
11560 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11562 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11563 separate-debug-file commands.
11564 * symfile.h (separate_debug_file_debug): New global.
11565 * symfile.c (separate_debug_file_debug): New global.
11566 (separate_debug_file_exists, find_separate_debug_file): Add
11568 (_initialize_symfile): Add "set debug separate-debug-file"
11570 * build-id.c (build_id_to_debug_bfd,
11571 find_separate_debug_file_by_buildid): Add debug output.
11573 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11575 * gdbarch.sh (displaced_step_free_closure): Remove.
11576 * gdbarch.h, gdbarch.c: Re-generate.
11577 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11578 displaced_step_free_closure.
11579 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11580 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11581 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11582 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11583 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11584 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11585 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11586 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11587 * infrun.c (displaced_step_clear): Call xfree instead of
11588 gdbarch_displaced_step_free_closure.
11590 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11592 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11595 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11597 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11598 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11599 (mn10300_push_dummy_call): Likewise.
11601 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11603 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11605 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11607 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11609 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11611 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11612 able to start inferiors using a shell.
11613 (New remote packets): Announce new packet "QStartupWithShell".
11614 * remote.c: Add PACKET_QStartupWithShell.
11615 (extended_remote_create_inferior): Handle new
11616 PACKET_QStartupWithShell.
11617 (remote_protocol_features) <QStartupWithShell>: New entry for
11618 PACKET_QStartupWithShell.
11619 (_initialize_remote): Call "add_packet_config_cmd" for
11622 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11623 Pedro Alves <palves@redhat.com>
11625 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11626 and "nat/fork-inferior.h".
11627 * common/common-inferior.h: New file, with contents from
11629 * commom/common-utils.c: Include "common-utils.h".
11630 (stringify_argv): New function.
11631 * common/common-utils.h (stringify_argv): New prototype.
11632 * configure.nat: Add "fork-inferior.o" as a dependency for
11633 "*linux*", "fbsd*" and "nbsd*" hosts.
11634 * corefile.c (get_exec_file): Update comment.
11635 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11636 instead of "startup_inferior".
11637 (darwin_create_inferior): Call "add_thread_silent" after
11639 * fork-child.c: Cleanup unnecessary includes.
11640 (SHELL_FILE): Move to "common/common-fork-child.c".
11641 (environ): Likewise.
11642 (exec_wrapper): Initialize.
11643 (get_exec_wrapper): New function.
11644 (breakup_args): Move to "common/common-fork-child.c"; rename to
11645 "breakup_args_for_exec".
11646 (escape_bang_in_quoted_argument): Move to
11647 "common/common-fork-child.c".
11648 (saved_ui): New variable.
11649 (prefork_hook): New function.
11650 (postfork_hook): Likewise.
11651 (postfork_child_hook): Likewise.
11652 (gdb_startup_inferior): Likewise.
11653 (fork_inferior): Move to "common/common-fork-child.c". Update
11654 function to support gdbserver.
11655 (startup_inferior): Likewise.
11656 * gdbcore.h (get_exec_file): Remove declaration.
11657 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11658 instead of "startup_inferior". Call "add_thread_silent" after
11660 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11661 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11662 instead of "startup_inferior". Call "add_thread_silent" after
11664 * inferior.h: Include "common-inferior.h".
11665 (trace_start_error): Move to "common/common-utils.h".
11666 (trace_start_error_with_name): Likewise.
11667 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11668 (startup_inferior): Likewise.
11669 (gdb_startup_inferior): New prototype.
11670 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11671 * nat/fork-inferior.h: New file.
11672 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11673 instead of "startup_inferior". Call "add_thread_silent" after
11675 * target.h (target_terminal_init): Move prototype to
11677 (target_terminal_inferior): Likewise.
11678 (target_terminal_ours): Likewise.
11679 * target/target.h (target_terminal_init): New prototype, moved
11681 (target_terminal_inferior): Likewise.
11682 (target_terminal_ours): Likewise.
11683 * utils.c (gdb_flush_out_err): New function.
11685 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11687 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11688 * common/common-gdbthread.h: New file, with parts from
11690 * gdbthread.h: Include "common-gdbthread.h".
11691 (switch_to_thread): Moved to "common/common-gdbthread.h".
11693 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11695 * Makefile.in (SFILES): Add "common/job-control.c".
11696 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11697 (COMMON_OBS): Add "job-control.o".
11698 * common/job-control.c: New file, with contents from
11700 * common/job-control.h: New file, with contents from "terminal.h".
11701 * fork-child.c: Include "job-control.h".
11702 * inflow.c: Include "job-control.h".
11703 (gdb_setpgid): Move to "common/common-inflow.c".
11704 (_initialize_inflow): Move setting of "job_control" to
11705 "handle_job_control".
11706 * terminal.h (job_control): Moved to "common/common-terminal.h".
11707 (gdb_setpgid): Likewise.
11708 * top.c: Include "job_control.h".
11709 * utils.c: Likewise.
11710 (job_control): Moved to "job-control.c".
11712 2017-06-07 Pedro Alves <palves@redhat.com>
11714 * Makefile.in (SFILES): Add gdb_regex.c.
11715 (COMMON_OBS): Add gdb_regex.o.
11716 * ada-lang.c (ada_add_standard_exceptions)
11717 (ada_add_exceptions_from_frame, name_matches_regex)
11718 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11719 parameter type to compiled_regex. Adjust.
11720 (ada_exceptions_list): Use compiled_regex.
11721 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11722 std::unique_ptr<compiled_regex>.
11723 (exception_catchpoint::~exception_catchpoint): Remove regfree
11725 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11726 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11727 * breakpoint.c (solib_catchpoint::compiled): Now a
11728 std::unique_ptr<compiled_regex>.
11729 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11730 (check_status_catch_solib): Adjust to use compiled_regex.
11731 (add_solib_catchpoint): Adjust to use compiled_regex.
11732 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11733 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11734 compiled_regex reference. Adjust to use it.
11735 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11736 declaration. Include "gdb_regex.h".
11737 (apropos_cmd): Change regex parameter to compiled_regex reference.
11738 * gdb_regex.c: New file.
11739 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11741 (class compiled_regex): New.
11742 * linux-tdep.c: Include "common/gdb_optional.h".
11743 (struct mapping_regexes): New, factored out from
11744 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11745 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11746 gdb::optional and remove cleanups. Adjust to compiled_regex.
11747 * probe.c: Include "common/gdb_optional.h".
11748 (collect_probes): Use compiled_regex and gdb::optional and remove
11750 * skip.c: Include "common/gdb_optional.h".
11751 (skiplist_entry::compiled_function_regexp): Now a
11752 gdb::optional<compiled_regex>.
11753 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11754 (free_skiplist_entry): Remove regfree call.
11755 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11756 compiled_regex and gdb::optional.
11757 * symtab.c: Include "common/gdb_optional.h".
11758 (search_symbols): Use compiled_regex and gdb::optional.
11759 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11760 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11763 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11765 * regcache.c (regcache::save): Avoid buffer use.
11766 (regcache::dump): Likewise.
11768 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11770 * sh-tdep.c (sh_pseudo_register_read): Remove
11772 (sh_pseudo_register_write): Likewise.
11773 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11774 (sh64_pseudo_register_write): Likewise
11776 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11778 * aarch64-tdep.c (aarch64_store_return_value): Use
11780 (aarch64_pseudo_read_value): Likewise.
11781 (aarch64_pseudo_write): Likewise.
11783 2017-06-06 Yao Qi <yao.qi@linaro.org>
11785 * regformats/regdef.h (set_register_cache): Remove the
11788 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11790 * frame.c (frame_unwind_register_signed): Use
11791 frame_unwind_register_value.
11793 2017-06-06 Pedro Alves <palves@redhat.com>
11795 PR breakpoints/21553
11796 * breakpoint.c (create_breakpoints_sal_default)
11797 (init_breakpoint_sal, create_breakpoint_sal): Use
11798 gdb::unique_xmalloc_ptr for string parameters.
11799 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11800 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11801 (base_breakpoint_create_breakpoints_sal)
11802 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11803 (strace_marker_create_breakpoints_sal)
11804 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11806 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11807 gdb::unique_xmalloc_ptr for string parameters.
11808 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11811 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11813 * alpha-tdep.c (alpha_register_to_value): Use
11814 get_frame_register_value.
11815 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11817 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11819 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11820 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11821 (ia64_value_to_register): Likewise.
11822 (ia64_extract_return_value): Likewise.
11823 (ia64_store_return_value): Likewise.
11824 (ia64_push_dummy_call): Likewise.
11826 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11830 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11832 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11834 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11836 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11838 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11840 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11842 * event-loop.c (poll_timers): Unallocate timer using delete
11845 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11847 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11848 (struct breakpoint) <~breakpoint>: New.
11849 (struct watchpoint): Inherit from breakpoint.
11850 <~watchpoint>: New.
11852 (struct tracepoint): Inherit from breakpoint.
11854 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11855 (struct longjmp_breakpoint): Inherit from breakpoint.
11856 <~longjmp_breakpoint>: New.
11858 (new_breakpoint_from_type): Remove casts.
11859 (watchpoint_in_thread_scope): Remove reference to base field.
11860 (watchpoint_del_at_next_stop): Likewise.
11861 (update_watchpoint): Likewise.
11862 (watchpoint_check): Likewise.
11863 (bpstat_check_watchpoint): Likewise.
11864 (set_longjmp_breakpoint): Likewise.
11865 (struct fork_catchpoint): Inherit from breakpoint.
11867 (struct solib_catchpoint): Inherit from breakpoint.
11868 <~solib_catchpoint>: New.
11870 (dtor_catch_solib): Change to ...
11871 (solib_catchpoint::~solib_catchpoint): ... this.
11872 (breakpoint_hit_catch_solib): Remove reference to base field.
11873 (add_solib_catchpoint): Likewise.
11874 (create_fork_vfork_event_catchpoint): Likewise.
11875 (struct exec_catchpoint): Inherit from breakpoint.
11876 <~exec_catchpoint>: New.
11878 (dtor_catch_exec): Change to ...
11879 (exec_catchpoint::~exec_catchpoint): ... this.
11880 (dtor_watchpoint): Change to ...
11881 (watchpoint::~watchpoint): ... this.
11882 (watch_command_1): Remove reference to base field.
11883 (catch_exec_command_1): Likewise.
11884 (base_breakpoint_dtor): Change to ...
11885 (breakpoint::~breakpoint): ... this.
11886 (base_breakpoint_ops): Remove dtor field value.
11887 (longjmp_bkpt_dtor): Change to ...
11888 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11889 (strace_marker_create_breakpoints_sal): Remove reference to base
11891 (delete_breakpoint): Don't manually call breakpoint destructor.
11892 (create_tracepoint_from_upload): Remove reference to base field.
11893 (trace_pass_set_count): Likewise.
11894 (initialize_breakpoint_ops): Don't initialize
11895 momentary_breakpoint_ops, don't set dtors.
11896 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11897 <~ada_catchpoint>: New.
11899 (create_excep_cond_exprs): Remove reference to base field.
11900 (dtor_exception): Change to ...
11901 (ada_catchpoint::~ada_catchpoint): ... this.
11902 (dtor_catch_exception): Remove.
11903 (dtor_catch_exception_unhandled): Remove.
11904 (dtor_catch_assert): Remove.
11905 (create_ada_exception_catchpoint): Remove reference to base
11907 (initialize_ada_catchpoint_ops): Don't set dtors.
11908 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11910 <~signal_catchpoint>: New.
11912 (signal_catchpoint_dtor): Change to ...
11913 (signal_catchpoint::~signal_catchpoint): ... this.
11914 (create_signal_catchpoint): Remove reference to base field.
11915 (initialize_signal_catchpoint_ops): Don't set dtor.
11916 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11918 <~syscall_catchpoint>: New.
11920 (dtor_catch_syscall): Change to ...
11921 (syscall_catchpoint::~syscall_catchpoint): ... this.
11922 (create_syscall_event_catchpoint): Remove reference to base
11924 (initialize_syscall_catchpoint_ops): Don't set dtor.
11925 * break-catch-throw.c (struct exception_catchpoint): Inherit
11927 <~exception_catchpoint>: New.
11929 (dtor_exception_catchpoint): Change to ...
11930 (exception_catchpoint::~exception_catchpoint): ... this.
11931 (handle_gnu_v3_exceptions): Remove reference to base field.
11932 (initialize_throw_catchpoint_ops): Don't set dtor.
11933 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11935 * remote.c (remote_get_tracepoint_status): Likewise.
11936 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11937 * tracefile.c (tracefile_fetch_registers): Likewise.
11938 * tracepoint.c (actions_command): Likewise.
11939 (validate_actionline): Likewise.
11940 (tfind_1): Likewise.
11941 (get_traceframe_location): Likewise.
11942 (find_matching_tracepoint_location): Likewise.
11943 (parse_tracepoint_status): Likewise.
11944 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11946 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11948 * breakpoint.c (struct longjmp_breakpoint): New struct.
11949 (is_tracepoint_type): Change return type to bool.
11950 (is_longjmp_type): New function.
11951 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11952 (set_raw_breakpoint_without_location): Use
11953 new_breakpoint_from_type.
11954 (set_raw_breakpoint): Likewise.
11956 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11958 * breakpoint.c (new_breakpoint_from_type): New function.
11959 (create_breakpoint_sal): Use new_breakpoint_from_type and
11961 (create_breakpoint): Likewise.
11963 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11965 * memattr.c (mem_info_command): Rename to ...
11966 (info_mem_command): ... this.
11967 (mem_enable_command): Rename to ...
11968 (enable_mem_command): ... this.
11969 (mem_disable_command): Rename to ...
11970 (disable_mem_command): ... this.
11971 (mem_delete_command): Rename to ...
11972 (delete_mem_command): ... this.
11973 (_initialize_mem): Adjust function names.
11975 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11977 * btrace.c (handle_pt_insn_events): New.
11978 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11979 STATUS. Split into this and ...
11980 (handle_pt_insn_event_flags): ... this.
11982 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11984 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11985 and struct pt_insn.resynced.
11986 * configure: Regenerated.
11987 * config.in: Regenerated.
11989 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11991 * btrace.c (ftrace_find_call_by_number): New function.
11992 (ftrace_new_function): Store objects, not pointers.
11993 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11994 ftrace_new_gap, ftrace_update_function,
11995 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11996 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11997 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11998 btrace_ends_with_single_insn, btrace_call_get): Account for
11999 btrace_thread_info::functions now storing objects.
12000 * btrace.h (struct btrace_thread_info): Add constructor.
12001 (struct btrace_thread_info) <functions>: Make std::vector.
12002 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12003 Initialize with default values.
12004 * record-btrace.c (record_btrace_frame_sniffer): Account for
12005 btrace_thread_info::functions now storing objects.
12007 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12009 * btrace.c: Remove typedef bfun_s.
12010 (ftrace_new_gap): Directly add gaps to the list of gaps.
12011 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12012 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12013 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12014 instead of gdb VEC.
12016 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12018 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12019 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12020 with btrace_thread_info::next_segment and
12021 btrace_thread_info::prev_segment.
12022 * btrace.h: Remove struct btrace_func_link.
12023 (struct btrace_function): Replace pair of function segment pointers
12024 with pair of indices.
12025 * python/py-record-btrace.c (btpy_call_prev_sibling,
12026 btpy_call_next_sibling): Replace references to
12027 btrace_thread_info::segment with btrace_thread_info::next_segment and
12028 btrace_thread_info::prev_segment.
12029 * record-btrace.c (record_btrace_frame_this_id): Use
12030 btrace_find_call_by_number.
12032 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12034 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12035 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12036 btrace_insn_next, btrace_insn_prev): Remove references to
12037 btrace_thread_info::flow.
12038 * btrace.h (struct btrace_function): Remove FLOW.
12040 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12042 * btrace.c (ftrace_find_call_by_number): New function.
12043 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12044 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12045 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12046 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12048 * btrace.h (struct btrace_function): Turn UP into an index.
12049 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12051 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12052 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12053 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12055 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12057 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12058 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12059 ftrace_update_function, ftrace_compute_global_level_offset,
12060 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12061 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12062 btrace_insn_end, btrace_is_empty): Remove references to
12063 btrace_thread_info::begin and btrace_thread_info::end.
12064 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12065 (struct btrace_thread_info) <functions>: Adjust comment.
12066 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12067 btrace_thread_info::begin.
12069 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12071 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12072 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12073 ftrace_update_function): Remove arguments that implicitly were always
12075 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12076 Don't pass BTINFO->END.
12078 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12080 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12081 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12082 btrace_find_insn_by_number): Replace function segment pointer with
12084 (btrace_insn_cmp): Simplify.
12085 * btrace.h: (struct btrace_insn_iterator) Rename index to
12086 insn_index. Replace function segment pointer with index into function
12088 * record-btrace.c (record_btrace_call_history): Replace function
12089 segment pointer use with index.
12090 (record_btrace_frame_sniffer): Retrieve function call segment through
12092 (record_btrace_set_replay): Remove defunc't safety check.
12094 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12096 * btrace.c (btrace_ends_with_single_insn): New function.
12097 (btrace_call_get, btrace_call_number, btrace_call_begin,
12098 btrace_call_end, btrace_call_next, btrace_call_prev,
12099 btrace_find_call_by_number): Use index into call segment vector
12100 instead of pointer.
12101 (btrace_call_cmp): Simplify.
12102 * btrace.h (struct btrace_call_iterator): Replace function call segment
12103 pointer with index into vector.
12104 * record-btrace.c (record_btrace_call_history): Use index instead of
12107 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12109 * btrace.c (btrace_insn_begin, btrace_insn_end,
12110 btrace_find_insn_by_number): Add btinfo to iterator.
12111 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12113 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12115 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12116 and save pointers directly.
12117 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12118 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12119 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12120 changed signature of functions.
12121 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12122 (btrace_fetch): Remove code that adds btrace_function pointers to
12123 vector of btrace_functions.
12124 (btrace_clear): Simplify freeing vector of btrace_functions.
12126 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12128 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12129 Replace VEC_* with std::vector functions.
12130 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12131 (struct btrace_thread_info)<functions>: Change type to std::vector.
12133 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12135 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12136 "Removed targets and native configurations" up. Merge duplicate
12137 "New commands" sub-sections. Add "New options" sub-sections.
12139 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12141 * defs.h (copy_integer_to_size): New declaration.
12142 * findvar.c (copy_integer_to_size): New function.
12143 (do_cint_test): New selftest function.
12144 (copy_integer_to_size_test): Likewise.
12145 (_initialize_findvar): Likewise.
12146 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12147 (mips_fbsd_collect_reg): Use raw_collect_integer.
12148 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12149 (mips64_fill_gregset): Use raw_collect_integer
12150 (mips64_fill_fpregset): Use raw_supply_integer.
12151 * regcache.c (regcache::raw_supply_integer): New function.
12152 (regcache::raw_collect_integer): Likewise.
12153 * regcache.h: (regcache::raw_supply_integer): New declaration.
12154 (regcache::raw_collect_integer): Likewise.
12156 2017-05-24 Yao Qi <yao.qi@linaro.org>
12158 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12159 (COMMON_OBS): Add gdbarch-selftests.o.
12160 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12161 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12162 * gdbarch-selftests.c: New file.
12163 * regcache.h (regcache) <~regcache>: Mark it virtual if
12165 <raw_write>: Likewise.
12167 2017-05-24 Yao Qi <yao.qi@linaro.org>
12169 * regcache.c (current_regcache): Change it to
12170 regcache::current_regcache.
12171 (regcache_observer_target_changed): Update.
12172 (regcache_thread_ptid_changed): Make it a regcache static
12174 (regcache_thread_ptid_changed): Update.
12175 (class regcache_access): New.
12176 (current_regcache_test): Update.
12177 (_initialize_regcache): Update.
12178 * regcache.h: Include forward_list.
12179 (regcache): Declare regcache_thread_ptid_changed and declare
12180 registers_changed_ptid as friend.
12182 2017-05-24 Yao Qi <yao.qi@linaro.org>
12184 * i387-tdep.c (i387_register_to_value): Use register_size
12185 instead of TYPE_LENGTH.
12186 * m68k-tdep.c (m68k_register_to_value): Likewise.
12188 2017-05-24 Yao Qi <yao.qi@linaro.org>
12190 * i387-tdep.c (i387_convert_register_p): Return false if type
12191 code isn't TYPE_CODE_FLT.
12193 2017-05-24 Yao Qi <yao.qi@linaro.org>
12195 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12197 (alpha_register_to_value): Remove type length check.
12198 (alpha_value_to_register): Likewise.
12200 2017-05-24 Yao Qi <yao.qi@linaro.org>
12202 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12205 2017-05-24 Yao Qi <yao.qi@linaro.org>
12207 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12208 TYPE_CODE_FLT or not.
12210 2017-05-24 Yao Qi <yao.qi@linaro.org>
12212 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12213 * avr-tdep.c (avr_gdbarch_init): Likewise.
12214 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12215 * cris-tdep.c (cris_gdbarch_init): Likewise.
12216 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12217 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12218 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12219 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12220 * mep-tdep.c (mep_gdbarch_init): Likewise.
12221 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12222 * mips-tdep.c (mips_gdbarch_init): Likewise.
12223 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12224 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12225 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12226 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12227 * v850-tdep.c (v850_gdbarch_init): Likewise.
12229 2017-05-24 Yao Qi <yao.qi@linaro.org>
12231 * selftest-arch.c (tests_with_arch): Call registers_changed
12232 and reinit_frame_cache.
12233 * selftest.c (run_self_tests): Likewise.
12235 2017-05-24 Yao Qi <yao.qi@linaro.org>
12237 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12238 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12240 2017-05-24 Yao Qi <yao.qi@linaro.org>
12242 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12243 set_gdbarch_print_insn.
12245 2017-05-24 Yao Qi <yao.qi@linaro.org>
12247 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12248 set_gdbarch_print_insn.
12250 2017-05-24 Yao Qi <yao.qi@linaro.org>
12252 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12253 set_gdbarch_print_insn.
12254 * arc-tdep.c (arc_gdbarch_init): Likewise.
12255 * arch-utils.c: include dis-asm.h.
12256 (default_print_insn): New function.
12257 * arch-utils.h (default_print_insn): Declare.
12258 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12259 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12260 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12261 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12262 * frv-tdep.c (frv_gdbarch_init): Likewise.
12263 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12264 * gdbarch.sh (print_insn): Use default_print_insn.
12265 * gdbarch.c: Regenerated.
12266 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12267 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12268 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12269 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12270 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12271 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12272 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12273 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12274 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12275 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12276 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12277 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12278 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12279 * mt-tdep.c (mt_gdbarch_init): Likewise.
12280 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12281 * nios2-tdep.c (nios2_print_insn): Remove.
12282 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12283 * rx-tdep.c (rx_gdbarch_init): Likewise.
12284 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12285 * score-tdep.c (score_print_insn): Remove.
12286 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12287 * sh-tdep.c (sh_gdbarch_init): Likewise.
12288 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12289 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12290 * tic6x-tdep.c (tic6x_print_insn): Remove.
12291 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12292 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12293 * v850-tdep.c (v850_gdbarch_init): Likewise.
12294 * vax-tdep.c (vax_gdbarch_init): Likewise.
12295 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12296 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12298 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12300 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12301 (MIPS_FP0_REGNUM): Remove.
12302 (MIPS_FSR_REGNUM): Remove.
12303 (mips_fbsd_supply_fpregs): Use mips_regnum.
12304 (mips_fbsd_supply_gregs): Likewise.
12305 (mips_fbsd_collect_fpregs): Likewise.
12306 (mips_fbsd_collect_gregs): Likewise.
12308 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12310 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12311 (getpfpregs_supplies): New function.
12312 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12313 getfpregs_supplies.
12314 (mips_fbsd_store_inferior_registers): Likewise.
12316 2017-05-22 Pedro Alves <palves@redhat.com>
12318 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12321 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12323 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12324 (store_register): Likewise.
12325 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12326 (get_decimal_float_return_value): Likewise.
12327 (do_ppc_sysv_return_value): Likewise.
12328 (ppc64_sysv_abi_push_integer): Likewise.
12329 (ppc64_sysv_abi_push_freg): Likewise.
12330 (ppc64_sysv_abi_return_value_base): Likewise.
12331 (ppc64_sysv_abi_return_value): Likewise.
12332 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12333 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12334 * rs6000-nat.c: Likewise.
12335 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12336 (rs6000_value_to_register): Likewise.
12337 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12339 2017-05-21 Tom Tromey <tom@tromey.com>
12342 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12343 arrays as "[T]", not "[T; ]".
12345 2017-05-19 Tom Tromey <tom@tromey.com>
12348 * rust-lang.c (exp_descriptor_rust): New function.
12349 (rust_language_defn): Use it.
12350 * p-lang.c (pascal_language_defn): Update.
12351 * opencl-lang.c (opencl_language_defn): Update.
12352 * objc-lang.c (objc_language_defn): Update.
12353 * m2-lang.c (m2_language_defn): Update.
12354 * language.h (struct language_defn)
12355 <la_watch_location_expression>: New member.
12356 * language.c (unknown_language_defn, auto_language_defn)
12357 (local_language_defn): Update.
12358 * go-lang.c (go_language_defn): Update.
12359 * f-lang.c (f_language_defn): Update.
12360 * d-lang.c (d_language_defn): Update.
12361 * c-lang.h (c_watch_location_expression): Declare.
12362 * c-lang.c (c_watch_location_expression): New function.
12363 (c_language_defn, cplus_language_defn, asm_language_defn)
12364 (minimal_language_defn): Use it.
12365 * breakpoint.c (watch_command_1): Call
12366 la_watch_location_expression.
12367 * ada-lang.c (ada_language_defn): Update.
12369 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12372 * gdb_curses.h (NOMACROS): Define.
12373 (NCURSES_NOMACROS): Define.
12375 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12378 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12380 * tui/tui-wingeneral.c (box_win): Likewise.
12381 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12382 (tui_show_source_line): Likewise.
12383 (tui_show_exec_info_content): Likewise.
12385 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12387 * sparc-tdep.c (sparc_structure_return_p)
12388 (sparc_arg_on_registers_p): New functions.
12389 (sparc32_store_arguments): Use them.
12390 * sparc64-tdep.c (sparc64_16_byte_align_p)
12391 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12392 Handle TYPE_CODE_ARRAY.
12394 2017-05-17 Yao Qi <yao.qi@linaro.org>
12396 * cli/cli-decode.c (add_alias_cmd): New function.
12397 * command.h (add_alias_cmd): Declare.
12398 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12399 instead call add_alias_cmd.
12401 2017-05-17 Pedro Alves <palves@redhat.com>
12403 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12404 (nat_makefile_frag): ... this. All references updated.
12405 * configure.ac: Likewise.
12406 * configure.nat: Likewise. Enhance comments.
12407 * configure: Regenerate.
12409 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12411 * procfs.c (procfs_create_inferior): Change prototype to match
12414 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12416 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12417 C++ compiler warning.
12419 2017-05-12 Tom Tromey <tom@tromey.com>
12422 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12423 recurse, just call value_struct_elt directly.
12425 2017-05-12 Tom Tromey <tom@tromey.com>
12427 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12428 OP_RUST_ARRAY>: Fix.
12430 2017-05-12 Tom Tromey <tom@tromey.com>
12432 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12434 2017-05-09 Yao Qi <yao.qi@linaro.org>
12436 * regcache.c: Include <forward_list>.
12437 (struct regcache_list): Remove.
12438 (current_regcache): Update.
12439 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12440 (regcache_thread_ptid_changed): Likewise.
12441 (registers_changed_ptid): Likewise.
12442 (current_regcache_size): Likewise.
12444 2017-05-09 Yao Qi <yao.qi@linaro.org>
12446 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12447 (current_regcache_size): New function.
12448 (current_regcache_test): New function.
12449 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12451 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12453 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12454 (print_gp_register_row): Use get_frame_register_value.
12456 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12458 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12459 (mips_supply_fpregset): Likewise.
12460 (mips64_supply_gregset): Likewise.
12462 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12464 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12465 regcache->raw_supply_zeroed.
12467 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12469 * configure.nat: Rearrange 'case' statements to match
12472 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12474 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12475 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12476 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12477 "@nat_extra_makefile_frag@".
12478 (Makefile): Remove dependency on "@frags@".
12479 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12480 (data-directory/Makefile): Likewise.
12481 * config/aarch64/linux.mh: Deleted; moved contents to
12482 "gdb/configure.nat".
12483 * config/alpha/alpha-linux.mh: Likewise.
12484 * config/alpha/nbsd.mh: Likewise.
12485 * config/arm/linux.mh: Likewise.
12486 * config/arm/nbsdelf.mh: Likewise.
12487 * config/i386/cygwin.mh: Likewise.
12488 * config/i386/cygwin64.mh: Likewise.
12489 * config/i386/darwin.mh: Likewise.
12490 * config/i386/fbsd.mh: Likewise.
12491 * config/i386/fbsd64.mh: Likewise.
12492 * config/i386/go32.mh: Likewise.
12493 * config/i386/i386gnu.mh: Likewise.
12494 * config/i386/i386sol2.mh: Likewise.
12495 * config/i386/linux.mh: Likewise.
12496 * config/i386/linux64.mh: Likewise.
12497 * config/i386/mingw.mh: Likewise.
12498 * config/i386/mingw64.mh: Likewise.
12499 * config/i386/nbsd64.mh: Likewise.
12500 * config/i386/nbsdelf.mh: Likewise.
12501 * config/i386/nto.mh: Likewise.
12502 * config/i386/obsd.mh: Likewise.
12503 * config/i386/obsd64.mh: Likewise.
12504 * config/i386/sol2-64.mh: Likewise.
12505 * config/ia64/linux.mh: Likewise.
12506 * config/m32r/linux.mh: Likewise.
12507 * config/m68k/linux.mh: Likewise.
12508 * config/m68k/nbsdelf.mh: Likewise.
12509 * config/m68k/obsd.mh: Likewise.
12510 * config/m88k/obsd.mh: Likewise.
12511 * config/mips/fbsd.mh: Likewise.
12512 * config/mips/linux.mh: Likewise.
12513 * config/mips/nbsd.mh: Likewise.
12514 * config/mips/obsd64.mh: Likewise.
12515 * config/pa/linux.mh: Likewise.
12516 * config/pa/nbsd.mh: Likewise.
12517 * config/pa/obsd.mh: Likewise.
12518 * config/powerpc/aix.mh: Likewise.
12519 * config/powerpc/fbsd.mh: Likewise.
12520 * config/powerpc/linux.mh: Likewise.
12521 * config/powerpc/nbsd.mh: Likewise.
12522 * config/powerpc/obsd.mh: Likewise.
12523 * config/powerpc/ppc64-linux.mh: Likewise.
12524 * config/powerpc/spu-linux.mh: Likewise.
12525 * config/s390/linux.mh: Likewise.
12526 * config/sh/nbsd.mh: Likewise.
12527 * config/sparc/fbsd.mh: Likewise.
12528 * config/sparc/linux.mh: Likewise.
12529 * config/sparc/linux64.mh: Likewise.
12530 * config/sparc/nbsd64.mh: Likewise.
12531 * config/sparc/nbsdelf.mh: Likewise.
12532 * config/sparc/obsd64.mh: Likewise.
12533 * config/sparc/sol2.mh: Likewise.
12534 * config/tilegx/linux.mh: Likewise.
12535 * config/vax/nbsdelf.mh: Likewise.
12536 * config/vax/obsd.mh: Likewise.
12537 * config/xtensa/linux.mh: Likewise.
12538 * config/i386/i386gnu.mn: New file, with excerpts from
12539 "config/i386/i386gnu.mh".
12540 * configure: Regenerate.
12541 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12542 *.mh files under "gdb/config".
12543 * configure.nat: New file, with contents from the
12544 "gdb/config/*/*.mh" files.
12546 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12548 * btrace.c (btrace_clear): Free insn vector.
12550 2017-05-05 Pedro Alves <palves@redhat.com>
12552 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12553 * configure: Regenerate.
12555 2017-05-04 Pedro Alves <palves@redhat.com>
12557 * Makefile.in (SFILES): Add progspace-and-thread.c.
12558 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12559 (COMMON_OBS): Add progspace-and-thread.o.
12560 * breakpoint.c: Include "progspace-and-thread.h".
12561 (update_inserted_breakpoint_locations)
12562 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12563 Use scoped_restore_current_pspace_and_thread.
12564 (create_std_terminate_master_breakpoint): Use
12565 scoped_restore_current_program_space.
12566 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12567 (print_breakpoint_location): Use
12568 scoped_restore_current_program_space.
12569 (bp_loc_is_permanent): Use
12570 scoped_restore_current_pspace_and_thread.
12571 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12572 (download_tracepoint_locations): Use
12573 scoped_restore_current_pspace_and_thread.
12574 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12575 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12576 (enum step_over_calls_kind): Moved from inferior.h.
12577 (class scoped_restore_current_thread): New class.
12578 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12580 (scoped_restore_current_thread): New class.
12581 * infcmd.c: Include "common/gdb_optional.h".
12582 (continue_1, proceed_after_attach): Use
12583 scoped_restore_current_thread.
12584 (notice_new_inferior): Use scoped_restore_current_thread.
12585 * inferior.c: Include "progspace-and-thread.h".
12586 (restore_inferior, save_current_inferior): Delete.
12587 (add_inferior_command, clone_inferior_command): Use
12588 scoped_restore_current_pspace_and_thread.
12589 * inferior.h (scoped_restore_current_inferior): New class.
12590 * infrun.c: Include "progspace-and-thread.h" and
12591 "common/gdb_optional.h".
12592 (follow_fork_inferior): Use
12593 scoped_restore_current_pspace_and_thread.
12594 (scoped_restore_exited_inferior): New class.
12595 (handle_vfork_child_exec_or_exit): Use
12596 scoped_restore_exited_inferior,
12597 scoped_restore_current_pspace_and_thread,
12598 scoped_restore_current_thread and scoped_restore.
12599 (fetch_inferior_event): Use scoped_restore_current_thread.
12600 * linespec.c (decode_line_full, decode_line_1): Use
12601 scoped_restore_current_program_space.
12602 * mi/mi-main.c: Include "progspace-and-thread.h".
12603 (exec_continue): Use scoped_restore_current_thread.
12604 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12605 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12606 * proc-service.c (ps_pglobal_lookup): Use
12607 scoped_restore_current_program_space.
12608 * progspace-and-thread.c: New file.
12609 * progspace-and-thread.h: New file.
12610 * progspace.c (release_program_space, clone_program_space): Use
12611 scoped_restore_current_program_space.
12612 (restore_program_space, save_current_program_space)
12613 (save_current_space_and_thread): Delete.
12614 (switch_to_program_space_and_thread): Moved to
12615 progspace-and-thread.c.
12616 * progspace.h (save_current_program_space)
12617 (save_current_space_and_thread): Delete declarations.
12618 (scoped_restore_current_program_space): New class.
12619 * remote.c (remote_btrace_maybe_reopen): Use
12620 scoped_restore_current_thread.
12621 * symtab.c: Include "progspace-and-thread.h".
12622 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12623 * thread.c (print_thread_info_1): Use
12624 scoped_restore_current_thread.
12625 (struct current_thread_cleanup): Delete.
12626 (do_restore_current_thread_cleanup)
12627 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12628 (scoped_restore_current_thread::~scoped_restore_current_thread):
12630 (make_cleanup_restore_current_thread): Rename/convert to ...
12631 (scoped_restore_current_thread::scoped_restore_current_thread):
12633 (thread_apply_all_command): Use scoped_restore_current_thread.
12634 (thread_apply_command): Use scoped_restore_current_thread.
12635 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12636 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12638 2017-05-04 Pedro Alves <palves@redhat.com>
12640 * thread.c (make_cleanup_restore_current_thread): Move
12641 find_thread_ptid call before the is_stopped call. Assert that the
12642 thread is found. Replace is_stopped call by checking the thread's
12643 state directly. Remove unnecessary NULL-thread check.
12645 2017-05-04 Pedro Alves <palves@redhat.com>
12647 * corelow.c (thread_section_name): New class.
12648 (get_core_register_section, get_core_siginfo): Use it.
12650 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12652 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12653 (get_core_register_section): Remove xfree of NULL pointer.
12655 2017-05-03 Alan Hayward <alan.hayward@arm.com>
12657 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12658 * regcache.c (regcache::raw_supply_zeroed): New function.
12659 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12661 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12663 * gdbarch.sh: Remove commented out definition of
12665 * gdbarch.h: Re-generate.
12667 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12669 * configure: Regenerate.
12671 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12673 * solib-target.c (solib_target_relocate_section_addresses):
12674 Remove num_section_bases, num_bases, segment_bases variables.
12676 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12678 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12680 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12682 * solib-target.c: Include <vector>
12683 (struct lm_info_target) <~lm_info_target>: Remove.
12684 <segment_bases, section_bases>: Change type to
12685 std::vector<CORE_ADDR>.
12686 (library_list_start_segment, library_list_start_section,
12687 library_list_end_library,
12688 solib_target_relocate_section_addresses): Adjust.
12690 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12692 * gdbarch.sh (software_single_step): Change return type to
12693 std::vector<CORE_ADDR>.
12694 * gdbarch.c, gdbarch.h: Re-generate.
12695 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12697 (arm_deal_with_atomic_sequence_raw): Adjust.
12698 (thumb_get_next_pcs_raw): Adjust.
12699 (arm_get_next_pcs_raw): Adjust.
12700 (arm_get_next_pcs): Adjust.
12701 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12702 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12703 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12704 (alpha_software_single_step): Adjust.
12705 * alpha-tdep.h (alpha_software_single_step): Adjust.
12706 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12707 * arm-tdep.c (arm_software_single_step): Adjust.
12708 (arm_breakpoint_kind_from_current_state): Adjust.
12709 * arm-tdep.h (arm_software_single_step): Adjust.
12710 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12711 * cris-tdep.c (cris_software_single_step): Adjust.
12712 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12713 (micromips_deal_with_atomic_sequence): Adjust.
12714 (deal_with_atomic_sequence): Adjust.
12715 (mips_software_single_step): Adjust.
12716 * mips-tdep.h (mips_software_single_step): Adjust.
12717 * moxie-tdep.c (moxie_software_single_step): Adjust.
12718 * nios2-tdep.c (nios2_software_single_step): Adjust.
12719 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12720 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12721 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12722 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12723 * sparc-tdep.c (sparc_software_single_step): Adjust.
12724 * spu-tdep.c (spu_software_single_step): Adjust.
12725 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12727 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12729 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12730 * gdbarch.h: Re-generate.
12732 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12734 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12735 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12736 * python/py-instruction.c, python/py-instruction.h: New file.
12737 * python/py-record.c: Add py-instruction.h include.
12738 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12739 gdb.RecordInstruction.
12740 * python/python-internal.h: Add gdbpy_initialize_instruction
12742 * python/python.c (do_start_initialization): Add
12743 gdbpy_initialize_instruction.
12745 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12747 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12749 (btrace_func_from_recpy_func): New function.
12750 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12751 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12752 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12753 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12754 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12755 Also, use new helper functions.
12756 (btpy_list_item): Use new helper functions.
12757 (recpy_bt_function_call_history): Use new type name.
12758 (btpy_call_getset): Remove.
12759 (gdbpy_initialize_btrace): Remove code to initialize
12760 gdb.BtraceFunctionCall.
12761 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12762 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12763 recpy_bt_func_prev, recpy_bt_func_next): New export.
12764 * python/py-record.c (recpy_func_type): New static object.
12765 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12766 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12767 recpy_func_next): New function.
12768 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12769 (recpy_func_getset): New static object.
12770 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12771 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12773 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12775 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12776 (btpy_object, btpy_insn_type, btpy_new): Remove.
12777 (btpy_list_object): Use gdb.RecordInstruction type instead of
12778 gdb.BtraceInstruction type.
12779 (btrace_insn_from_recpy_insn): New function.
12780 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12782 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12783 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12784 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12785 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12786 instead of btpy_object.
12787 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12788 btpy_insn_data, btpy_insn_decode): Rename to ...
12789 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12790 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12791 recpy_bt_insn_decode): This. Also, use new helper functions.
12792 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12794 (btpy_insn_getset): Remove.
12795 (gdbpy_initialize_btrace): Remove code to initialize
12796 gdb.BtraceInstruction. Use recpy_element_object.
12797 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12798 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12799 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12800 * python/py-record.c (recpy_insn_type): New static object.
12801 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12802 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12803 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12805 (recpy_insn_getset): New static object.
12806 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12807 * python/py-record.h (recpy_element_object): New typedef.
12808 (recpy_insn_type, recpy_insn_new): New export.
12810 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12812 * py-record-btrace.c (btpy_insn_new): Removed.
12813 (btpy_insn_or_gap_new): New function.
12814 (btpy_insn_error): Removed.
12815 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12816 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12817 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12818 btpy_insn_or_gap_new instead of btpy_insn_new.
12819 (btpy_insn_getset): Remove btpy_insn_error.
12820 * py-record.c (recpy_gap_type): New static object.
12821 (recpy_gap_object): New typedef.
12822 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12823 recpy_gap_reason_string): New function.
12824 (recpy_gap_getset): New static object.
12825 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12826 * py-record.h (recpy_gap_new): New export.
12828 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12830 * python/py-record.c (recpy_ptid): Remove.
12831 (recpy_record_getset): Remove recpy_ptid.
12833 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12835 * btrace.c (btrace_fetch): Set inferior_ptid.
12836 * python/py-record-btrace.c: Add "py-record.h" include.
12837 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12838 recpy_bt_end, recpy_bt_instruction_history,
12839 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12840 in gdb.Record object instead of current ptid.
12841 * python/py-record.c: Include new "py-record.h" file.
12842 (recpy_record_object): Moved to py-record.h.
12843 * python/py-record.h: New file.
12845 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12847 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12848 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12851 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12853 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12854 the past maintainers section.
12856 2017-04-28 Yao Qi <yao.qi@linaro.org>
12858 * infcmd.c (get_return_value): Use regcache ctor, and remove
12861 2017-04-28 Yao Qi <yao.qi@linaro.org>
12862 Pedro Alves <palves@redhat.com>
12864 * regcache.c (regcache::regcache): New tag dispatch ctor.
12865 (do_cooked_read): Moved above.
12866 (regcache_dup): Use the tag dispatch ctor..
12867 * regcache.h (regcache): Declare ctor, delete copy ctor and
12868 assignment operator, remove friend regcache_dup.
12870 2017-04-28 Yao Qi <yao.qi@linaro.org>
12872 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12873 call method save instead of regcache_cpy.
12874 * regcache.h (struct regcache): Make regcache_dup a friend.
12876 2017-04-28 Yao Qi <yao.qi@linaro.org>
12878 * regcache.c (struct regcache): Move to regcache.h
12879 (regcache::arch): New method.
12880 (regcache_get_ptid): Update.
12881 (get_regcache_arch): Call arch method.
12882 (get_regcache_aspace): Call method aspace.
12883 (register_buffer): Change it to method.
12884 (regcache_save): Change it to regcache::save.
12885 (regcache_restore): Likewise.
12886 (regcache_cpy_no_passthrough): Remove the declaration.
12887 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12888 (regcache_cpy_no_passthrough): Change it to method
12889 cpy_no_passthrough.
12890 (regcache_register_status): Change it to method
12891 get_register_status.
12892 (regcache_invalidate): Change it to method invalidate.
12893 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12894 (regcache_raw_update): Change it to method raw_update.
12895 (regcache_raw_read): Likewise.
12896 (regcache_raw_read_signed): Likewise.
12897 (regcache_raw_read_unsigned): Likewise.
12898 (regcache_raw_write_signed): Likewise.
12899 (regcache_raw_write_unsigned): Likewise.
12900 (regcache_cooked_read): Likewise.
12901 (regcache_cooked_read_value): Likewise.
12902 (regcache_cooked_read_signed): Likewise.
12903 (regcache_cooked_read_unsigned): Likewise.
12904 (regcache_cooked_write_signed): Likewise.
12905 (regcache_cooked_write_unsigned): Likewise.
12906 (regcache_raw_set_cached_value): Likewise.
12907 (regcache_raw_write): Likewise.
12908 (regcache_cooked_write): Likewise.
12909 (regcache_xfer_part): Likewise.
12910 (regcache_raw_read_part): Likewise.
12911 (regcache_raw_write_part): Likewise.
12912 (regcache_cooked_read_part): Likewise.
12913 (regcache_cooked_write_part): Likewise.
12914 (regcache_raw_supply): Likewise.
12915 (regcache_raw_collect): Likewise.
12916 (regcache_transfer_regset): Likewise.
12917 (regcache_supply_regset): Likewise.
12918 (regcache_collect_regset): Likewise.
12919 (regcache_debug_print_register): Likewise.
12920 (enum regcache_dump_what): Move it to regcache.h.
12921 (regcache_dump): Change it to method dump.
12922 * regcache.h (enum regcache_dump_what): New.
12923 (class regcache): New.
12924 * target.c (target_fetch_registers): Call method
12925 debug_print_register.
12926 (target_store_registers): Likewise.
12928 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12930 * windows-nat.c (struct lm_info_windows): Initialize field.
12931 (windows_make_so): Allocate lm_info_windows with new.
12932 (windows_free_so): Free lm_info_windows with delete.
12934 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12936 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12937 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12939 (darwin_free_so): Free lm_info_darwin with delete.
12941 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12943 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12944 <l_addr_p>: Change type to bool.
12945 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12946 (svr4_free_so): Free lm_info_svr4 with delete.
12947 (svr4_copy_library_list): Replace memcpy with call to copy
12949 (library_list_start_library, svr4_default_sos): Allocate
12950 lm_info_svr4 with new.
12952 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12954 * solib-target.c (struct lm_info_target): Add destructor,
12956 <name>: Change type to std::string.
12957 (library_list_start_library): Allocate lm_info_target with new.
12958 (solib_target_free_library_list): Free lm_info_target with
12960 (solib_target_current_sos): Adapt to std::string.
12961 (solib_target_free_so): Free lm_info_target with delete.
12963 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12965 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12967 (frv_current_sos): Allocate lm_info_frv with new.
12968 (frv_relocate_main_executable): Free lm_info_frv with delete,
12970 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12972 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12974 * solib-frv.c (struct lm_info_frv): Fix indentation.
12976 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12978 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12980 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12981 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12982 and allocate with new.
12983 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12985 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12987 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12988 <filename, member_name>: Change type to std::string.
12989 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12990 (library_list_start_library): Allocate lm_info_aix with new.
12991 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12992 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12993 with copy constructor.
12995 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12997 * solist.h (struct lm_info): Remove.
12998 (struct lm_info_base): New class.
12999 (struct so_list) <lm_info>: Change type to lm_info_base *.
13000 * nto-tdep.c (struct lm_info): Remove.
13002 * solib-aix.c (struct lm_info): Rename to ...
13003 (struct lm_info_aix): ... this. Extend lm_info_base.
13004 (lm_info_p): Rename to ...
13005 (lm_info_aix_p): ... this, and adjust.
13006 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13007 solib_aix_parse_libraries, library_list_start_library,
13008 solib_aix_free_library_list, solib_aix_parse_libraries,
13009 solib_aix_get_library_list,
13010 solib_aix_relocate_section_addresses, solib_aix_free_so,
13011 solib_aix_get_section_offsets,
13012 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13014 (struct solib_aix_inferior_data) <library_list>: Adjust.
13015 * solib-darwin.c (struct lm_info): Rename to ...
13016 (struct lm_info_darwin): ... this. Extend lm_info_base.
13017 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13018 * solib-dsbt.c (struct lm_info): Rename to ...
13019 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13020 (struct dsbt_info) <main_executable_lm_info): Adjust.
13021 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13022 dsbt_relocate_section_addresses): Adjust.
13023 * solib-frv.c (struct lm_info): Rename to ...
13024 (struct lm_info_frv): ... this. Extend lm_info_base.
13025 (main_executable_lm_info): Adjust.
13026 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13027 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13028 find_canonical_descriptor_in_load_object,
13029 frv_fdpic_find_canonical_descriptor): Adjust.
13030 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13032 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13033 svr4_clear_so, svr4_copy_library_list,
13034 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13035 svr4_current_sos, svr4_fetch_objfile_link_map,
13036 solist_update_incremental): Adjust.
13037 * solib-svr4.h (struct lm_info_svr4): Move here from
13039 * solib-target.c (struct lm_info): Rename to ...
13040 (struct lm_info_target): ... this. Extend lm_info_base.
13041 (lm_info_p): Rename to ...
13042 (lm_info_target_p): ... this.
13043 (solib_target_parse_libraries, library_list_start_segment,
13044 library_list_start_section, library_list_start_library,
13045 library_list_end_library, solib_target_free_library_list,
13046 solib_target_current_sos, solib_target_free_so,
13047 solib_target_relocate_section_addresses): Adjust.
13048 * windows-nat.c (struct lm_info): Rename to ...
13049 (struct lm_info_windows): ... this. Extend lm_info_base.
13050 (windows_make_so, handle_load_dll, handle_unload_dll,
13051 windows_xfer_shared_libraries): Adjust.
13053 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13055 * solib-darwin.c (struct darwin_so_list): Remove.
13056 (darwin_current_sos): Allocate an so_list object instead of a
13057 darwin_so_list, separately allocate an lm_info object.
13058 (darwin_free_so): Free lm_info.
13060 2017-04-28 John Baldwin <jhb@FreeBSD.org>
13062 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13063 with fprintf_filtered.
13065 2017-04-28 Yao Qi <yao.qi@linaro.org>
13067 * regcache.c (regcache::regcache): New function.
13068 (regcache::~regcache): New function.
13069 (regcache_xmalloc_1): Remove.
13070 (regcache_xmalloc): Call new regcache.
13071 (regcache_xfree): Call delete regcache.
13072 (get_thread_arch_aspace_regcache): Call new regcache.
13074 2017-04-28 Yao Qi <yao.qi@linaro.org>
13076 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13077 lwp instead of ptid_get_lwp.
13079 2017-04-28 Yao Qi <yao.qi@linaro.org>
13081 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13082 lwp_info instead of getting from inferior_ptid.
13084 2017-04-27 Keith Seitz <keiths@redhat.com>
13086 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13087 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13088 (CV_CONVERSION_BADNESS): Define.
13089 (rank_one_type): Remove overly restrictive rvalue reference
13091 Add cv-qualifier checks and subranks for type equality.
13092 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13093 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13094 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13096 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13098 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13099 count when creating the object.
13101 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13102 Ulrich Weigand <uweigand@de.ibm.com>
13104 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13105 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13107 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13108 (process_xcoff_symbol): Likewise.
13109 (scan_xcoff_symtab): Likewise.
13111 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13113 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13114 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13115 (ia64_access_reg): Use get_frame_register_unsigned.
13116 (ia64_access_rse_reg): Likewise.
13117 (ia64_libunwind_frame_prev_register): Likewise.
13119 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13121 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13122 * gdbarch.c: Regenerated.
13123 * gdbarch.h: Regenerated.
13124 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13125 visibility external.
13126 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13127 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13128 (enum cfa_how_kind): Move to ...
13129 (struct dwarf2_frame_state_reg_info): Likewise.
13130 (struct dwarf2_frame_state): Likewise.
13131 * dwarf2-frame.h: ... here.
13132 (dwarf2_frame_state_alloc_regs): New declaration.
13133 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13134 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13136 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13138 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13139 regcache_raw_read_unsigned.
13140 (xtensa_pseudo_register_write): Likewise.
13142 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13144 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13145 (nds32_pseudo_register_write): Likewise.
13147 2017-04-25 Yao Qi <yao.qi@linaro.org>
13149 * regcache.c (struct regcache) <readonly_p>: Change its type
13151 (regcache_xmalloc_1): Update parameter type and callers update.
13153 2017-04-25 Yao Qi <yao.qi@linaro.org>
13155 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13156 set_gdbarch_wchar_bit.
13157 * arm-tdep.c (arm_gdbarch_init): Likewise.
13159 2017-04-25 Pedro Alves <palves@redhat.com>
13161 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13162 (BothAreRelocatable, memcopy, memmove): Don't define.
13163 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13166 2017-04-25 Pedro Alves <palves@redhat.com>
13168 * common/common-defs.h: Include "common/poison.h".
13169 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13171 * common/poison.h: New file.
13172 * common/traits.h: Include <type_traits>.
13173 (Not, Or, Requires): New, moved from common/function-view.h.
13175 2017-04-25 Pedro Alves <palves@redhat.com>
13177 * breakpoint.h (struct breakpoint): In-class initialize all
13178 fields. Make boolean fields "bool".
13179 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13180 memset call and initializations no longer necessary.
13182 2017-04-25 Pedro Alves <palves@redhat.com>
13184 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13186 (pt_btrace_insn): New function.
13187 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13189 2017-04-25 Pedro Alves <palves@redhat.com>
13191 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13192 "base" field and inherit from "bp_location" instead. Add
13194 (allocate_location_exception): Use new non-default ctor.
13195 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13196 (init_bp_location): Convert to ...
13197 (bp_location::bp_location): ... this new ctor, and remove memset
13199 (base_breakpoint_allocate_location): Use the new non-default ctor.
13200 * breakpoint.h (bp_location): Now a class. Declare default and
13201 non-default ctors. In-class initialize all members.
13202 (init_bp_location): Remove declaration.
13204 2017-04-25 Pedro Alves <palves@redhat.com>
13206 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13207 assignment operator.
13209 2017-04-24 Yao Qi <yao.qi@linaro.org>
13211 * doublest.c (convert_doublest_to_floatformat): Call
13212 floatformat_totalsize_bytes.
13214 2017-04-22 Tom Tromey <tom@tromey.com>
13216 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13218 * stack.c (print_frame): Use ui_out_emit_list.
13219 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13221 * mi/mi-main.c (print_one_inferior)
13222 (mi_cmd_data_list_register_names)
13223 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13224 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13226 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13227 (mi_output_solib_attribs): Use ui_out_emit_list,
13229 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13230 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13231 (mi_cmd_stack_list_args, list_args_or_locals): Use
13233 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13234 * breakpoint.c (print_solib_event, output_thread_groups): Use
13237 2017-04-22 Tom Tromey <tom@tromey.com>
13239 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13240 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13241 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13243 2017-04-22 Tom Tromey <tom@tromey.com>
13245 * tracepoint.c (tvariables_info_1)
13246 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13248 2017-04-22 Tom Tromey <tom@tromey.com>
13250 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13251 annotate_arg_emitter.
13252 * breakpoint.c (print_mention_watchpoint)
13253 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13254 * annotate.h (struct annotate_arg_emitter): New.
13256 2017-04-22 Tom Tromey <tom@tromey.com>
13258 * record-btrace.c (record_btrace_insn_history)
13259 (record_btrace_insn_history_range, record_btrace_call_history)
13260 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13261 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13263 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13264 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13265 * skip.c (skip_info): Use ui_out_emit_tuple.
13266 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13267 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13268 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13269 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13270 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13272 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13273 (output_register, mi_cmd_data_read_memory)
13274 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13275 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13276 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13277 Use ui_out_emit_tuple.
13278 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13280 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13281 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13282 * linux-thread-db.c (info_auto_load_libthread_db): Use
13284 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13285 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13286 * disasm.c (do_mixed_source_and_assembly_deprecated)
13287 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13288 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13289 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13290 * breakpoint.c (print_one_breakpoint_location)
13291 (print_one_breakpoint): Use ui_out_emit_tuple.
13292 * auto-load.c (print_script, info_auto_load_cmd): Use
13294 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13296 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13298 * thread.c (print_thread_info_1): Remove dead code.
13300 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13302 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13304 * arm-tdep.c (selftests::arm_record_test): Likewise.
13306 2017-04-21 Yao Qi <yao.qi@linaro.org>
13308 * regcache.c (regcache_restore): Remove argument 2. Replace
13309 argument 3 with regcache. Get register status from
13310 src->register_status and get register contents from
13311 register_buffer (src, regnum).
13312 (regcache_cpy): Update.
13314 2017-04-19 Pedro Alves <palves@redhat.com>
13316 * gdbthread.h (thread): Add missing closing parenthesis in
13319 2017-04-19 Pedro Alves <palves@redhat.com>
13321 * common/refcounted-object.h: New file.
13322 * gdbthread.h: Include "common/refcounted-object.h".
13323 (thread_info): Inherit from refcounted_object and add comments.
13324 (thread_info::incref, thread_info::decref)
13325 (thread_info::m_refcount): Delete.
13326 (thread_info::deletable): Use the refcounted_object::refcount()
13328 * inferior.c (current_inferior_): Add comment.
13329 (set_current_inferior): Increment/decrement refcounts.
13330 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13331 not-deletable instead of comparing with the current inferior.
13332 (initialize_inferiors): Increment the initial inferior's refcount.
13333 * inferior.h (struct inferior): Forward declare.
13334 Include "common/refcounted-object.h".
13335 (current_inferior, set_current_inferior): Move declaration to
13336 before struct inferior's definition, and fix comment.
13337 (inferior): Inherit from refcounted_object. Add comments.
13338 * thread.c (switch_to_thread_no_regs): Reference the thread's
13339 inferior pointer directly instead of doing a ptid lookup.
13340 (switch_to_no_thread): New function.
13341 (switch_to_thread(thread_info *)): New function, factored out
13343 (switch_to_thread(ptid_t)): ... this.
13344 (restore_current_thread): Delete.
13345 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13346 fields, and add 'inf' field.
13347 (do_restore_current_thread_cleanup): Check whether old->inf is
13348 alive instead of looking up an inferior by ptid. Use
13349 switch_to_thread and switch_to_no_thread.
13350 (restore_current_thread_cleanup_dtor): Use old->inf directly
13351 instead of lookup up an inferior by id. Decref the inferior.
13352 Don't restore 'removable'.
13353 (make_cleanup_restore_current_thread): Same the inferior pointer
13354 in old, instead of the inferior number. Incref the inferior.
13355 Don't save/clear 'removable'.
13357 2017-04-19 Pedro Alves <palves@redhat.com>
13359 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13360 unittests/scoped_restore-selftests.c.
13361 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13362 * common/scoped_restore.h (scoped_restore_base): Make "class".
13363 (scoped_restore_base::release): New public method.
13364 (scoped_restore_base::scoped_restore_base): New protected ctor.
13365 (scoped_restore_base::m_saved_var): New protected field.
13366 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13367 scoped_restore_base base class instead of m_saved_var directly.
13368 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13369 (scoped_restore_tmpl::scoped_restore_tmpl(const
13370 scoped_restore_tmpl<T>&)): Likewise.
13371 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13373 (scoped_restore_tmpl::saved_var): New method.
13374 (scoped_restore_tmpl::m_saved_var): Delete.
13375 * inferior.h (inferior::detaching): Now a bool.
13376 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13378 * unittests/scoped_restore-selftests.c: New file.
13380 2017-04-19 Pedro Alves <palves@redhat.com>
13382 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13383 Re-sort in alphabetic order.
13385 2017-04-18 Pedro Alves <palves@redhat.com>
13387 * xml-support.c (obstack_xml_printf): Delete.
13388 * xml-support.h (obstack_xml_printf): Delete.
13390 2017-04-18 Pedro Alves <palves@redhat.com>
13392 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13393 vdebug, verror, body_text, start_element, end_element, name,
13394 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13395 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13396 is_xinclude>: Make private and add m_ prefix.
13397 (gdb_xml_parser::body_text): New method, based on ...
13398 (gdb_xml_body_text): ... this. Adjust.
13399 (gdb_xml_parser::vdebug): New method, based on ...
13400 (gdb_xml_debug): ... this. Adjust.
13401 (gdb_xml_parser::verror): New method, based on ...
13402 (gdb_xml_error): ... this. Adjust.
13403 (gdb_xml_parser::start_element): New method, based on ...
13404 (gdb_xml_start_element): ... this. Adjust.
13405 (gdb_xml_start_element_wrapper): Defer to
13406 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13407 (gdb_xml_parser::end_element): New method, based on ...
13408 (gdb_xml_end_element_wrapper): ... this. Adjust.
13409 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13410 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13411 (gdb_xml_parser::use_dtd): New method, based on ...
13412 (gdb_xml_use_dtd): ... this. Adjust.
13413 (gdb_xml_parser::parse): New method, based on ...
13414 (gdb_xml_parse): ... this. Adjust.
13415 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13416 (xinclude_start_include): Adjust to call the parser's name method.
13417 (xml_xinclude_default, xml_xinclude_start_doctype)
13418 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13420 (xml_process_xincludes): Adjust to call parser methods.
13421 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13424 2017-04-18 Pedro Alves <palves@redhat.com>
13426 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13427 gdb::optional<std::string>.
13428 * xml-support.c: Include <string>.
13429 (scope_level::scope_level(scope_level &&))
13430 (scope_level::~scope_level): Delete.
13431 (scope_level::body): Now a std::string.
13432 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13433 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13435 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13436 (xinclude_parsing_data::output): Now a std::string reference.
13437 (xinclude_start_include): Adjust.
13438 (xml_xinclude_default): Adjust.
13439 (xml_process_xincludes): Add 'output' parameter, and return bool.
13440 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13442 * xml-tdesc.c: Include <unordered_map> and <string>.
13443 (tdesc_xml_cache): Delete.
13444 (tdesc_xml_cache_s): Delete.
13445 (xml_cache): Now an std::unordered_map.
13446 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13447 (target_fetch_description_xml): Change return type to
13448 gdb::optional<std::string>, and adjust.
13449 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13450 (target_fetch_description_xml): Change return type to
13451 gdb::optional<std::string>.
13453 2017-04-18 Pedro Alves <palves@redhat.com>
13455 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13456 unittests/optional-selftests.c.
13457 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13458 * unittests/optional-selftests.c: New file.
13459 * unittests/optional/assignment/1.cc: New file.
13460 * unittests/optional/assignment/2.cc: New file.
13461 * unittests/optional/assignment/3.cc: New file.
13462 * unittests/optional/assignment/4.cc: New file.
13463 * unittests/optional/assignment/5.cc: New file.
13464 * unittests/optional/assignment/6.cc: New file.
13465 * unittests/optional/assignment/7.cc: New file.
13466 * unittests/optional/cons/copy.cc: New file.
13467 * unittests/optional/cons/default.cc: New file.
13468 * unittests/optional/cons/move.cc: New file.
13469 * unittests/optional/cons/value.cc: New file.
13470 * unittests/optional/in_place.cc: New file.
13471 * unittests/optional/observers/1.cc: New file.
13472 * unittests/optional/observers/2.cc: New file.
13474 2017-04-18 Pedro Alves <palves@redhat.com>
13476 * common/gdb_optional.h: Include common/traits.h.
13477 (in_place_t): New type.
13478 (in_place): New constexpr variable.
13479 (optional::optional): Remove member initialization of
13481 (optional::optional(in_place_t...)): New constructor.
13482 (optional::~optional): Use reset.
13483 (optional::optional(const optional&)): New.
13484 (optional::optional(const optional&&)): New.
13485 (optional::optional(T &)): New.
13486 (optional::optional(T &&)): New.
13487 (operator::operator=(const optional &)): New.
13488 (operator::operator=(optional &&)): New.
13489 (operator::operator= (const T &))
13490 (operator::operator= (T &&))
13491 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13492 (operator::reset): New.
13493 (operator::m_instantiated):: Add in-class initializer.
13494 * common/traits.h: Include <type_traits>.
13495 (struct And): New types.
13497 2017-04-18 Pedro Alves <palves@redhat.com>
13499 * xml-support.c: Include <vector>.
13500 (scope_level::scope_level(const gdb_xml_element *))
13501 (scope_level::scope_level(scope_level&&)): New.
13502 (scope_level::~scope_level): New.
13503 (scope_level_s): Delete.
13504 (gdb_xml_parser::scopes): Now a std::vector.
13505 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13507 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13508 scope cleanup code.
13509 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13510 of the scopes member. Use std::vector::emplace_back.
13512 2017-04-18 Pedro Alves <palves@redhat.com>
13514 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13516 (gdb_xml_end_element): Change type of first parameter.
13517 (gdb_xml_cleanup): Rename to ...
13518 (gdb_xml_parser::~gdb_xml_parser): ... this.
13519 (gdb_xml_create_parser_and_cleanup): Delete with ...
13520 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13522 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13523 using gdb_xml_create_parser_and_cleanup.
13524 (xinclude_parsing_data): Add ctor/dtor.
13525 (xml_xinclude_cleanup): Delete.
13526 (xml_process_xincludes): Create a local xinclude_parsing_data
13527 instead of heap-allocating one. Create a local gdb_xml_parser
13528 instead of heap-allocating one with
13529 gdb_xml_create_parser_and_cleanup.
13531 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13534 * fbsd-nat.c (resume_one_thread_cb): Remove.
13535 (resume_all_threads_cb): Remove.
13536 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13537 iterate_over_threads.
13539 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13541 * NEWS: Create a new section for the next release branch.
13542 Rename the section of the current branch, now that it has
13545 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13547 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13548 * version.in: Bump version to 8.0.50.DATE-git.
13550 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13553 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13554 independently of the host, and fix build breakage on Cygwin.
13556 2017-04-13 Pedro Alves <palves@redhat.com>
13558 * inferior.c (free_inferior): Convert to ...
13559 (inferior::~inferior): ... this dtor.
13560 (inferior::inferior): New ctor, factored out from ...
13561 (add_inferior_silent): ... here. Allocate the inferior with a new
13563 (delete_inferior): Call delete instead of free_inferior.
13564 * inferior.h (gdb_environ, continuation): Forward declare.
13565 (inferior): Now a class. Add in-class initialization to all
13566 members. Make boolean fields bool, except 'detaching'.
13567 (inferior::inferior): New explicit ctor.
13568 (inferior::~inferior): New.
13570 2017-04-13 Pedro Alves <palves@redhat.com>
13572 * inferior.c (init_inferior_list): Delete.
13573 * inferior.h (init_inferior_list): Delete.
13575 2017-04-13 Pedro Alves <palves@redhat.com>
13578 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13579 (top level): Call it twice, with different thread sets.
13581 2017-04-13 Pedro Alves <palves@redhat.com>
13583 * thread.c: Include <algorithm>.
13584 (thread_array_cleanup): Delete.
13585 (scoped_inc_dec_ref): New class.
13586 (live_threads_count): New function.
13587 (set_thread_refcount): Delete.
13588 (tp_array_compar_ascending): Now a bool.
13589 (tp_array_compar): Convert to a std::sort comparison function.
13590 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13591 and live_threads_count.
13593 2017-04-13 Pedro Alves <palves@redhat.com>
13595 * infrun.c (follow_fork_inferior): Also switch the current
13598 2017-04-13 Pedro Alves <palves@redhat.com>
13600 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13601 before calling create_internal_breakpoint.
13603 2017-04-13 Pedro Alves <palves@redhat.com>
13605 * fork-child.c (execv_argv): New class.
13606 (breakup_args): Refactored as ...
13607 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13608 Copy arguments to storage and replace separators with NULL
13609 terminators in place.
13610 (escape_bang_in_quoted_argument): Adjust to return bool.
13611 (execv_argv::execv_argv): New ctor.
13612 (execv_argv::init_for_shell): New method, factored out from
13613 fork_inferior. Don't strdup strings into the vector.
13614 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13615 Remove free_vector_argv call.
13617 2017-04-13 Yao Qi <yao.qi@linaro.org>
13619 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13622 2017-04-13 Yao Qi <yao.qi@linaro.org>
13624 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13625 * rx-tdep.c (rx_gdbarch_init): Likewise.
13627 2017-04-13 Pedro Alves <palves@redhat.com>
13629 * breakpoint.h (struct breakpoint): Reindent.
13631 2017-04-13 Pedro Alves <palves@redhat.com>
13633 * breakpoint.c (bp_location): Rename to ...
13634 (bp_locations): ... this. All references updated.
13635 (bp_location_count): Rename to ...
13636 (bp_locations_count): ... this. All references updated.
13637 (bp_location_placed_address_before_address_max): Rename to ...
13638 (bp_locations_placed_address_before_address_max): ... this. All
13639 references updated.
13640 (bp_location_shadow_len_after_address_max): Rename to ...
13641 (bp_locations_shadow_len_after_address_max): ... this. All
13642 references updated.
13643 (bp_location_compare_addrs): Rename to ...
13644 (bp_locations_compare_addrs): ... this. All references updated.
13645 (bp_location_compare):Rename to ...
13646 (bp_locations_compare): ... this. All references updated.
13647 (bp_location_target_extensions_update): Rename to ...
13648 (bp_locations_target_extensions_update): ... this. All references
13651 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13653 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13654 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13656 * common/gdb_termios.h: New file, with parts of "terminal.h".
13657 * inflow.c: Include "gdb_termios.h".
13658 * ser-unix.c: Include "gdb_termios.h".
13659 * terminal.h: Move terminal-related defines to
13660 "common/gdb_termios.h".
13662 2017-04-12 Tom Tromey <tom@tromey.com>
13664 * probe.c (parse_probes): Update.
13665 * location.h (delete_event_location): Don't declare.
13666 (event_location_deleter::operator()): Update.
13667 * location.c (event_location_deleter::operator()): Rename from
13668 delete_event_location.
13669 * linespec.h (linespec_result) <location>: Change type to
13671 * linespec.c (canonicalize_linespec, event_location_to_sals)
13672 (decode_objc): Update.
13673 (linespec_result): Don't call delete_event_location.
13674 * breakpoint.c (create_breakpoints_sal)
13675 (bkpt_probe_create_sals_from_location)
13676 (strace_marker_create_sals_from_location): Update.
13678 2017-04-12 Tom Tromey <tom@tromey.com>
13680 * linespec.h (struct linespec_result): Add constructor and
13682 (init_linespec_result, destroy_linespec_result)
13683 (make_cleanup_destroy_linespec_result): Don't declare.
13684 * linespec.c (init_linespec_result): Remove.
13685 (linespec_result::~linespec_result): Rename from
13686 destroy_linespec_result. Update.
13687 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13689 * breakpoint.c (create_breakpoint, break_range_command)
13690 (decode_location_default): Update.
13691 * ax-gdb.c (agent_command_1): Update.
13693 2017-04-12 Tom Tromey <tom@tromey.com>
13695 * remote.c (remote_download_tracepoint): Update.
13696 * python/py-breakpoint.c (bppy_get_location): Update.
13697 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13698 (gdbscm_breakpoint_location): Update.
13699 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13700 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13701 Change type to event_location_up.
13702 * breakpoint.c (create_overlay_event_breakpoint)
13703 (create_longjmp_master_breakpoint)
13704 (create_std_terminate_master_breakpoint)
13705 (create_exception_master_breakpoint)
13706 (breakpoint_event_location_empty_p, print_breakpoint_location)
13707 (print_one_breakpoint_location, create_thread_event_breakpoint)
13708 (init_breakpoint_sal, create_breakpoint)
13709 (print_recreate_ranged_breakpoint, break_range_command)
13710 (init_ada_exception_breakpoint, say_where): Update.
13711 (base_breakpoint_dtor): Don't call delete_event_location.
13712 (bkpt_print_recreate, tracepoint_print_recreate)
13713 (dprintf_print_recreate, update_static_tracepoint)
13714 (breakpoint_re_set_default): Update.
13716 2017-04-12 Tom Tromey <tom@tromey.com>
13718 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13719 type of "to_do". Update.
13720 (compute_stack_depth): Use std::vector.
13722 2017-04-12 Tom Tromey <tom@tromey.com>
13724 * printcmd.c (find_instruction_backward): Use std::vector.
13726 2017-04-12 Tom Tromey <tom@tromey.com>
13728 * symfile.c (objfilep): Remove typedef.
13729 (reread_symbols): Use a std::vector.
13731 2017-04-12 Tom Tromey <tom@tromey.com>
13733 * mi/mi-main.c (exec_direction_forward): Remove.
13734 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13735 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13737 * guile/guile.c (guile_repl_command, guile_command)
13738 (gdbscm_execute_gdb_command): Use scoped_restore.
13739 * go-exp.y (go_parse): Use scoped_restore.
13740 * d-exp.y (d_parse): Use scoped_restore.
13741 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13742 * c-exp.y (c_parse): Use scoped_restore.
13744 2017-04-12 Tom Tromey <tom@tromey.com>
13746 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13747 (mi_parse): Update return type.
13748 (mi_parse_free): Remove.
13749 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13750 (mi_parse::~mi_parse): Rename from mi_parse_free.
13751 (mi_parse_cleanup): Remove.
13752 (mi_parse): Return a unique_ptr. Use new.
13753 * mi/mi-main.c (mi_execute_command): Update.
13755 2017-04-12 Tom Tromey <tom@tromey.com>
13757 * location.c (explicit_location_lex_one): Return a
13758 unique_xmalloc_ptr.
13759 (string_to_explicit_location): Update. Remove cleanups.
13761 2017-04-12 Tom Tromey <tom@tromey.com>
13763 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13764 (compare_value_and_voffset): Change type. Update.
13765 (compute_vtable_size): Change type of "offset_vec".
13766 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13767 (gnuv3_get_typeid): Remove extraneous declaration.
13769 2017-04-12 Tom Tromey <tom@tromey.com>
13771 * charset.h (wchar_iterator): Fix comment.
13773 2017-04-12 Tom Tromey <tom@tromey.com>
13775 * charset.c (iconv_wrapper): New class.
13776 (cleanup_iconv): Remove.
13777 (convert_between_encodings): Use it.
13779 2017-04-12 Tom Tromey <tom@tromey.com>
13781 * symfile.h (increment_reading_symtab): Update type.
13782 * symfile.c (decrement_reading_symtab): Remove.
13783 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13784 * psymtab.c (psymtab_to_symtab): Update.
13785 * dwarf2read.c (dw2_instantiate_symtab): Update.
13787 2017-04-12 Tom Tromey <tom@tromey.com>
13789 * jit.c (struct jit_reader): Declare separately. Add constructor
13790 and destructor. Change type of "handle".
13791 (loaded_jit_reader): Define separately.
13792 (jit_reader_load): Update. New "new".
13793 (jit_reader_unload_command): Use "delete".
13794 * gdb-dlfcn.h (struct dlclose_deleter): New.
13795 (gdb_dlhandle_up): New typedef.
13796 (gdb_dlopen, gdb_dlsym): Update types.
13797 (gdb_dlclose): Remove.
13798 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13799 (gdb_dlsym): Change type of "handle".
13800 (make_cleanup_dlclose): Remove.
13801 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13802 * compile/compile-c-support.c (load_libcc): Update.
13804 2017-04-12 Tom Tromey <tom@tromey.com>
13806 * symtab.h (find_pcs_for_symtab_line): Change return type.
13807 * symtab.c (find_pcs_for_symtab_line): Change return type.
13808 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13809 type of "vec". Update.
13810 (ltpy_get_pcs_for_line): Update.
13811 * linespec.c (decode_digits_ordinary): Update.
13813 2017-04-12 Tom Tromey <tom@tromey.com>
13815 * tracepoint.c (actions_command): Update.
13816 * python/python.c (python_command, python_interactive_command):
13818 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13819 * guile/guile.c (guile_command): Update.
13820 * defs.h (read_command_lines, read_command_lines_1): Return
13822 (command_lines_deleter): New struct.
13823 (command_line_up): New typedef.
13824 * compile/compile.c (compile_code_command)
13825 (compile_print_command): Update.
13826 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13828 (make_cleanup_free_command_lines): Remove.
13829 * cli/cli-script.c (get_command_line, read_command_lines_1)
13830 (copy_command_lines): Return command_line_up.
13831 (while_command, if_command, read_command_lines, define_command)
13832 (document_command): Update.
13833 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13835 * breakpoint.h (breakpoint_set_commands): Change type of
13837 * breakpoint.c (breakpoint_set_commands): Change type of
13838 "commands". Update.
13839 (do_map_commands_command, update_dprintf_command_list)
13840 (create_tracepoint_from_upload): Update.
13842 2017-04-12 Tom Tromey <tom@tromey.com>
13844 * tracepoint.c (scope_info): Update.
13845 * spu-tdep.c (spu_catch_start): Update.
13846 * python/python.c (gdbpy_decode_line): Update.
13847 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13848 * python/py-breakpoint.c (bppy_init): Update.
13849 * probe.c (parse_probes): Update.
13850 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13851 * location.h (event_location_deleter): New struct.
13852 (event_location_up): New typedef.
13853 (new_linespec_location, new_address_location, new_probe_location)
13854 (new_explicit_location, copy_event_location)
13855 (string_to_event_location, string_to_event_location_basic)
13856 (string_to_explicit_location): Update return type.
13857 (make_cleanup_delete_event_location): Remove.
13858 * location.c (new_linespec_location, new_address_location)
13859 (new_probe_location, new_explicit_location, copy_event_location):
13860 Return event_location_up.
13861 (delete_event_location_cleanup)
13862 (make_cleanup_delete_event_location): Remove.
13863 (string_to_explicit_location, string_to_event_location_basic)
13864 (string_to_event_location): Return event_location_up.
13865 * linespec.c (canonicalize_linespec, event_location_to_sals)
13866 (decode_line_with_current_source)
13867 (decode_line_with_last_displayed, decode_objc): Update.
13868 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13869 * completer.c (location_completer): Update.
13870 * cli/cli-cmds.c (edit_command, list_command): Update.
13871 * breakpoint.c (create_overlay_event_breakpoint)
13872 (create_longjmp_master_breakpoint)
13873 (create_std_terminate_master_breakpoint)
13874 (create_exception_master_breakpoint)
13875 (create_thread_event_breakpoint): Update.
13876 (init_breakpoint_sal): Update. Remove some dead code.
13877 (create_breakpoint_sal): Change type of "location". Update.
13878 (create_breakpoints_sal, create_breakpoint, break_command_1)
13879 (dprintf_command, break_range_command, until_break_command)
13880 (init_ada_exception_breakpoint)
13881 (strace_marker_create_sals_from_location)
13882 (update_static_tracepoint, trace_command, ftrace_command)
13883 (strace_command, create_tracepoint_from_upload): Update.
13884 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13885 * ax-gdb.c (agent_command_1): Update.
13887 2017-04-12 Pedro Alves <palves@redhat.com>
13889 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13890 * configure.tgt: Handle i[34567]86-*-go32* and
13891 i[34567]86-*-msdosdjgpp*.
13892 * i386-tdep.c (i386_svr4_reg_to_regnum):
13894 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13896 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13897 * i386-go32-tdep.c: New file.
13898 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13901 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13903 * aix-thread.c (pd_status2str): Change return type to const char *.
13905 2017-04-12 Pedro Alves <palves@redhat.com>
13907 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13908 calls to set_gdbarch_gnu_triplet_regexp.
13910 2017-04-12 Pedro Alves <palves@redhat.com>
13913 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13915 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13916 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13917 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13918 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13919 * gdbarch.h, gdbarch.c: Regenerate.
13920 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13921 gdbarch_wchar_bit and gdbarch_wchar_signed.
13922 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13923 * arm-tdep.c (arm_gdbarch_init): Likewise.
13924 * avr-tdep.c (avr_gdbarch_init): Likewise.
13925 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13926 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13927 * i386-tdep.c (i386_go32_init_abi): Likewise.
13928 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13929 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13930 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13931 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13932 * sh-tdep.c (sh_gdbarch_init): Likewise.
13933 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13934 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13935 * windows-tdep.c (windows_init_abi): Likewise.
13936 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13938 2017-04-12 Pedro Alves <palves@redhat.com>
13941 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13942 cplus_primitive_type_char32_t>: New enum values.
13943 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13944 and cplus_primitive_type_char32_t.
13945 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13946 32, use the archtecture's built-in type for char16_t and char32_t,
13947 respectively. Otherwise, fallback to init_integer_type as before,
13948 but make the type unsigned, and issue a complaint.
13949 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13951 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13953 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13954 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13956 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13958 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13961 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13963 * common/common-utils.c (free_vector_argv): New function.
13964 * common/common-utils.h: Include <vector>.
13965 (free_vector_argv): New prototype.
13966 * darwin-nat.c (darwin_create_inferior): Rewrite function
13967 prototype in order to constify "exec_file" and accept a
13968 "std::string" for "allargs".
13969 * fork-child.c: Include <vector>.
13970 (breakup_args): Rewrite function, using C++.
13971 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13972 and accept "std::string" for "allargs". Update the code to
13973 calculate "argv" based on "allargs". Update calls to "exec_fun"
13975 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13976 order to constify "exec_file" and accept a "std::string" for
13978 * go32-nat.c (go32_create_inferior): Likewise.
13979 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13980 * infcmd.c (run_command_1): Constify "exec_file". Use
13981 "std::string" for inferior arguments.
13982 * inferior.h (fork_inferior): Update prototype.
13983 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13984 prototype in order to constify "exec_file" and accept a
13985 "std::string" for "allargs".
13986 * nto-procfs.c (procfs_create_inferior): Likewise.
13987 * procfs.c (procfs_create_inferior): Likewise.
13988 * remote-sim.c (gdbsim_create_inferior): Likewise.
13989 * remote.c (extended_remote_run): Update code to accept
13990 "std::string" as argument.
13991 (extended_remote_create_inferior): Rewrite function prototype in
13992 order to constify "exec_file" and accept a "std::string" for
13994 * rs6000-nat.c (super_create_inferior): Likewise.
13995 (rs6000_create_inferior): Likewise.
13996 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13997 * windows-nat.c (windows_create_inferior): Likewise.
13999 2017-04-11 Pedro Alves <palves@redhat.com>
14001 * thread.c: Fix whitespace throughout.
14003 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14005 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14007 2017-04-11 Alan Hayward <alan.hayward@arm.com>
14009 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14011 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14014 * osdata.c (info_osdata): Check if 'type' is an empty string
14017 2017-04-10 Pedro Alves <palves@redhat.com>
14019 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14020 (ptid_to_global_thread_id, in_thread_list)
14021 (do_captured_list_thread_ids, set_resumed, set_running)
14022 (set_executing, set_stop_requested, finish_thread_state)
14023 (validate_registers_access, can_access_registers_ptid)
14024 (print_thread_info_1, switch_to_thread)
14025 (do_restore_current_thread_cleanup)
14026 (make_cleanup_restore_current_thread, thread_command)
14027 (thread_name_command): Use operator== instead of ptid_equal.
14029 2017-04-10 Pedro Alves <palves@redhat.com>
14031 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14032 (current_thread_cleanup_chain): Delete.
14033 (restore_current_thread_cleanup_dtor)
14034 (make_cleanup_restore_current_thread): Remove references to
14035 current_thread_cleanup_chain.
14037 2017-04-10 Alan Hayward <alan.hayward@arm.com>
14039 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14042 2017-04-10 Yao Qi <yao.qi@linaro.org>
14045 * gdbthread.h (thread_info::deletable): New method.
14046 (thread_info::incref): New method.
14047 (thread_info::decref): New method.
14048 (thread_info::refcount): Move it to private.
14049 * infrun.c (save_stop_context): Call inc_refcount.
14050 (release_stop_context_cleanup): Likewise.
14051 * thread.c (set_thread_exited): New function.
14052 (init_thread_list): Delete "tp" only it is deletable, otherwise
14053 call set_thread_exited.
14054 (delete_thread_1): Call set_thread_exited.
14055 (current_thread_cleanup) <inferior_pid>: Remove.
14056 <thread>: New field.
14057 (restore_current_thread_ptid_changed): Removed.
14058 (do_restore_current_thread_cleanup): Adjust.
14059 (restore_current_thread_cleanup_dtor): Don't call
14061 (set_thread_refcount): Use dec_refcount.
14062 (make_cleanup_restore_current_thread): Adjust.
14063 (thread_apply_all_command): Call inc_refcount.
14064 (_initialize_thread): Don't call
14065 observer_attach_thread_ptid_changed.
14067 2017-04-10 Yao Qi <yao.qi@linaro.org>
14069 * thread.c (delete_thread_1): Hoist code on marking thread as
14072 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14074 * windows-nat.c (windows_detach): Initialize ptid with
14077 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14079 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14081 2017-04-07 Alan Hayward <alan.hayward@arm.com>
14083 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14084 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14085 (bfin_pseudo_register_write): Likewise
14087 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14089 * common/ptid.h (struct ptid): Change to...
14090 (class ptid_t): ... this.
14091 <ptid_t>: New constructors.
14092 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14093 matches>: New methods.
14094 <make_null, make_minus_one>: New static methods.
14095 <pid>: Rename to...
14097 <lwp>: Rename to...
14099 <tid>: Rename to...
14101 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14102 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14103 as references, move comment to class ptid_t.
14104 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14105 ptid_t static methods.
14106 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14107 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14108 Take ptid arguments as references, implement using ptid_t methods.
14109 * unittests/ptid-selftests.c: New file.
14110 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14111 unittests/ptid-selftests.c.
14112 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14114 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14116 * python/python.c (python_run_simple_file): Cast mode literal to
14117 non-const char pointer as expected by PyFile_FromString.
14119 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14121 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14122 minus_one_ptid and null_ptid.
14124 2017-04-05 Pedro Alves <palves@redhat.com>
14126 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14127 * configure: Regenerate.
14129 2017-04-05 Pedro Alves <palves@redhat.com>
14131 * ada-exp.y (yyerror): Constify.
14132 * ada-lang.c (bound_name, get_selections)
14133 (ada_variant_discrim_type)
14134 (ada_variant_discrim_name, ada_value_struct_elt)
14135 (ada_lookup_struct_elt_type, is_unchecked_variant)
14136 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14137 (catch_ada_exception_command_split)
14138 (catch_ada_assert_command_split, catch_assert_command)
14139 (ada_op_name): Constify.
14140 * ada-lang.h (ada_yyerror, get_selections)
14141 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14142 * arc-tdep.c (arc_print_frame_cache): Constify.
14143 * arm-tdep.c (arm_skip_stub): Constify.
14144 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14145 (gen_aggregate_elt_ref): Constify.
14146 * bcache.c (print_bcache_statistics): Constify.
14147 * bcache.h (print_bcache_statistics): Constify.
14148 * break-catch-throw.c (catch_exception_command_1):
14149 * breakpoint.c (struct ep_type_description::description):
14151 (add_solib_catchpoint): Constify.
14152 (catch_fork_command_1): Add cast.
14153 (add_catch_command): Constify.
14154 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14156 * bsd-uthread.c (bsd_uthread_state): Constify.
14157 * buildsym.c (patch_subfile_names): Constify.
14158 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14160 * c-exp.y (yyerror): Constify.
14161 (token::oper): Constify.
14162 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14163 * c-varobj.c (cplus_describe_child): Constify.
14164 * charset.c (find_charset_names): Add cast.
14165 (find_charset_names): Constify array and add const_cast.
14166 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14167 (edit_command): Constify.
14168 * cli/cli-decode.c (lookup_cmd): Constify.
14169 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14171 (struct dump_context): Constify.
14172 (add_dump_command, restore_command): Constify.
14173 * cli/cli-script.c (get_command_line): Constify.
14174 * cli/cli-script.h (get_command_line): Constify.
14175 * cli/cli-utils.c (check_for_argument): Constify.
14176 * cli/cli-utils.h (check_for_argument): Constify.
14177 * coff-pe-read.c (struct read_pe_section_data): Constify.
14178 * command.h (lookup_cmd): Constify.
14179 * common/print-utils.c (decimal2str): Constify.
14180 * completer.c (gdb_print_filename): Constify.
14181 * corefile.c (set_gnutarget): Constify.
14182 * cp-name-parser.y (yyerror): Constify.
14183 * cp-valprint.c (cp_print_class_member): Constify.
14184 * cris-tdep.c (cris_register_name, crisv32_register_name):
14186 * d-exp.y (yyerror): Constify.
14187 (struct token::oper): Constify.
14188 * d-lang.h (d_yyerror): Constify.
14189 * dbxread.c (struct header_file_location::name): Constify.
14190 (add_old_header_file, add_new_header_file, last_function_name)
14191 (dbx_next_symbol_text, add_bincl_to_list)
14192 (find_corresponding_bincl_psymtab, set_namestring)
14193 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14194 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14195 * defs.h (command_line_input, print_address_symbolic)
14196 (deprecated_readline_begin_hook): Constify.
14197 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14199 * event-top.c (handle_line_of_input): Constify and add cast.
14200 * exceptions.c (catch_errors): Constify.
14201 * exceptions.h (catch_errors): Constify.
14202 * expprint.c (print_subexp_standard, op_string, op_name)
14203 (op_name_standard, dump_raw_expression, dump_raw_expression):
14204 * expression.h (op_name, op_string, dump_raw_expression):
14206 * f-exp.y (yyerror): Constify.
14207 (struct token::oper): Constify.
14208 (struct f77_boolean_val::name): Constify.
14209 * f-lang.c (f_word_break_characters): Constify.
14210 * f-lang.h (f_yyerror): Constify.
14211 * fork-child.c (fork_inferior): Add cast.
14212 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14213 (new_variant): Constify.
14214 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14215 * gdbarch.c: Regenerate.
14216 * gdbcore.h (set_gnutarget): Constify.
14217 * go-exp.y (yyerror): Constify.
14218 (token::oper): Constify.
14219 * go-lang.h (go_yyerror): Constify.
14220 * go32-nat.c (go32_sysinfo): Constify.
14221 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14222 * guile/scm-cmd.c (cmdscm_function): Constify.
14223 * guile/scm-param.c (pascm_param_value): Constify.
14224 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14225 (h8300sx_register_name): Constify.
14226 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14228 * ia64-tdep.c (ia64_register_names): Constify.
14229 * infcmd.c (construct_inferior_arguments): Constify.
14230 (path_command, attach_post_wait): Constify.
14231 * language.c (show_range_command, show_case_command)
14232 (unk_lang_error): Constify.
14233 * language.h (language_defn::la_error)
14234 (language_defn::la_name_of_this): Constify.
14235 * linespec.c (decode_line_2): Constify.
14236 * linux-thread-db.c (thread_db_err_str): Constify.
14237 * lm32-tdep.c (lm32_register_name): Constify.
14238 * m2-exp.y (yyerror): Constify.
14239 * m2-lang.h (m2_yyerror): Constify.
14240 * m32r-tdep.c (m32r_register_names): Constify and make static.
14241 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14242 * m88k-tdep.c (m88k_register_name): Constify.
14243 * macroexp.c (appendmem): Constify.
14244 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14245 (upgrade_type, parse_external, parse_partial_symbols)
14246 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14247 (new_symbol): Constify.
14248 * memattr.c (mem_info_command): Constify.
14249 * mep-tdep.c (register_name_from_keyword): Constify.
14250 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14252 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14253 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14254 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14256 (mi_execute_async_cli_command): Constify.
14257 * mips-tdep.c (mips_register_name): Constify.
14258 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14259 (am33_register_name, am33_2_register_name)
14260 * moxie-tdep.c (moxie_register_names): Constify.
14261 * nat/linux-osdata.c (osdata_type): Constify fields.
14262 * nto-tdep.c (nto_parse_redirection): Constify.
14263 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14264 (lookup_child_selector): Constify.
14265 (objc_methcall::name): Constify.
14266 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14267 (lookup_struct_typedef): Constify.
14268 * objfiles.c (pc_in_section): Constify.
14269 * objfiles.h (pc_in_section): Constify.
14270 * p-exp.y (struct token::oper): Constify.
14271 (yyerror): Constify.
14272 * p-lang.h (pascal_yyerror): Constify.
14273 * parser-defs.h (op_name_standard): Constify.
14274 (op_print::string): Constify.
14275 (exp_descriptor::op_name): Constify.
14276 * printcmd.c (print_address_symbolic): Constify.
14277 * psymtab.c (print_partial_symbols): Constify.
14278 * python/py-breakpoint.c (stop_func): Constify.
14279 (bppy_get_expression): Constify.
14280 * python/py-cmd.c (cmdpy_completer::name): Constify.
14281 (cmdpy_function): Constify.
14282 * python/py-event.c (evpy_add_attribute)
14283 (gdbpy_initialize_event_generic): Constify.
14284 * python/py-event.h (evpy_add_attribute)
14285 (gdbpy_initialize_event_generic): Constify.
14286 * python/py-evts.c (add_new_registry): Constify.
14287 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14288 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14289 * python/py-inferior.c (get_buffer): Add cast.
14290 * python/py-param.c (parm_constant::name): Constify.
14291 * python/py-unwind.c (fprint_frame_id): Constify.
14292 * python/python.c (gdbpy_parameter_value): Constify.
14293 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14294 * remote.c (memory_packet_config::name): Constify.
14295 (show_packet_config_cmd, remote_write_bytes)
14296 (remote_buffer_add_string):
14297 * reverse.c (exec_reverse_once): Constify.
14298 * rs6000-tdep.c (variant::name, variant::description): Constify.
14299 * rust-exp.y (rustyyerror): Constify.
14300 * rust-lang.c (rust_op_name): Constify.
14301 * rust-lang.h (rustyyerror): Constify.
14302 * serial.h (serial_ops::name): Constify.
14303 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14304 (sh_sh3e_register_name, sh_sh2e_register_name)
14305 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14306 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14307 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14308 (sh_sh4al_dsp_register_name): Constify.
14309 * sh64-tdep.c (sh64_register_name): Constify.
14310 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14311 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14312 * stabsread.c (patch_block_stabs, read_type_number)
14313 (ref_map::stabs, ref_add, process_reference)
14314 (symbol_reference_defined, define_symbol, define_symbol)
14315 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14316 (read_one_struct_field, read_struct_fields, read_baseclasses)
14317 (read_tilde_fields, read_struct_type, read_array_type)
14318 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14319 (read_huge_number, read_range_type, read_args, common_block_start)
14320 (find_name_end): Constify.
14321 * stabsread.h (common_block_start, define_symbol)
14322 (process_one_symbol, symbol_reference_defined, ref_add):
14323 * symfile.c (get_section_index, add_symbol_file_command):
14324 * symfile.h (get_section_index): Constify.
14325 * target-descriptions.c (tdesc_type::name): Constify.
14326 (tdesc_free_type): Add cast.
14327 * target.c (find_default_run_target):
14328 (add_deprecated_target_alias, find_default_run_target)
14329 (target_announce_detach): Constify.
14330 (do_option): Constify.
14331 * target.h (add_deprecated_target_alias): Constify.
14332 * thread.c (print_thread_info_1): Constify.
14333 * top.c (deprecated_readline_begin_hook, command_line_input):
14335 (init_main): Add casts.
14336 * top.h (handle_line_of_input): Constify.
14337 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14338 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14339 (tfind_command): Rename to ...
14340 (tfind_command_1): ... this and constify.
14341 (tfind_command): New function.
14342 (tfind_end_command, tfind_start_command): Adjust.
14343 (encode_source_string): Constify.
14344 * tracepoint.h (encode_source_string): Constify.
14345 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14346 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14347 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14348 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14349 * tui/tui-win.c (parse_scrolling_args): Constify.
14350 * tui/tui-windata.c (tui_erase_data_content): Constify.
14351 * tui/tui-windata.h (tui_erase_data_content): Constify.
14352 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14353 * tui/tui.c (tui_enable): Add cast.
14354 * utils.c (defaulted_query): Constify.
14355 (init_page_info): Add cast.
14356 (puts_debug, subset_compare): Constify.
14357 * utils.h (subset_compare): Constify.
14358 * varobj.c (varobj_format_string): Constify.
14359 * varobj.h (varobj_format_string): Constify.
14360 * vax-tdep.c (vax_register_name): Constify.
14361 * windows-nat.c (windows_detach): Constify.
14362 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14363 * xml-support.c (gdb_xml_end_element): Constify.
14364 * xml-tdesc.c (tdesc_start_reg): Constify.
14365 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14366 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14367 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14369 2017-04-05 Pedro Alves <palves@redhat.com>
14371 * proc-api.c (struct trans): Constify.
14372 (procfs_note): Constify.
14373 * proc-events.c (struct trans, syscall_table):
14374 * proc-flags.c (struct trans): Constify.
14375 * proc-utils.h (procfs_note): Constify.
14376 * proc-why.c (struct trans): Constify.
14377 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14378 (procfs_detach): Constify.
14379 * sol-thread.c (struct string_map): Constify.
14380 (td_err_string, td_state_string): Constify.
14382 2017-04-05 Pedro Alves <palves@redhat.com>
14384 * proc-api.c (procfs_filename): Don't initialize
14386 (prepare_to_trace): Assume procfs_filename is non-NULL.
14387 (_initialize_proc_api): Give procfs_filename a default value here.
14389 2017-04-05 Pedro Alves <palves@redhat.com>
14391 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14392 'cond_string' parameter.
14393 (extract_exception_regexp): Constify 'string' parameter.
14394 (catch_exception_command_1): Constify.
14395 * breakpoint.c (init_catchpoint)
14396 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14398 (ep_parse_optional_if_clause, catch_fork_command_1)
14399 (catch_exec_command_1): Constify.
14400 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14402 (ep_parse_optional_if_clause): Constify.
14403 * cli/cli-utils.c (remove_trailing_whitespace)
14404 (check_for_argument): Constify.
14405 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14406 non-const overload.
14407 (check_for_argument): Likewise.
14409 2017-04-05 Pedro Alves <palves@redhat.com>
14411 * event-top.c (command_line_handler): Add cast to execute_command
14413 * record-btrace.c (cmd_record_btrace_bts_start)
14414 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14415 (cmd_record_btrace_start): Add cast to execute_command call.
14416 * record-full.c (record_full_goto_insn):
14417 * record.c (record_start, record_stop): Add cast to
14418 execute_command_to_string calls.
14419 (cmd_record_start): Add cast to execute_command calls.
14421 2017-04-05 Pedro Alves <palves@redhat.com>
14423 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14424 static inline function.
14425 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14426 array and use gdb_PyArg_ParseTupleAndKeywords.
14427 * python/py-cmd.c (cmdpy_init): Likewise.
14428 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14429 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14430 (infpy_search_memory): Likewise.
14431 * python/py-objfile.c (objfpy_add_separate_debug_file)
14432 (gdbpy_lookup_objfile): Likewise.
14433 * python/py-symbol.c (gdbpy_lookup_symbol)
14434 (gdbpy_lookup_global_symbol): Likewise.
14435 * python/py-type.c (gdbpy_lookup_type): Likewise.
14436 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14437 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14440 2017-04-05 Pedro Alves <palves@redhat.com>
14442 * python/python-internal.h (gdb_PyGetSetDef): New type.
14443 * python/py-block.c (block_object_getset)
14444 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14445 * python/py-event.c (event_object_getset)
14446 (finish_breakpoint_object_getset): Likewise.
14447 * python/py-inferior.c (inferior_object_getset): Likewise.
14448 * python/py-infthread.c (thread_object_getset): Likewise.
14449 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14450 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14451 * python/py-objfile.c (objfile_getset): Likewise.
14452 * python/py-progspace.c (pspace_getset): Likewise.
14453 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14455 * python/py-record.c (recpy_record_getset): Likewise.
14456 * python/py-symbol.c (symbol_object_getset): Likewise.
14457 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14459 * python/py-type.c (type_object_getset, field_object_getset):
14461 * python/py-value.c (value_object_getset): Likewise.
14463 2017-04-05 Pedro Alves <palves@redhat.com>
14465 * python/python-internal.h (gdb_PyObject_CallMethod)
14466 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14468 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14469 (PySys_GetObject, PySys_SetPath): New macros.
14471 2017-04-05 Pedro Alves <palves@redhat.com>
14473 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14474 info_osdata_command.
14475 * osdata.c (info_osdata_command): Rename to ...
14476 (info_osdata): ... this. Constify 'type' parameter, and remove
14477 the 'from_tty' parameter. Accept NULL TYPE.
14478 (info_osdata_command): New function.
14479 * osdata.h (info_osdata_command): Remove declaration.
14480 (info_osdata): New declaration.
14482 2017-04-05 Pedro Alves <palves@redhat.com>
14484 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14485 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14486 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14488 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14489 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14490 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14492 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14493 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14494 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14495 (mi_cmd_file_list_exec_source_files)
14496 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14497 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14498 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14500 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14501 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14502 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14503 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14504 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14505 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14506 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14507 'command' parameter.
14508 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14509 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14510 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14511 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14512 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14513 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14514 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14515 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14516 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14517 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14518 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14520 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14521 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14522 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14523 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14524 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14525 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14526 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14527 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14528 (mi_cmd_data_list_changed_registers)
14529 (mi_cmd_data_write_register_values)
14530 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14531 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14532 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14533 (mi_cmd_list_features, mi_cmd_list_target_features)
14534 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14535 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14536 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14537 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14538 (mi_cmd_trace_frame_collected): Constify 'command'
14540 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14541 'command' parameter.
14543 2017-04-05 Pedro Alves <palves@redhat.com>
14545 * ada-lang.c (ada_completer_word_break_characters): Now a const
14547 (ada_get_gdb_completer_word_break_characters): Constify.
14548 * completer.c (gdb_completer_command_word_break_characters)
14549 (gdb_completer_file_name_break_characters)
14550 (gdb_completer_quote_characters): Now const arrays.
14551 (get_gdb_completer_quote_characters): Constify.
14552 (set_rl_completer_word_break_characters): New function.
14553 (set_gdb_completion_word_break_characters)
14554 (complete_line_internal): Use it.
14555 * completer.h (get_gdb_completer_quote_characters): Constify.
14556 (set_rl_completer_word_break_characters): Declare.
14557 * f-lang.c (f_word_break_characters): Constify.
14558 * language.c (default_word_break_characters): Constify.
14559 * language.h (language_defn::la_word_break_characters): Constify.
14560 (default_word_break_characters): Constify.
14561 * top.c (init_main): Use set_rl_completer_word_break_characters.
14563 2017-04-05 Pedro Alves <palves@redhat.com>
14565 * aix-thread.c (aix_thread_pid_to_str)
14566 (aix_thread_extra_thread_info): Constify.
14567 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14568 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14569 (bsd_uthread_pid_to_str): Constify.
14570 * corelow.c (core_pid_to_str): Constify.
14571 * darwin-nat.c (darwin_pid_to_str): Constify.
14572 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14573 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14575 * gnu-nat.c (gnu_pid_to_str): Constify.
14576 * go32-nat.c (go32_pid_to_str): Constify.
14577 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14578 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14579 * inferior.c (inferior_pid_to_str): Constify.
14580 * linux-nat.c (linux_nat_pid_to_str): Constify.
14581 * linux-tdep.c (linux_core_pid_to_str): Constify.
14582 * linux-thread-db.c (thread_db_pid_to_str)
14583 (thread_db_extra_thread_info): Constify.
14584 * nto-tdep.c (nto_extra_thread_info): Constify.
14585 * nto-tdep.h (nto_extra_thread_info): Constify.
14586 * obsd-nat.c (obsd_pid_to_str): Constify.
14587 * procfs.c (procfs_pid_to_str): Constify.
14588 * ravenscar-thread.c (ravenscar_extra_thread_info)
14589 (ravenscar_pid_to_str): Constify.
14590 * remote-sim.c (gdbsim_pid_to_str): Constify.
14591 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14593 * sol-thread.c (solaris_pid_to_str): Constify.
14594 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14595 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14596 * target.c (default_pid_to_str, target_pid_to_str)
14597 (normal_pid_to_str, default_pid_to_str): Constify.
14598 * target.h (target_ops::to_pid_to_str)
14599 (target_ops::to_extra_thread_info): Constify.
14600 (target_pid_to_str, normal_pid_to_str): Constify.
14601 * windows-nat.c (windows_pid_to_str): Constify.
14602 * gdbarch.sh (core_pid_to_str): Constify.
14603 * target-delegates.c: Regenerate.
14604 * gdbarch.h, gdbarch.c: Regenerate.
14606 2017-04-05 Pedro Alves <palves@redhat.com>
14608 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14609 the memory of the temporary warning_pre_print override.
14610 * utils.c (warning_pre_print): Constify.
14611 * utils.h (warning_pre_print): Constify.
14613 2017-04-05 Pedro Alves <palves@redhat.com>
14615 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14616 (shell_command): New function.
14617 (make_command): Use std::string.
14618 (init_cli_cmds): Register shell_command instead of shell_escape.
14620 2017-04-05 Pedro Alves <palves@redhat.com>
14622 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14623 * tracepoint.c (default_collect): Don't initialize.
14625 2017-04-05 Pedro Alves <palves@redhat.com>
14627 * macroexp.c (macro_buffer::shared): Now a bool.
14628 (init_buffer): Update.
14629 (init_shared_buffer): Constify 'addr' parameter.
14630 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14633 2017-04-05 Pedro Alves <palves@redhat.com>
14635 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14636 * disasm.c (set_disassembler_options): Constify local.
14637 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14639 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14642 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14645 2017-04-05 Yao Qi <yao.qi@linaro.org>
14647 * frame.c (frame_unwind_register_unsigned): Call
14648 frame_unwind_register_value.
14650 2017-04-05 Yao Qi <yao.qi@linaro.org>
14652 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14653 Use gdb_test_multiple, and don't match anchor.
14655 2017-04-05 Pedro Alves <palves@redhat.com>
14657 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14658 (Write After Approval): Remove Simon Marchi.
14660 2017-04-05 Pedro Alves <palves@redhat.com>
14662 * common/gdb_optional.h (optional::optional): Make constexpr and
14663 initialize m_dummy.
14665 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14667 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14668 (amd64fbsd_jmp_buf_reg_offset): Remove.
14669 (amd64fbsd_supply_uthread): Remove function.
14670 (amd64fbsd_collect_uthread): Remove function.
14671 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14672 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14673 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14674 (fbsd-nat.c): Update comment.
14675 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14676 (i386fbsd_jmp_buf_reg_offset): Remove.
14677 (i386fbsd_supply_uthread): Remove function.
14678 (i386fbsd_collect_uthread): Remove function.
14679 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14681 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14683 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14684 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14685 * NEWS: Mention that support for FreeBSD/alpha was removed.
14686 * alpha-fbsd-tdep.c: Delete file.
14687 * config/alpha/fbsd.mh: Delete file.
14688 * configure.host: Delete alpha*-*-freebsd* and
14689 alpha*-*-kfreebsd*-gnu.
14690 * configure.tgt: Delete alpha*-*-freebsd* and
14691 alpha*-*-kfreebsd*-gnu.
14693 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14695 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14696 amd64bsd_store_inferior_registers): Use ptid from regcache.
14698 2017-04-04 Pedro Alves <palves@redhat.com>
14700 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14701 data fields, make them private and add "m_" prefixes.
14702 (lnp_state_machine::lnp_state_machine): New ctor.
14703 (record_line, check_line_address, handle_set_discriminator)
14704 (handle_set_address, handle_advance_pc, handle_special_opcode)
14705 (handle_advance_line, handle_set_file, handle_negate_stmt)
14706 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14707 (end_sequence, advance_line): New methods.
14708 (m_gdbarch, m_record_lines_p): New fields.
14709 (lnp_reader_state): Delete.
14710 (dwarf_record_line): Rename to ...
14711 (lnp_state_machine::record_line): ... adjust.
14712 (init_lnp_state_machine): Delete.
14713 (lnp_state_machine::lnp_state_machine): New.
14714 (check_line_address): Rename to ...
14715 (lnp_state_machine::check_line_address): This.
14716 (dwarf_decode_lines_1): Remove reference to "reader_state".
14717 Adjust lnp_state_machine having a non-default ctor. Use bool.
14718 State machine internal state manipulation moved to
14719 lnp_state_machine methods.
14721 2017-04-04 Pedro Alves <palves@redhat.com>
14723 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14724 unittests/offset-type-selftests.c.
14725 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14726 * common/offset-type.h: New file.
14727 * common/preprocessor.h: New file.
14728 * common/traits.h: New file.
14729 * common/valid-expr.h: New file.
14730 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14731 sect_offset and cu_offset strong typedefs throughout.
14732 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14733 typedefs throughout.
14734 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14735 sect_offset and cu_offset strong typedefs throughout.
14736 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14737 typedefs throughout.
14738 * gdbtypes.h: Include "common/offset-type.h".
14739 (cu_offset): Now an offset type (strong typedef) instead of a
14741 (sect_offset): Likewise.
14742 (union call_site_parameter_u): Rename "param_offset" field to
14744 * unittests/offset-type-selftests.c: New file.
14746 2017-04-04 Pedro Alves <palves@redhat.com>
14748 * common/underlying.h: New file.
14749 * dwarf2read.c: Include "common/gdb_optional.h" and
14750 "common/underlying.h".
14751 (dir_index, file_name_index): New types.
14752 (file_entry): Use them.
14753 (file_entry::include): Use to_underlying.
14754 (line_header::add_file_name): Use dir_index.
14755 (read_formatted_entries): Use gdb::optional. Read form before
14756 writting to file_entry.
14757 (dwarf_decode_line_header): Use dir_index.
14758 (lnp_state_machine::current_file): Use to_underlying.
14759 (lnp_state_machine::file): Change type to file_name_index.
14760 (dwarf_record_line): Use to_underlying.
14761 (init_lnp_state_machine): Use file_name_index.
14762 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14764 2017-04-04 Pedro Alves <palves@redhat.com>
14766 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14767 operator bool, has_value and get methods.
14769 2017-04-04 Pedro Alves <palves@redhat.com>
14771 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14773 (line_header): Initialize all data fields. Change type of
14774 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14775 Change type of include_dirs to std::vector<const char *>. Remove
14776 num_include_dirs, include_dirs_size. Change type of file_names to
14777 std::vector<file_entry>. Remove num_file_names, file_names_size.
14778 (line_header::line_header): New.
14779 (line_header::add_include_dir, line_header::add_file_name): New
14781 (line_header::include_dir_at): Remove NULL check.
14782 (line_header::file_name_at): Add const overload.
14783 (line_header_up): New unique_ptr typedef.
14784 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14785 std::vector. Remove free_line_header call.
14786 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14787 free_line_header call.
14788 (free_cu_line_header): Delete.
14789 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14790 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14791 Adjust to use std::vector.
14792 (free_line_header): Delete.
14793 (free_line_header_voidp): Use delete.
14794 (add_include_dir): Replace with ...
14795 (line_header::add_include_dir): ... this method. Use std::vector.
14796 (add_file_name): Replace with ...
14797 (line_header::add_file_name): ... this method. Use std::vector.
14798 (add_include_dir_stub): Delete.
14799 (read_formatted_entries): Remove memset.
14800 (dwarf_decode_line_header): Return a line_header_up instead of a
14801 raw pointer. Remove cleanup handling. Pass lambdas to
14802 read_formatted_entries. Adjust to use line_header methods.
14803 (dwarf_decode_lines_1): Adjust to use line_header methods.
14804 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14807 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14809 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14810 instead of struct ptid.
14812 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14814 * frame.c (get_frame_register_bytes): Unwind using value.
14815 (put_frame_register_bytes): Likewise.
14817 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14819 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14822 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14824 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14826 2017-03-29 Yao Qi <yao.qi@linaro.org>
14828 * gdbthread.h (struct thread_info): Declare constructor and
14829 destructor. Add some in-class member initializers.
14830 * thread.c (free_thread): Remove.
14831 (init_thread_list): Call delete instead of free_thread.
14832 (new_thread): Call thread_info constructor.
14833 (thread_info::thread_info): New function.
14834 (thread_info::~thread_info): New function.
14835 (delete_thread_1): Call delete instead of free_thread.
14836 (make_cleanup_restore_current_thread): Move tp and frame to
14839 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14841 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14842 (arc_skip_prologue): Likewise.
14843 (arc_make_frame_cache): Likewise.
14844 (arc_pv_get_operand): New function.
14845 (arc_is_in_prologue): Likewise.
14846 (arc_analyze_prologue): Likewise.
14847 (arc_print_frame_cache): Likewise.
14848 (MAX_PROLOGUE_LENGTH): New constant.
14850 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14852 * configure.tgt: Add arc-insn.o.
14853 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14854 (dump_arc_instruction_command): New function.
14855 (arc_fprintf_disasm): Likewise.
14856 (arc_disassemble_info): Likewise.
14857 (arc_insn_get_operand_value): Likewise.
14858 (arc_insn_get_operand_value_signed): Likewise.
14859 (arc_insn_get_memory_base_reg): Likewise.
14860 (arc_insn_get_memory_offset): Likewise.
14861 (arc_insn_get_branch_target): Likewise.
14862 (arc_insn_dump): Likewise.
14863 (arc_insn_get_linear_next_pc): Likewise.
14864 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14865 (arc_disassemble_info): Likewise.
14866 (arc_insn_get_branch_target): Likewise.
14867 (arc_insn_get_linear_next_pc): Likewise.
14868 * NEWS: Mention new "maint print arc arc-instruction".
14870 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14872 * arc-tdep (maintenance_print_arc_list): New variable.
14873 (maintenance_print_arc_command): New function.
14875 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14877 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14878 Add "limm" and "reserved".
14879 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14880 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14881 * arc-tdep.h (arc_regnum): Likewise.
14883 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14885 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14886 for THREADPTR register.
14887 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14889 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14890 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14891 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14893 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14895 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14896 registers above gdbarch_num_regs (gdbarch) as privileged in
14899 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14901 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14902 for a single specified register or for all registers in
14903 a0_base..a0_base + C0_NREGS range.
14904 (supply_gregset_reg): Call regcache_raw_supply for a single
14905 specified register or for all registers in a0_base..a0_base +
14908 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14910 * arch/xtensa.h (C0_NREGS): Add definition.
14911 * xtensa-tdep.c (C0_NREGS): Remove definition.
14913 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14915 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14916 Drop xtensa_default_isa initialization.
14917 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14919 2017-03-27 Pedro Alves <palves@redhat.com>
14921 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14922 (file_entry::include_dir): New method.
14923 (line_header::include_dir_at, line_header::file_name_at): New
14925 (setup_type_unit_groups, setup_type_unit_groups)
14926 (psymtab_include_file_name): Simplify using the new methods.
14927 (lnp_state_machine) <the_line_header>: New field.
14928 <file>: Add comment.
14929 (lnp_state_machine::current_file): New method.
14930 (dwarf_record_line): Simplify using the new methods.
14931 (init_lnp_state_machine): Initialize the "the_line_header" field.
14932 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14933 Simplify using the new methods.
14935 2017-03-27 Pedro Alves <palves@redhat.com>
14937 * cp-name-parser.y (make_empty): Delete.
14938 (demangler_special, nested_name, ptr_operator, array_indicator)
14939 (direct_declarator, declarator_1): Use fill_comp instead of
14942 2017-03-27 Pedro Alves <palves@redhat.com>
14944 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14945 to ATTRIBUTE_PRINTF.
14946 * solib-target.c (library_list_start_list): Print "string" not
14948 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14949 gdb_xml_error call.
14951 2017-03-27 Pedro Alves <palves@redhat.com>
14953 * dwarf2read.c (struct file_and_directory): New.
14954 (dwarf2_get_dwz_file): Adjust to use std::string.
14955 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14956 (find_file_and_directory): Adjust to return a file_and_directory
14958 (read_file_scope): Adjust to use file_and_directory. Remove
14959 make_cleanup/do_cleanups calls.
14960 (open_and_init_dwp_file): Adjust to use std::string. Remove
14961 make_cleanup/do_cleanups calls.
14962 * python/python.c (do_start_initialization): Adjust to ldirname
14963 returning a std::string.
14964 * utils.c (ldirname): Now returns a std::string.
14965 * utils.h (ldirname): Change return type to std::string.
14966 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14967 returning a std::string.
14968 * xml-tdesc.c (file_read_description_xml): Likewise.
14970 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14972 * regcache.c (regcache_debug_print_register): New function.
14973 * regcache.h (regcache_debug_print_register): New declaration.
14974 * target.c (debug_print_register): Remove.
14975 (target_fetch_registers): Call regcache_debug_print_register.
14976 (target_store_registers): Likewise.
14978 2017-03-24 Pádraig Brady <pbrady@fb.com>
14980 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14981 reference beyond the 'lh->include_dirs' array before accessing to
14983 (psymtab_include_file_name): Likewise.
14984 (dwarf_decode_lines_1): Likewise.
14985 (dwarf_decode_lines): Likewise.
14986 (file_file_name): Likewise.
14988 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14990 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14992 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14993 ps_lsetfpregs): Likewise.
14994 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14995 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14996 ps_lsetfpregs): Likewise.
14997 * target.c (target_fetch_registers, target_store_registers):
15000 2017-03-23 Alan Hayward <alan.hayward@arm.com>
15002 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15004 2017-03-23 Yao Qi <yao.qi@linaro.org>
15006 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15007 (_initialize_aarch64_tdep): Register it.
15008 (aarch64_record_load_store): Handle PRFM instruction.
15009 (aarch64_process_record_test): New function.
15011 2017-03-23 Yao Qi <yao.qi@linaro.org>
15013 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15016 2017-03-23 Yao Qi <yao.qi@linaro.org>
15018 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15020 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15022 python/python.c (do_start_initialization): Fix memory leak.
15024 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15026 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15027 using get_ptrace_pid.
15028 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15030 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15031 inferior_ptid instead of pid.
15033 2017-03-22 Yao Qi <yao.qi@linaro.org>
15035 * aarch64-tdep.c: Wrap locally used classes in anonymous
15037 * arm-tdep.c: Likewise.
15038 * linespec.c: Likewise.
15039 * ui-out.c: Likewise.
15041 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
15044 * python/lib/gdb/printer/bound_registers.py: Import sys.
15046 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15048 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15049 windows_thread_info parameter and use it instead of
15051 (windows_fetch_inferior_registers): Don't set current_thread,
15052 pass the thread to do_windows_fetch_inferior_registers. Use
15053 ptid from regcache instead of inferior_ptid.
15054 (do_windows_store_inferior_registers): Add windows_thread_info
15055 parameter and use it instead of current_thread.
15056 (windows_store_inferior_registers): Don't set current_thread,
15057 pass the thread to do_windows_store_inferior_registers. Use
15058 ptid from regcache instead of inferior_ptid.
15060 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15062 * ser-mingw.c (ser_windows_raw): Remove reference to
15063 struct serial::current_timeout.
15065 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15068 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15069 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15070 (sparc64_fsr_type): Fix %fsr decoding.
15072 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15074 * python/py-record-btrace.c (btpy_insn_data): Change return type
15077 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15079 * spu-linux-nat.c (spu_fetch_inferior_registers,
15080 spu_store_inferior_registers): Use ptid from regcache, set and
15081 restore inferior_ptid.
15082 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15085 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15087 * i386-linux-nat.c (fetch_register, store_register,
15088 i386_linux_fetch_inferior_registers,
15089 i386_linux_store_inferior_registers): Use ptid from regcache.
15090 * ia64-linux-nat.c (ia64_linux_fetch_register,
15091 ia64_linux_store_register): Likewise.
15092 * inf-ptrace.c (inf_ptrace_fetch_register,
15093 inf_ptrace_store_register): Likewise.
15094 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15095 m32r_linux_store_inferior_registers): Likewise.
15096 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15097 m68kbsd_store_inferior_registers): Likewise.
15098 * m68k-linux-nat.c (fetch_register, store_register,
15099 m68k_linux_fetch_inferior_registers,
15100 m68k_linux_store_inferior_registers): Likewise.
15101 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15102 m88kbsd_store_inferior_registers): Likewise.
15103 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15104 mips_fbsd_store_inferior_registers): Likewise.
15105 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15106 mips64_linux_regsets_store_registers): Likewise.
15107 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15108 mipsnbsd_store_inferior_registers): Likewise.
15109 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15110 mips64obsd_store_inferior_registers): Likewise.
15111 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15113 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15114 ppcfbsd_store_inferior_registers): Likewise.
15115 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15116 ppc_linux_store_inferior_registers): Likewise.
15117 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15118 ppcnbsd_store_inferior_registers): Likewise.
15119 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15120 ppcobsd_store_registers): Likewise.
15121 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15123 * ravenscar-thread.c (ravenscar_fetch_registers,
15124 ravenscar_store_registers, ravenscar_prepare_to_store):
15126 * record-btrace.c (record_btrace_fetch_registers,
15127 record_btrace_store_registers, record_btrace_prepare_to_store):
15129 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15130 Lookup inferior using ptid from regcache, instead of
15132 * remote.c (remote_fetch_registers, remote_store_registers): Use
15133 ptid from regcache.
15134 * rs6000-nat.c (fetch_register, store_register): Likewise.
15135 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15136 s390_linux_store_inferior_registers): Likewise.
15137 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15138 shnbsd_store_inferior_registers): Likewise.
15139 * sol-thread.c (sol_thread_fetch_registers,
15140 sol_thread_store_registers): Likewise.
15141 * sparc-nat.c (sparc_fetch_inferior_registers,
15142 sparc_store_inferior_registers): Likewise.
15143 * tilegx-linux-nat.c (fetch_inferior_registers,
15144 store_inferior_registers): Likewise.
15145 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15146 vaxbsd_store_inferior_registers): Likewise.
15147 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15148 store_xtregs): Likewise.
15150 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15153 * NEWS: Mention support for rvalue references in GDB and python.
15154 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15155 supports both lvalue and rvalue references.
15157 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15160 * gdbtypes.c (rank_one_type): Implement overloading
15161 resolution rules regarding rvalue references.
15163 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15166 * aarch64-tdep.c (aarch64_type_align)
15167 (aarch64_extract_return_value, aarch64_store_return_value): Change
15168 lvalue reference type checks to general reference type checks.
15169 * amd64-tdep.c (amd64_classify): Likewise.
15170 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15172 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15173 (arm_store_return_value): Likewise.
15174 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15175 * c-typeprint.c (c_print_type): Likewise.
15176 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15177 (cplus_number_of_children, cplus_describe_child): Likewise.
15178 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15179 * completer.c (expression_completer): Likewise.
15180 * cp-support.c (make_symbol_overload_list_adl_namespace):
15182 * darwin-nat-info.c (info_mach_region_command): Likewise.
15183 * dwarf2loc.c (entry_data_value_coerce_ref)
15184 (value_of_dwarf_reg_entry): Likewise.
15185 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15186 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15188 * findvar.c (extract_typed_address, store_typed_address):
15190 * gdbtypes.c (rank_one_type): Likewise.
15191 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15192 * infcall.c (value_arg_coerce): Likewise.
15193 * language.c (pointer_type): Likewise.
15194 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15196 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15197 * mn10300-tdep.c (mn10300_type_align): Likewise.
15198 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15199 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15200 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15202 * printcmd.c (print_formatted, x_command): Likewise.
15203 * python/py-type.c (typy_get_composite, typy_template_argument):
15205 * python/py-value.c (valpy_referenced_value)
15206 (valpy_get_dynamic_type, value_has_field): Likewise.
15207 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15208 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15209 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15210 * spu-tdep.c (spu_scalar_value_p): Likewise.
15211 * symtab.c (lookup_symbol_aux): Likewise.
15212 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15213 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15215 * valops.c (value_cast_pointers, value_cast)
15216 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15217 (value_struct_elt, value_struct_elt_bitpos)
15218 (value_find_oload_method_list, find_overload_match)
15219 (value_rtti_indirect_type): Likewise.
15220 * valprint.c (val_print_scalar_type_p, generic_val_print):
15222 * value.c (value_actual_type, value_as_address, unpack_long)
15223 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15224 (coerce_ref): Likewise.
15225 * varobj.c (varobj_get_value_type): Likewise.
15227 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15230 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15231 table of constants.
15232 * python/lib/gdb/command/explore.py: Support exploring values
15233 of rvalue reference types.
15234 * python/lib/gdb/types.py: Implement get_basic_type() for
15235 rvalue reference types.
15236 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15238 * python/py-value.c (valpy_getitem): Add an rvalue reference
15240 (valpy_reference_value): Add new parameter "refcode".
15241 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15242 New wrappers for valpy_reference_value().
15243 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15244 (gdbpy_invoke_xmethod): Likewise.
15246 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15249 * dwarf2read.c (process_die, read_type_die_1): Handle the
15250 DW_TAG_rvalue_reference_type DIE.
15251 (read_tag_reference_type): Add new parameter "refcode".
15253 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15256 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15257 (c_type_print_modifier, c_type_print_varspec_suffix)
15258 (c_type_print_base): Support printing rvalue reference types.
15259 * c-valprint.c (c_val_print, c_value_print): Support printing
15260 rvalue reference values.
15262 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15265 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15267 * cp-support.c (replace_typedefs): Handle
15268 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15269 * python/py-type.c (typy_lookup_type): Likewise.
15271 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15274 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15275 * parse.c (insert_type): Change assert statement.
15276 (follow_types): Handle rvalue reference types.
15277 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15280 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15283 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15284 value_ref() interface.
15285 * c-valprint.c (c_value_print): Likewise.
15286 * infcall.c (value_arg_coerce): Likewise.
15287 * python/py-value.c (valpy_reference_value): Likewise.
15288 * valops.c (value_cast, value_reinterpret_cast)
15289 (value_dynamic_cast, typecmp): Likewise.
15290 (value_ref): Parameterize by kind of return value reference type.
15291 * value.h (value_ref): Add new parameter "refcode".
15293 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15296 * dwarf2read.c (read_tag_reference_type): Use
15297 lookup_lvalue_reference_type() instead of lookup_reference_type().
15298 * eval.c (evaluate_subexp_standard): Likewise.
15299 * f-exp.y: Likewise.
15300 * gdbtypes.c (make_reference_type, lookup_reference_type):
15301 Generalize with rvalue reference types.
15302 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15303 convenience wrappers for lookup_reference_type().
15304 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15305 reference kind parameter.
15306 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15307 wrappers for lookup_reference_type().
15308 * guile/scm-type.c (gdbscm_type_reference): Use
15309 lookup_lvalue_reference_type() instead of lookup_reference_type().
15310 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15311 * parse.c (follow_types): Likewise.
15312 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15313 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15315 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15316 (gdbpy_invoke_xmethod): Likewise.
15317 * stabsread.c: Provide extra argument to make_reference_type()
15319 * valops.c (value_ref, value_rtti_indirect_type): Use
15320 lookup_lvalue_reference_type() instead of lookup_reference_type().
15322 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15325 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15326 (TYPE_IS_REFERENCE): New macro.
15327 (struct type): Add rvalue_reference_type field.
15328 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15330 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15332 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15333 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15334 New function definition.
15335 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15336 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15337 New function declaration.
15338 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15339 * mi/mi-interp.h: New file.
15340 * solib.c (info_sharedlibrary_command): Replace for loop with
15342 * solib.h (update_solib_list): New function declaration.
15343 (so_list_head): Move macro.
15344 * solist.h (ALL_SO_LIBS): New macro.
15346 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15348 * infcmd.c (post_create_inferior): Remove unused argument in
15350 * remote.c (remote_start_remote): Likewise.
15351 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15352 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15353 (enable_break): Likewise.
15354 * solib.c (update_solib_list): Remove unused target argument
15355 and its documentation.
15356 (solib_add): Remove unused target argument. Remove unused
15357 argument in call to update_solib_list.
15358 (info_sharedlibrary_command): Remove unused argument in call
15359 to update_solib_list.
15360 (sharedlibrary_command): Remove unused argument in call to
15362 (handle_solib_event): Likewise.
15363 (reload_shared_libraries): Likewise.
15364 * solib.h (solib_add): Remove unused target argument.
15366 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15368 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15369 (s390_displaced_step_fixup): Cover relative branches with the
15370 default fixup handling. This fixes lack of support for some
15371 relative branch instructions.
15373 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15375 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15376 ptid from regcache.
15378 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15380 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15381 i386_darwin_store_inferior_registers): Use ptid from regcache.
15383 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15385 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15386 i386bsd_store_inferior_registers): Use ptid from regcache.
15388 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15390 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15391 hppaobsd_store_registers): Use ptid from regcache.
15393 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15395 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15396 hppanbsd_store_registers): Use ptid from regcache.
15398 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15400 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15401 from regcache. Use get_ptrace_pid.
15403 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15405 * corelow.c (get_core_register_section): Use ptid from regcache,
15408 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15410 * bsd-uthread.c (bsd_uthread_fetch_registers,
15411 bsd_uthread_store_registers): Use ptid from regcache, set and
15412 restore inferior_ptid.
15414 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15416 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15417 fetch_fp_regs, store_register, store_regs, store_fp_register,
15418 store_fp_regs): Use ptid from regcache.
15420 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15422 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15423 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15424 store_vfp_regs): Use ptid from regcache.
15426 2017-03-17 Pedro Alves <palves@redhat.com>
15429 * ser-base.c (ser_base_wait_for): Add comment.
15430 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15432 * ser-unix.c (hardwire_raw): Remove reference to
15433 scb->current_timeout.
15434 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15435 (hardwire_ops): Install ser_base_readchar instead of
15437 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15440 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15443 * python/lib/gdb/printer/bound_registers.py: Add support for
15446 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15448 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15449 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15450 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15451 byte_offset to subobj_byte_offset. Fix the handling of
15452 DWARF_VALUE_STACK on big-endian targets when coming via an
15454 (dwarf2_evaluate_loc_desc): Adjust call to
15455 dwarf2_evaluate_loc_desc_full.
15456 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15457 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15459 2017-03-16 Yao Qi <yao.qi@linaro.org>
15461 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15462 and REVSH instructions.
15464 2017-03-16 Yao Qi <yao.qi@linaro.org>
15466 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15467 (arm_record_test): Declare.
15468 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15469 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15470 align with the manual.
15471 (thumb_record_misc): Adjust the code order to align with the
15473 (thumb2_record_decode_insn_handler): Fix instruction matching.
15474 (instruction_reader_thumb): New class.
15475 (arm_record_test): New function.
15477 2017-03-16 Yao Qi <yao.qi@linaro.org>
15479 * arm-tdep.c (abstract_memory_reader): New class.
15480 (instruction_reader): New class.
15481 (extract_arm_insn): Add argument 'reader'. Callers updated.
15482 (decode_insn): Likewise.
15484 2017-03-16 Doug Evans <dje@google.com>
15486 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15487 member. Change type of TYPE member to SCM. All uses updated.
15488 (lsscm_make_lazy_string_smob): Add assert.
15489 (lsscm_make_lazy_string): Flag bad length values.
15490 (lsscm_elt_type): New function.
15491 (gdbscm_lazy_string_to_value): Rewrite to use
15492 lsscm_safe_lazy_string_to_value.
15493 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15494 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15495 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15497 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15498 * guile/scm-type.c (tyscm_scm_to_type): New function.
15500 2017-03-15 Doug Evans <dje@google.com>
15502 PR python/17728, python/18439, python/18779
15503 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15504 member. Change type of TYPE member to PyObject *. All uses updated.
15505 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15506 (gdbpy_create_lazy_string_object): Flag bad length values.
15507 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15508 Handle typedefs in incoming type.
15509 (stpy_lazy_string_elt_type): New function.
15510 (gdbpy_extract_lazy_string): Call it.
15511 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15512 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15513 typedefs in incoming type.
15515 2017-03-16 Doug Evans <dje@google.com>
15517 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15518 * guile/scm-type.c (tyscm_scm_to_type): New function.
15520 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15522 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15523 "ULONGEST" for "skip".
15525 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15528 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15529 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15530 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15531 over ptrace peek/poke until end of buffer or error.
15533 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15535 * parse.c (length_of_subexp): Make static.
15536 * parser-defs.h (length_of_subexp): Remove.
15538 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15540 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15543 2017-03-14 Pedro Alves <palves@redhat.com>
15545 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15546 (main): Use std::unique_ptr. Remove calls to
15547 cp_demangled_name_parse_free.
15549 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15551 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15552 alphabsd_store_inferior_registers): Use regcache->ptid instead
15555 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15557 * aix-thread.c (aix_thread_fetch_registers,
15558 aix_thread_store_registers): Use regcache->ptid instead of
15561 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15563 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15564 store_gregs_to_thread, fetch_fpregs_from_thread,
15565 store_fpregs_to_thread): Use regcache->ptid instead of
15568 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15570 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15571 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15572 instead of inferior_ptid.
15574 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15576 * target.c (target_fetch_registers, target_store_registers): Add
15579 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15581 * regcache.h (regcache_get_ptid): New function.
15582 * regcache.c (regcache_get_ptid): New function.
15584 2017-03-13 Mark Wielaard <mark@klomp.org>
15586 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15588 2017-03-10 Keith Seitz <keiths@redhat.com>
15591 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15593 2017-03-08 Pedro Alves <palves@redhat.com>
15596 * infrun.c (start_step_over, do_target_resume, resume)
15597 (restart_threads): Assert we're not resuming a thread that is
15598 meant to be stopped.
15599 (infrun_thread_stop_requested_callback): Delete.
15600 (infrun_thread_stop_requested): If the thread is internally
15601 stopped, queue a pending stop event and clear the thread's
15602 inline-frame state.
15603 (handle_stop_requested): New function.
15604 (handle_syscall_event, handle_inferior_event_1): Use
15605 handle_stop_requested.
15606 (handle_stop_requested): New function.
15607 (handle_signal_stop): Set the thread's stop_signal here instead of
15609 (finish_step_over): Clear step over info unconditionally.
15610 (handle_signal_stop): If the user had interrupted the event
15611 thread, consider the stop a random signal.
15612 (handle_signal_stop) <signal arrived while stepping over
15613 breakpoint>: Don't restart threads here.
15614 (stop_waiting): Don't clear step-over info here.
15616 2017-03-08 Pedro Alves <palves@redhat.com>
15619 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15620 goes to argument 2, not 1.
15622 2017-03-08 Pedro Alves <palves@redhat.com>
15625 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15626 display_gdb_prompt.
15627 (command_line_input): Add comment.
15629 2017-03-08 Pedro Alves <palves@redhat.com>
15632 * tui/tui-file.c (tui_file::write): New.
15633 * tui/tui-file.h (tui_file): Override "write".
15634 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15635 factored out from ...
15636 (tui_puts): ... here.
15637 (tui_putc): Use them.
15638 (tui_write): New function.
15639 * tui/tui-io.h (tui_write): Declare.
15641 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15643 * Makefile.in (SFILES): Replace "environ.c" with
15644 "common/environ.c".
15645 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15646 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15648 * common/environ.c: ... here.
15649 * environ.h: Moved to...
15650 * common/environ.h: ... here.
15652 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15654 * gdbarch.sh (pstring_ptr): New static function.
15655 (gdbarch_disassembler_options): Use it.
15656 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15657 not valid_disassembler_option->name.
15658 * gdbarch.c: Regenerate.
15660 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15662 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15664 2017-03-07 Pedro Alves <palves@redhat.com>
15666 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15668 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
15670 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15671 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15672 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15673 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15675 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15677 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15679 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15681 * remote.c (remote_add_target_side_commands): Use range-based
15684 2017-03-03 Yao Qi <yao.qi@linaro.org>
15687 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15689 * valprint.c (common_val_print): Likewise.
15691 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15693 * NEWS: Mention new set/show disassembler-options commands.
15694 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15695 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15696 (prospective_options): New static variable.
15697 (gdb_disassembler::gdb_disassembler): Initialize
15698 m_di.disassembler_options.
15699 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15700 (get_disassembler_options): New function.
15701 (set_disassembler_options): Likewise.
15702 (set_disassembler_options_sfunc): Likewise.
15703 (show_disassembler_options_sfunc): Likewise.
15704 (disassembler_options_completer): Likewise.
15705 (_initialize_disasm): Likewise.
15706 * disasm.h (get_disassembler_options): New prototype.
15707 (set_disassembler_options): Likewise.
15708 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15709 (gdbarch_verify_disassembler_options): Likewise.
15710 * gdbarch.c: Regenerate.
15711 * gdbarch.h: Likewise.
15712 * arm-tdep.c (num_disassembly_options): Delete.
15713 (set_disassembly_style): Likewise.
15714 (arm_disassembler_options): New static variable.
15715 (set_disassembly_style_sfunc): Convert short style name into long
15716 option name. Call set_disassembler_options.
15717 (show_disassembly_style_sfunc): New function.
15718 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15719 set_gdbarch_verify_disassembler_options.
15720 (_initialize_arm_tdep): Delete regnames variable and update callers.
15721 (arm_disassembler_options): Initialize.
15722 (disasm_options): New variable.
15723 (num_disassembly_options): Rename from this...
15724 (num_disassembly_styles): ...to this. Compute by scanning through
15726 (valid_disassembly_styles): Initialize using disasm_options.
15727 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15728 set_arm_regname_option.
15729 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15730 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15731 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15732 set_gdbarch_verify_disassembler_options.
15733 * s390-tdep.c (s390_disassembler_options): New static variable.
15734 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15735 set_gdbarch_verify_disassembler_options.
15737 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15739 * remote.c (remote_add_target_side_condition): Remove "struct"
15740 keyword from range-based for loop.
15742 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15744 * remote.c (remote_add_target_side_condition): Use range-based
15745 for loop. Update comment.
15747 2017-02-27 Yao Qi <yao.qi@linaro.org>
15749 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15751 2017-02-26 Alan Hayward <alan.hayward@arm.com>
15753 * regcache.c (regcache_raw_update): New function.
15754 (regcache_raw_read): Move code to regcache_raw_update.
15755 * regcache.h (regcache_raw_update): New declaration.
15756 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15758 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15760 * dwarf2read.c (create_debug_type_hash_table): Initialize
15761 header.signature and header.type_offset_in_tu.
15763 2017-02-24 Pedro Alves <palves@redhat.com>
15765 * symtab.c (make_file_symbol_completion_list_1): Use
15766 add_symtab_completions.
15768 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15770 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15772 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15774 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15775 I386_MAX_REGISTER_SIZE.
15776 (i386_pseudo_register_write): Likewise.
15777 (i386_process_record): Likewise.
15778 * i387-tdep.c (i387_supply_xsave): Likewise.
15779 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15780 (store_register): Likewise.
15782 2017-02-23 Pedro Alves <palves@redhat.com>
15784 * ada-lang.c: Include "common/function-view.h".
15785 (ada_iterate_over_symbols): Adjust to use function_view as
15787 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15788 (ada_make_symbol_completion_list): Use a lambda.
15789 (ada_exc_search_name_matches): Delete.
15790 (name_matches_regex): New.
15791 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15792 * compile/compile-c-support.c: Include "common/function-view.h".
15793 (print_one_macro): Change prototype to accept a ui_file pointer.
15794 (write_macro_definitions): Use a lambda.
15795 * dwarf2read.c: Include "common/function-view.h".
15796 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15797 (dw2_expand_symtabs_matching): Adjust to use function_view as
15799 * language.h: Include "common/function-view.h".
15800 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15801 function_view as callback type.
15802 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15803 * linespec.c: Include "common/function-view.h".
15804 (collect_info::add_symbol): New method.
15805 (struct symbol_and_data_callback, iterate_inline_only, struct
15806 symbol_matcher_data, iterate_name_matcher): Delete.
15807 (iterate_over_all_matching_symtabs): Adjust to use function_view
15808 as callback type and lambdas.
15809 (iterate_over_file_blocks): Adjust to use function_view as
15811 (decode_compound_collector): Now a class with private fields.
15812 (decode_compound_collector::release_symbols): New method.
15813 (collect_one_symbol): Rename to...
15814 (decode_compound_collector::operator()): ... this and adjust.
15815 (lookup_prefix_sym): decode_compound_collector construction bits
15816 move to decode_compound_collector ctor. Pass the
15817 decode_compound_collector object directly as callback. Remove
15818 cleanups and use decode_compound_collector::release_symbols
15820 (symtab_collector): Now a class with private fields.
15821 (symtab_collector::release_symtabs): New method.
15822 (add_symtabs_to_list): Rename to...
15823 (symtab_collector::operator()): ... this and adjust.
15824 (collect_symtabs_from_filename): symtab_collector construction
15825 bits move to symtab_collector ctor. Pass the symtab_collector
15826 object directly as callback. Remove cleanups and use
15827 symtab_collector::release_symtabs instead.
15828 (collect_symbols): Delete.
15829 (add_matching_symbols_to_info): Use lambdas.
15830 * macrocmd.c (print_macro_callback): Delete.
15831 (info_macro_command): Use a lambda.
15832 (info_macros_command): Pass print_macro_definition as callable
15834 (print_one_macro): Remove 'ignore' parameter.
15835 (macro_list_command): Adjust.
15836 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15837 (macro_for_each_data::user_data): Delete field.
15838 (foreach_macro): Adjust to call the function_view.
15839 (macro_for_each): Adjust to use function_view as callback type.
15840 (foreach_macro_in_scope): Adjust to call the function_view.
15841 (macro_for_each_in_scope): Adjust to use function_view as callback
15843 * macrotab.h: Include "common/function-view.h".
15844 (macro_callback_fn): Declare a prototype instead of a pointer.
15845 Remove "user_data" parameter.
15846 (macro_for_each, macro_for_each_in_scope): Adjust to use
15847 function_view as callback type.
15848 * psymtab.c (partial_map_expand_apply)
15849 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15850 Adjust to use function_view as callback type and to return bool.
15851 (psym_expand_symtabs_matching): Adjust to use function_view as
15853 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15854 to use function_view as callback type and to return bool.
15855 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15857 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15859 * symfile.h: Include "common/function-view.h".
15860 (expand_symtabs_file_matcher_ftype)
15861 (expand_symtabs_symbol_matcher_ftype)
15862 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15864 (quick_symbol_functions::map_symtabs_matching_filename)
15865 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15866 function_view as callback type and return bool.
15867 (expand_symtabs_matching): Adjust to use function_view as callback
15869 (maintenance_expand_name_matcher)
15870 (maintenance_expand_file_matcher): Delete.
15871 (maintenance_expand_symtabs): Use lambdas.
15872 * symtab.c (iterate_over_some_symtabs): Adjust to use
15873 function_view as callback types and return bool.
15874 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15876 (lookup_symtab_callback): Delete.
15877 (lookup_symtab): Use a lambda.
15878 (iterate_over_symbols): Adjust to use function_view as callback
15880 (struct search_symbols_data, search_symbols_file_matches)
15881 (search_symbols_name_matches): Delete.
15882 (search_symbols): Use a pair of lambdas.
15883 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15884 (symtab_expansion_callback): Delete.
15885 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15886 * symtab.h: Include "common/function-view.h".
15887 (iterate_over_some_symtabs): Adjust to use function_view as
15888 callback type and return bool.
15889 (iterate_over_symtabs): Adjust to use function_view as callback
15891 (symbol_found_callback_ftype): Remove 'data' parameter and return
15893 (iterate_over_symbols): Adjust to use function_view as callback
15896 2017-02-23 Pedro Alves <palves@redhat.com>
15898 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15899 (%.o) <unittests/%.c>: New pattern.
15900 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15901 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15902 * common/function-view.h: New file.
15903 * unittests/function-view-selftests.c: New file.
15904 * configure: Regenerate.
15906 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15908 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15910 * go32-nat.c (go32_thread_alive): Likewise.
15912 2017-02-23 Yao Qi <yao.qi@linaro.org>
15914 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15917 2017-02-23 Yao Qi <yao.qi@linaro.org>
15919 * varobj.c (varobj_clear_saved_item): Use delete instead of
15921 (update_dynamic_varobj_children): Likewise.
15923 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15925 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15927 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15929 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15930 m_enum_value to 0 in default constructor.
15932 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15934 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15935 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15936 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15937 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15938 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15939 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15940 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15941 IS_STORE_CONDITIONAL_INSN.
15943 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15945 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15947 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15949 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15951 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15953 * dwarf2read.c (skip_one_die, read_attribute_value)
15954 (dwarf2_const_value_attr, dump_die_shallow)
15955 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15956 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15958 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15960 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15961 (dwarf_parse_macro_header): Accept DWARF version 5.
15962 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15964 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15966 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15968 * common/common-exceptions.h (enum errors): Likewise.
15969 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15970 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15971 (dwarf_expr_context::execute_stack_op): Likewise.
15972 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15974 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15975 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15976 (show_entry_values_debug, call_site_to_target_addr)
15977 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15978 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15979 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15980 (value_of_dwarf_block_entry, indirect_pieced_value)
15981 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15982 (disassemble_dwarf_expression): Likewise.
15983 * dwarf2read.c (process_die, inherit_abstract_dies)
15984 (read_call_site_scope): Likewise.
15985 * gdbtypes.h (struct func_type, struct call_site_parameter)
15986 (struct call_site): Likewise.
15987 * stack.c (read_frame_arg): Likewise.
15988 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15990 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15992 * defs.h (read_unsigned_leb128): New declaration.
15993 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15994 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15995 (dwarf2_find_location_expression): Call also
15996 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15997 * dwarf2loc.h (dwarf2_version): New declaration.
15998 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16000 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16002 (struct dwop_section_names): Add loclists_dwo.
16003 (dwop_section_names): Add .debug_loclists.dwo.
16004 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16005 (struct dwarf2_per_cu_data): Add dwarf_version.
16006 (struct dwo_sections): Add loclists.
16007 (struct attr_abbrev): Add implicit_const.
16008 (read_indirect_line_string): New declaration.
16009 (read_unsigned_leb128): Delete declaration.
16010 (rcuh_kind): New definition.
16011 (read_and_check_comp_unit_head): Change parameter
16012 is_debug_types_section to section_kind.
16013 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16014 (read_comp_unit_head): Change parameter abfd to section, add parameter
16015 section_kind. Handle DWARF-5.
16016 (error_check_comp_unit_head): Accept also DWARF version 5.
16017 (read_and_check_comp_unit_head): Change parameter
16018 is_debug_types_section to section_kind.
16019 (read_and_check_type_unit_head): Delete function.
16020 (read_abbrev_offset): Handle DWARF-5.
16021 (create_debug_type_hash_table): Add parameter section_kind. Process
16022 only DW_UT_type. Use signature and type_offset_in_tu from struct
16024 (create_debug_types_hash_table): Update create_debug_type_hash_table
16026 (create_all_type_units): Call create_debug_type_hash_table.
16027 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16028 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16030 (skip_one_die): Handle DW_FORM_implicit_const.
16031 (dwarf2_rnglists_process): New function.
16032 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16033 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16034 (read_attribute_value): Handle DW_FORM_implicit_const,
16036 (read_attribute): Handle DW_FORM_implicit_const.
16037 (read_indirect_string_at_offset_from): New function from
16038 read_indirect_string_at_offset.
16039 (read_indirect_string_at_offset): Call
16040 read_indirect_string_at_offset_from.
16041 (read_indirect_line_string_at_offset): New function.
16042 (read_indirect_string): New function comment.
16043 (read_indirect_line_string): New function.
16044 (read_unsigned_leb128): Make it global.
16045 (dwarf2_string_attr): Handle DWARF-5.
16046 (add_include_dir_stub, read_formatted_entries): New functions.
16047 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16049 (per_cu_header_read_in): Update read_comp_unit_head caller.
16050 (dwarf2_version): New function.
16051 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16053 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16056 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16058 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16060 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16062 * dwarf2read.c (dwarf2_ranges_process): New function from
16063 dwarf2_ranges_read.
16064 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16065 dwarf2_ranges_process.
16067 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16069 * dwarf2read.c (create_debug_type_hash_table): New function from
16070 create_debug_types_hash_table.
16071 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16072 (create_all_type_units, open_and_init_dwo_file): Update
16073 create_debug_types_hash_table callers.
16075 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16078 * fork-child.c (trace_start_error): Fix thinko. va_end should
16079 refer to 'ap', not 'args'.
16081 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16082 Pedro Alves <palves@redhat.com>
16085 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16087 * fork-child.c (trace_start_error): New function.
16088 (trace_start_error_with_name): Likewise.
16089 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16090 * inf-ptrace.c (inf_ptrace_me): Likewise.
16091 * inferior.h (trace_start_error): New prototype.
16092 (trace_start_error_with_name): Likewise.
16094 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16097 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16098 NULL before using it.
16099 * symmisc.c (maintenance_print_symbols): Likewise.
16100 (maintenance_print_msymbols): Likewise.
16102 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16104 * NEWS: Add record Python bindings entry.
16106 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16108 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16110 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16111 * python/py-record-btrace.c, python/py-record-btrace.h,
16112 python/py-record-full.c, python/py-record-full.h: New file.
16113 * python/py-record.c: Add include for py-record-btrace.h and
16115 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16116 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16117 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16118 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16120 (gdbpy_initialize_btrace): New export.
16121 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16123 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16125 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16126 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16127 * python/py-record.c: New file.
16128 * python/python-internal.h (gdbpy_start_recording,
16129 gdbpy_current_recording, gdpy_stop_recording,
16130 gdbpy_initialize_record): New export.
16131 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16132 (python_GdbMethods): Add gdbpy_start_recording,
16133 gdbpy_current_recording and gdbpy_stop_recording.
16135 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16137 * record-btrace.c (record_btrace_record_method): New function.
16138 (init_record_btrace_ops): Initialize to_record_method.
16139 * record-full.c (record_full_record_method): New function.
16140 (init_record_full_ops, init_record_full_core_ops): Add
16141 record_full_record_method.
16142 * record.h (enum record_method): New enum.
16143 * target-debug.h (target_debug_print_enum_record_method: New define.
16144 * target-delegates.c: Regenerate.
16145 * target.c (target_record_method): New function.
16146 * target.h: Include record.h.
16147 (struct target_ops) <to_record_method>: New field.
16148 (target_record_method): New export.
16150 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16152 * record.h (record_start, record_stop): New export.
16153 * record.c (record_start, record_stop): New function.
16155 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16157 * btrace.c (btrace_fetch): Copy function call segments pointer
16159 (btrace_clear): Clear the vector.
16160 (btrace_find_insn_by_number): Use binary search to find the correct
16161 function call segment.
16162 * btrace.h (brace_fun_p): New typedef.
16163 (struct btrace_thread_info) <functions>: New field.
16165 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16167 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16168 * btrace.c (btrace_decode_error): ... here. New function.
16169 * btrace.h (btrace_decode_error): New export.
16171 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16173 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16174 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16175 btrace_find_insn_by_number): Remove special case for gaps.
16176 * btrace.h (btrace_insn_get_error): New export.
16177 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16178 * record-btrace.c (btrace_insn_history): Print number for gaps.
16179 (record_btrace_info, record_btrace_goto): Handle gaps.
16181 2017-02-14 Tom Tromey <tom@tromey.com>
16184 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16186 * python/py-evts.c (gdbpy_initialize_py_events): Add
16187 before_prompt registry.
16188 * python/py-events.h (events_object) <before_prompt>: New field.
16190 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16192 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16194 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16196 * symfile (_initialize_symfile): Add usage text to the load command's
16199 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16201 * utils.c (defaulted_query): Don't query on secondary UIs.
16203 2017-02-10 Tom Tromey <tom@tromey.com>
16205 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16207 2017-02-10 Tom Tromey <tom@tromey.com>
16209 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16211 * python/py-type.c (typy_legacy_template_argument): Remove
16212 unnecessary "cleanup" local.
16214 2017-02-10 Tom Tromey <tom@tromey.com>
16216 * python/python.c (do_start_initialization): New function, from
16217 _initialize_python.
16218 (_initialize_python): Call do_start_initialization.
16219 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16222 2017-02-10 Tom Tromey <tom@tromey.com>
16224 * python/py-prettyprint.c (pretty_print_one_value): Use
16227 2017-02-10 Tom Tromey <tom@tromey.com>
16229 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16230 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16232 * python/py-type.c (field_new): Use gdbpy_ref.
16233 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16235 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16236 (py_free_pspace): Likewise.
16237 (pspace_to_pspace_object): Likewise.
16238 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16239 (py_free_objfile): Likewise.
16240 (objfile_to_objfile_object): Likewise.
16241 * python/py-inferior.c (delete_thread_object): Use
16243 (infpy_read_memory): Likewise.
16244 (py_free_inferior): Likewise.
16245 * python/py-evtregistry.c (create_eventregistry_object): Use
16247 * python/py-event.c (create_event_object): Use gdbpy_ref.
16249 2017-02-10 Tom Tromey <tom@tromey.com>
16251 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16252 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16254 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16255 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16256 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16257 python/py-framefilter.c, python/py-function.c,
16258 python/py-inferior.c, python/py-infevents.c,
16259 python/py-linetable.c, python/py-newobjfileevent.c,
16260 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16261 python/py-signalevent.c, python/py-stopevent.c,
16262 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16263 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16264 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16265 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16267 2017-02-10 Tom Tromey <tom@tromey.com>
16269 * ui-out.h (ui_out_emit_type): New class.
16270 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16271 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16272 and ui_out_emit_tuple.
16273 (enumerate_locals): Likewise.
16274 (py_mi_print_variables, py_print_locals, py_print_args): Use
16276 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16278 * common/gdb_optional.h: New file.
16280 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16282 * MAINTAINERS (Write After Approval): Update my e-mail address.
16284 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16287 * breakpoint.c (_initialize_breakpoint): Update the help description
16288 of the 'commands' command to indicate that it takes a list argument.
16290 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16292 * interps.c (current_interp_set_logging): Remove "return".
16294 2017-02-09 Gary Benson <gbenson@redhat.com>
16296 * symtab.c (add_symtab_completions): Prevent NULL pointer
16299 2017-02-08 Pedro Alves <palves@redhat.com>
16301 * interps.c (interp::interp): Remove reference to quiet_p.
16302 (interp_set): Make static. Remove dead "Switching to" output
16304 (interp_quiet_p, interp_set_quiet): Delete.
16305 (interpreter_exec_cmd): Don't set the interpreter quiet.
16306 * interps.h (interp_quiet_p): Make static.
16307 (class interp) <quiet_p>: Remove field
16309 2017-02-08 Jerome Guitton <guitton@adacore.com>
16311 * cli/cli-decode.c (find_command_name_length): Make it extern.
16312 * cli/cli-decode.h (find_command_name_length): Declare.
16313 * cli/cli-script.c (command_name_equals, line_first_arg):
16315 (process_next_line): Use cli-decode to parse command names.
16316 (build_command_line): Make args a constant pointer.
16318 2017-02-08 Jerome Guitton <guitton@adacore.com>
16320 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16321 Remove case-insensitive search.
16323 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16325 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16326 at the end of the line. Avoids an ARI warning.
16328 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16330 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16331 rdseed instructions.
16332 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16334 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16337 Provide and use sparc32 and sparc64 target description XML files.
16338 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16339 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16340 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16341 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16342 * features/sparc/sparc32-solaris.xml: New file.
16343 * features/sparc/sparc64-solaris.xml: New file.
16344 * features/sparc/sparc32-solaris.c: Generated.
16345 * features/sparc/sparc64-solaris.c: Generated.
16346 * sparc-tdep.h: Account for differences in target descriptions.
16347 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16348 (sparc32_register_type): Use target provided registers.
16349 (validate_tdesc_registers): New function.
16350 (sparc32_gdbarch_init): Use tdesc_has_registers.
16351 Set pseudoregister functions.
16352 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16353 (sparc64_register_type): Use target provided registers.
16354 (sparc64_init_abi): Set pseudoregister functions.
16356 2017-02-03 Tom Tromey <tom@tromey.com>
16359 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16360 with a single member.
16362 2017-02-03 Pedro Alves <palves@redhat.com>
16364 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16365 (cli_interp_base::~cli_interp_base): New.
16366 (cli_interp): New struct.
16367 (as_cli_interp): Cast the interp itself to cli_interp.
16368 (cli_interpreter_pre_command_loop): Rename to ...
16369 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16371 (cli_interpreter_init): Rename to ...
16372 (cli_interp::init): ... this. Remove 'self' parameter. Use
16373 boolean. Make extern.
16374 (cli_interpreter_resume): Rename to ...
16375 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16377 (cli_interpreter_suspend): Rename to ...
16378 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16380 (cli_interpreter_exec): Rename to ...
16381 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16383 (cli_interpreter_supports_command_editing): Rename to ...
16384 (cli_interp_base::supports_command_editing): ... this. Remove
16385 'interp' parameter. Make extern.
16386 (cli_ui_out): Rename to ...
16387 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16389 (cli_set_logging): Rename to ...
16390 (cli_interp_base::set_logging): ... this. Remove 'interp'
16391 parameter. Make extern.
16392 (cli_interp_procs): Delete.
16393 (cli_interp_factory): Adjust to use "new".
16394 * cli/cli-interp.h: Include "interps.h".
16395 (struct cli_interp_base): New struct.
16396 * interps.c (struct interp): Delete. Fields moved to interps.h.
16397 (interp_new): Delete.
16398 (interp::interp, interp::~interp): New.
16399 (interp_set): Use bool, and return void. Assume the interpreter
16400 has suspend, init and resume methods, and that the all return
16402 (set_top_level_interpreter): interp_set returns void.
16403 (interp_ui_out): Adapt.
16404 (current_interp_set_logging): Adapt.
16405 (interp_data): Delete.
16406 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16407 (interp_exec): Adapt.
16408 (top_level_interpreter_data): Delete.
16409 * interps.h (interp_init_ftype, interp_resume_ftype)
16410 (interp_suspend_ftype, interp_exec_ftype)
16411 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16412 (class interp): New.
16413 (interp_new): Delete.
16414 (interp_set): Now returns void. Use bool.
16415 (interp_data, top_level_interpreter_data): Delete.
16416 * mi/mi-common.h: Include interps.h.
16417 (class mi_interp): Inherit from interp. Define a ctor. Declare
16418 init, resume, suspect, exec, interp_ui_out, set_logging and
16419 pre_command_loop methods.
16420 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16421 (mi_interpreter_init): Rename to ...
16422 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16423 bool, return void and make extern. Adjust.
16424 (mi_interpreter_resume): ... Rename to ...
16425 (mi_interp::resume): ... this. Remove the 'data' parameter,
16426 return void and make extern. Adjust.
16427 (mi_interpreter_suspend): ... Rename to ...
16428 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16429 return void and make extern. Adjust.
16430 (mi_interpreter_exec): ... Rename to ...
16431 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16433 (mi_interpreter_pre_command_loop): ... Rename to ...
16434 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16435 parameter and make extern.
16436 (mi_on_normal_stop_1): Adjust.
16437 (mi_ui_out): Rename to ...
16438 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16439 parameter and make extern. Adjust.
16440 (mi_set_logging): Rename to ...
16441 (mi_interp::set_logging): ... this. Remove the 'interp'
16442 parameter and make extern. Adjust.
16443 (mi_interp_procs): Delete.
16444 (mi_interp_factory): Adjust to use 'new'.
16445 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16446 (mi_print_exception, mi_execute_command, mi_load_progress):
16448 * tui/tui-interp.c (tui_interp): New class.
16449 (as_tui_interp): Return a tui_interp pointer.
16450 (tui_on_normal_stop, tui_on_signal_received)
16451 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16452 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16453 to use interp::interp_ui_out.
16454 (tui_init): Rename to ...
16455 (tui_interp::init): ... this. Remove the 'self' parameter, use
16456 bool, return void and make extern. Adjust.
16457 (tui_resume): Rename to ...
16458 (tui_interp::resume): ... this. Remove the 'data' parameter,
16459 return void and make extern. Adjust.
16460 (tui_suspend): Rename to ...
16461 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16462 return void and make extern. Adjust.
16463 (tui_ui_out): Rename to ...
16464 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16465 parameter, and make extern. Adjust.
16466 (tui_exec): Rename to ...
16467 (tui_interp::exec): ... this. Remove the 'data' parameter and
16469 (tui_interp_procs): Delete.
16470 (tui_interp_factory): Use "new".
16472 2017-02-02 Tom Tromey <tom@tromey.com>
16474 * rust-exp.y (ends_raw_string, space_then_number)
16475 (rust_identifier_start_p): Return bool.
16476 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16477 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16478 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16479 (rust_chartype_p): Return bool.
16480 (val_print_struct, rust_print_struct_def, rust_print_type):
16482 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16485 2017-02-02 Tom Tromey <tom@tromey.com>
16487 * rust-lang.c: Reindent.
16489 2017-02-02 Tom Tromey <tom@tromey.com>
16491 * rust-lang.h (rust_crate_for_block): Update.
16492 * rust-lang.c (rust_crate_for_block): Return std::string.
16493 (rust_get_disr_info): Use std:;string, not
16494 gdb::unique_xmalloc_ptr.
16495 * rust-exp.y (crate_name): Update.
16497 2017-02-02 Pedro Alves <palves@redhat.com>
16499 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16500 field out of gdb_disassembler_test and make it static.
16502 2017-02-02 Pedro Alves <palves@redhat.com>
16504 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16505 mi1_interp and mi_interp fields.
16507 2017-02-02 Pedro Alves <palves@redhat.com>
16509 * cli/cli-interp.c (struct saved_output_files, saved_output):
16510 Moved from cli/cli-logging.c.
16511 (cli_set_logging): New function.
16512 (cli_interp_procs): Install cli_set_logging.
16513 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16515 * cli/cli-logging.c (struct saved_output_files, saved_output):
16516 Moved to cli/cli-interp.c.
16517 (pop_output_files): Don't save outputs here.
16518 (make_logging_output): New function.
16519 (handle_redirections): Don't build tee nor save previous outputs
16521 * interps.c (current_interp_set_logging): Change prototype.
16522 Assume there's always a set_logging_proc method installed.
16523 * interps.h (interp_set_logging_ftype): Change prototype.
16524 (current_interp_set_logging): Change prototype and adjust comment.
16525 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16526 use make_logging_output.
16527 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16528 2017-02-02 Pedro Alves <palves@redhat.com>
16530 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16532 (set_logging_overwrite): ... here.
16533 (logging_no_redirect_file): Delete.
16534 (set_logging_redirect): Don't handle redirection on the fly.
16535 Instead warn that "logging off" / "logging on" is necessary.
16536 (pop_output_files): Delete references to logging_no_redirect_file.
16537 (show_logging_command): Always speak in terms of what will happen
16538 once logging is reenabled.
16540 2017-02-02 Pedro Alves <palves@redhat.com>
16542 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16544 2017-02-02 Pedro Alves <palves@redhat.com>
16546 * disasm.c (gdb_pretty_print_insn): Rename to ...
16547 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16548 Remove gdbarch parameter. Adapt to clear the object's buffers
16549 instead of allocating new buffers, and to print using the object's
16550 gdb_disassembler instead of calling gdb_print_insn.
16551 (dump_insns): Use gdb_pretty_print_disassembler.
16552 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16553 (gdb_pretty_print_disassembler): New class.
16554 * record-btrace.c (btrace_insn_history): Use
16555 gdb_pretty_print_disassembler.
16557 2017-02-02 Pedro Alves <palves@redhat.com>
16559 * ada-lang.c (type_as_string): Use string_file.
16560 * ada-valprint.c (ada_print_floating): Use string_file.
16561 * ada-varobj.c (ada_varobj_scalar_image)
16562 (ada_varobj_get_value_image): Use string_file.
16563 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16564 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16565 * breakpoint.c (update_inserted_breakpoint_locations)
16566 (insert_breakpoint_locations, reattach_breakpoints)
16567 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16568 (print_it_watchpoint): Use string_file.
16569 (save_breakpoints): Use stdio_file.
16570 * c-exp.y (oper): Use string_file.
16571 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16573 (pop_output_files): Use delete.
16574 (handle_redirections): Use stdio_file and tee_file.
16575 * cli/cli-setshow.c (do_show_command): Use string_file.
16576 * compile/compile-c-support.c (c_compute_program): Use
16578 * compile/compile-c-symbols.c (generate_vla_size): Take a
16579 'string_file &' instead of a 'ui_file *'.
16580 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16581 of a 'ui_file *'. Use string_file.
16582 (generate_c_for_variable_locations): Take a 'string_file &'
16583 instead of a 'ui_file *'.
16584 * compile/compile-internal.h (generate_c_for_for_one_variable):
16585 Take a 'string_file &' instead of a 'ui_file *'.
16586 * compile/compile-loc2c.c (push, pushf, unary, binary)
16587 (print_label, pushf_register_address, pushf_register)
16588 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16589 'ui_file *'. Adjust.
16590 * compile/compile.c (compile_to_object): Use string_file.
16591 * compile/compile.h (compile_dwarf_expr_to_c)
16592 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16594 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16595 (replace_typedefs_qualified_name): Use string_file and
16597 * disasm.c (gdb_pretty_print_insn): Use string_file.
16598 (gdb_disassembly): Adjust reference the null_stream global.
16599 (do_ui_file_delete): Delete.
16600 (gdb_insn_length): Use null_stream.
16601 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16602 * dwarf2loc.c (dwarf2_compile_property_to_c)
16603 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16604 'string_file &' instead of a 'ui_file *'.
16605 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16606 * dwarf2read.c (do_ui_file_peek_last): Delete.
16607 (dwarf2_compute_name): Use string_file.
16608 * event-top.c (gdb_setup_readline): Use stdio_file.
16609 * gdbarch.sh (verify_gdbarch): Use string_file.
16610 * gdbtypes.c (safe_parse_type): Use null_stream.
16611 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16613 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16614 'string_file *' instead of a 'ui_file *'.
16615 (gdbscm_arch_disassemble): Use string_file.
16616 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16617 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16618 inherits from ui_file.
16619 (ioscm_file_port_delete, ioscm_file_port_rewind)
16620 (ioscm_file_port_put): Delete.
16621 (ioscm_file_port_write): Rename to ...
16622 (ioscm_file_port::write): ... this. Remove file_port_magic
16624 (ioscm_file_port_new): Delete.
16625 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16627 * guile/scm-type.c (tyscm_type_name): Use string_file.
16628 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16630 * infcmd.c (print_return_value_1): Use string_file.
16631 * infrun.c (print_target_wait_results): Use string_file.
16632 * language.c (add_language): Use string_file.
16633 * location.c (explicit_to_string_internal): Use string_file.
16634 * main.c (captured_main_1): Use null_file.
16635 * maint.c (maintenance_print_architecture): Use stdio_file.
16636 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16637 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16638 event_channel>: Change type to mi_console_file pointer.
16639 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16640 (mi_console_file_delete): Delete.
16641 (struct mi_console_file): Delete.
16642 (mi_console_file_magic): Delete.
16643 (mi_console_file_new): Delete.
16644 (mi_console_file::mi_console_file): New.
16645 (mi_console_file_delete): Delete.
16646 (mi_console_file_fputs): Delete.
16647 (mi_console_file::write): New.
16648 (mi_console_raw_packet): Delete.
16649 (mi_console_file::flush): New.
16650 (mi_console_file_flush): Delete.
16651 (mi_console_set_raw): Rename to ...
16652 (mi_console_file::set_raw): ... this.
16653 * mi/mi-console.h (class mi_console_file): New class.
16654 (mi_console_file_new, mi_console_set_raw): Delete.
16655 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16656 (mi_set_logging): Use delete and tee_file. Adjust.
16657 * mi/mi-main.c (output_register): Use string_file.
16658 (mi_cmd_data_evaluate_expression): Use string_file.
16659 (mi_cmd_data_read_memory): Use string_file.
16660 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16661 * mi/mi-out.c (mi_ui_out::main_stream): New.
16662 (mi_ui_out::rewind): Use main_stream and
16664 (mi_ui_out::put): Use main_stream and string_file.
16665 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16666 Allocate a 'string_file' instead.
16667 (mi_out_new): Don't allocate a mem_fileopen stream here.
16668 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16669 (mi_ui_out::main_stream): Declare method.
16670 * printcmd.c (eval_command): Use string_file.
16671 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16672 * python/py-arch.c (archpy_disassemble): Use string_file.
16673 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16674 * python/py-frame.c (frapy_str): Use string_file.
16675 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16677 * python/py-type.c (typy_str): Use string_file.
16678 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16679 * python/py-value.c (valpy_str): Use string_file.
16680 * record-btrace.c (btrace_insn_history): Use string_file.
16681 * regcache.c (regcache_print): Use stdio_file.
16682 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16683 * remote.c (escape_buffer): Use string_file.
16684 * rust-lang.c (rust_get_disr_info): Use string_file.
16685 * serial.c (serial_open_ops_1): Use stdio_file.
16686 (do_serial_close): Use delete.
16687 * stack.c (print_frame_arg): Use string_file.
16688 (print_frame_args): Remove local mem_fileopen stream, not used.
16689 (print_frame): Use string_file.
16690 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16691 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16692 Take a 'string_file *' instead of a 'ui_file *'.
16693 * top.c (new_ui): Use stdio_file and stderr_file.
16694 (free_ui): Use delete.
16695 (execute_command_to_string): Use string_file.
16696 (quit_confirm): Use string_file.
16697 * tracepoint.c (collection_list::append_exp): Use string_file.
16698 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16699 * tui/tui-file.c: Don't include "ui-file.h".
16700 (enum streamtype, struct tui_stream): Delete.
16701 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16702 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16703 (tui_file::tui_file): New method.
16704 (tui_file_fputs): Delete.
16705 (tui_file_get_strbuf): Delete.
16706 (tui_file::puts): New method.
16707 (tui_file_adjust_strbuf): Delete.
16708 (tui_file_flush): Delete.
16709 (tui_file::flush): New method.
16710 * tui/tui-file.h: Tweak intro comment.
16712 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16713 (tui_file_adjust_strbuf): Delete declarations.
16714 (class tui_file): New class.
16715 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16716 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16717 (tui_register_format): Use string_stream.
16718 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16719 (tui_get_function_from_frame): Use string_file.
16720 * typeprint.c (type_to_string): Use string_file.
16721 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16722 (null_stream): New global.
16723 (ui_file_delete): Delete.
16724 (ui_file::ui_file): New.
16725 (null_file_isatty): Delete.
16726 (ui_file::~ui_file): New.
16727 (null_file_rewind): Delete.
16728 (ui_file::printf): New.
16729 (null_file_put): Delete.
16730 (null_file_flush): Delete.
16731 (ui_file::putstr): New.
16732 (null_file_write): Delete.
16733 (ui_file::putstrn): New.
16734 (null_file_read): Delete.
16735 (ui_file::putc): New.
16736 (null_file_fputs): Delete.
16737 (null_file_write_async_safe): Delete.
16738 (ui_file::vprintf): New.
16739 (null_file_delete): Delete.
16740 (null_file::write): New.
16741 (null_file_fseek): Delete.
16742 (null_file::puts): New.
16743 (ui_file_data): Delete.
16744 (null_file::write_async_safe): New.
16745 (gdb_flush, ui_file_isatty): Adjust.
16746 (ui_file_put, ui_file_rewind): Delete.
16747 (ui_file_write): Adjust.
16748 (ui_file_write_for_put): Delete.
16749 (ui_file_write_async_safe, ui_file_read): Adjust.
16750 (ui_file_fseek): Delete.
16751 (fputs_unfiltered): Adjust.
16752 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16753 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16754 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16755 (set_ui_file_data): Delete.
16756 (string_file::~string_file, string_file::write)
16757 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16758 (do_ui_file_as_string, ui_file_as_string): Delete.
16759 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16760 (struct mem_file): Delete.
16761 (mem_file_new): Delete.
16762 (stdio_file::stdio_file): New.
16763 (mem_file_delete): Delete.
16764 (stdio_file::stdio_file): New.
16765 (mem_fileopen): Delete.
16766 (stdio_file::~stdio_file): New.
16767 (mem_file_rewind): Delete.
16768 (stdio_file::set_stream): New.
16769 (mem_file_put): Delete.
16770 (stdio_file::open): New.
16771 (mem_file_write): Delete.
16772 (stdio_file_magic, struct stdio_file): Delete.
16773 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16774 (stdio_file::flush): New.
16775 (stdio_file_read): Rename to ...
16776 (stdio_file::read): ... this. Adjust.
16777 (stdio_file_write): Rename to ...
16778 (stdio_file::write): ... this. Adjust.
16779 (stdio_file_write_async_safe): Rename to ...
16780 (stdio_file::write_async_safe) ... this. Adjust.
16781 (stdio_file_fputs): Rename to ...
16782 (stdio_file::puts) ... this. Adjust.
16783 (stdio_file_isatty): Delete.
16784 (stdio_file_fseek): Delete.
16785 (stdio_file::isatty): New.
16786 (stderr_file_write): Rename to ...
16787 (stderr_file::write) ... this. Adjust.
16788 (stderr_file_fputs): Rename to ...
16789 (stderr_file::puts) ... this. Adjust.
16790 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16791 (stderr_file::stderr_file): New.
16792 (tee_file_magic): Delete.
16793 (struct tee_file): Delete.
16794 (tee_file::tee_file): New.
16795 (tee_file_new): Delete.
16796 (tee_file::~tee_file): New.
16797 (tee_file_delete): Delete.
16798 (tee_file_flush): Rename to ...
16799 (tee_file::flush): ... this. Adjust.
16800 (tee_file_write): Rename to ...
16801 (tee_file::write): ... this. Adjust.
16802 (tee_file::write_async_safe): New.
16803 (tee_file_fputs): Rename to ...
16804 (tee_file::puts): ... this. Adjust.
16805 (tee_file_isatty): Rename to ...
16806 (tee_file::isatty): ... this. Adjust.
16807 * ui-file.h (struct obstack, struct ui_file): Don't
16809 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16810 (ui_file_write_ftype)
16811 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16812 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16813 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16814 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16815 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16816 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16817 (set_ui_file_fseek): Delete.
16818 (ui_file_data, ui_file_delete, ui_file_rewind)
16819 (struct ui_file): New.
16821 (class null_file): New.
16822 (null_stream): Declare.
16823 (ui_file_write_for_put, ui_file_put): Delete.
16824 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16826 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16827 (gdb_fopen, tee_file_new): Delete.
16828 (struct string_file): New.
16829 (struct stdio_file): New.
16830 (stdio_file_up): New.
16831 (struct stderr_file): New.
16832 (class tee_file): New.
16833 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16834 of a 'ui_file *'. Adjust.
16835 * ui-out.h (class ui_out) <field_stream>: Likewise.
16836 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16837 (null_stream): Delete.
16838 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16840 * utils.h (struct ui_file): Delete forward declaration..
16841 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16842 (error_stream): Take a 'string_file &' instead of a
16844 * varobj.c (varobj_value_get_print_value): Use string_file.
16845 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16846 * gdbarch.c: Regenerate.
16848 2017-02-02 Pedro Alves <palves@redhat.com>
16850 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16851 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16852 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16853 Adjust to call gdb_print_insn instead of
16854 gdb_disassembler::print_insn.
16855 (dump_insns, do_mixed_source_and_assembly_deprecated)
16856 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16857 'gdbarch' parameter. Remove gdb_disassembler parameter.
16858 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16859 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16861 (gdb_pretty_print_insn): Re-add declaration.
16862 * record-btrace.c (btrace_insn_history): Don't allocate a
16863 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16865 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16867 * disasm.h (gdb_disassembly): Remove file_string parameter.
16868 * disasm.c (gdb_disassembly): Likewise.
16869 * cli/cli-cmds.c (print_disassembly): Adapt.
16870 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16871 * stack.c (do_gdb_disassembly): Likewise.
16873 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16875 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16876 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16877 targets. And if the implicit value is longer than needed, extract
16878 the first bytes instead of the "least significant" ones.
16880 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16882 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16883 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16884 (btrace_fetch): Assert can_access_registers_ptid.
16885 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16886 validate_registers_access.
16888 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16890 * gdbthread.h (can_access_registers_ptid): New.
16891 * thread.c (can_access_registers_ptid): New.
16893 2017-02-01 Pedro Alves <palves@redhat.com>
16895 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16897 2017-01-31 Pedro Alves <palves@redhat.com>
16899 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16902 2017-01-31 Pedro Alves <palves@redhat.com>
16904 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16907 2017-01-31 Pedro Alves <palves@redhat.com>
16909 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16911 2017-01-31 Pedro Alves <palves@redhat.com>
16913 * common/scoped_restore.h
16914 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16915 change the value's parameter type to T2.
16916 (make_scoped_restore): Likewise.
16918 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16919 Richard Henderson <rth@redhat.com>
16921 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16922 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16923 GS_BASE for older kernels.
16924 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16925 GS_BASE for older kernels.
16926 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16927 and GS_BASE to the offset table.
16928 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16929 system register group.
16930 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16932 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16934 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16935 AMD64_GSBASE_REGNUM.
16936 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16937 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16938 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16939 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16940 i386/64bit-segments.xml in those rules.
16941 * features/i386/64bit-segments.xml: New file.
16942 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16943 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16944 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16945 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16946 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16947 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16948 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16949 * features/i386/amd64-avx-linux.c: Regenerated.
16950 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16951 * features/i386/amd64-avx-mpx.c: Regenerated.
16952 * features/i386/amd64-avx512-linux.c: Regenerated.
16953 * features/i386/amd64-linux.c: Regenerated.
16954 * features/i386/amd64-mpx-linux.c: Regenerated.
16955 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16956 * features/i386/i386-avx-mpx.c: Regenerated.
16957 * features/i386/x32-avx-linux.c: Regenerated.
16958 * features/i386/x32-avx512-linux.c: Regenerated.
16959 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16960 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16961 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16962 * regformats/i386/amd64-linux.dat: Regenerated.
16963 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16964 * regformats/i386/x32-avx-linux.dat: Regenerated.
16965 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16966 * regformats/i386/x32-linux.dat: Regenerated.
16968 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16970 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16971 Set to AMD64_NUM_REGS.
16973 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16975 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16976 that checks validity of a register number.
16978 2017-01-27 Kees Cook <keescook@google.com>
16980 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16981 fetch_fpregs if target has fpa registers.
16982 (arm_linux_store_inferior_registers): Call store_fpregs if target
16985 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16987 * cris-tdep.c (cris_gdbarch_init): Remove check for
16988 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16990 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16992 * corelow.c (get_core_register_section): Check for regset
16993 existence before checking for REGSET_VARIABLE_SIZE.
16995 2017-01-26 Yao Qi <yao.qi@linaro.org>
16996 Pedro Alves <palves@redhat.com>
16999 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17000 call memory_error, save memaddr instead.
17001 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17002 negative, cal memory_error.
17003 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17005 2017-01-26 Yao Qi <yao.qi@linaro.org>
17007 * disasm-selftests.c (memory_error_test): New function.
17008 (_initialize_disasm_selftests): Register memory_error_test.
17010 2017-01-26 Yao Qi <yao.qi@linaro.org>
17012 * Makefile.in (SFILES): Add disasm-selftests.c and
17014 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17015 * disasm-selftests.c: New file.
17016 * selftest-arch.c: New file.
17017 * selftest-arch.h: New file.
17019 2017-01-26 Yao Qi <yao.qi@linaro.org>
17021 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17022 to bfd_arch_mep. Don't return 0 if section is not
17023 found. Call print_insn_mep.
17025 2017-01-26 Pedro Alves <palves@redhat.com>
17026 Yao Qi <yao.qi@linaro.org>
17028 * arm-tdep.c: Include "disasm.h".
17029 (gdb_print_insn_arm): Update code to get gdbarch.
17030 * disasm.c (dis_asm_read_memory): Change it to
17031 gdb_disassembler::dis_asm_read_memory.
17032 (dis_asm_memory_error): Likewise.
17033 (dis_asm_print_address): Likewise.
17034 (gdb_pretty_print_insn): Change it to
17035 gdb_disassembler::pretty_print_insn.
17036 (dump_insns): Add one argument gdb_disassemlber. All
17038 (do_mixed_source_and_assembly_deprecated): Likewise.
17039 (do_mixed_source_and_assembly): Likewise.
17040 (do_assembly_only): Likewise.
17041 (gdb_disassembler::gdb_disassembler): New.
17042 (gdb_disassembler::print_insn): New.
17043 * disasm.h (class gdb_disassembler): New.
17044 (gdb_pretty_print_insn): Remove declaration.
17045 (gdb_disassemble_info): Likewise.
17046 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17047 (gdbscm_disasm_read_memory_worker): Update.
17048 (gdbscm_disasm_read_memory): Update.
17049 (gdbscm_disasm_memory_error): Remove.
17050 (gdbscm_disasm_print_address): Remove.
17051 (gdbscm_disassembler::gdbscm_disassembler): New.
17052 (gdbscm_print_insn_from_port): Update.
17053 * mips-tdep.c: Include disasm.h.
17054 (gdb_print_insn_mips): Update code to get gdbarch.
17055 * record-btrace.c (btrace_insn_history): Update.
17056 * spu-tdep.c: Include disasm.h.
17057 (struct spu_dis_asm_data): Remove.
17058 (struct spu_dis_asm_info): New.
17059 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17061 (gdb_print_insn_spu): Cast disassemble_info to
17064 2017-01-26 Yao Qi <yao.qi@linaro.org>
17066 * disasm.c (do_ui_file_delete): Delete.
17067 (gdb_insn_length): Move code creating stream to ...
17068 * utils.c (null_stream): ... here. New function.
17069 * utils.h (null_stream): Declare.
17071 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17073 * python/py-inferior.c (find_thread_object): Return directly
17074 from the loop. Remove "found" variable.
17076 2017-01-21 Joel Brobecker <brobecker@adacore.com>
17078 GDB 7.12.1 released.
17080 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17082 * python/py-function.c (fnpy_call): Reorder declarations to have
17083 the gdbpy_enter object declared first.
17084 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17086 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17089 * python/python-internal.h (PyMem_RawMalloc): Define for
17091 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17092 PyMem_RawMalloc instead of PyMem_Malloc.
17094 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17095 Luis Machado <lgustavo@codesourcery.com>
17097 * NEWS (New commands): Mention flash-erase.
17098 (New MI commands): Mention target-flash-erase.
17099 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17101 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17102 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17103 * target.c (flash_erase_command): New function.
17104 (initialize_targets): Add new flash-erase command.
17105 * target.h (flash_erase_command): New declaration.
17107 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17109 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17110 HAVE_SYS_PROCFS_H is defined.
17112 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17114 * remote.c (struct cached_reg): Change data into a pointer.
17115 * (stop_reply_dtr): Free data pointers before deleting vector.
17116 (process_stop_reply): Likewise.
17117 (remote_parse_stop_reply): Allocate space for data
17119 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17121 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17123 (amd64_pseudo_register_read_value): Likewise.
17124 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17125 (store_register_using_P): Likewise.
17126 * regcache.c (regcache_xfer_part): Likewise.
17128 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17130 Split real and pseudo registers.
17131 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17132 (sparc32_pseudo_regnum): New enum.
17133 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17134 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17135 (SPARC32_CP0_REGISTERS): New macro.
17136 (sparc32_pseudo_register_name): New function.
17137 (sparc32_register_name): Use sparc32_pseudo_register_name.
17138 (sparc32_pseudo_register_type): New function.
17139 (sparc32_register_type): Use sparc32_pseudo_register_type.
17140 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17141 pseudo register numbers.
17142 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17143 (SPARC64_CP0_REGISTERS): New macro.
17144 (sparc64_pseudo_register_name): New function.
17145 (sparc64_register_name): Use sparc64_pseudo_register_name.
17146 (sparc64_pseudo_register_type): New function.
17147 (sparc64_register_type): Use sparc64_pseudo_register_type.
17148 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17149 pseudo register numbers.
17150 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17151 sparc64_store_arguments): Handle pseudo register numbers.
17153 2017-01-13 Yao Qi <yao.qi@linaro.org>
17155 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17156 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17158 (getpkt_or_notif_sane_1): Likewise.
17160 2017-01-13 Yao Qi <yao.qi@linaro.org>
17162 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17163 of CC. Pass "-x c++-header" instead of "-x c".
17165 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17167 * remote.c (remote_can_async_p): Update comment.
17169 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17171 * linux-nat.c (linux_nat_can_async_p): Update comment.
17173 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17175 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17177 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17179 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17181 2017-01-10 Tom Tromey <tom@tromey.com>
17183 * python/py-type.c (typy_legacy_template_argument): Update.
17184 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17185 ~demangle_parse_info): Declare new members.
17186 (cp_demangled_name_to_comp): Return unique_ptr.
17187 (cp_demangled_name_parse_free)
17188 (make_cleanup_cp_demangled_name_parse_free)
17189 (cp_new_demangle_parse_info): Remove.
17190 * cp-support.c (do_demangled_name_parse_free_cleanup)
17191 (make_cleanup_cp_demangled_name_parse_free): Remove.
17192 (inspect_type, cp_canonicalize_string_full)
17193 (cp_canonicalize_string): Update.
17194 (mangled_name_to_comp): Change return type.
17195 (cp_class_name_from_physname, method_name_from_physname)
17196 (cp_func_name, cp_remove_params): Update.
17197 * cp-name-parser.y (demangle_parse_info): New constructor, from
17198 cp_new_demangle_parse_info.
17199 (~demangle_parse_info): New destructor, from
17200 cp_demangled_name_parse_free.
17201 (cp_merge_demangle_parse_infos): Update.
17202 (cp_demangled_name_to_comp): Change return type.
17204 2017-01-10 Tom Tromey <tom@tromey.com>
17206 * top.c (prevent_dont_repeat): Change return type.
17207 * python/python.c (execute_gdb_command): Use std::string.
17209 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17210 * command.h (prevent_dont_repeat): Change return type.
17211 * breakpoint.c (bpstat_do_actions_1): Update.
17213 2017-01-10 Tom Tromey <tom@tromey.com>
17215 * value.h (scoped_value_mark::~scoped_value_mark): Call
17217 (scoped_value_mark::free_to_mark): New method.
17218 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17221 2017-01-10 Tom Tromey <tom@tromey.com>
17223 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17224 (valpy_reference_value, valpy_const_value, valpy_get_address)
17225 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17226 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17227 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17228 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17230 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17231 * value.h (scoped_value_mark): New class.
17233 2017-01-10 Tom Tromey <tom@tromey.com>
17235 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17236 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17237 * psymtab.c (discard_psymtabs_upto): Remove.
17238 (make_cleanup_discard_psymtabs): Remove.
17239 (struct psymtab_state): Remove.
17241 2017-01-10 Tom Tromey <tom@tromey.com>
17243 * record-full.c (record_full_save_cleanups): Remove.
17244 (record_full_save): Use gdb::unlinker.
17245 * gcore.c (do_bfd_delete_cleanup): Remove.
17246 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17248 * dwarf2read.c (unlink_if_set): Remove.
17249 (write_psymtabs_to_index): Use gdb::unlinker.
17250 * common/gdb_unlinker.h: New file.
17252 2017-01-10 Tom Tromey <tom@tromey.com>
17254 * windows-tdep.c (windows_xfer_shared_library): Update.
17255 * windows-nat.c (windows_make_so): Update.
17256 * utils.h (make_cleanup_bfd_unref): Remove.
17257 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17258 * symfile.h (symfile_bfd_open)
17259 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17260 * symfile.c (read_symbols, symbol_file_add)
17261 (separate_debug_file_exists): Update.
17262 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17263 (generic_load, reread_symbols): Update.
17264 * symfile-mem.c (symbol_file_add_from_memory): Update.
17265 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17266 (spu_symbol_file_add_from_memory): Update.
17267 * solist.h (struct target_so_ops) <bfd_open>: Return
17269 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17270 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17272 (solib_map_sections, reload_shared_libraries_1): Update.
17273 * solib-svr4.c (enable_break): Update.
17274 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17275 * solib-frv.c (enable_break2): Update.
17276 * solib-dsbt.c (enable_break): Update.
17277 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17279 (darwin_solib_get_all_image_info_addr_at_init): Update.
17280 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17281 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17282 * record-full.c (record_full_save): Update.
17283 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17284 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17285 * minidebug.c (find_separate_debug_file_in_section): Return
17287 * machoread.c (macho_add_oso_symfile): Change abfd to
17289 (macho_symfile_read_all_oso): Update.
17290 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17291 (macho_symfile_read): Update.
17292 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17293 (jit_bfd_try_read_symtab): Update.
17294 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17295 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17296 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17298 (gdb_bfd_ref_policy): New struct.
17299 (gdb_bfd_ref_ptr): New typedef.
17300 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17301 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17302 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17304 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17305 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17306 (gcore_command): Update.
17307 * exec.c (exec_file_attach): Update.
17308 * elfread.c (elf_symfile_read): Update.
17309 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17310 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17311 (open_and_init_dwo_file): Update.
17312 (open_dwp_file): Return gdb_bfd_ref_ptr.
17313 (open_and_init_dwp_file): Update.
17314 * corelow.c (core_open): Update.
17315 * compile/compile-object-load.c (compile_object_load): Update.
17316 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17317 * coffread.c (coff_symfile_read): Update.
17318 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17319 gdb_bfd_ref_ptr. Rename.
17320 (dump_bfd_file, restore_command): Update.
17321 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17322 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17323 (find_separate_debug_file_by_buildid): Update.
17325 2017-01-10 Tom Tromey <tom@tromey.com>
17327 * common/gdb_ref_ptr.h: New file.
17328 * python/py-ref.h (struct gdbpy_ref_policy): New.
17329 (gdbpy_ref): Now a typedef.
17331 2017-01-10 Tom Tromey <tom@tromey.com>
17333 * utils.h (make_cleanup_htab_delete): Don't declare.
17334 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17336 * linespec.c (decode_compound_collector): Add constructor,
17338 (lookup_prefix_sym): Remove cleanup.
17339 (symtab_collector): Add constructor, destructor.
17340 (collect_symtabs_from_filename): Remove cleanup.
17341 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17342 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17344 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17345 * dwarf2read.c (dw2_expand_symtabs_matching)
17346 (dw2_map_symbol_filenames, dwarf_decode_macros)
17347 (write_psymtabs_to_index): Use htab_up.
17348 * dwarf2loc.c (func_verify_no_selftailcall)
17349 (call_site_find_chain_1, func_verify_no_selftailcall)
17350 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17351 std::vector, gdb::unique_xmalloc_ptr.
17352 (call_sitep): Remove typedef.
17353 (dwarf2_locexpr_baton_eval): Remove unused variable.
17355 2017-01-10 Tom Tromey <tom@tromey.com>
17357 * python/python-internal.h (make_cleanup_py_decref)
17358 (make_cleanup_py_xdecref): Don't declare.
17359 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17360 (py_xdecref, make_cleanup_py_xdecref): Remove.
17362 2017-01-10 Tom Tromey <tom@tromey.com>
17364 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17365 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17367 2017-01-10 Tom Tromey <tom@tromey.com>
17369 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17371 2017-01-10 Tom Tromey <tom@tromey.com>
17373 * python/py-utils.c (unicode_to_encoded_string)
17374 (python_string_to_target_string)
17375 (python_string_to_target_python_string)
17376 (python_string_to_host_string, gdbpy_obj_to_string)
17377 (get_addr_from_python): Use gdbpy_ref.
17379 2017-01-10 Tom Tromey <tom@tromey.com>
17381 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17384 2017-01-10 Tom Tromey <tom@tromey.com>
17386 * python/python.c (eval_python_command, gdbpy_decode_line)
17387 (gdbpy_run_events, gdbpy_start_type_printers)
17388 (gdbpy_apply_type_printers): Use gdbpy_ref.
17390 2017-01-10 Tom Tromey <tom@tromey.com>
17392 * python/py-param.c (get_doc_string, compute_enum_values): Use
17395 2017-01-10 Tom Tromey <tom@tromey.com>
17397 * python/py-inferior.c (find_thread_object, build_inferior_list):
17400 2017-01-10 Tom Tromey <tom@tromey.com>
17402 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17404 2017-01-10 Tom Tromey <tom@tromey.com>
17406 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17409 2017-01-10 Tom Tromey <tom@tromey.com>
17411 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17413 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17416 2017-01-10 Tom Tromey <tom@tromey.com>
17418 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17421 2017-01-10 Tom Tromey <tom@tromey.com>
17423 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17424 decref results of PyArg_ParseTupleAndKeywords.
17426 2017-01-10 Tom Tromey <tom@tromey.com>
17428 * python/python.c (python_run_simple_file): Use
17429 unique_xmalloc_ptr, gdbpy_ref.
17431 2017-01-10 Tom Tromey <tom@tromey.com>
17433 * python/py-prettyprint.c (print_stack_unless_memory_error)
17434 (print_string_repr, print_children): Use gdbpy_ref.
17435 (dummy_python_frame): New class.
17436 (dummy_python_frame::dummy_python_frame): Rename from
17437 push_dummy_python_frame.
17438 (py_restore_tstate): Remove.
17440 2017-01-10 Tom Tromey <tom@tromey.com>
17442 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17444 2017-01-10 Tom Tromey <tom@tromey.com>
17446 * python/python.c (ensure_python_env, restore_python_env):
17448 * python/python-internal.h (ensure_python_env): Don't declare.
17449 * varobj.h (varobj_ensure_python_env): Don't declare.
17450 * varobj.c (varobj_ensure_python_env): Remove.
17452 2017-01-10 Tom Tromey <tom@tromey.com>
17454 * varobj.c (varobj_value_get_print_value): Use
17455 gdbpy_enter_varobj.
17457 2017-01-10 Tom Tromey <tom@tromey.com>
17459 * python/py-prettyprint.c (print_string_repr, print_children):
17461 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17463 * varobj.c (varobj_value_get_print_value): Update.
17464 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17466 2017-01-10 Tom Tromey <tom@tromey.com>
17468 * varobj.c (varobj_get_display_hint)
17469 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17470 (varobj_set_visualizer, free_variable): Use
17471 gdbpy_enter_varobj.
17473 2017-01-10 Tom Tromey <tom@tromey.com>
17475 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17476 (do_finish_initialization): New function. Use gdbpy_ref.
17477 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17478 do_finish_initialization.
17480 2017-01-10 Tom Tromey <tom@tromey.com>
17482 * python/py-param.c (get_set_value, get_show_value): Use
17483 gdbpy_enter, gdbpy_ref.
17485 2017-01-10 Tom Tromey <tom@tromey.com>
17487 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17489 2017-01-10 Tom Tromey <tom@tromey.com>
17491 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17493 2017-01-10 Tom Tromey <tom@tromey.com>
17495 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17496 Use gdbpy_enter_varobj.
17498 2017-01-10 Tom Tromey <tom@tromey.com>
17500 * varobj.c (gdbpy_enter_varobj): New constructor.
17501 * python/python-internal.h (gdbpy_enter_varobj): New class.
17502 * python/py-varobj.c (py_varobj_get_iterator): Use
17503 gdbpy_enter_varobj.
17505 2017-01-10 Tom Tromey <tom@tromey.com>
17507 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17508 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17509 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17510 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17511 unique_xmalloc_ptr.
17512 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17514 2017-01-10 Tom Tromey <tom@tromey.com>
17516 * python/py-xmethods.c (invoke_match_method): Use
17519 2017-01-10 Tom Tromey <tom@tromey.com>
17521 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17522 gdbpy_enter, gdbpy_ref.
17524 2017-01-10 Tom Tromey <tom@tromey.com>
17526 * python/python.c (python_interactive_command): Use gdbpy_enter.
17528 2017-01-10 Tom Tromey <tom@tromey.com>
17530 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17533 2017-01-10 Tom Tromey <tom@tromey.com>
17535 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17536 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17538 2017-01-10 Tom Tromey <tom@tromey.com>
17540 * utils.h (htab_deleter): New struct.
17541 (htab_up): New typedef.
17542 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17543 gdbpy_enter, gdbpy_ref, htab_up.
17545 2017-01-10 Tom Tromey <tom@tromey.com>
17547 * python/py-unwind.c (pending_frame_invalidate): Remove.
17548 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17550 2017-01-10 Tom Tromey <tom@tromey.com>
17552 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17553 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17555 2017-01-10 Tom Tromey <tom@tromey.com>
17557 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17559 2017-01-10 Tom Tromey <tom@tromey.com>
17561 * python/python.c (gdbpy_eval_from_control_command)
17562 (gdbpy_source_script, gdbpy_run_events)
17563 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17564 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17567 2017-01-10 Tom Tromey <tom@tromey.com>
17569 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17571 2017-01-10 Tom Tromey <tom@tromey.com>
17573 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17575 2017-01-10 Tom Tromey <tom@tromey.com>
17577 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17578 (python_on_inferior_call_pre, python_on_inferior_call_post)
17579 (python_on_memory_change, python_on_register_change)
17580 (python_inferior_exit, python_new_objfile, add_thread_object)
17581 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17583 2017-01-10 Tom Tromey <tom@tromey.com>
17585 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17586 (bpfinishpy_handle_exit): Use gdbpy_enter.
17588 2017-01-10 Tom Tromey <tom@tromey.com>
17590 * python/py-cmd.c (cmdpy_destroyer)
17591 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17594 2017-01-10 Tom Tromey <tom@tromey.com>
17596 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17598 (gdbpy_breakpoint_has_cond): Likewise.
17600 2017-01-10 Tom Tromey <tom@tromey.com>
17602 * python/python.c (gdbpy_enter): New constructor.
17603 (~gdbpy_enter): New destructor.
17604 (restore_python_env, ensure_python_env): Rewrite.
17605 * python/python-internal.h (gdbpy_enter): New class.
17607 2017-01-10 Tom Tromey <tom@tromey.com>
17609 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17611 2017-01-10 Tom Tromey <tom@tromey.com>
17613 * python/py-value.c (value_has_field, get_field_flag)
17614 (get_field_type, valpy_getitem, convert_value_from_python): Use
17617 2017-01-10 Tom Tromey <tom@tromey.com>
17619 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17622 2017-01-10 Tom Tromey <tom@tromey.com>
17624 * python/py-prettyprint.c (search_pp_list)
17625 (find_pretty_printer_from_objfiles)
17626 (find_pretty_printer_from_progspace)
17627 (find_pretty_printer_from_gdb, find_pretty_printer)
17628 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17631 2017-01-10 Tom Tromey <tom@tromey.com>
17633 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17635 2017-01-10 Tom Tromey <tom@tromey.com>
17637 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17638 (ltpy_get_all_source_lines): Use gdbpy_ref.
17640 2017-01-10 Tom Tromey <tom@tromey.com>
17642 * python/py-framefilter.c (extract_sym, extract_value)
17643 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17646 2017-01-10 Tom Tromey <tom@tromey.com>
17648 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17650 2017-01-10 Tom Tromey <tom@tromey.com>
17652 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17654 2017-01-10 Tom Tromey <tom@tromey.com>
17656 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17659 2017-01-10 Tom Tromey <tom@tromey.com>
17661 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17663 2017-01-10 Tom Tromey <tom@tromey.com>
17665 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17666 (typy_range): Use gdbpy_ref.
17668 2017-01-10 Tom Tromey <tom@tromey.com>
17670 * python/py-threadevent.c (create_thread_event_object): Use
17672 * python/py-stopevent.c (create_stop_event_object): Simplify.
17673 (emit_stop_event): Use gdbpy_ref.
17674 * python/py-signalevent.c (create_signal_event_object): Use
17676 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17677 (emit_new_objfile_event, create_clear_objfiles_event_object)
17678 (emit_clear_objfiles_event): Use gdbpy_ref.
17679 * python/py-infevents.c (create_inferior_call_event_object)
17680 (create_register_changed_event_object)
17681 (create_memory_changed_event_object, emit_inferior_call_event)
17682 (emit_memory_changed_event, emit_register_changed_event): Use
17684 * python/py-exitedevent.c (create_exited_event_object)
17685 (emit_exited_event): Use gdbpy_ref.
17686 * python/py-event.h (evpy_emit_event): Remove
17687 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17688 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17689 * python/py-continueevent.c (emit_continue_event): Use
17691 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17692 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17694 * python/py-bpevent.c (create_breakpoint_event_object): Use
17697 2017-01-10 Tom Tromey <tom@tromey.com>
17699 * python/py-ref.h: New file.
17701 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17703 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17705 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17706 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17707 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17708 * ui-out.c (ui_out::redirect): Likewise.
17709 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17710 * cli/cli-logging.c (set_logging_redirect): Update call site of
17712 (handle_redirections): Likewise.
17713 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17714 * top.c (execute_command_to_string): Likewise.
17715 * utils.c (do_ui_out_redirect_pop): Likewise.
17717 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17719 * stack.c (_initialize_stack): Update "frame" command help message.
17721 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17723 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17725 2017-01-06 Yao Qi <yao.qi@linaro.org>
17727 * x86-linux-nat.h: Include gdb_proc_service.h.
17729 2017-01-06 Yao Qi <yao.qi@linaro.org>
17731 * ser-base.h: Include serial.h.
17733 2017-01-06 Yao Qi <yao.qi@linaro.org>
17735 * ppc-linux-tdep.h: Include ppc-tdep.h.
17737 2017-01-06 Yao Qi <yao.qi@linaro.org>
17739 * nat/amd64-linux-siginfo.h: Include signal.h.
17741 2017-01-06 Yao Qi <yao.qi@linaro.org>
17743 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17745 2017-01-06 Yao Qi <yao.qi@linaro.org>
17747 * mi/mi-parse.h: Include mi-cmds.h.
17749 2017-01-06 Yao Qi <yao.qi@linaro.org>
17751 * inf-loop.c: Don't include "target.h".
17752 * inf-loop.h: Include it here.
17754 2017-01-06 Yao Qi <yao.qi@linaro.org>
17756 * dfp.h: Include "dboulest.h" and "expression.h".
17758 2017-01-06 Yao Qi <yao.qi@linaro.org>
17760 * ax-gdb.h: Include "ax.h".
17762 2017-01-06 Yao Qi <yao.qi@linaro.org>
17764 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17765 with nat/gdb_ptrace.h.
17767 2017-01-05 Yao Qi <yao.qi@linaro.org>
17769 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17771 (mips64_fbsd_sigframe_init): Likewise.
17773 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17775 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17776 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17778 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17780 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17781 * NEWS: Mention new FreeBSD/mips native configuration.
17782 * config/mips/fbsd.mh: New file.
17783 * configure.host: Add mips*-*-freebsd*.
17784 * mips-fbsd-nat.c: New file.
17786 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17788 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17789 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17790 * NEWS: Mention new FreeBSD/mips target.
17791 * configure.tgt: Add mips*-*-freebsd*.
17792 * mips-fbsd-tdep.c: New file.
17793 * mips-fbsd-tdep.h: New file.
17795 2017-01-04 Yao Qi <yao.qi@linaro.org>
17797 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17798 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17800 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17802 Update copyright year range in all GDB files.
17804 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17806 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17808 For older changes see ChangeLog-2016.
17814 version-control: never