]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Fix syscall group completion
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
9a93831c
SM
12017-12-06 Simon Marchi <simon.marchi@ericsson.com>
2
3 * break-catch-syscall.c (catch_syscall_completer): Get pointers
4 to syscall group strings after building the string vector.
5
7cc244de
PA
62017-12-06 Pedro Alves <palves@redhat.com>
7
8 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
9 "qXfer:features:read"" is disabled.
10 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
11 Check packet_config_support instead of packet->support directly.
12
858c9d13
SM
132017-12-05 Simon Marchi <simon.marchi@ericsson.com>
14
15 * target-descriptions.c (struct tdesc_feature) <registers>: Use
16 tdesc_reg_up typedef.
17 (struct target_desc) <features>: Use tdesc_feature_up typedef.
18
d4a0e8b5
SM
192017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * target-descriptions.c (struct tdesc_type): Use default
22 destructor.
23 <u>: Remove.
24 <accept>: Remove.
25 (struct tdesc_type_builtin): New.
26 (struct tdesc_type_vector): New.
27 (struct tdesc_type_with_fields): New.
28 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
29 (tdesc_gdb_type): Remove.
30 (tdesc_register_type): Adjust.
31 (tdesc_create_vector): Create tdesc_type_vector.
32 (tdesc_create_struct): Create tdesc_type_with_fields.
33 (tdesc_set_struct_size): Change parameter type.
34 (tdesc_create_union): Create tdesc_type_with_fields.
35 (tdesc_create_flags): Likewise.
36 (tdesc_create_enum): Likewise.
37 (tdesc_add_field): Change parameter type.
38 (tdesc_add_typed_bitfield): Likewise.
39 (tdesc_add_bitfield): Likewise.
40 (tdesc_add_flag): Likewise.
41 (tdesc_add_enum_value): Likewise.
42 (print_c_tdesc) <visit>: Remove overload with tdesc_type
43 parameter, add overloads for tdesc_type_builtin,
44 tdesc_type_with_fields and tdesc_type_vector.
45 <m_printed_type>: Remove.
46 <m_printed_element_type, m_printed_type_with_fields>: Add.
47 * target-descriptions.h (tdesc_create_enum): Change return type.
48 (tdesc_add_typed_bitfield): Change parameter type.
49 (tdesc_add_enum_value): Change parameter type.
50 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
51 type to tdesc_type_with_fields.
52 (tdesc_start_struct): Adjust.
53 (tdesc_start_flags): Adjust.
54 (tdesc_start_enum): Adjust.
55 (tdesc_start_field): Adjust.
56 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
57 (struct tdesc_type_vector): Forward-declare.
58 (struct tdesc_type_with_fields): Forward-declare.
59 (tdesc_create_struct): Change return type.
60 (tdesc_create_union): Likewise.
61 (tdesc_create_flags): Likewise.
62 (tdesc_add_field): Change parameter type.
63 (tdesc_set_struct_size): Likewise.
64 (tdesc_add_bitfield): Likewise.
65 (tdesc_add_flag): Likewise.
66 * features: Re-generate C files.
67
f0cddbef
SM
682017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
71 (struct tdesc_arch_reg): Add constructor.
72 (DEF_VEC_O (tdesc_arch_reg)): Remove.
73 (struct tdesc_arch_data): Initialize fields.
74 <arch_regs>: Change type to std::vector.
75 (target_find_description): Adjust.
76 (tdesc_find_type): Adjust.
77 (tdesc_data_init): Call tdesc_arch_data constructor.
78 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
79 (tdesc_data_cleanup): Free data with delete.
80 (tdesc_numbered_register): Adjust.
81 (tdesc_find_arch_register): Adjust.
82 (tdesc_use_registers): Adjust.
83
d05200d1
SM
842017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
85
86 * target-descriptions.c (tdesc_type_field): Remove typedef.
87 (DEF_VEC_O (tdesc_type_field)): Remove.
88 (struct tdesc_type_field): Add constructor.
89 <name>: Change type to std::string.
90 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
91 kind uses it.
92 <~tdesc_type>: Destroy vector if the type kind uses it.
93 <u::u::fields>: Change type to std::vector.
94 (tdesc_gdb_type): Adjust.
95 (tdesc_add_field): Adjust.
96 (tdesc_add_typed_bitfield): Adjust.
97 (tdesc_add_field): Adjust.
98 (tdesc_add_enum_value): Adjust.
99 (class print_c_tdesc) <visit>: Adjust.
100
082b9140
SM
1012017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
102
103 * target-descriptions.c (struct tdesc_type) <name>: Change type
104 to std::string.
105 <~tdesc_type>: Don't manually free name.
106 <operator==>: Adjust.
107 (tdesc_named_type): Adjust.
108 (tdesc_find_type): Adjust.
109 (tdesc_gdb_type): Adjust.
110 (class print_c_tdesc) <visit>: Adjust.
111
53c934e9
SM
1122017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
113
114 * target-descriptions.c (tdesc_type_p): Remove typedef.
115 (DEF_VEC_P (tdesc_type_p)): Remove.
116 (struct tdesc_feature) <types>: Change type to std::vector.
117 <~tdesc_feature>: Replace with default implementation.
118 <accept>: Adjust.
119 (tdesc_named_type): Adjust.
120 (tdesc_create_vector): Adjust.
121 (tdesc_create_struct): Adjust.
122 (tdesc_create_union): Adjust.
123 (tdesc_create_flags): Adjust.
124 (tdesc_create_enum): Adjust.
125
a8142ee1
SM
1262017-12-05 Simon Marchi <simon.marchi@ericsson.com>
127
128 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
129 type of name_ parameter, adjust to std::string change.
130 <name, group, type>: Change type to std::string.
131 <~tdesc_reg>: Replace with default implementation.
132 <operator==>: Adjust.
133 (tdesc_find_register_early): Adjust.
134 (tdesc_register_name): Adjust.
135 (tdesc_register_type): Adjust.
136 (tdesc_register_in_reggroup_p): Adjust.
137 (class print_c_tdesc) <visit>: Adjust.
138 (class print_c_feature) <visit>: Adjust.
858c9d13
SM
139 * features/arc-arcompact.c: Re-generate.
140 * features/arc-v2.c: Re-generate.
a8142ee1 141
c9c895b9
SM
1422017-12-05 Simon Marchi <simon.marchi@ericsson.com>
143
144 * target-descriptions.c (tdesc_reg_p): Remove typedef.
145 (DEF_VEC_P (tdesc_reg_p)): Remove.
146 (struct tdesc_feature) <registers>: Change type to std::vector.
147 <~tdesc_feature>: Don't manually free registers.
148 <accept>: Adjust.
149 <operator==>: Adjust.
150 (tdesc_has_registers): Adjust.
151 (tdesc_find_register_early): Adjust.
152 (tdesc_use_registers): Adjust.
153 (tdesc_create_reg): Adjust.
154
f65ff9f9
SM
1552017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
156
157 * target-descriptions.c (tdesc_feature) <name>: Change type to
158 std::string.
159 <~tdesc_feature>: Don't manually free name.
160 <operator==>: Adjust.
161 (tdesc_find_feature): Adjust.
162 (tdesc_feature_name): Adjust.
163 (class print_c_tdesc) <visit_pre>: Adjust.
164 (class print_c_feature) <visit_pre>: Adjust.
165
3eea796c
SM
1662017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
167
168 * target-descriptions.c (tdesc_feature_p): Remove typedef.
169 (DEF_VEC_P (tdesc_feature_p)): Remove.
170 (struct target_desc) <features>: Change type to std::vector.
171 <~target_desc>: Replace with default implementation.
172 <accept>: Adjust.
173 <operator==>: Adjust.
174 (tdesc_has_registers): Adjust.
175 (tdesc_find_feature): Adjust.
176 (tdesc_use_registers): Adjust.
177 (tdesc_create_feature): Adjust.
178
40e2a983
SM
1792017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
180
181 * target-descriptions.c (arch_p): Remove typedef.
182 (DEF_VEC_P (arch_p)): Remove.
183 (struct target_desc) <compatible>: Change type to std::vector.
184 <~target_desc>: Don't manually free compatible.
185 (tdesc_compatible_p): Adjust.
186 (tdesc_add_compatible): Adjust.
187 (class print_c_tdesc) <visit_pre>: Adjust.
188
129c10bc
SM
1892017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * target-descriptions.c (property_s): Remove typedef.
192 (DEF_VEC_O (property_s)): Remove.
193 (struct target_desc) <properties>: Make an std::vector.
194 <~target_desc>: Don't manually free properties.
195 (tdesc_property): Adjust.
196 (set_tdesc_property): Adjust.
197 (class print_c_tdesc) <visit_pre>: Adjust.
198
ed9376bd
SM
1992017-12-05 Simon Marchi <simon.marchi@ericsson.com>
200
201 * common/gdb_assert.h (gdb_static_assert): Redefine using
202 static_assert.
203
798a7429
SM
2042017-12-05 Simon Marchi <simon.marchi@ericsson.com>
205
206 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
207 unused variables.
208 (ada_is_redundant_range_encoding): Likewise.
209 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
210 Likewise.
211 * alpha-tdep.c (alpha_software_single_step): Likewise.
212 * arm-tdep.c (_initialize_arm_tdep): Likewise.
213 * auto-load.c (info_auto_load_cmd): Likewise.
214 * break-catch-syscall.c (insert_catch_syscall): Likewise.
215 (remove_catch_syscall): Likewise.
216 * breakpoint.c (condition_completer): Likewise.
217 (clear_command): Likewise.
218 (update_breakpoint_locations): Likewise.
219 * btrace.c (btrace_disable): Likewise.
220 (btrace_teardown): Likewise.
221 (btrace_maint_update_pt_packets): Likewise.
222 (maint_btrace_clear_cmd): Likewise.
223 * cli/cli-decode.c (lookup_cmd_1): Likewise.
224 (lookup_cmd_composition): Likewise.
225 * cli/cli-dump.c (scan_filename): Likewise.
226 (restore_command): Likewise.
227 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
228 * compile/compile-object-load.c (compile_object_load): Likewise.
229 * compile/compile-object-run.c (compile_object_run): Likewise.
230 * compile/compile.c (compile_to_object): Likewise.
231 * completer.c (filename_completer): Likewise.
232 (complete_files_symbols): Likewise.
233 (complete_expression): Likewise.
234 * corelow.c (core_open): Likewise.
235 * ctf.c (ctf_start): Likewise.
236 (ctf_write_status): Likewise.
237 (ctf_write_uploaded_tsv): Likewise.
238 (ctf_write_definition_end): Likewise.
239 (ctf_open_dir): Likewise.
240 (ctf_xfer_partial): Likewise.
241 (ctf_trace_find): Likewise.
242 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
243 Likewise.
244 * dwarf2loc.c (allocate_piece_closure): Likewise.
245 (indirect_pieced_value): Likewise.
246 (dwarf2_evaluate_loc_desc_full): Likewise.
247 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
248 (dw2_expand_symtabs_matching): Likewise.
249 (dw2_map_symbol_filenames): Likewise.
250 (read_and_check_comp_unit_head): Likewise.
251 (read_cutu_die_from_dwo): Likewise.
252 (lookup_dwo_unit): Likewise.
253 (read_comp_units_from_section): Likewise.
254 (dwarf2_compute_name): Likewise.
255 (handle_DW_AT_stmt_list): Likewise.
256 (create_cus_hash_table): Likewise.
257 (create_dwp_v2_section): Likewise.
258 (dwarf2_rnglists_process): Likewise.
259 (dwarf2_ranges_process): Likewise.
260 (dwarf2_record_block_ranges): Likewise.
261 (is_vtable_name): Likewise.
262 (read_formatted_entries): Likewise.
263 (skip_form_bytes): Likewise.
264 * elfread.c (elf_symtab_read): Likewise.
265 * exec.c (exec_file_command): Likewise.
266 * f-valprint.c (f_val_print): Likewise.
267 (info_common_command_for_block): Likewise.
268 * guile/guile.c (initialize_scheme_side): Likewise.
269 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
270 * guile/scm-cmd.c (cmdscm_completer): Likewise.
271 (gdbscm_register_command_x): Likewise.
272 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
273 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
274 * guile/scm-ports.c (file_port_magic): Likewise.
275 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
276 (ppscm_pretty_print_one_value): Likewise.
277 (ppscm_print_children): Likewise.
278 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
279 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
280 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
281 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
282 * i386-tdep.c (i386_register_reggroup_p): Likewise.
283 * infcmd.c (run_command_1): Likewise.
284 (until_next_fsm_clean_up): Likewise.
285 * linespec.c (linespec_complete): Likewise.
286 (find_label_symbols): Likewise.
287 * m2-valprint.c (m2_val_print): Likewise.
288 * memattr.c (require_user_regions): Likewise.
289 (lookup_mem_region): Likewise.
290 (disable_mem_command): Likewise.
291 (mem_delete): Likewise.
292 * mep-tdep.c (mep_register_name): Likewise.
293 (mep_analyze_prologue): Likewise.
294 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
295 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
296 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
297 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
298 * minidebug.c (lzma_open): Likewise.
299 * minsyms.c (lookup_minimal_symbol): Likewise.
300 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
301 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
302 (mips_o64_return_value): Likewise.
303 (mips_single_step_through_delay): Likewise.
304 (_initialize_mips_tdep): Likewise.
305 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
306 (nios2_software_single_step): Likewise.
307 * parse.c (find_minsym_type_and_address): Likewise.
308 * psymtab.c (psym_relocate): Likewise.
309 * python/py-breakpoint.c (bppy_get_commands): Likewise.
310 (gdbpy_breakpoint_modified): Likewise.
311 * python/py-infevents.c (create_inferior_call_event_object):
312 Likewise.
313 * python/py-record-btrace.c (btpy_list_item): Likewise.
314 * python/py-type.c (typy_str): Likewise.
315 * python/py-value.c (valpy_call): Likewise.
316 * python/python.c (do_start_initialization): Likewise.
317 * record-btrace.c (record_btrace_insn_history_range): Likewise.
318 (record_btrace_call_history_range): Likewise.
319 (record_btrace_record_method): Likewise.
320 (record_btrace_xfer_partial): Likewise.
321 (btrace_get_frame_function): Likewise.
322 * record-full.c (record_full_open): Likewise.
323 * record.c (get_context_size): Likewise.
324 * registry.h (DEFINE_REGISTRY): Likewise.
325 * remote-fileio.c (remote_fileio_request): Likewise.
326 * remote.c (remote_update_thread_list): Likewise.
327 (remote_check_symbols): Likewise.
328 (remote_commit_resume): Likewise.
329 (remote_interrupt): Likewise.
330 (remote_insert_breakpoint): Likewise.
331 (compare_sections_command): Likewise.
332 * rust-exp.y (super_name): Likewise.
333 (lex_string): Likewise.
334 (convert_ast_to_type): Likewise.
335 (convert_ast_to_expression): Likewise.
336 * rust-lang.c (rust_print_struct_def): Likewise.
337 (rust_print_type): Likewise.
338 (rust_evaluate_subexp): Likewise.
339 * rx-tdep.c (rx_register_type): Likewise.
340 * ser-event.c (serial_event_clear): Likewise.
341 * serial.c (serial_open): Likewise.
342 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
343 * symfile.c (section_is_overlay): Likewise.
344 (overlay_unmapped_address): Likewise.
345 (overlay_mapped_address): Likewise.
346 (simple_overlay_update_1): Likewise.
347 (simple_overlay_update): Likewise.
348 * symtab.c (symbol_find_demangled_name): Likewise.
349 (search_symbols): Likewise.
350 * target-descriptions.c (tdesc_predefined_type): Likewise.
351 * target.c (target_commit_resume): Likewise.
352 * thread.c (print_selected_thread_frame): Likewise.
353 * top.c (new_ui_command): Likewise.
354 (gdb_readline_no_editing): Likewise.
355 * tracefile-tfile.c (tfile_open): Likewise.
356 * tracepoint.c (create_tsv_from_upload): Likewise.
357 * utils.c (quit): Likewise.
358 (defaulted_query): Likewise.
359 * valarith.c (value_concat): Likewise.
360 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
361 * xml-tdesc.c (target_fetch_description_xml): Likewise.
362 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
363 (xtensa_pseudo_register_write): Likewise.
364
7403715e
TT
3652017-12-04 Tom Tromey <tom@tromey.com>
366
367 * NEWS: Mention Rust trait object inspection.
368
50a1fdd5
PA
3692017-12-04 Pedro Alves <palves@redhat.com>
370
371 PR gdb/22499
372 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
373 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
374 (vex2_prefix_p, vex3_prefix_p): New functions.
375 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
376 VEX3 prefixes.
377 (fixup_riprel): Set VEX3.!B.
378
1e97a227
SM
3792017-12-03 Simon Marchi <simon.marchi@ericsson.com>
380
381 * target.h (mem_region_vector): Remove.
382 (struct target_ops) <to_memory_map>: Change return type to
383 std::vector<mem_region>.
384 * target-debug.h (target_debug_print_mem_region_vector): Rename
385 to ...
386 (target_debug_print_std_vector_mem_region): ... this.
387 * target-delegates.c: Re-generate.
388
10f64178
PA
3892017-12-03 Pedro Alves <palves@redhat.com>
390
391 * make-target-delegates (munge_type): Also munge '<', '>', and
392 ':'. Avoid double underscores in identifiers, and trailing
393 underscores.
394 * target-debug.h
395 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
396 ...
397 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
398 * target-delegates.c: Regenerate.
399
6d83e819
SM
4002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
401
402 * common/poison.h (XDELETE): Fix typo.
403
97cbe998
SDJ
4042017-12-01 Andrew Cagney <cagney@redhat.com>
405 Joel Brobecker <brobecker@adacore.com>
406 Sergio Durigan Junior <sergiodj@redhat.com>
407
408 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
409 feature.
410 * coffread.c (coff_symfile_read): Do not map over sections with
411 'coff_locate_sections' if readnever is on.
412 * dwarf2read.c (dwarf2_has_info): Return 0 if
413 readnever is on.
414 * elfread.c (elf_symfile_read): Do not map over sections with
415 'elf_locate_sections' if readnever is on.
416 * main.c (validate_readnow_readnever): New function.
417 (captured_main_1): Add support for --readnever.
418 (print_gdb_help): Document --readnever.
419 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
420 flag.
421 * symfile.c (readnever_symbol_files): New global.
422 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
423 'READNEVER_SYMBOL_FILES' is set.
424 (validate_readnow_readnever): New function.
425 (symbol_file_command): Handle '-readnever' option.
426 Call 'validate_readnow_readnever'.
427 (add_symbol_file_command): Handle '-readnever' option.
428 Call 'validate_readnow_readnever'.
429 (_initialize_symfile): Document new '-readnever' option for
430 both 'symbol-file' and 'add-symbol-file' commands.
431 * top.h (readnever_symbol_files): New extern global.
432 * xcoffread.c (xcoff_initial_scan): Do not read debug
433 information if readnever is on.
434
40fc416f
SDJ
4352017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
436
437 * symfile.c (symbol_file_command): Call
438 'symbol_file_add_main_1' only after processing all command
439 line options.
440 (add_symbol_file_command): Modify logic to make arguments
441 position-independent.
442
ec6a20c2
JB
4432017-12-01 Joel Brobecker <brobecker@adacore.com>
444
445 * ada-lang.c (symbol_list_obstack): Delete.
446 (resolve_subexp): Make sure "candidates" gets xfree'ed.
447 (ada_lookup_symbol_list_worker): Remove the limitation that
448 the result is only good until the next call, now making it
449 the responsibility of the caller to free the result when no
450 longer needed. Adjust the function's intro comment accordingly.
451 (ada_lookup_symbol_list): Adjust the function's intro comment.
452 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
453 (ada_lookup_encoded_symbol, get_var_value): Likewise.
454 (_initialize_ada_language): Remove symbol_list_obstack
455 initialization.
456 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
457 (write_var_or_type, write_name_assoc): Likewise.
458
d0df06af
TT
4592017-12-01 Tom Tromey <tom@tromey.com>
460
461 * Makefile.in (all_deps_files): New variable.
462 Include .Po files using all_deps_files.
463
2ee0c9b3
JB
4642017-12-01 Joel Brobecker <brobecker@adacore.com>
465
466 * MAINTAINERS: Update list of maintainers, moving those who
467 stepped down or became inactive to the "Past Maintainers"
468 section.
469
44122162
RO
4702017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
471
472 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
473 sys/proc.h.
474 (NEW_PROC_API): Remove.
475 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
476 Likewise.
477 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
478 * configure: Regenerate.
479 * config.in: Regenerate.
480 * gdbserver/configure: Regenerate.
481 * gdbserver/config.in: Regenerate.
482
483 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
484 NEW_PROC_API test.
485 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
486
487 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
488
489 * proc-api.c: Remove !NEW_PROC_API support.
490 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
491 Remove tests for macros always defined on Solaris.
492 * proc-events.c: Remove !NEW_PROC_API support.
493 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
494 HAVE_SYS_USER_H tests.
495 (init_syscall_table): Remove non-Solaris syscalls.
496 Remove tests for syscalls present on all Solaris versions.
497 Add missing Solaris 10+ syscalls.
498 (signal_table): Remove non-Solaris signals.
499 Remove tests for signals present on all Solaris versions.
500 (fault_table): Remove non-Solaris faults.
501 Remove tests for faults present on all Solaris versions.
502 * proc-flags.c: Remove !NEW_PROC_API support.
503 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
504 Remove non-Solaris flags.
505 * proc-why.c: Remove !NEW_PROC_API support.
506 (pr_why_table): Remove meaningless comments.
507 Remove tests for reasons present on all Solaris versions.
508 Remove OSF/1 cases.
509 (proc_prettyfprint_why): Likewise.
510
511 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
512 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
513 Remove WA_READ test, IRIX watchpoint support.
514 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
515 types. Change users.
516 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
517 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
518 Change callers.
519 Remove CTL_PROC_NAME_FMT tests.
520 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
521 users.
522 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
523 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
524 (proc_modify_flag): Replace GDBRESET by PCUNSET.
525 Remove PR_ASYNC, PR_KLC tests.
526 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
527 (proc_parent_pid): Remove PCWATCH etc. tests.
528 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
529 Remove PCAGENT test.
530 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
531 Remove SYS_lwpcreate || SYS_lwp_create test.
532 (proc_get_current_thread): Likewise.
533 [PIOCNTHR && PIOCTLIST]: Remove.
534 [PIOCLSTATUS]: Remove.
535 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
536 [PRFS_STOPEXEC]: Remove.
537 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
538 (syscall_is_exit): Likewise.
539 (syscall_is_exec): Likewise.
540 (syscall_is_lwp_create): Likewise.
541 Remove SYS_syssgi support.
542 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
543 [SYS_syssgi]: Remove.
544 Remove non-Solaris cases, conditionals.
545 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
546 Remove.
547 (procfs_init_inferior) [SYS_syssgi]: Remove.
548 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
549 (procfs_inferior_created) [SYS_syssgi]: Remove.
550 (procfs_set_watchpoint): Remove !AIX5 test.
551 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
552 case.
553 (mappingflags) [MA_PHYS]: Remove.
554 (info_mappings_callback): Remove PCAGENT test.
555 Remove PIOCOPENLWP || PCAGENT test.
556
e8020e54
RO
5572017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
558
559 * sol-thread.c (info_solthreads): Constify args.
560 Cast args to void *.
561
75059544
JB
5622017-11-29 John Baldwin <jhb@FreeBSD.org>
563
564 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
565
f5a91472
JB
5662017-11-29 Joel Brobecker <brobecker@adacore.com>
567
568 * ada-lang.c (to_fixed_range_type): Make sure that the size
569 of the range type being returned is the same as the size
570 of the range type being fixed.
571
bd69330d
PA
5722017-11-29 Pedro Alves <palves@redhat.com>
573
574 PR c++/19436
575 * NEWS: Mention setting breakpoints on functions with C++ ABI
576 tags.
577 * completer.h (completion_match_for_lcd) <match,
578 mark_ignored_range>: New methods.
579 <finish>: Consider ignored ranges.
580 <clear>: Clear ignored ranges.
581 <m_ignored_ranges, m_finished_storage>: New fields.
582 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
583 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
584 completion_match_for_lcd pointer to strncmp_iw_with_mode.
585 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
586 * language.c (default_symbol_name_matcher): Pass the
587 completion_match_for_lcd pointer to strncmp_iw_with_mode.
588 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
589 * utils.c (skip_abi_tag): New function.
590 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
591 Handle ABI tags.
592 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
593 parameter.
594
5952017-11-29 Pedro Alves <palves@redhat.com>
596
597 PR c++/19436
598 * NEWS: Mention setting breakpoints on functions with C++ ABI
599 tags.
600 * completer.h (completion_match_for_lcd) <match,
601 mark_ignored_range>: New methods.
602 <finish>: Consider ignored ranges.
603 <clear>: Clear ignored ranges.
604 <m_ignored_ranges, m_finished_storage>: New fields.
605 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
606 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
607 completion_match_for_lcd pointer to strncmp_iw_with_mode.
608 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
609 * language.c (default_symbol_name_matcher): Pass the
610 completion_match_for_lcd pointer to strncmp_iw_with_mode.
611 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
612 * utils.c (skip_abi_tag): New function.
613 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
614 Handle ABI tags.
615 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
616 parameter.
617
a20714ff
PA
6182017-11-29 Pedro Alves <palves@redhat.com>
619
620 * NEWS: Mention that breakpoints on C++ functions are now set on
621 on all namespaces/classes by default, and mention "break
622 -qualified".
623 * ax-gdb.c (agent_command_1): Adjust to pass a
624 symbol_name_match_type to new_linespec_location.
625 * breakpoint.c (parse_breakpoint_sals): Adjust to
626 get_linespec_location's return type change.
627 (strace_marker_create_sals_from_location): Adjust to pass a
628 symbol_name_match_type to new_linespec_location.
629 (strace_marker_decode_location): Adjust to get_linespec_location's
630 return type change.
631 (strace_command): Adjust to pass a symbol_name_match_type to
632 new_linespec_location.
633 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
634 mention "-qualified".
635 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
636 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
637 enumerator.
638 (complete_address_and_linespec_locations): New parameter
639 'match_type'. Pass it down.
640 (explicit_options): Add "-qualified".
641 (collect_explicit_location_matches): Pass the requested match type
642 to the linespec completers. Handle MATCH_QUALIFIED.
643 (location_completer): Handle "-qualified" combined with linespecs.
644 * cp-support.c (cp_search_name_hash): New.
645 (cp_symbol_name_matches_1): Implement wild matching for C++.
646 (cp_fq_symbol_name_matches): Reimplement.
647 (cp_get_symbol_name_matcher): Return different matchers depending
648 on the lookup name's match type.
649 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
650 * cp-support.h (cp_search_name_hash): New declaration.
651 * dwarf2read.c
652 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
653 symbols.
654 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
655 tests.
656 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
657 pass a symbol_name_match_type to new_linespec_location.
658 * linespec.c (linespec_parse_basic): Lookup function symbols using
659 the parser's symbol name match type.
660 (convert_explicit_location_to_linespec): New
661 symbol_name_match_type parameter. Pass it down to
662 find_linespec_symbols.
663 (convert_explicit_location_to_sals): Pass the location's name
664 match type to convert_explicit_location_to_linespec.
665 (parse_linespec): New match_type parameter. Save it in the
666 parser.
667 (linespec_parser_new): Default to symbol_name_match_type::WILD.
668 (linespec_complete_function): New symbol_name_match_type
669 parameter. Use it.
670 (complete_linespec_component): Pass down the parser's recorded
671 name match type.
672 (linespec_complete_label): New symbol_name_match_type parameter.
673 Use it.
674 (linespec_complete): New symbol_name_match_type parameter. Save
675 it in the parser and pass it down. Adjust to
676 get_linespec_location's prototype change.
677 (find_function_symbols, find_linespec_symbols): New
678 symbol_name_match_type parameter. Pass it down instead of
679 assuming symbol_name_match_type::WILD.
680 * linespec.h (linespec_complete, linespec_complete_function)
681 (linespec_complete_label): New symbol_name_match_type parameter.
682 * location.c (event_location::linespec_location): Now a struct
683 linespec_location.
684 (EL_LINESPEC): Adjust.
685 (initialize_explicit_location): Default to
686 symbol_name_match_type::WILD.
687 (new_linespec_location): New symbol_name_match_type parameter.
688 Record it in the location.
689 (get_linespec_location): Now returns a struct linespec_location.
690 (new_explicit_location): Also copy func_name_match_type.
691 (explicit_to_string_internal)
692 (string_to_explicit_location): Handle "-qualified".
693 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
694 Copy symbol_name_match_type fields.
695 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
696 type change.
697 (event_location_to_string): Adjust to LINESPEC_LOCATION type
698 change. Handle "-qualfied".
699 (string_to_explicit_location): Handle "-qualified".
700 (string_to_event_location_basic): New symbol_name_match_type
701 parameter. Pass it down.
702 (string_to_event_location): Handle "-qualified".
703 * location.h (struct linespec_location): New.
704 (explicit_location::func_name_match_type): New field.
705 (new_linespec_location): Now returns a const linespec_location *.
706 (string_to_event_location_basic): New symbol_name_match_type
707 parameter.
708 (explicit_completion_info::saw_explicit_location_option): New
709 field.
710 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
711 symbol_name_match_type to new_linespec_location.
712 * python/py-breakpoint.c (bppy_init): Likewise.
713 * python/python.c (gdbpy_decode_line): Likewise.
714
a207cff2
PA
7152017-11-29 Pedro Alves <palves@redhat.com>
716
717 * ada-lang.c (ada_lookup_name_info::matches): Change type of
718 parameter from completion_match to completion_match_result.
719 Adjust.
720 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
721 * completer.c (completion_tracker::maybe_add_completion): Add
722 match_for_lcd parameter and use it.
723 (completion_tracker::add_completion): Likewise.
724 * completer.h (class completion_match_for_lcd): New class.
725 (completion_match_result::match_for_lcd): New field.
726 (completion_match_result::set_match): New method.
727 (completion_tracker): Add comments.
728 (completion_tracker::add_completion): Add match_for_lcd parameter.
729 (completion_tracker::reset_completion_match_result): Reset
730 match_for_lcd too.
731 (completion_tracker::maybe_add_completion): Add match_for_lcd
732 parameter.
733 (completion_tracker::m_lowest_common_denominator_unique): Extend
734 comments.
735 * cp-support.c (cp_symbol_name_matches_1)
736 (cp_fq_symbol_name_matches): Change type of parameter from
737 completion_match to completion_match_result. Adjust.
738 * language.c (default_symbol_name_matcher): Change type of
739 parameter from completion_match to completion_match_result.
740 Adjust.
741 * language.h (completion_match_for_lcd): Forward declare.
742 (default_symbol_name_matcher): Change type of parameter from
743 completion_match to completion_match_result.
744 * symtab.c (compare_symbol_name): Adjust.
745 (completion_list_add_name): Pass the match_for_lcd to the tracker.
746 * symtab.h (ada_lookup_name_info::matches): Change type of
747 parameter from completion_match to completion_match_result.
748 (symbol_name_matcher_ftype): Likewise, and update comments.
749
4024cf2b
PA
7502017-11-29 Pedro Alves <palves@redhat.com>
751
752 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
753 * minsyms.c (msymbol_is_text): Delete.
754 (msymbol_is_function): New function.
755 * minsyms.h (msymbol_is_text): Delete.
756 (msymbol_is_function): New declaration.
757 * symtab.c (find_function_alias_target): Use msymbol_is_function.
758
5dcf52c1
TT
7592017-11-29 Tom Tromey <tom@tromey.com>
760
761 * Makefile.in (distclean): Handle the case where rmdir fails.
762
8ca2f0b9
TT
7632017-11-29 Tom Tromey <tom@tromey.com>
764
765 * symfile.c (_initialize_symfile): Update usage text for
766 add-symbol-file, symbol-file, load.
767
02ca603a
TT
7682017-11-29 Tom Tromey <tom@tromey.com>
769
770 * symfile.c (add_symbol_file_command): Error if some arguments to
771 -s are missing. Change unrecognized-argument error message.
772 (_initialize_symfile): Fix usage text for add-symbol-file.
773
18ca7347
TT
7742017-11-27 Tom Tromey <tom@tromey.com>
775
776 * Makefile.in (REMOTE_OBS): Remove.
777 (SFILES): Remove remote sources.
778 (COMMON_SFILES): Add remote sources.
779 (ALLDEPFILES): Remove dcache.c.
780
66599a7d
TT
7812017-11-27 Tom Tromey <tom@tromey.com>
782
783 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
784 variables.
785 (SFILES): Use SUBDIR_TARGET_SRCS.
786 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
787 (CONFIG_SRC_SUBDIR): Add target.
788 (%.o): Remove target rule.
789
4f04fba8
TT
7902017-11-27 Tom Tromey <tom@tromey.com>
791
792 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
793 registry.o, thread-fsm.o, debug.o.
794 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
795 thread-fsm.c, debug.c.
796
b5adff3b
TT
7972017-11-27 Tom Tromey <tom@tromey.com>
798
799 * Makefile.in (COMMON_SFILES): New.
800 (SFILES): Move some entries to COMMON_SFILES.
801 (COMMON_OBS): Use COMMON_SFILES.
802
afa0a411
TT
8032017-11-27 Tom Tromey <tom@tromey.com>
804
805 * Makefile.in (YYFILES): Update comment.
806 (YYOBJ): Redefine.
807
8fd8d003
TT
8082017-11-27 Tom Tromey <tom@tromey.com>
809
810 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
811 (CONFIG_SRC_SUBDIR): Add python.
812 (%.o): Remove python rule.
813 (python/%.o): New rule.
814 * configure: Rebuild.
815 * configure.ac (CONFIG_OBS): Refer to python/python.o
816
bd810fff
TT
8172017-11-27 Tom Tromey <tom@tromey.com>
818
819 * configure: Rebuild.
820 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
821 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
822 (CONFIG_SRC_SUBDIR): Add guile.
823 (%.o): Remove guile rule.
824
75787ac1
TT
8252017-11-27 Tom Tromey <tom@tromey.com>
826
827 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
828 (%.o): Remove unittests rule.
829 (CONFIG_SRC_SUBDIR): Add unittests.
830
5c8a9431
TT
8312017-11-27 Tom Tromey <tom@tromey.com>
832
833 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
834 (CONFIG_SRC_SUBDIR): Add tui.
835 (%.o): Remove tui rule.
836
a26aa30c
TT
8372017-11-27 Tom Tromey <tom@tromey.com>
838
839 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
840 (%.o): Remove compile rule.
841 (CONFIG_SRC_SUBDIR): Add compile.
842
6f3cdf9a
TT
8432017-11-27 Tom Tromey <tom@tromey.com>
844
845 * Makefile.in (SUBDIR_MI_OBS): Redefine.
846 (%.o): Remove mi rule.
847 (CONFIG_SRC_SUBDIR): Add mi.
848 (COMMON_OBS): Use mi/mi-common.o
849
f06afa53
TT
8502017-11-27 Tom Tromey <tom@tromey.com>
851
852 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
853 (%.o): Remove cli rule.
854 (CONFIG_SRC_SUBDIR): Add cli.
855
b22c88c2
TT
8562017-11-27 Tom Tromey <tom@tromey.com>
857
858 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
859 * configure: Rebuild.
860 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
861 (CONFIG_DEP_SUBDIR): New variable.
862 (%.o): Add order-only dependency.
863 ($(CONFIG_DEP_SUBDIR)): New target.
864
ee9a09e9
DC
8652017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
866
867 PR gdb/21945
868 * findcmd.c (_initialize_mem_search): Update find command help
869 text.
870
e8e7d10c
SM
8712017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
872
873 * python/python.c (do_start_initialization): Change progname
874 type to gdb::unique_xmalloc_ptr. Release the pointer when using
875 Python 2.
876
6a997029
TT
8772017-11-26 Tom Tromey <tom@tromey.com>
878
879 * common/format.h: Add include guards.
880
41272101
TT
8812017-11-26 Tom Tromey <tom@tromey.com>
882
883 * nat/linux-personality.h (class
884 maybe_disable_address_space_randomization): New class.
885 (maybe_disable_address_space_randomization): Don't declare
886 function.
887 * nat/linux-personality.c (restore_personality)
888 (make_disable_asr_cleanup): Remove.
889 (maybe_disable_address_space_randomization): Now a constructor.
890 (~maybe_disable_address_space_randomization): New destructor.
891 * linux-nat.c (linux_nat_create_inferior): Update.
892
44287fd8
TT
8932017-11-26 Tom Tromey <tom@tromey.com>
894
895 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
896
5ffd2cb7
UW
8972017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
898
899 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
900 "cooked" register. Access only first four bytes of branch target
901 registers.
902
0e5457dc
SDJ
9032017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
904
905 PR gdb/22491
906 * stap-probe.c (relocate_address): New function.
907 (stap_probe::get_relocated_address): Use 'relocate_address'.
908 (stap_probe::set_semaphore): Use 'relocate_address' and pass
909 'm_sem_addr'.
910 (stap_probe::clear_semaphore): Likewise.
911
deeeba55
PA
9122017-11-25 Pedro Alves <palves@redhat.com>
913
914 * dictionary.c: Include "safe-ctype.h".
915 * minsyms.c: Include "safe-ctype.h".
916 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
917
a81aaca0
PA
9182017-11-25 Pedro Alves <palves@redhat.com>
919
920 * completer.c (complete_line_internal_1): Skip spaces until the
921 start of the command.
922
0662b6a7
PA
9232017-11-24 Pedro Alves <palves@redhat.com>
924
925 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
926 cp_fq_symbol_name_matches. Pass language_cplus to
927 strncmp_with_mode.
928 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
929 (selftests::test_cp_symbol_name_cmp): New.
930 (_initialize_cp_support): Register "cp_symbol_name_matches"
931 selftests.
932 * language.c (default_symbol_name_matcher): Pass language_minimal
933 to strncmp_iw_with_mode.
934 * utils.c: Include "cp-support.h" and <algorithm>.
935 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
936 (cp_is_operator): New functions.
937 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
938 skip whitespace in the symbol name when the lookup name doesn't
939 have spaces, and vice versa.
940 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
941 * utils.h (strncmp_iw_with_mode): Add language parameter.
942
e547c119
JB
9432017-11-24 Joel Brobecker <brobecker@adacore.com>
944
945 * ada-lang.c (ada_exception_message_1, ada_exception_message):
946 New functions.
947 (print_it_exception): If available, display the exception
948 message as well.
949 * NEWS: Document new feature.
950
d7fcdff9
UW
9512017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
952
953 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
954
30649c14
PR
9552017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
956
957 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
958 (dtrace_probe::is_enabled, dtrace_probe::enable)
959 (dtrace_probe::disable): Remove keyword 'struct' at for-range
960 variable
961 * probe.c (gen_ui_out_table_header_info)
962 (print_ui_out_not_applicables): Remove keyword 'struct' at
963 for-range variable
964
7696f5c9
AH
9652017-11-24 Alan Hayward <alan.hayward@arm.com>
966
967 * configure.tgt: Add arch/aarch64.o
968
8172f16b
SM
9692017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * common/common-utils.h: Include poison.h.
972 (xfree): Remove declaration, add definition with static_assert.
973 * common/common-utils.c (xfree): Remove.
974 * common/poison.h (IsMallocatable): Define.
975 (IsFreeable): Define.
976 (free): Delete for non-freeable types.
977 (xnew): New.
978 (XNEW): Undef and redefine.
979 (xcnew): New.
980 (XCNEW): Undef and redefine.
981 (xdelete): New.
982 (XDELETE): Undef and redefine.
983 (xnewvec): New.
984 (XNEWVEC): Undef and redefine.
985 (xcnewvec): New.
986 (XCNEWVEC): Undef and redefine.
987 (xresizevec): New.
988 (XRESIZEVEC): Undef and redefine.
989 (xdeletevec): New.
990 (XDELETEVEC): Undef and redefine.
991 (xnewvar): New.
992 (XNEWVAR): Undef and redefine.
993 (xcnewvar): New.
994 (XCNEWVAR): Undef and redefine.
995 (xresizevar): New.
996 (XRESIZEVAR): Undef and redefine.
997
7aabaf9d
SM
9982017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
999
1000 * gdbthread.h (private_thread_info): Define structure type, add
1001 virtual pure destructor.
1002 (thread_info) <priv>: Change type to unique_ptr.
1003 <private_dtor>: Remove.
1004 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1005 (private_thread_info::~private_thread_info): Provide default
1006 implementation.
1007 (thread_info::~thread_info): Don't call private_dtor nor
1008 manually free priv.
1009 * aix-thread.c (private_thread_info): Rename to ...
1010 (aix_thread_info): ... this.
1011 (get_aix_thread_info): New.
1012 (sync_threadlists): Adjust.
1013 (iter_tid): Adjust.
1014 (aix_thread_resume): Adjust.
1015 (aix_thread_fetch_registers): Adjust.
1016 (aix_thread_store_registers): Adjust.
1017 (aix_thread_extra_thread_info): Adjust.
1018 * darwin-nat.h (private_thread_info): Rename to ...
1019 (darwin_thread_info): ... this.
1020 (get_darwin_thread_info): New.
1021 * darwin-nat.c (darwin_init_thread_list): Adjust.
1022 (darwin_check_new_threads): Adjust.
1023 (thread_info_from_private_thread_info): Adjust.
1024 * linux-thread-db.c (private_thread_info): Rename to ...
1025 (thread_db_thread_info): ... this, initialize fields.
1026 (get_thread_db_thread_info): New.
1027 <dying>: Change type to bool.
1028 (update_thread_state): Adjust to type rename.
1029 (record_thread): Adjust to type rename an use of unique_ptr.
1030 (thread_db_pid_to_str): Likewise.
1031 (thread_db_extra_thread_info): Likewise.
1032 (thread_db_thread_handle_to_thread_info): Likewise.
1033 (thread_db_get_thread_local_address): Likewise.
1034 * nto-tdep.h (private_thread_info): Rename to ...
1035 (nto_thread_info): ... this, initialize fields.
1036 (get_nto_thread_info): New.
1037 <name>: Change type to std::string.
1038 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1039 use of unique_ptr.
1040 * nto-procfs.c (update_thread_private_data_name): Adjust to
1041 std::string change, allocate nto_private_thread_info with new.
1042 (update_thread_private_data): Adjust to unique_ptr.
1043 * remote.c (private_thread_info): Rename to ...
1044 (remote_thread_info): ... this, initialize data members with
1045 default values.
1046 <extra, name>: Change type to std::string.
1047 <thread_handle>: Change type to non-pointer.
1048 (free_private_thread_info): Remove.
1049 (get_private_info_thread): Rename to...
1050 (get_remote_thread_info): ... this, change return type, adjust to
1051 use of unique_ptr, use remote_thread_info constructor.
1052 (remote_add_thread): Adjust.
1053 (get_private_info_ptid): Rename to...
1054 (get_remote_thread_info): ...this, change return type.
1055 (remote_thread_name): Use get_remote_thread_info, adjust to
1056 change to std::string.
1057 (struct thread_item) <~thread_item>: Remove.
1058 <thread_handle>: Make non pointer.
1059 (start_thread): Adjust to thread_item::thread_handle type
1060 change.
1061 (remote_update_thread_list): Adjust to type name change, move
1062 strings from temporary to long-lived object instead of
1063 duplicating.
1064 (remote_threads_extra_info): Use get_remote_thread_info.
1065 (process_initial_stop_replies): Likewise.
1066 (resume_clear_thread_private_info): Likewise.
1067 (remote_resume): Adjust to type name change.
1068 (remote_commit_resume): Use get_remote_thread_info.
1069 (process_stop_reply): Adjust to type name change.
1070 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1071 (remote_stopped_by_hw_breakpoint): Likewise.
1072 (remote_stopped_by_watchpoint): Likewise.
1073 (remote_stopped_data_address): Likewise.
1074 (remote_core_of_thread): Likewise.
1075 (remote_thread_handle_to_thread_info): Use
1076 get_private_info_thread, adjust to thread_handle field type
1077 change.
1078
21fe1c75
SM
10792017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1080
1081 * remote.c (struct thread_item): Add constructor, disable copy
1082 construction and copy assignment, define default move
1083 construction and move assignment.
1084 <extra, name>: Change type to std::string.
1085 <core>: Initialize.
1086 <thread_handle>: Make non-pointer.
1087 (thread_item_t): Remove typedef.
1088 (DEF_VEC_O(thread_item_t)): Remove.
1089 (threads_listing_context) <contains_thread>: New method.
1090 <remove_thread>: New method.
1091 <items>: Change type to std::vector.
1092 (clear_threads_listing_context): Remove.
1093 (threads_listing_context_remove): Remove.
1094 (remote_newthread_step): Use thread_item constructor, adjust to
1095 change to std::vector.
1096 (start_thread): Use thread_item constructor, adjust to change to
1097 std::vector.
1098 (end_thread): Adjust to change to std::vector and std::string.
1099 (remote_get_threads_with_qthreadinfo): Use thread_item
1100 constructor, adjust to std::vector.
1101 (remote_update_thread_list): Adjust to change to std::vector and
1102 std::string, use threads_listing_context methods.
1103 (remove_child_of_pending_fork): Adjust.
1104 (remove_new_fork_children): Adjust.
1105 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1106 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1107 * unittests/rsp-low-selftests.c: New file.
1108 * common/rsp-low.h: Include common/byte-vector.h.
1109 (hex2bin): New overload.
1110 * common/rsp-low.c (hex2bin): New overload.
1111
089354bb
SM
11122017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1113
1114 * inferior.h (private_inferior): Define structure type, add
1115 virtual pure destructor.
1116 (inferior) <priv>: Change type to unique_ptr.
1117 * inferior.c (private_inferior::~private_inferior): Provide
1118 default implementation.
1119 (inferior::~inferior): Don't free priv field.
1120 (exit_inferior_1): Likewise.
1121 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1122 (darwin_exception_info): Remove typedef.
1123 (DEF_VEC_O (darwin_thread_t)); Remove.
1124 (private_inferior): Rename to ...
1125 (darwin_private_inferior): ... this, extend private_inferior.
1126 (get_darwin_inferior): New.
1127 <threads>: Change type to std::vector of darwin_thread_t pointers.
1128 * darwin-nat.c (darwin_check_new_threads): Adjust.
1129 (find_inferior_task_it): Adjust.
1130 (darwin_find_thread); Adjust.
1131 (darwin_suspend_inferior): Adjust.
1132 (darwin_resume_inferior): Adjust.
1133 (darwin_find_new_inferior): Adjust.
1134 (darwin_decode_notify_message): Adjust.
1135 (darwin_send_reply): Adjust.
1136 (darwin_resume_inferior_threads): Adjust.
1137 (darwin_suspend_inferior_threads): Adjust.
1138 (darwin_decode_message): Adjust.
1139 (darwin_wait): Adjust.
1140 (darwin_interrupt): Adjust.
1141 (darwin_deallocate_threads): Adjust.
1142 (darwin_mourn_inferior): Adjust, don't free private data.
1143 (darwin_reply_to_all_pending_messages): Adjust.
1144 (darwin_stop_inferior): Adjust.
1145 (darwin_setup_exceptions): Adjust.
1146 (darwin_kill_inferior): Adjust.
1147 (darwin_setup_request_notification): Adjust.
1148 (darwin_attach_pid): Adjust.
1149 (darwin_init_thread_list): Adjust.
1150 (darwin_setup_fake_stop_event): Adjust.
1151 (darwin_attach): Adjust.
1152 (darwin_detach): Adjust.
1153 (darwin_xfer_partial): Adjust.
1154 (set_enable_mach_exceptions): Adjust.
1155 (darwin_pid_to_exec_file): Adjust.
1156 (darwin_get_ada_task_ptid): Adjust.
1157 * darwin-nat-info.c (get_task_from_args): Adjust.
1158 (info_mach_ports_command): Adjust.
1159 (info_mach_region_command): Adjust.
1160 (info_mach_exceptions_command): Adjust.
1161 * remote.c (private_inferior): Rename to ...
1162 (remote_private_inferior): ... this, initialize fields.
1163 (get_remote_inferior); New.
1164 (remote_commit_resume): Use get_remote_inferior.
1165 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1166
d044bac8
PA
11672017-11-24 Pedro Alves <palves@redhat.com>
1168
1169 * NEWS: Mention linespecs and explicit locations, and completion
1170 improvements.
1171
e8d58cba
YQ
11722017-11-24 Yao Qi <yao.qi@linaro.org>
1173
1174 * regcache.c (regcache::dump): Remove footnote_register_size.
1175
a63f2d2f
YQ
11762017-11-24 Yao Qi <yao.qi@linaro.org>
1177
1178 * regcache.c (cooked_read_test): Add more test for readonly
1179 regcache.
1180
1b30aaa5
YQ
11812017-11-24 Yao Qi <yao.qi@linaro.org>
1182
1183 * gdbarch-selftests.c (test_target_has_registers): Move it to
1184 target.c.
1185 (test_target_has_stack): Likewise.
1186 (test_target_has_memory): Likewise.
1187 (test_target_prepare_to_store): Likewise.
1188 (test_target_store_registers): Likewise.
1189 (test_target_ops): Likewise.
1190 * regcache.c: Include selftest-arch.h and gdbthread.h.
1191 (target_ops_no_register): New class.
1192 (test_target_fetch_registers): New.
1193 (test_target_store_registers): New.
1194 (test_target_xfer_partial): New.
1195 (readwrite_regcache): New.
1196 (cooked_read_test): New.
1197 (_initialize_regcache): Register the test.
1198 * target.c: (test_target_has_registers): Moved from
1199 gdbarch-selftests.c.
1200 (test_target_has_stack): Likewise.
1201 (test_target_has_memory): Likewise.
1202 (test_target_prepare_to_store): Likewise.
1203 (test_target_store_registers): Likewise.
1204 * target.h (test_target_ops): New class.
1205
6654d750
AH
12062017-11-24 Alan Hayward <alan.hayward@arm.com>
1207
1208 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1209 selftest.
1210
49bdb7ee
AH
12112017-11-24 Alan Hayward <alan.hayward@arm.com>
1212
1213 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1214 * arch/aarch64.c (aarch64_create_target_description): Create
1215 new target description.
1216 * features/Makefile: Add new files.
1217 * features/aarch64.c: Remove file.
1218 * features/aarch64-core.c: New autogenerated file.
1219 * features/aarch64-fpu.c: New autogenerated file.
1220 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
1221
12222017-11-24 Alan Hayward <alan.hayward@arm.com>
1223
1224 * Makefile.in: Add new files.
1225 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1226 aarch64_read_description.
1227 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1228 Call aarch64_read_description.
1229 * aarch64-tdep.c (aarch64_read_description): New function.
1230 (aarch64_gdbarch_init): Call aarch64_read_description.
1231 * aarch64-tdep.h (aarch64_read_description): New function.
1232 * arch/aarch64.c: New file.
1233 * configure.tgt: Add new files.
1234
98ead37e
YQ
12352017-11-24 Yao Qi <yao.qi@linaro.org>
1236
1237 * mi/mi-main.c (register_changed_p): Update.
1238 * value.c (value_contents_bits_eq): Change return type.
1239 (value_contents_eq): Likewise.
1240 * value.h: Update comments.
1241
62ad7ce7
YQ
12422017-11-24 Yao Qi <yao.qi@linaro.org>
1243
1244 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1245 local 'changed'. Remove error.
1246 (register_changed_p): Change return type to bool.
1247
506fe5f4
YQ
12482017-11-24 Yao Qi <yao.qi@linaro.org>
1249
1250 * arch/tic6x.c: New file.
1251 * arch/tic6x.h: New file.
1252 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1253 tic6x-core.xml and tic6x-gp.xml.
1254 * features/tic6x-c6xp.c: Generated.
1255 * features/tic6x-core.c: Generated.
1256 * features/tic6x-gp.c: Generated.
1257 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1258 "tic6x-".
1259
00ea2e2a
SM
12602017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1261
1262 * mi/mi-main.c (list_available_thread_groups): Change map value
1263 type to std::vector.
1264
f45e2a77
SM
12652017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1266
1267 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1268
bd046f64
SM
12692017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1270
1271 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1272 back to...
1273 <children_requested>: ... this.
1274 (varobj_get_num_children, varobj_update): Adjust.
1275
4c37490d
SM
12762017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1277
1278 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1279 (ada_value_has_mutated): Likewise.
1280 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1281 (c_is_path_expr_parent): Likewise.
1282 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1283 (mi_cmd_var_set_frozen): Likewise.
1284 (mi_cmd_var_update_iter): Likewise.
1285 (mi_cmd_var_update): Likewise.
1286 * varobj.c (pretty_printing): Likewise.
1287 (varobj_enable_pretty_printing): Likewise.
1288 (struct varobj_root) <floating, is_valid>: Likewise.
1289 (struct varobj_dynamic) <children_requested>: Likewise.
1290 (delete_variable): Likewise.
1291 (delete_variable_1): Likewise.
1292 (install_variable): Likewise.
1293 (update_type_if_necessary): Likewise.
1294 (install_new_value): Likewise.
1295 (value_of_root): Likewise.
1296 (is_root_p): Likewise.
1297 (varobj_create): Likewise.
1298 (varobj_delete): Likewise.
1299 (varobj_has_more): Likewise.
1300 (varobj_set_frozen): Likewise.
1301 (varobj_get_frozen): Likewise.
1302 (install_dynamic_child): Likewise.
1303 (dynamic_varobj_has_child_method): Likewise.
1304 (update_dynamic_varobj_children): Likewise.
1305 (varobj_get_num_children): Likewise.
1306 (varobj_list_children): Likewise.
1307 (is_path_expr_parent): Likewise.
1308 (varobj_default_is_path_expr_parent): Likewise.
1309 (varobj_is_dynamic_p): Likewise.
1310 (varobj_set_value): Likewise.
1311 (varobj_value_has_mutated): Likewise.
1312 (varobj_update): Likewise.
1313 (check_scope): Likewise.
1314 (value_of_root_1): Likewise.
1315 (varobj_value_get_print_value): Likewise.
1316 (varobj_editable_p): Likewise.
1317 (varobj_value_is_changeable_p): Likewise.
1318 (varobj_floating_p): Likewise.
1319 (varobj_default_value_is_changeable_p): Likewise.
1320 (varobj_invalidate_iter): Likewise.
1321 * varobj.h (struct varobj_update_result) <type_changed,
1322 children_changed, changed, value_installed>: Likewise.
1323 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1324 (struct lang_varobj_ops) <value_is_changeable_p,
1325 value_has_mutated, is_path_expr_parent>: Likewise.
1326 (varobj_delete): Likewise.
1327 (varobj_set_frozen): Likewise.
1328 (varobj_get_frozen): Likewise.
1329 (varobj_set_value): Likewise.
1330 (varobj_update): Likewise.
1331 (varobj_editable_p): Likewise.
1332 (varobj_floating_p): Likewise.
1333 (varobj_has_more): Likewise.
1334 (varobj_is_dynamic_p): Likewise.
1335 (varobj_default_value_is_changeable_p): Likewise.
1336 (varobj_value_is_changeable_p): Likewise.
1337 (varobj_is_anonymous_child): Likewise.
1338 (varobj_default_is_path_expr_parent): Likewise.
1339
9c23b42f
SDJ
13402017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1341
1342 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1343 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1344 <type_str>: Convert to 'std::string'.
1345 <expr>: Convert to 'expression_up'.
1346 (dtrace_probe_arg_s): Delete type and VEC.
1347 (dtrace_probe_enabler_s): Likewise.
1348 (struct dtrace_probe): Replace by...
1349 (class dtrace_static_probe_ops): ...this and...
1350 (class dtrace_probe): ...this.
1351 (dtrace_probe_is_linespec): Rename to...
1352 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1353 to reflect change.
1354 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1355 Adjust code. Create new instance of 'dtrace_probe'.
1356 (dtrace_build_arg_exprs): Rename to...
1357 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1358 reflect change.
1359 (dtrace_get_probes): Rename to...
1360 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1361 to reflect change.
1362 (dtrace_get_arg): Rename to...
1363 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1364 reflect change.
1365 (dtrace_probe_is_enabled): Rename to...
1366 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1367 change.
1368 (dtrace_get_probe_address): Rename to...
1369 (dtrace_probe::get_relocated_address): ...this. Adjust code
1370 to reflect change.
1371 (dtrace_get_probe_argument_count): Rename to...
1372 (dtrace_probe::get_argument_count): ...this. Adjust code to
1373 reflect change.
1374 (dtrace_can_evaluate_probe_arguments): Rename to...
1375 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1376 to reflect change.
1377 (dtrace_evaluate_probe_argument): Rename to...
1378 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1379 reflect change.
1380 (dtrace_compile_to_ax): Rename to...
1381 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1382 reflect change.
1383 (dtrace_probe_destroy): Delete.
1384 (dtrace_type_name): Rename to...
1385 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1386 reflect change.
1387 (dtrace_probe::get_static_ops): New method.
1388 (dtrace_gen_info_probes_table_header): Rename to...
1389 (dtrace_static_probe_ops::gen_info_probes_table_header):
1390 ...this. Adjust code to reflect change.
1391 (dtrace_gen_info_probes_table_values): Rename to...
1392 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1393 code to reflect change.
1394 (dtrace_enable_probe): Rename to...
1395 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1396 change.
1397 (dtrace_disable_probe): Rename to...
1398 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1399 change.
1400 (struct probe_ops dtrace_probe_ops): Delete.
1401 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1402 instead of 'info_probes_for_ops'.
1403 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1404 of 'all_probe_ops'.
1405
0e9ae10f
SDJ
14062017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1407 Simon Marchi <simark@simark.ca>
1408
1409 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1410 variable.
1411 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1412 <aexpr>: Change type to 'expression_up'.
1413 (stap_probe_arg_s): Delete type and VEC.
1414 (struct stap_probe): Delete. Replace by...
1415 (class stap_static_probe_ops): ...this and...
1416 (class stap_probe): ...this. Rename variables to add 'm_'
1417 prefix. Do not use 'union' for arguments anymore.
1418 (stap_get_expected_argument_type): Receive probe name instead
1419 of 'struct stap_probe'. Adjust code.
1420 (stap_parse_probe_arguments): Rename to...
1421 (stap_probe::parse_arguments): ...this. Adjust code to
1422 reflect change.
1423 (stap_get_probe_address): Rename to...
1424 (stap_probe::get_relocated_address): ...this. Adjust code
1425 to reflect change.
1426 (stap_get_probe_argument_count): Rename to...
1427 (stap_probe::get_argument_count): ...this. Adjust code
1428 to reflect change.
1429 (stap_get_arg): Rename to...
1430 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1431 reflect change.
1432 (can_evaluate_probe_arguments): Rename to...
1433 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1434 to reflect change.
1435 (stap_evaluate_probe_argument): Rename to...
1436 (stap_probe::evaluate_argument): ...this. Adjust code
1437 to reflect change.
1438 (stap_compile_to_ax): Rename to...
1439 (stap_probe::compile_to_ax): ...this. Adjust code to
1440 reflect change.
1441 (stap_probe_destroy): Delete.
1442 (stap_modify_semaphore): Adjust comment.
1443 (stap_set_semaphore): Rename to...
1444 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1445 change.
1446 (stap_clear_semaphore): Rename to...
1447 (stap_probe::clear_semaphore): ...this. Adjust code to
1448 reflect change.
1449 (stap_probe::get_static_ops): New method.
1450 (handle_stap_probe): Adjust code to create instance of
1451 'stap_probe'.
1452 (stap_get_probes): Rename to...
1453 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1454 reflect change.
1455 (stap_probe_is_linespec): Rename to...
1456 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1457 reflect change.
1458 (stap_type_name): Rename to...
1459 (stap_static_probe_ops::type_name): ...this. Adjust code to
1460 reflect change.
1461 (stap_gen_info_probes_table_header): Rename to...
1462 (stap_static_probe_ops::gen_info_probes_table_header):
1463 ...this. Adjust code to reflect change.
1464 (stap_gen_info_probes_table_values): Rename to...
1465 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1466 code to reflect change.
1467 (struct probe_ops stap_probe_ops): Delete.
1468 (info_probes_stap_command): Use 'info_probes_for_spops'
1469 instead of 'info_probes_for_ops'.
1470 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1471 of 'all_probe_ops'.
1472
935676c9
SDJ
14732017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1474
1475 * break-catch-throw.c (fetch_probe_arguments): Use
1476 'probe.prob' instead of 'probe.probe'.
1477 * breakpoint.c (create_longjmp_master_breakpoint): Call
1478 'can_evaluate_arguments' and 'get_relocated_address' methods
1479 from probe.
1480 (create_exception_master_breakpoint): Likewise.
1481 (add_location_to_breakpoint): Use 'sal->prob' instead of
1482 'sal->probe'.
1483 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1484 probe.
1485 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1486 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1487 of 'probe_ops'.
1488 (probe_key_free): Call 'delete' on probe.
1489 (check_exception_resume): Use 'probe.prob' instead of
1490 'probe.probe'.
1491 * location.c (string_to_event_location_basic): Call
1492 'probe_linespec_to_static_ops'.
1493 * probe.c (class any_static_probe_ops): New class.
1494 (any_static_probe_ops any_static_probe_ops): New variable.
1495 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1496 argument. Adjust code to reflect change.
1497 (parse_probes): Use 'static_probe_ops' instead of
1498 'probe_ops'. Adjust code to reflect change.
1499 (find_probes_in_objfile): Call methods to get name and
1500 provider from probe.
1501 (find_probe_by_pc): Use 'result.prob' instead of
1502 'result.probe'. Call 'get_relocated_address' method from
1503 probe.
1504 (collect_probes): Adjust comment and argument list to receive
1505 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1506 reflect change. Call necessary methods from probe.
1507 (compare_probes): Call methods to get name and provider from
1508 probes.
1509 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1510 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1511 adjust code accordingly.
1512 (print_ui_out_not_applicables): Likewise.
1513 (info_probes_for_ops): Rename to...
1514 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1515 as argument instead of 'probe_ops'. Adjust code. Call
1516 necessary methods from probe.
1517 (info_probes_command): Use 'info_probes_for_spops'.
1518 (enable_probes_command): Pass correct argument to
1519 'collect_probes'. Call methods from probe.
1520 (disable_probes_command): Likewise.
1521 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1522 (get_probe_argument_count): Move to
1523 'any_static_probe_ops::get_argument_count'.
1524 (can_evaluate_probe_arguments): Move to
1525 'any_static_probe_ops::can_evaluate_arguments'.
1526 (evaluate_probe_argument): Move to
1527 'any_static_probe_ops::evaluate_argument'.
1528 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1529 'probe.probe'.
1530 (probe_linespec_to_ops): Rename to...
1531 (probe_linespec_to_static_ops): ...this. Adjust code.
1532 (probe_any_is_linespec): Rename to...
1533 (any_static_probe_ops::is_linespec): ...this.
1534 (probe_any_get_probes): Rename to...
1535 (any_static_probe_ops::get_probes): ...this.
1536 (any_static_probe_ops::type_name): New method.
1537 (any_static_probe_ops::gen_info_probes_table_header): New
1538 method.
1539 (compute_probe_arg): Use 'pc_probe.prob' instead of
1540 'pc_probe.probe'. Call methods from probe.
1541 (compile_probe_arg): Likewise.
1542 (std::vector<const probe_ops *> all_probe_ops): Delete.
1543 (std::vector<const static_probe_ops *> all_static_probe_ops):
1544 New variable.
1545 (_initialize_probe): Use 'all_static_probe_ops' instead of
1546 'all_probe_ops'.
1547 * probe.h (struct info_probe_column) <field_name>: Delete
1548 extraneous newline
1549 (info_probe_column_s): Delete type and VEC.
1550 (struct probe_ops): Delete. Replace with...
1551 (class static_probe_ops): ...this and...
1552 (clas probe): ...this.
1553 (struct bound_probe) <bound_probe>: Delete extraneous
1554 newline. Adjust constructor to receive 'probe' instead of
1555 'struct probe'.
1556 <probe>: Rename to...
1557 <prob>: ...this. Delete extraneous newline.
1558 <objfile>: Delete extraneous newline.
1559 (register_probe_ops): Delete unused prototype.
1560 (info_probes_for_ops): Rename to...
1561 (info_probes_for_spops): ...this. Adjust comment.
1562 (get_probe_address): Move to 'probe::get_address'.
1563 (get_probe_argument_count): Move to
1564 'probe::get_argument_count'.
1565 (can_evaluate_probe_arguments): Move to
1566 'probe::can_evaluate_arguments'.
1567 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1568 * solib-svr4.c (struct svr4_info): Adjust comment.
1569 (struct probe_and_action) <probe>: Rename to...
1570 <prob>: ...this.
1571 (register_solib_event_probe): Receive 'probe' instead of
1572 'struct probe' as argument. Use 'prob' instead of 'probe'
1573 when applicable.
1574 (solib_event_probe_action): Call 'get_argument_count' method
1575 from probe. Adjust comment.
1576 (svr4_handle_solib_event): Adjust comment. Call
1577 'evaluate_argument' method from probe.
1578 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1579 from probe.
1580 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1581 'struct probe'. Call 'can_evaluate_arguments' from probe.
1582 * symfile.h: Forward declare 'class probe' instead of 'struct
1583 probe'.
1584 * symtab.h: Likewise.
1585 (struct symtab_and_line) <probe>: Rename to...
1586 <prob>: ...this.
1587 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1588 Call probe methods.
1589 (stop_tracing): Likewise.
1590
8f6cb6c3
JB
15912017-11-22 Joel Brobecker <brobecker@adacore.com>
1592
1593 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1594 trailing newline at end of string in call to warning.
1595
479f8de1
SM
15962017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1597
1598 * osdata.h: Include vector isntead of vec.h.
1599 (osdata_column_s): Remove typedef.
1600 (struct osdata_column): Add constructor.
1601 <name, value>: Change type to std::string.
1602 (DEF_VEC_O (osdata_column_s)): Remove.
1603 (osdata_item_s): Remove typedef.
1604 (struct osdata_item) <columns>: Change type to std::vector.
1605 (DEF_VEC_O (osdata_item_s)): Remove.
1606 (struct osdata): Add constructor.
1607 <type>: Change type to std::string.
1608 <items>: Change type to std::vector.
1609 (osdata_p): Remove typedef.
1610 (DEF_VEC_P (osdata_p)): Remove.
1611 (osdata_parse): Return a unique_ptr.
1612 (osdata_free): Remove.
1613 (make_cleanup_osdata_free): Remove.
1614 (get_osdata): Return a unique_ptr.
1615 (get_osdata_column): Return pointer to std::string, take a
1616 reference to osdata_item as parameter.
1617 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1618 unique_ptr.
1619 <property_name>: Change type to std::string.
1620 (osdata_start_osdata): Allocate osdata with new and adjust.
1621 (osdata_start_item): Adjust.
1622 (osdata_start_column): Adjust.
1623 (osdata_end_column): Adjust.
1624 (clear_parsing_data): Remove.
1625 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1626 (osdata_item_clear): Remove.
1627 (get_osdata): return a unique_ptr and adjust.
1628 (get_osdata_column): Return a pointer to std::string and adjust.
1629 (info_osdata): Adjust.
1630 * mi/mi-main.c: Include <map>.
1631 (free_vector_of_osdata_items): Remove.
1632 (list_available_thread_groups): Adjust, use std::map instead of
1633 splay tree.
1634
41bd68f5
SM
16352017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1636
1637 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1638 case in switch.
1639
7e2fd2f4
SM
16402017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1641
1642 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1643
0604393c
SM
16442017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1645
1646 * varobj.h (struct varobj_update_result): Add constructor, add
1647 move constructor, disable copy and assign, initialize fields.
1648 <newobj>: Change type to std::vector.
1649 (varobj_update): Return std::vector.
1650 * varobj.c (install_dynamic_child): Change VEC parameters to
1651 std::vector and adjust.
1652 (update_dynamic_varobj_children): Likewise.
1653 (varobj_update): Return std::vector and adjust.
1654 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1655
ddf0ea08
SM
16562017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1657
1658 * varobj.h (struct varobj) <parent>: Remove const.
1659 <children>: Change type to std::vector.
1660 (varobj_list_children): Return std::vector const reference.
1661 (varobj_restrict_range): Change parameter type to std::vector
1662 const reference.
1663 * varobj.c (varobj_has_more): Adjust.
1664 (varobj_restrict_range): Change parameter type to std::vector
1665 const reference and adjust.
1666 (install_dynamic_child): Adjust.
1667 (update_dynamic_varobj_children): Adjust.
1668 (varobj_list_children): Return std::vector const reference and
1669 adjust.
1670 (varobj_add_child): Adjust.
1671 (update_type_if_necessary): Adjust.
1672 (varobj_update): Adjust.
1673 (delete_variable_1): Adjust.
1674 * ada-varobj.c (ada_value_has_mutated): Adjust.
1675 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1676
9e5b9d2b
SM
16772017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1678
1679 * varobj.h (struct varobj): Add constructor and destructor,
1680 initialize fields.
1681 * varobj.c (struct varobj_root): Initialize fields.
1682 (struct varobj_dynamic): Initialize fields.
1683 (varobj_create): Use unique_ptr instead of cleanup. Create
1684 varobj with new instead of new_root_variable.
1685 (delete_variable_1): Free variable with delete instead of
1686 free_variable.
1687 (create_child_with_value): Create variable with new instead of
1688 new_variable.
1689 (varobj::varobj): New.
1690 (varobj::~varobj): New (body mostly coming from free_variable).
1691 (new_variable): Remove.
1692 (free_variable): Remove.
1693 (do_free_variable_cleanup): Remove.
1694 (make_cleanup_free_variable): Remove.
1695
fc35dab1
UW
16962017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1697
1698 * core-regset.c: Remove file.
1699 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1700
2400729e
UW
17012017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1702
1703 * NEWS: Document use of GNU MPFR.
1704 * README: Likewise.
1705
1706 * Makefile.in (LIBMPFR): Add define.
1707 (CLIBS): Add $(LIBMPFR).
1708 * configure.ac: Add --with-mpfr configure option.
1709 * configure: Regenerate.
1710 * config.in: Regenerate.
1711
1712 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1713 (class mpfr_float_ops): New type.
1714 (mpfr_float_ops::from_target): Two new overloaded functions.
1715 (mpfr_float_ops::to_target): Likewise.
1716 (mpfr_float_ops::to_string): New function.
1717 (mpfr_float_ops::from_string): Likewise.
1718 (mpfr_float_ops::to_longest): Likewise.
1719 (mpfr_float_ops::from_longest): Likewise.
1720 (mpfr_float_ops::from_ulongest): Likewise.
1721 (mpfr_float_ops::to_host_double): Likewise.
1722 (mpfr_float_ops::from_host_double): Likewise.
1723 (mpfr_float_ops::convert): Likewise.
1724 (mpfr_float_ops::binop): Likewise.
1725 (mpfr_float_ops::compare): Likewise.
1726 (get_target_float_ops): Use mpfr_float_ops if available.
1727
7a26362d
UW
17282017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1729
1730 * target-float.c: Do not include <math.h>.
1731 Include <cmath> and <limits>.
1732 (DOUBLEST): Do not define.
1733 (class target_float_ops): New type.
1734 (class host_float_ops): New templated type.
1735 (class decimal_float_ops): New type.
1736
1737 (floatformat_to_doublest): Rename to ...
1738 (host_float_ops<T>::from_target): ... this. Use template type T
1739 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1740 (host_float_ops<T>::from_target): New overload using a type argument.
1741 (floatformat_from_doublest): Rename to ...
1742 (host_float_ops<T>::to_target): ... this. Use template type T
1743 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1744 (host_float_ops<T>::to_target): New overload using a type argument.
1745 (floatformat_printf_format): New function.
1746 (struct printf_length_modifier): New templated type.
1747 (floatformat_to_string): Rename to ...
1748 (host_float_ops<T>::to_string): ... this. Use type instead of
1749 floatformat argument. Use floatformat_printf_format and
1750 printf_length_modifier. Remove special handling of invalid numbers,
1751 infinities and NaN (moved to target_float_to_string).
1752 (struct scanf_length_modifier): New templated type.
1753 (floatformat_from_string): Rename to ...
1754 (host_float_ops<T>::from_string): ... this. Use type instead of
1755 floatformat argument. Use scanf_length_modifier.
1756 (floatformat_to_longest): Rename to ...
1757 (host_float_ops<T>::to_longest): ... this. Use type instead of
1758 floatformat argument. Handle out-of-range values deterministically.
1759 (floatformat_from_longest): Rename to ...
1760 (host_float_ops<T>::from_longest): ... this. Use type instead of
1761 floatformat argument.
1762 (floatformat_from_ulongest): Rename to ...
1763 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1764 floatformat argument.
1765 (floatformat_to_host_double): Rename to ...
1766 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1767 floatformat argument.
1768 (floatformat_from_host_double): Rename to ...
1769 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1770 floatformat argument.
1771 (floatformat_convert): Rename to ...
1772 (host_float_ops<T>::convert): ... this. Use type instead of
1773 floatformat arguments. Remove handling of no-op conversions.
1774 (floatformat_binop): Rename to ...
1775 (host_float_ops<T>::binop): ... this. Use type instead of
1776 floatformat arguments.
1777 (floatformat_compare): Rename to ...
1778 (host_float_ops<T>::compare): ... this. Use type instead of
1779 floatformat arguments.
1780
1781 (match_endianness): Use type instead of length/byte_order arguments.
1782 (set_decnumber_context): Likewise.
1783 (decimal_from_number): Likewise. Update calls.
1784 (decimal_to_number): Likewise.
1785 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1786 (decimal_float_ops::to_host_double): New dummy function.
1787 (decimal_float_ops::from_host_double): Likewise.
1788 (decimal_to_string): Rename to ...
1789 (decimal_float_ops::to_string): ... this. Use type instead of
1790 length/byte_order arguments. Update calls.
1791 (decimal_from_string): Rename to ...
1792 (decimal_float_ops::from_string): ... this. Use type instead of
1793 length/byte_order arguments. Update calls.
1794 (decimal_from_longest): Rename to ...
1795 (decimal_float_ops::from_longest): ... this. Use type instead of
1796 length/byte_order arguments. Update calls.
1797 (decimal_from_ulongest): Rename to ...
1798 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1799 length/byte_order arguments. Update calls.
1800 (decimal_to_longest): Rename to ...
1801 (decimal_float_ops::to_longest): ... this. Use type instead of
1802 length/byte_order arguments. Update calls.
1803 (decimal_binop): Rename to ...
1804 (decimal_float_ops::binop): ... this. Use type instead of
1805 length/byte_order arguments. Update calls.
1806 (decimal_compare): Rename to ...
1807 (decimal_float_ops::compare): ... this. Use type instead of
1808 length/byte_order arguments. Update calls.
1809 (decimal_convert): Rename to ...
1810 (decimal_float_ops::convert): ... this. Use type instead of
1811 length/byte_order arguments. Update calls.
1812
1813 (target_float_same_category_p): New function.
1814 (target_float_same_format_p): Likewise.
1815 (target_float_format_length): Likewise.
1816 (enum target_float_ops_kind): New type.
1817 (get_target_float_ops_kind): New function.
1818 (get_target_float_ops): Three new overloaded functions.
1819
1820 (target_float_is_zero): Update call.
1821 (target_float_to_string): Add special handling of invalid numbers,
1822 infinities and NaN (moved from floatformat_to_string). Use
1823 target_float_ops callback.
1824 (target_float_from_string): Use target_float_ops callback.
1825 (target_float_to_longest): Likewise.
1826 (target_float_from_longest): Likewise.
1827 (target_float_from_ulongest): Likewise.
1828 (target_float_to_host_double): Likewise.
1829 (target_float_from_host_double): Likewise.
1830 (target_float_convert): Add special case for no-op conversions.
1831 Use target_float_ops callback.
1832 (target_float_binop): Use target_float_ops callback.
1833 (target_float_compare): Likewise.
1834
a9f26f60
YQ
18352017-11-22 Yao Qi <yao.qi@linaro.org>
1836
1837 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1838
29f9a567
YQ
18392017-11-22 Yao Qi <yao.qi@linaro.org>
1840
1841 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1842 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1843
3b1b69bf
JG
18442017-11-21 Jerome Guitton <guitton@adacore.com>
1845
1846 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1847 with event ptid from the lower layer before doing the
1848 ravenscar-specific update.
1849
54aa6c67
JB
18502017-11-21 Joel Brobecker <brobecker@adacore.com>
1851
1852 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1853 the ptid's TID is nonzero.
1854
cf3fbed4
JB
18552017-11-21 Joel Brobecker <brobecker@adacore.com>
1856
1857 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1858 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1859 Make non-static. Change return type to char *. Adjust code
1860 accordingly. Rewrite the function's documentation.
1861 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1862 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1863 we have enough debugging information in the runtime to support
1864 Ada task debugging before we enable the ravenscar-thread layer.
1865
9edcc12f
JB
18662017-11-21 Joel Brobecker <brobecker@adacore.com>
1867
1868 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1869 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1870 * ravenscar-thread.c: Add into comment.
1871 (base_magic_null_ptid): Delete.
1872 (base_ptid): Change documentation.
1873 (ravenscar_active_task): Renames ravenscar_running_thread.
1874 All callers updated throughout.
1875 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1876 (ravenscar_task_is_currently_active): Likewise.
1877 (get_base_thread_from_ravenscar_task): Ditto.
1878 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1879 (ravenscar_runtime_initialized): Likewise.
1880 (get_running_thread_id): Add new parameter "cpu". Adjust
1881 implementation to handle this new parameter.
1882 (ravenscar_fetch_registers): Small adjustment to use
1883 is_ravenscar_task and ravenscar_task_is_currently_active in
1884 order to decide whether to use the target beneath or this
1885 module's arch_ops.
1886 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1887 (ravenscar_stopped_by_sw_breakpoint): Use
1888 get_base_thread_from_ravenscar_task to get the underlying
1889 thread, rather than using base_ptid.
1890 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1891 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1892 Likewise.
1893 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1894
65d40437
JB
18952017-11-21 Joel Brobecker <brobecker@adacore.com>
1896
1897 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1898 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1899 (get_tcb_types_info): Set fieldnos.base_cpu.
1900 (read_atcb): Set task_info->base_cpu.
1901 (info_task): Print "Base CPU" info if set by runtime.
1902
e02544b2
JB
19032017-11-21 Joel Brobecker <brobecker@adacore.com>
1904
1905 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1906 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1907 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1908 New functions.
1909 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1910 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1911 to_stopped_data_address and to_core_of_thread fields of
1912 ravenscar_ops.
1913
ed0f4273
UW
19142017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1915
1916 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1917 (struct gdbarch_tdep): New member long_double_abi.
1918 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1919 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1920 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1921 format depending on long_double_abi tdep member.
1922 (ppc_floatformat_for_type): Handle __ibm128 type.
1923
0fc76421
SM
19242017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1925
1926 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1927
e6b2f5ef
PA
19282017-11-21 Pedro Alves <palves@redhat.com>
1929
1930 * dwarf2read.c (mapped_index::find_name_components_bounds)
1931 <completion mode, upper bound>: Use std::lower_bound instead of
1932 std::upper_bound.
1933 (test_mapped_index_find_name_component_bounds): Remove incorrect
1934 "t1_fund" from expected symbols.
1935
5c58de74
PA
19362017-11-21 Pedro Alves <palves@redhat.com>
1937
1938 * dwarf2read.c (mapped_index::name_components_casing): New field.
1939 (mapped_index) <build_name_components,
1940 find_name_components_bounds): Declare new methods.
1941 (mapped_index::find_name_components_bounds)
1942 (mapped_index::build_name_components): New methods, factored out
1943 from dw2_expand_symtabs_matching_symbol.
1944 (check_find_bounds_finds)
1945 (test_mapped_index_find_name_component_bounds): New.
1946 (run_test): Rename to ...
1947 (test_dw2_expand_symtabs_matching_symbol): ... this.
1948 (run_test): Reimplement.
1949
e1ef7d7a
PA
19502017-11-21 Pedro Alves <palves@redhat.com>
1951
1952 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1953 (symbol_end): Use cp_ident_is_alnum.
1954 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1955 * dwarf2read.c (make_sort_after_prefix_name): New function.
1956 (dw2_expand_symtabs_matching_symbol): Use it.
1957 (test_symbols): Add more symbols.
1958 (run_test): Add tests.
1959
cf724bc9
TT
19602017-11-17 Tom Tromey <tom@tromey.com>
1961
1962 * symtab.h (enum symbol_subclass_kind): New.
1963 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1964 Remove.
1965 <subclass>: New member.
1966 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1967 * rust-lang.c (rust_get_trait_object_pointer): Update.
1968 * dwarf2read.c (read_func_scope): Update.
1969 (read_variable): Update.
1970
68e745e3
TT
19712017-11-17 Tom Tromey <tom@tromey.com>
1972
1973 * dwarf2read.c (read_func_scope): Update.
1974 * symtab.h (struct template_symbol): Derive from symbol.
1975 <base>: Remove.
1976
71a3c369
TT
19772017-11-17 Tom Tromey <tom@tromey.com>
1978
1979 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1980 (struct rust_vtable_symbol): New.
1981 (find_symbol_at_address): Declare.
1982 * symtab.c (find_symbol_at_address): New function.
1983 * symfile.h (struct quick_symbol_functions)
1984 <find_compunit_symtab_by_address>: New member.
1985 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1986 function.
1987 (debug_sym_quick_functions): Link to
1988 debug_qf_find_compunit_symtab_by_address.
1989 * rust-lang.c (rust_get_trait_object_pointer): New function.
1990 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1991 rust_get_trait_object_pointer.
1992 * psymtab.c (psym_relocate): Clear psymbol_map.
1993 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1994 functions.
1995 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1996 * objfiles.h (struct objfile) <psymbol_map>: New member.
1997 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1998 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1999 (rust_containing_type, read_variable): New functions.
2000
7468702d
SM
20012017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2002
2003 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2004
37269bc9
SM
20052017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2006
2007 * common/filestuff.c: Include <algorithm>.
2008 (open_fds): Change type to std::vector<int>.
2009 (do_mark_open_fd): Adjust.
2010 (unmark_fd_no_cloexec): Adjust.
2011 (do_close): Adjust.
2012
5c632425
SM
20132017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2014
2015 * breakpoint.c (output_thread_groups): Take an std::vector.
2016 (print_one_breakpoint_location): Adjust.
2017
ced9779b
JB
20182017-11-17 Joel Brobecker <brobecker@adacore.com>
2019
2020 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2021 (ada_evaluate_subexp_for_cast): New function.
2022 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2023 ada_evaluate_subexp_for_cast.
2024 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2025 eval_skip_value.
2026 * eval.c (evaluate_var_value): Make non-static.
2027 (evaluate_var_msym_value, eval_skip_value): Likewise.
2028 * value.h (evaluate_var_value, evaluate_var_msym_value)
2029 (eval_skip_value): Declare.
2030
b7e22850
JB
20312017-11-16 Joel Brobecker <brobecker@adacore.com>
2032
2033 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2034 Update all callers.
2035
9ccabccd
PA
20362017-11-16 Pedro Alves <palves@redhat.com>
2037
2038 * python/py-unwind.c (pyuw_sniffer): Translate
2039 PyExc_KeyboardInterrupt to a GDB Quit exception.
2040
d930703d
PA
20412017-11-16 Pedro Alves <palves@redhat.com>
2042
2043 * infrun.c (resume_cleanups): Delete.
2044 (resume): No longer install a resume_cleanups cleanup nor call
2045 QUIT.
2046 (proceed): Pass the terminal to the inferior.
2047 (keep_going_pass_signal): No longer install a resume_cleanups
2048 cleanup.
2049
38dc2859
PA
20502017-11-16 Pedro Alves <palves@redhat.com>
2051
2052 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2053 if the prompt is blocked.
2054
688fca4f
PA
20552017-11-16 Pedro Alves <palves@redhat.com>
2056
2057 * breakpoint.c (insert_bp_location): Replace bp_err and
2058 bp_err_message locals by a gdb_exception local.
2059
e2c33ac7
PA
20602017-11-16 Pedro Alves <palves@redhat.com>
2061
2062 * inflow.c (scoped_ignore_sigttou): New class.
2063 (child_terminal_ours_1, new_tty): Use it.
2064
d7236961
UW
20652017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2066
2067 * target-float.c (decimal_from_number): Add byte_order argument and
2068 call match_endianness. Error if unknown floating-point type.
2069 (decimal_to_number): Add byte_order argument and call match_endianness.
2070 (decimal_from_longest): Update call. Do not call match_endianness.
2071 (decimal_from_ulongest): Likewise.
2072 (decimal_binop): Likewise.
2073 (decimal_is_zero): Likewise.
2074 (decimal_compare): Likewise.
2075 (decimal_convert): Likewise.
2076
d8ae99a7
PM
20772017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2078
2079 * python/python.c (gdbpy_rbreak): New function.
2080 * NEWS: Document Python rbreak feature.
2081
c632b645
YQ
20822017-11-16 Yao Qi <yao.qi@linaro.org>
2083
2084 * features/tic6x-c62x.xml: Remove.
2085 * features/tic6x-c64x.xml: Remove.
2086 * features/tic6x-c64xp.xml: Remove.
2087
a014b87a
JB
20882017-11-15 John Baldwin <jhb@FreeBSD.org>
2089
2090 * symtab.h: Include <array>.
2091
94765011
JB
20922017-11-15 John Baldwin <jhb@FreeBSD.org>
2093
2094 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2095 (bsd_kvm_proc_cmd): Likewise.
2096
625ad440
SM
20972017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2098
2099 * tui/tui-win.c (window_name_completer): Replace VEC with
2100 std::vector.
2101
c0c11fa9
AC
21022017-11-15 Andrew Cagney <cagney@gnu.org>
2103
2104 * MAINTAINERS: Remove no-longer applicable entries.
2105
34a7ebaf
AC
21062017-11-15 Andrew Cagney <cagney@gnu.org>
2107
2108 * MAINTAINERS: Move self to Past Maintainers.
2109
5334ef39
YQ
21102017-11-15 Yao Qi <yao.qi@linaro.org>
2111
2112 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2113 * features/nios2-linux.c: Remove.
2114 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2115 initialize_tdesc_nios2_linux.
2116
a714b0d6
YQ
21172017-11-15 Yao Qi <yao.qi@linaro.org>
2118
2119 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2120 M68HC11_LAST_HARD_REG + 1.
2121
92ffd475
PC
21222017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2123
2124 PR gdb/22388
2125 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2126 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2127 Return TARGET_XFER_EOF if size of returned data is 0.
2128
07431908
SM
21292017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2130
2131 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2132 memory-map-selftests.c.
2133 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2134 * memory-map.c (memory_map_start_memory): Fix computation of hi
2135 address.
2136 * unittests/memory-map-selftests.c: New file.
2137
31432a67
JB
21382017-11-09 Joel Brobecker <brobecker@adacore.com>
2139
2140 * ada-lang.c: Fix some typos in the general command documenting
2141 how Ada expressions are being evaluated and how their result
2142 is printed.
2143
e793c052
TT
21442017-11-09 Tom Tromey <tom@tromey.com>
2145
2146 * psymtab.c (psymbol_hash): Do not hash string contents.
2147 (psymbol_compare): Add comment.
2148
7e8835c5
TT
21492017-11-09 Tom Tromey <tom@tromey.com>
2150
2151 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2152
286acbb5
JB
21532017-11-08 Joel Brobecker <brobecker@adacore.com>
2154
2155 * ada-exp.y (write_var_from_sym): Remove parameter
2156 "orig_left_context". Update all callers.
2157
b44ec619
SM
21582017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2159
2160 * tracepoint.h (class collection_list) <stringify>: Return
2161 std::vector<std::string>.
2162 (encode_actions_rsp): Change parameters to
2163 std::vector<std::string> *.
2164 * tracepoint.c (collection_list::stringify): Return
2165 std::vector<std::string> and adjust accordingly.
2166 (encode_actions_rsp): Changee parameters to
2167 std::vector<std::string> and adjust accordingly.
2168 * remote.c (free_actions_list),
2169 free_actions_list_cleanup_wrapper): Remove.
2170 (remote_download_tracepoint): Adjust to std::vector.
2171
2f4732b0
TT
21722017-11-08 Tom Tromey <tom@tromey.com>
2173
2174 * dwarf2read.c (symbolp): Remove typedef.
2175 (read_func_scope): Use std::vector.
2176 (process_structure_scope): Use std::vector.
2177
f9d67a22
PA
21782017-11-08 Pedro Alves <palves@redhat.com>
2179
2180 * ada-lang.c (ada_make_symbol_completion_list): Use
2181 completion_skip_symbol.
2182 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2183 (symbol_is_function_or_method(symbol*)): New.
2184 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2185 completion_skip_symbol.
2186 (default_collect_symbol_completion_matches_break_on): Use
2187 completion_skip_symbol. Pass down mode.
2188 (collect_file_symbol_completion_matches): Pass down mode.
2189 * symtab.h (symbol_is_function_or_method): New declarations.
2190 (completion_skip_symbol): New template function.
2191
56d87ef7
PA
21922017-11-08 Pedro Alves <palves@redhat.com>
2193
2194 * linespec.c (iterate_over_all_matching_symtabs): Add
2195 search_domain parameter. Pass it down to expand_symtabs_matching.
2196 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2197 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2198 search_domain.
2199 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2200 Pass it down.
2201 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2202 symbols.
2203 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2204 it down.
2205
1b026119
PA
22062017-11-08 Pedro Alves <palves@redhat.com>
2207
2208 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2209 text_len locals and don't pass them down.
2210 * symtab.c (completion_list_add_name): Remove
2211 sym_text/sym_text_len parameters and adjust.
2212 (completion_list_add_symbol, completion_list_add_msymbol)
2213 (completion_list_objc_symbol, completion_list_add_fields)
2214 (add_symtab_completions): Likewise.
2215 (default_collect_symbol_completion_matches_break_on)
2216 (collect_file_symbol_completion_matches): Remove sym_text_len
2217 local and don't pass it down.
2218 * symtab.h (completion_list_add_name): Remove
2219 sym_text/sym_text_len parameters.
2220
c62446b1
PA
22212017-11-08 Pedro Alves <palves@redhat.com>
2222
2223 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2224 unittests/lookup_name_info-selftests.c.
2225 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2226 * cp-support.c: Include "selftest.h".
2227 (cp_remove_params_1): Rename from cp_remove_params. Add
2228 'require_param' parameter, and handle it.
2229 (cp_remove_params): Reimplement.
2230 (cp_remove_params_if_any): New.
2231 (selftests::quote): New.
2232 (selftests::check_remove_params): New.
2233 (selftests::test_cp_remove_params): New.
2234 (_initialize_cp_support): Install
2235 selftests::test_cp_remove_params.
2236 * cp-support.h (cp_remove_params_if_any): Declare.
2237 * dwarf2read.c :Include "selftest.h".
2238 (dw2_expand_symtabs_matching_symbol): Use
2239 lookup_name_info::make_ignore_params.
2240 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2241 (selftests::dw2_expand_symtabs_matching::string_or_null)
2242 (selftests::dw2_expand_symtabs_matching::check_match)
2243 (selftests::dw2_expand_symtabs_matching::test_symbols)
2244 (selftests::dw2_expand_symtabs_matching::run_test): New.
2245 (_initialize_dwarf2_read): Register
2246 selftests::dw2_expand_symtabs_matching::run_test.
2247 * psymtab.c (psym_expand_symtabs_matching): Use
2248 lookup_name_info::make_ignore_params.
2249 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2250 If the lookup name wants to ignore parameters, strip them.
2251 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2252 code handling '('.
2253 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2254 (default_collect_symbol_completion_matches_break_on): Don't try to
2255 strip parameters.
2256 * symtab.h (lookup_name_info::lookup_name_info): Add
2257 'ignore_parameters' parameter.
2258 (lookup_name_info::ignore_parameters)
2259 (lookup_name_info::make_ignore_params): New methods.
2260 (lookup_name_info::m_ignore_parameters): New field.
2261 * unittests/lookup_name_info-selftests.c: New file.
2262
61920122
PA
22632017-11-08 Pedro Alves <palves@redhat.com>
2264
2265 * dwarf2read.c (dw2_expand_marked_cus)
2266 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2267 (dw2_expand_symtabs_matching): Move further below.
2268 (dw2_expand_marked_cus): Reindent.
2269
3f563c84
PA
22702017-11-08 Pedro Alves <palves@redhat.com>
2271
2272 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2273 (struct name_component): New.
2274 (mapped_index::name_components): New field.
2275 (mapped_index::symbol_name_at): New method.
2276 (dwarf2_read_index): Call mapped_index ctor.
2277 (dw2_map_matching_symbols): Add comment about name_components
2278 table.
2279 (dw2_expand_symtabs_matching): Factor part to...
2280 (dw2_expand_symtabs_matching_symbol): ... this new function.
2281 Build name components table, and lookup symbols in it before
2282 calling the name matcher.
2283 (dw2_expand_marked_cus): New, factored out from
2284 dw2_expand_symtabs_matching.
2285 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2286
b5ec771e
PA
22872017-11-08 Pedro Alves <palves@redhat.com>
2288
2289 * ada-lang.c (ada_encode): Rename to ..
2290 (ada_encode_1): ... this. Add throw_errors parameter and handle
2291 it.
2292 (ada_encode): Reimplement.
2293 (match_name): Delete, folded into full_name.
2294 (resolve_subexp): No longer pass the encoded name to
2295 ada_lookup_symbol_list.
2296 (should_use_wild_match): Delete.
2297 (name_match_type_from_name): New.
2298 (ada_lookup_simple_minsym): Use lookup_name_info and the
2299 language's symbol_name_matcher_ftype.
2300 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2301 (ada_add_block_renamings): Adjust to use lookup_name_info.
2302 (ada_lookup_name): New.
2303 (add_nonlocal_symbols, ada_add_all_symbols)
2304 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2305 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2306 (ada_name_for_lookup): Delete.
2307 (ada_lookup_encoded_symbol): Construct a verbatim name.
2308 (wild_match): Reverse sense of return type. Use bool.
2309 (full_match): Reverse sense of return type. Inline bits of old
2310 match_name here.
2311 (ada_add_block_symbols): Adjust to use lookup_name_info.
2312 (symbol_completion_match): Delete, folded into...
2313 (ada_lookup_name_info::matches): ... .this new method.
2314 (symbol_completion_add): Delete.
2315 (ada_collect_symbol_completion_matches): Add name_match_type
2316 parameter. Adjust to use lookup_name_info and
2317 completion_list_add_name.
2318 (get_var_value, ada_add_global_exceptions): Adjust to use
2319 lookup_name_info.
2320 (ada_get_symbol_name_cmp): Delete.
2321 (do_wild_match, do_full_match): New functions.
2322 (ada_lookup_name_info::ada_lookup_name_info): New method.
2323 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2324 functions.
2325 (ada_language_defn): Install ada_get_symbol_name_matcher.
2326 * ada-lex.l (processId): If name starts with '<', copy it
2327 verbatim.
2328 * block.c (block_iter_match_step, block_iter_match_first)
2329 (block_iter_match_next, block_lookup_symbol)
2330 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2331 lookup_name_info.
2332 * block.h (block_iter_match_first, block_iter_match_next)
2333 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2334 * c-lang.c (c_language_defn, cplus_language_defn)
2335 (asm_language_defn, minimal_language_defn): Adjust comments to
2336 refer to la_get_symbol_name_matcher.
2337 * completer.c (complete_files_symbols)
2338 (collect_explicit_location_matches, symbol_completer): Pass a
2339 symbol_name_match_type down.
2340 * completer.h (class completion_match, completion_match_result):
2341 New classes.
2342 (completion_tracker::reset_completion_match_result): New method.
2343 (completion_tracker::m_completion_match_result): New field.
2344 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2345 lookup_name_info.
2346 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2347 functions.
2348 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2349 * d-lang.c: Adjust comments to refer to
2350 la_get_symbol_name_matcher.
2351 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2352 Adjust to use lookup_name_info.
2353 (dict_iter_match_first, dict_iter_match_next)
2354 (iter_match_first_hashed, iter_match_next_hashed)
2355 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2356 with a lookup_name_info.
2357 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2358 Likewise.
2359 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2360 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2361 (gdb_index_symbol_name_matcher): New class.
2362 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2363 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2364 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2365 with a symbol_name_match_type.
2366 (f_language_defn): Adjust comments to refer to
2367 la_get_symbol_name_matcher.
2368 * go-lang.c (go_language_defn): Adjust comments to refer to
2369 la_get_symbol_name_matcher.
2370 * language.c (default_symbol_name_matcher)
2371 (language_get_symbol_name_matcher): New functions.
2372 (unknown_language_defn, auto_language_defn): Adjust comments to
2373 refer to la_get_symbol_name_matcher.
2374 * language.h (symbol_name_cmp_ftype): Delete.
2375 (language_defn) <la_collect_symbol_completion_matches>: Add match
2376 type parameter.
2377 <la_get_symbol_name_cmp>: Delete field.
2378 <la_get_symbol_name_matcher>: New field.
2379 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2380 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2381 Declare.
2382 * linespec.c (iterate_over_all_matching_symtabs)
2383 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2384 (find_methods): Add language parameter, and use lookup_name_info
2385 and the language's symbol_name_matcher_ftype.
2386 (linespec_complete_function): Adjust.
2387 (lookup_prefix_sym): Use lookup_name_info.
2388 (add_all_symbol_names_from_pspace): Adjust.
2389 (find_superclass_methods): Add language parameter and pass it
2390 down.
2391 (find_method): Pass symbol language down.
2392 (find_linespec_symbols): Don't demangle or Ada encode here.
2393 (search_minsyms_for_name): Add lookup_name_info parameter.
2394 (add_matching_symbols_to_info): Add name_match_type parameter.
2395 Use lookup_name_info.
2396 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2397 la_get_symbol_name_matcher.
2398 * minsyms.c: Include <algorithm>.
2399 (add_minsym_to_demangled_hash_table): Remove table parameter and
2400 add objfile parameter. Use search_name_hash, and add language to
2401 demangled languages vector.
2402 (struct found_minimal_symbols): New struct.
2403 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2404 New functions.
2405 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2406 input names here. Use lookup_name_info instead. Lookup up
2407 demangled names once for each language in the demangled names
2408 vector.
2409 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2410 demangled names once for each language in the demangled names
2411 vector.
2412 (build_minimal_symbol_hash_tables): Adjust.
2413 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2414 lookup_name_info.
2415 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2416 la_get_symbol_name_matcher.
2417 * objfiles.h: Include <vector>.
2418 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2419 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2420 la_get_symbol_name_matcher.
2421 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2422 la_get_symbol_name_matcher.
2423 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2424 (match_partial_symbol): Use symbol_name_match_type,
2425 lookup_name_info and psymbol_name_matches.
2426 (lookup_partial_symbol): Use lookup_name_info.
2427 (map_block): Use symbol_name_match_type and lookup_name_info.
2428 (psym_map_matching_symbols): Use symbol_name_match_type.
2429 (psymbol_name_matches): New.
2430 (recursively_search_psymtabs): Use lookup_name_info and
2431 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2432 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2433 'kind' parameter to 'domain'.
2434 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2435 la_get_symbol_name_matcher.
2436 * symfile-debug.c (debug_qf_map_matching_symbols)
2437 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2438 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2439 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2440 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2441 Adjust to use symbol_name_match_type.
2442 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2443 (expand_symtabs_matching): Adjust to use lookup_name_info.
2444 * symmisc.c (maintenance_expand_symtabs): Use
2445 lookup_name_info::match_any ().
2446 * symtab.c (symbol_matches_search_name): New.
2447 (eq_symbol_entry): Adjust to use lookup_name_info and the
2448 language's matcher.
2449 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2450 (lookup_name_info::match_any): New.
2451 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2452 (compare_symbol_name): Add language, lookup_name_info and
2453 completion_match_result parameters, and use them.
2454 (completion_list_add_name): Make extern. Add language and
2455 lookup_name_info parameters. Use them.
2456 (completion_list_add_symbol, completion_list_add_msymbol)
2457 (completion_list_objc_symbol): Add lookup_name_info parameters and
2458 adjust. Pass down language.
2459 (completion_list_add_fields): Add lookup_name_info parameters and
2460 adjust. Pass down language.
2461 (add_symtab_completions): Add lookup_name_info parameters and
2462 adjust.
2463 (default_collect_symbol_completion_matches_break_on): Add
2464 name_match_type parameter, and use it. Use lookup_name_info.
2465 (default_collect_symbol_completion_matches)
2466 (collect_symbol_completion_matches): Add name_match_type
2467 parameter, and pass it down.
2468 (collect_symbol_completion_matches_type): Adjust.
2469 (collect_file_symbol_completion_matches): Add name_match_type
2470 parameter, and use lookup_name_info.
2471 * symtab.h: Include <string> and "common/gdb_optional.h".
2472 (enum class symbol_name_match_type): New.
2473 (class ada_lookup_name_info): New.
2474 (struct demangle_for_lookup_info): New.
2475 (class lookup_name_info): New.
2476 (symbol_name_matcher_ftype): New.
2477 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2478 (symbol_matches_search_name): Declare.
2479 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2480 (default_collect_symbol_completion_matches)
2481 (collect_symbol_completion_matches)
2482 (collect_file_symbol_completion_matches): Add name_match_type
2483 parameter.
2484 (iterate_over_symbols): Use lookup_name_info.
2485 (completion_list_add_name): Declare.
2486 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2487 (strncmp_iw_with_mode): Now extern.
2488 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2489 (strncmp_iw_with_mode): Declare.
2490
5ffa0793
PA
24912017-11-08 Keith Seitz <keiths@redhat.com>
2492 Pedro Alves <palves@redhat.com>
2493
2494 * ada-lang.c (ada_language_defn): Install
2495 default_search_name_hash.
2496 * buildsym.c (struct buildsym_compunit): <language>: New field.
2497 (finish_block_internal): Pass language when creating dictionaries.
2498 (start_buildsym_compunit, start_symtab): New language parameters.
2499 Use them.
2500 (restart_symtab): Pass down compilation unit's language.
2501 * buildsym.h (enum language): Forward declare.
2502 (start_symtab): New 'language' parameter.
2503 * c-lang.c (c_language_defn, cplus_language_defn)
2504 (asm_language_defn, minimal_language_defn): Install
2505 default_search_name_hash.
2506 * coffread.c (coff_start_symtab): Adjust.
2507 * d-lang.c (d_language_defn): Install default_search_name_hash.
2508 * dbxread.c (struct symloc): Add 'pst_language' field.
2509 (PST_LANGUAGE): Define.
2510 (start_psymtab, read_ofile_symtab): Use it.
2511 (process_one_symbol): New 'language' parameter. Pass it down.
2512 * dictionary.c (struct dictionary) <language>: New field.
2513 (DICT_LANGUAGE): Define.
2514 (dict_create_hashed, dict_create_hashed_expandable)
2515 (dict_create_linear, dict_create_linear_expandable): New parameter
2516 'language'. Set the dictionary's language.
2517 (iter_match_first_hashed): Adjust to rename.
2518 (insert_symbol_hashed): Assert we don't see mismatching
2519 languages. Adjust to rename.
2520 (dict_hash): Rename to ...
2521 (default_search_name_hash): ... this and make extern.
2522 * dictionary.h (struct language_defn): Forward declare.
2523 (dict_create_hashed): New parameter 'language'.
2524 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2525 * f-lang.c (f_language_defn): Install default_search_name_hash.
2526 * go-lang.c (go_language_defn): Install default_search_name_hash.
2527 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2528 creation.
2529 * language.c (unknown_language_defn, auto_language_defn):
2530 * language.h (language_defn::la_search_name_hash): New field.
2531 (default_search_name_hash): Declare.
2532 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2533 * mdebugread.c (new_block): New parameter 'language'.
2534 * mdebugread.c (parse_symbol): Pass symbol language to block
2535 allocation.
2536 (psymtab_to_symtab_1): Pass down language.
2537 (new_symtab): Pass compunit's language to block allocation.
2538 * objc-lang.c (objc_language_defn): Install
2539 default_search_name_hash.
2540 * opencl-lang.c (opencl_language_defn):
2541 * p-lang.c (pascal_language_defn): Install
2542 default_search_name_hash.
2543 * rust-lang.c (rust_language_defn): Install
2544 default_search_name_hash.
2545 * stabsread.h (enum language): Forward declare.
2546 (process_one_symbol): Add 'language' parameter.
2547 * symtab.c (search_name_hash): New function.
2548 * symtab.h (search_name_hash): Declare.
2549 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2550
2a1dde5d
PA
25512017-11-08 Pedro Alves <palves@redhat.com>
2552
2553 * cp-name-parser.y (main): Don't initialize extra_chars.
2554
95a6b0a1
TT
25552017-11-07 Tom Tromey <tom@tromey.com>
2556
2557 * event-top.h (command_handler): Constify.
2558 * record-full.c (cmd_record_full_start): Update.
2559 * thread.c (thread_apply_all_command): Update.
2560 * printcmd.c (eval_command): Update.
2561 * mi/mi-main.c (mi_execute_cli_command): Update.
2562 (mi_execute_async_cli_command): Update.
2563 * tui/tui-stack.c (tui_update_command): Update.
2564 * cli/cli-interp.c (safe_execute_command): Constify.
2565 * record.c (record_start): Update.
2566 (record_start, record_stop, cmd_record_start): Update.
2567 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2568 (cmd_record_btrace_pt_start): Update.
2569 (cmd_record_btrace_start): Update.
2570 (cmd_record_btrace_start): Update.
2571 * reverse.c (exec_reverse_once): Update.
2572 * python/python.c (execute_gdb_command): Don't copy the command.
2573 * event-top.c (command_line_handler): Update.
2574 (command_handler): Constify.
2575 * defs.h (deprecated_call_command_hook): Constify.
2576 * cli/cli-script.h (execute_user_command): Constify.
2577 * cli/cli-script.c (execute_user_command): Constify.
2578 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2579 (enum command_control_type): Update.
2580 * main.c (catch_command_errors): Remove non-const overload.
2581 (catch_command_errors_ftype): Remove.
2582 * python/py-cmd.c (cmdpy_function): Constify.
2583 * guile/scm-cmd.c (cmdscm_function): Constify.
2584 * cli/cli-dump.c (call_dump_func): Constify.
2585 * cli/cli-decode.c (do_const_cfunc): Constify.
2586 (do_sfunc): Constify.
2587 (cmd_func): Constify.
2588 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2589 * top.h (execute_command): Constify.
2590 * top.c (execute_command): Constify.
2591 (execute_command_to_string): Constify.
2592 (deprecated_call_command_hook): Constify.
2593 * command.h (cmd_func): Constify.
2594 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2595
eb4c3f4a
TT
25962017-11-07 Tom Tromey <tom@tromey.com>
2597
2598 * ada-lang.c (catch_ada_exception_command): Constify.
2599 (catch_assert_command): Constify.
2600 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2601 (catch_rethrow_command): Constify.
2602 (catch_exception_command_1): Constify.
2603 * breakpoint.h (add_catch_command): Constify.
2604 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2605 (catch_syscall_split_args): Constify.
2606 * break-catch-sig.c (catch_signal_command): Constify.
2607 (catch_signal_split_args): Constify.
2608 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2609 cmd_const_sfunc_ftype.
2610 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2611 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2612 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2613 (add_setshow_string_cmd, struct cmd_list_element)
2614 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2615 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2616 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2617 Constify.
2618 (set_cmd_sfunc): Constify.
2619 (empty_sfunc): Constify.
2620 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2621 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2622 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2623 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2624 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2625 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2626 Constify.
2627 (set_cmd_sfunc): Constify.
2628 (cmd_sfunc_ftype): Remove.
2629 * compile/compile.c (set_compile_args): Constify.
2630 * infrun.c (set_disable_randomization): Constify.
2631 * infcmd.c (set_args_command, set_cwd_command): Constify.
2632 * breakpoint.c (set_condition_evaluation_mode): Constify.
2633 (add_catch_command): Constify.
2634 (catch_fork_command_1, catch_exec_command_1)
2635 (catch_load_command_1, catch_unload_command_1): Constify.
2636 (catch_load_or_unload): Constify.
2637 * guile/scm-param.c (pascm_set_func): Constify.
2638 (add_setshow_generic): Constify.
2639 * python/py-param.c (get_set_value): Constify.
2640 * top.h (set_verbose): Constify.
2641 * tui/tui-win.c (tui_set_var_cmd): Constify.
2642 * mi/mi-main.c (set_mi_async_command): Constify.
2643 * cli/cli-logging.c (set_logging_overwrite)
2644 (set_logging_redirect): Constify.
2645 * value.c (set_max_value_size): Constify.
2646 * valprint.c (set_input_radix, set_output_radix): Constify.
2647 * utils.c (set_width_command, set_height_command): Constify.
2648 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2649 * tracepoint.c (set_disconnected_tracing)
2650 (set_circular_trace_buffer, set_trace_buffer_size)
2651 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2652 * top.c (set_history_size_command, set_verbose, set_editing)
2653 (set_gdb_datadir, set_history_filename): Constify.
2654 * target.c (set_targetdebug, maint_set_target_async_command)
2655 (maint_set_target_non_stop_command, set_target_permissions)
2656 (set_write_memory_permission): Constify.
2657 (open_target): Constify.
2658 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2659 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2660 * symtab.c (set_symbol_cache_size_handler): Constify.
2661 * symfile.c (set_ext_lang_command): Constify.
2662 * symfile-debug.c (set_debug_symfile): Constify.
2663 * source.c (set_directories_command): Constify.
2664 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2665 * serial.c (set_parity): Constify.
2666 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2667 * remote.c (set_remote_exec_file, set_remotebreak)
2668 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2669 * record.c (set_record_insn_history_size)
2670 (set_record_call_history_size): Constify.
2671 * record-full.c (set_record_full_insn_max_num): Constify.
2672 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2673 * osabi.c (set_osabi): Constify.
2674 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2675 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2676 * maint.c (maintenance_set_profile_cmd): Constify.
2677 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2678 * language.c (set_language_command, set_range_command)
2679 (set_case_command): Constify.
2680 * infrun.c (set_non_stop, set_observer_mode)
2681 (set_stop_on_solib_events, set_schedlock_func)
2682 (set_exec_direction_func): Constify.
2683 * infcmd.c (set_inferior_tty_command): Constify.
2684 * disasm.c (set_disassembler_options_sfunc): Constify.
2685 * demangle.c (set_demangling_command): Constify.
2686 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2687 * cris-tdep.c (set_cris_version, set_cris_mode)
2688 (set_cris_dwarf2_cfi): Constify.
2689 * corefile.c (set_gnutarget_command): Constify.
2690 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2691 (set_target_wide_charset_sfunc): Constify.
2692 * breakpoint.c (update_dprintf_commands): Constify.
2693 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2694 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2695 (set_disassembly_style_sfunc): Constify.
2696 * arch-utils.c (set_endian, set_architecture): Constify.
2697 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2698 * agent.c (set_can_use_agent): Constify.
2699
5fed81ff
TT
27002017-11-07 Tom Tromey <tom@tromey.com>
2701
2702 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2703 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2704 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2705 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2706 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2707 (parse_int_arg, show_thread_default_detach_sc_cmd)
2708 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2709 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2710 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2711 (show_task_pause_cmd, set_task_detach_sc_cmd)
2712 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2713 (set_noninvasive_cmd, set_thread_pause_cmd)
2714 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2715 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2716 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2717 * windows-nat.c (display_selectors): Constify.
2718 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2719 non-const "cfunc".
2720 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2721 (cmd_cfunc_eq): Likewise.
2722 (struct cmd_list_element): Likewise.
2723 (do_cfunc): Remove.
2724 (cli_user_command_p): Update.
2725 * command.h (add_cmd): Remove non-const overload.
2726 (cmd_cfunc_ftype): Remove typedef.
2727 (cmd_cfunc_eq): Remove non-const overload.
2728 * value.c (show_values): Constify.
2729 * thread.c (thread_apply_all_command): Constify.
2730 * symfile.c (load_command): Constify.
2731 * source.c (directory_command): Constify.
2732 * maint.c (maintenance_internal_error)
2733 (maintenance_demangler_warning, maintenance_space_display)
2734 (maintenance_print_architecture, maintenance_translate_address)
2735 (maintenance_info_selftests, maintenance_internal_warning):
2736 Constify.
2737 * breakpoint.c (disable_trace_command, enable_trace_command):
2738 Constify.
2739 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2740 Constify.
2741 (add_auto_load_safe_path): Constify.
2742 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2743 * top.h (show_commands): Constify.
2744 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2745 * sparc64-tdep.c (adi_examine_command): Constify.
2746 (adi_assign_command): Constify.
2747
1d12d88f
TT
27482017-11-07 Tom Tromey <tom@tromey.com>
2749
2750 * frame.h (info_locals_command, info_args_command): Constify.
2751 * auto-load.h (auto_load_info_scripts): Constify.
2752 * inferior.h (registers_info): Constify.
2753 * copying.c: Rebuild.
2754 * copying.awk: Constify generated commands.
2755 * auto-load.c (auto_load_info_scripts)
2756 (info_auto_load_gdb_scripts): Constify.
2757 * cli/cli-decode.c (struct cmd_list_element): Take a
2758 cmd_const_cfunc_ftype.
2759 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2760 * tui/tui-win.c (tui_all_windows_info): Constify.
2761 * python/py-auto-load.c (info_auto_load_python_scripts):
2762 Constify.
2763 * cli/cli-cmds.c (show_command): Remove non-const overload.
2764 * tracepoint.c (info_tvariables_command, info_scope_command):
2765 Constify.
2766 (info_static_tracepoint_markers_command): Constify.
2767 * thread.c (info_threads_command): Constify.
2768 (print_thread_info_1): Constify.
2769 * target.c (info_target_command): Constify.
2770 * symtab.c (info_sources_command, info_functions_command)
2771 (info_types_command): Constify.
2772 (info_variables_command): Remove non-const overload.
2773 * symfile.c (info_ext_lang_command): Constify.
2774 * stack.c (info_frame_command, info_locals_command)
2775 (info_args_command): Constify.
2776 (backtrace_command): Remove non-const overload.
2777 * source.c (info_source_command, info_line_command): Constify.
2778 * solib.c (info_sharedlibrary_command): Constify.
2779 * skip.c (info_skip_command): Constify.
2780 * ser-go32.c (info_serial_command): Constify.
2781 * reverse.c (info_bookmarks_command): Constify.
2782 * printcmd.c (info_symbol_command, info_address_command)
2783 (info_display_command): Constify.
2784 * osdata.c (info_osdata_command): Constify.
2785 * objc-lang.c (info_selectors_command, info_classes_command):
2786 Constify.
2787 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2788 * memattr.c (info_mem_command): Constify.
2789 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2790 * linux-fork.c (info_checkpoints_command): Constify.
2791 * infrun.c (info_signals_command): Constify.
2792 * inflow.c (info_terminal_command): Constify.
2793 * inferior.c (info_inferiors_command): Constify.
2794 (print_inferior): Constify.
2795 * infcmd.c (info_program_command, info_all_registers_command)
2796 (info_registers_command, info_vector_command)
2797 (info_float_command): Constify.
2798 (registers_info): Constify.
2799 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2800 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2801 Constify.
2802 * f-valprint.c (info_common_command): Constify.
2803 * dcache.c (info_dcache_command): Constify.
2804 (dcache_info_1): Constify.
2805 * darwin-nat-info.c (info_mach_tasks_command)
2806 (info_mach_task_command, info_mach_ports_command)
2807 (info_mach_port_command, info_mach_threads_command)
2808 (info_mach_thread_command, info_mach_regions_command)
2809 (info_mach_regions_recurse_command, info_mach_region_command)
2810 (info_mach_exceptions_command): Constify.
2811 (get_task_from_args): Constify.
2812 * cp-support.c (info_vtbl_command): Constify.
2813 * breakpoint.c (info_watchpoints_command)
2814 (info_tracepoints_command): Constify.
2815 (info_breakpoints_command): Remove non-const overload.
2816 * avr-tdep.c (avr_io_reg_read_command): Constify.
2817 * auxv.c (info_auxv_command): Constify.
2818 * ada-tasks.c (info_tasks_command): Constify.
2819 (info_task): Constify.
2820 * ada-lang.c (info_exceptions_command): Constify.
2821
0b39b52e
TT
28222017-11-07 Tom Tromey <tom@tromey.com>
2823
2824 * solib.h (no_shared_libraries): Constify.
2825 * frame.h (return_command): Constify.
2826 * cli/cli-cmds.h (quit_command): Constify.
2827 * top.h (quit_command, execute_command): Constify.
2828 * target.h (flash_erase_command): Constify.
2829 * inferior.h (set_inferior_args, attach_command): Constify.
2830 * tracepoint.h (start_tracing, stop_tracing): Constify.
2831 * breakpoint.h (break_command, tbreak_command)
2832 (hbreak_command_wrapper, thbreak_command_wrapper)
2833 (rbreak_command_wrapper, watch_command_wrapper)
2834 (awatch_command_wrapper, rwatch_command_wrapper)
2835 (get_tracepoint_by_number): Constify.
2836 * symtab.c (info_variables_command, rbreak_command)
2837 (symtab_symbol_info): Constify.
2838 (info_variables_command): Add non-const overload.
2839 * top.c (dont_repeat_command): Constify.
2840 * breakpoint.c (ignore_command, commands_command)
2841 (condition_command, tbreak_command, hbreak_command)
2842 (thbreak_command, clear_command, break_command)
2843 (info_breakpoints_command, watch_command, rwatch_command)
2844 (awatch_command, trace_command, ftrace_command, strace_command)
2845 (trace_pass_command, break_range_command, dprintf_command)
2846 (agent_printf_command, get_tracepoint_by_number)
2847 (watch_maybe_just_location, trace_pass_command): Constify.
2848 (info_breakpoints_command): Add non-const overload.
2849 * tracefile.c (tsave_command): Constify.
2850 * infcmd.c (attach_command, disconnect_command, signal_command)
2851 (queue_signal_command, stepi_command, nexti_command)
2852 (finish_command, next_command, step_command, until_command)
2853 (advance_command, jump_command, continue_command, run_command)
2854 (start_command, starti_command, interrupt_command)
2855 (run_command_1, set_inferior_args, step_1): Constify.
2856 * inferior.c (add_inferior_command, remove_inferior_command)
2857 (clone_inferior_command): Constify.
2858 * linux-fork.c (checkpoint_command, restart_command): Constify.
2859 * windows-nat.c (signal_event_command): Constify.
2860 * guile/guile.c (guile_repl_command, guile_command): Constify.
2861 * printcmd.c (x_command, display_command, printf_command)
2862 (output_command, set_command, call_command, print_command)
2863 (eval_command): Constify.
2864 (non_const_set_command): Remove.
2865 (_initialize_printcmd): Update.
2866 * source.c (forward_search_command, reverse_search_command):
2867 Constify.
2868 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2869 Constify.
2870 * infrun.c (handle_command): Constify.
2871 * memattr.c (mem_command): Constify.
2872 * stack.c (return_command, up_command, up_silently_command)
2873 (down_command, down_silently_command, frame_command)
2874 (backtrace_command, func_command, backtrace_command_1): Constify.
2875 (backtrace_command): Add non-const overload.
2876 * remote-sim.c (simulator_command): Constify.
2877 * exec.c (set_section_command): Constify.
2878 * tracepoint.c (tdump_command, trace_variable_command)
2879 (tstatus_command, tstop_command, tstart_command)
2880 (end_actions_pseudocommand, while_stepping_pseudocommand)
2881 (collect_pseudocommand, teval_pseudocommand, actions_command)
2882 (start_tracing, stop_tracing): Constify.
2883 * value.c (init_if_undefined_command): Constify.
2884 * tui/tui-stack.c (tui_update_command): Constify.
2885 * tui/tui-win.c (tui_refresh_all_command)
2886 (tui_set_tab_width_command, tui_set_win_height_command)
2887 (tui_set_focus_command, tui_scroll_forward_command)
2888 (tui_scroll_backward_command, tui_scroll_left_command)
2889 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2890 (tui_set_win_height): Constify.
2891 * tui/tui-layout.c (tui_layout_command): Constify.
2892 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2893 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2894 (proc_untrace_sysexit_cmd): Constify.
2895 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2896 (threadset_test_cmd, threadlist_update_test_cmd)
2897 (threadalive_test): Constify.
2898 * objc-lang.c (print_object_command): Constify.
2899 * command.h (add_com): Constify.
2900 * cli/cli-dump.c (restore_command): Constify.
2901 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2902 (help_command, complete_command, shell_command, edit_command)
2903 (list_command, disassemble_command, make_command)
2904 (apropos_command, alias_command): Constify.
2905 * cli/cli-script.c (document_command, define_command)
2906 (while_command, if_command, validate_comname): Constify.
2907 * cli/cli-decode.c (struct cmd_list_element): Change type of
2908 "fun".
2909 * target.c (do_monitor_command, flash_erase_command): Constify.
2910 * regcache.c (reg_flush_command): Constify.
2911 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2912 (reverse_nexti, reverse_continue, reverse_finish)
2913 (save_bookmark_command, goto_bookmark_command)
2914 (exec_reverse_once): Constify.
2915 * python/python.c (python_interactive_command, python_command):
2916 Constify.
2917 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2918 Constify.
2919 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2920 * gcore.c (gcore_command): Constify.
2921
85c4be7c
TT
29222017-11-07 Tom Tromey <tom@tromey.com>
2923
2924 * printcmd.c (x_command): Call set_repeat_arguments.
2925 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2926 * top.c (repeat_arguments): New global.
2927 (set_repeat_arguments): New function.
2928 (execute_command): Handle repeat_arguments.
2929 (show_commands): Calls set_repeat_arguments.
2930 * command.h (set_repeat_arguments): Declare.
2931
022643b4
TT
29322017-11-07 Tom Tromey <tom@tromey.com>
2933
2934 * stack.c (backtrace_command): Use std::string.
2935 (backtrace_command_1): Make "count_exp" const.
2936
5614fb77
TT
29372017-11-07 Tom Tromey <tom@tromey.com>
2938
2939 * source.c (directory_switch, mod_path, add_path): Constify.
2940 * defs.h (add_path, mod_path, directory_switch): Constify.
2941 * mi/mi-cmd-env.c (env_mod_path): Constify.
2942
6be9a197
TT
29432017-11-07 Tom Tromey <tom@tromey.com>
2944
2945 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2946 (run_command_1, continue_command, step_1, jump_command)
2947 (signal_command, until_command, advance_command, finish_command)
2948 (attach_command): Update.
2949
c2252c0d
TT
29502017-11-07 Tom Tromey <tom@tromey.com>
2951
2952 * command.h (set_cmd_cfunc): Don't declare.
2953 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2954
1ee870c5
TT
29552017-11-07 Tom Tromey <tom@tromey.com>
2956
2957 * stack.c (select_frame_command): Constify.
2958 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2959 * command.h (add_com_suppress_notification): Constify.
2960
ee7ddd71
TT
29612017-11-07 Tom Tromey <tom@tromey.com>
2962
2963 * breakpoint.c (stop_command): Constify.
2964 * cli/cli-decode.c (struct cmd_list_element): Constify.
2965 * command.h (add_abbrev_prefix_cmd): Constify.
2966
95e95a6d
PA
29672017-11-07 Pedro Alves <palves@redhat.com>
2968
2969 * breakpoint.c (extract_bp_kind): New enum.
2970 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2971 factored out from ...
2972 (extract_bp_number_and_location): ... here.
2973 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2974
cc638e86
PA
29752017-11-07 Pedro Alves <palves@redhat.com>
2976
2977 * breakpoint.c (extract_bp_number_and_location): Change return
2978 type to void. Throw error instead of warning.
2979 (enable_disable_command): Adjust.
2980
d0fe4701
XR
29812017-11-07 Xavier Roirand <roirand@adacore.com>
2982 Pedro Alves <palves@redhat.com>
2983
2984 * breakpoint.c (map_breakpoint_number_range): New, factored out
2985 from ...
2986 (map_breakpoint_numbers): ... here.
2987 (find_location_by_number): Change parameters from string to
2988 breakpoint number and location.
2989 (extract_bp_number_and_location): New function.
2990 (enable_disable_bp_num_loc)
2991 (enable_disable_breakpoint_location_range)
2992 (enable_disable_command): New functions, factored out ...
2993 (enable_command, disable_command): ... these functions, and
2994 adjusted to support ranges.
2995 * NEWS: Document enable/disable breakpoint location range feature.
2996
635dc5b2
LM
29972017-11-06 Luis Machado <luis.machado@linaro.org>
2998
2999 * MAINTAINERS (Write After Approval): Update my e-mail address.
3000
556e5da5
PA
30012017-11-06 Pedro Alves <palves@redhat.com>
3002
3003 * gnu-nat.c (gnu_terminal_init): Delete.
3004 (gnu_target): Don't install gnu_terminal_init.
3005 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3006 (child_terminal_init): ... this function.
3007
d1928160
PA
30082017-11-06 Pedro Alves <palves@redhat.com>
3009
3010 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3011 sgtty.h.
3012 * config.in, configure: Regenerate.
3013
6aa899ce
PA
30142017-11-06 Pedro Alves <palves@redhat.com>
3015
3016 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3017 (async_init_signals): Adjust.
3018 (handle_stop_sig): Rename to ...
3019 (handle_sigtstp): ... this.
3020 (async_stop_sig): Rename to ...
3021 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3022 SIGTSTP path.
3023 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3024 instead of STOP_SIGNAL thoughout.
3025 (handle_stop_sig): Rename to ...
3026 (handle_sigtstp): ... this.
3027 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3028
a94799ac
PA
30292017-11-06 Pedro Alves <palves@redhat.com>
3030
3031 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3032 longer set flags twice in row.
3033
726e1356
PA
30342017-11-06 Pedro Alves <palves@redhat.com>
3035
3036 * Makefile.in (SER_HARDWIRE): Update comment.
3037 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3038 * common/gdb_termios.h: Delete file.
3039 * common/job-control.c: Include termios.h and unistd.h instead of
3040 gdb_termios.h.
3041 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3042 check.
3043 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3044 Remove sgtty code.
3045 * configure.ac: No longer check for termio.h and sgtty.h.
3046 * configure: Regenerate.
3047 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3048 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3049 Replace PROCESS_GROUP_TYPE references with pid_t references
3050 throughout.
3051 (gdb_getpgrp): Delete.
3052 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3053 (child_terminal_inferior): Remove comment. Remove sgtty code.
3054 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3055 gdb_getpgrp. Use serial_set_tty_state instead aof
3056 serial_noflush_set_tty_state. Remove sgtty code.
3057 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3058 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3059 (inferior_process_group): Now returns pid_t.
3060 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3061 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3062 * ser-event.c (serial_event_ops): Update.
3063 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3064 (dos_ops): Update.
3065 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3066 * ser-pipe.c (pipe_ops): Update.
3067 * ser-tcp.c (tcp_ops): Update.
3068 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3069 HAVE_TERMIOS checks.
3070 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3071 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3072 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3073 assume termios.
3074 (hardwire_noflush_set_tty_state): Delete.
3075 (hardwire_print_tty_state, hardwire_drain_output)
3076 (hardwire_flush_output, hardwire_flush_input)
3077 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3078 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3079 code, and assume termios.
3080 (hardwire_ops): Update.
3081 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3082 * serial.c (serial_noflush_set_tty_state): Delete.
3083 * serial.h (serial_noflush_set_tty_state): Delete.
3084 (serial_ops::noflush_set_tty_state): Delete.
3085
1cfb73db
UW
30862017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3087
3088 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3089 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3090 (COMMON_OBS): Remove doublest.o and dfp.o.
3091 Do not build target-float.c (instead of doublest.c)
3092 with -Wformat-nonliteral.
3093
3094 * doublest.c: Remove file.
3095 * doublest.h: Remove file.
3096 * dfp.c: Remove file.
3097 * dfp.h: Remove file.
3098
3099 * target-float.c: Do not include "doublest.h" and "dfp.h".
3100 (DOUBLEST): Move here from doublest.h.
3101 (enum float_kind): Likewise.
3102 (FLOATFORMAT_CHAR_BIT): Likewise.
3103 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3104 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3105 (floatformat_precision): Likewise.
3106 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3107 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3108 Likewise.
3109 (host_float_format, host_double_format, host_long_double_format):
3110 Likewise.
3111 (floatformat_to_string, floatformat_from_string): Likewise.
3112 (floatformat_to_doublest): Likewise. Also, inline the original
3113 convert_floatformat_to_doublest.
3114 (floatformat_from_doublest): Likewise. Also, inline the original
3115 convert_floatformat_from_doublest.
3116
3117 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3118 (MAX_DECIMAL_STRING): Move here from dfp.c.
3119 (match_endianness): Likewise.
3120 (set_decnumber_context, decimal_check_errors): Likewise.
3121 (decimal_from_number, decimal_to_number): Likewise.
3122 (decimal_to_string, decimal_from_string): Likewise. Make static.
3123 (decimal_from_longest, decimal_from_ulongest): Likewise.
3124 (decimal_to_longest): Likewise.
3125 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3126 (decimal_convert): Likewise.
3127
b07e9c46
UW
31282017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3129
3130 * doublest.c: Do not include "gdbtypes.h".
3131 (extract_typed_floating): Remove.
3132 (store_typed_floating): Remove.
3133 (convert_typed_floating): Remove.
3134 * doublest.h (struct type): Remove.
3135 (DOUBLEST_PRINT_FORMAT): Remove.
3136 (DOUBLEST_SCAN_FORMAT): Remove.
3137 (extract_typed_floating): Remove.
3138 (store_typed_floating): Remove.
3139 (convert_typed_floating): Remove.
3140
3141 * dfp.c (decimal_from_doublest): Remove.
3142 (decimal_to_doublest): Remove.
3143 * dfp.h: Do not include "doublest.h".
3144 (decimal_from_doublest): Remove.
3145 (decimal_to_doublest): Remove.
3146
3147 * value.c: Do not include "doublest.h" and "dfp.h".
3148 (value_as_double): Remove.
3149 (unpack_double): Remove.
3150 (value_from_double): Remove.
3151 (value_from_decfloat): Remove.
3152 * value.h: Do not include "doublest.h".
3153 (value_as_double): Remove.
3154 (unpack_double): Remove.
3155 (value_from_double): Remove.
3156 (value_from_decfloat): Remove.
3157
3b2ca824
UW
31582017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3159
3160 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3161 (i386_extract_return_value): Use target_float_convert.
3162 (i386_store_return_value): Likewise.
3163 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3164 (i387_value_to_register): Likewise.
3165 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3166 (ia64_register_to_value): Use target_float_convert.
3167 (ia64_value_to_register): Likewise.
3168 (ia64_extract_return_value): Likewise.
3169 (ia64_store_return_value): Likewise.
3170 (ia64_push_dummy_call): Likewise.
3171 * m68k-tdep.c: Include "target-float.h".
3172 (m68k_register_to_value): Use target_float_convert.
3173 (m68k_value_to_register): Likewise.
3174 (m68k_svr4_extract_return_value): Likewise.
3175 (m68k_svr4_store_return_value): Likewise.
3176 * ppc-sysv-tdep.c: Include "target-float.h".
3177 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3178 (do_ppc_sysv_return_value): Likewise.
3179 (ppc64_sysv_abi_push_freg): Likewise.
3180 (ppc64_sysv_abi_return_value_base): Likewise.
3181 * rs6000-aix-tdep.c: Include "target-float.h".
3182 (rs6000_push_dummy_call): Use target_float_convert.
3183 (rs6000_return_value): Likewise.
3184 * rs6000-lynx178-tdep.c: Include "target-float.h".
3185 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3186 (rs6000_lynx178_return_value): Likewise.
3187 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3188 (rs6000_register_to_value): Use target_float_convert.
3189 (rs6000_value_to_register): Likewise.
3190 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3191 (arm_extract_return_value): Use target_float_convert.
3192 (arm_store_return_value): Likewise.
3193 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3194 (sh_register_convert_to_virtual): Use target_float_convert.
3195 (sh_register_convert_to_raw): Likewise.
3196 * sh64-tdep.c: Include "target-float.h".
3197 (sh64_extract_return_value): Use target_float_convert.
3198 (sh64_register_convert_to_virtual): Likewise.
3199 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3200
14ad9311
UW
32012017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3202
3203 * target-float.c (floatformat_to_host_double): New function.
3204 (floatformat_from_host_double): Likewise.
3205 (target_float_to_host_double): Likewise.
3206 (target_float_from_host_double): Likewise.
3207 * target-float.h (target_float_to_host_double): Add prototype.
3208 (target_float_from_host_double): Likewise.
3209
3210 * guile/scm-value.c: Include "target-float.h".
3211 (gdbscm_value_to_real): Use target_float_to_host_double.
3212 Handle integer source values via value_as_long.
3213 * guile/scm-math.c: Include "target-float.h". Do not include
3214 "doublest.h", "dfp.h", and "expression.h".
3215 (vlscm_convert_typed_number): Use target_float_from_host_double.
3216 (vlscm_convert_number): Likewise.
3217
3218 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3219 (convert_value_from_python): Use target_float_from_host_double.
3220
50eff16b
UW
32212017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3222
3223 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3224 (cast_from_fixed): Likewise.
3225 (ada_scaling_type): New function.
3226 (ada_delta): Return value instead of DOUBLEST. Perform target
3227 arithmetic instead of host arithmetic.
3228 (scaling_factor): Rename to ...
3229 (ada_scaling_factor) ... this. Make non-static. Return value instead
3230 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3231 (ada_fixed_to_float): Remove.
3232 (ada_float_to_fixed): Remove.
3233 * ada-lang.h (ada_fixed_to_float): Remove.
3234 (ada_float_to_fixed): Remove.
3235 (ada_delta): Return value instead of DOUBLEST.
3236 (ada_scaling_factor): Add prototype.
3237
3238 * ada-typeprint.c: Include "target-float.h".
3239 (print_fixed_point_type): Perform target arithmetic instead of
3240 host arithmetic.
3241 * ada-valprint.c: Include "target-float.h".
3242 (ada_val_print_num): Perform target arithmetic instead of
3243 host arithmetic for fixed-point types.
3244
66c02b9e
UW
32452017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3246
3247 * target-float.c: Include <math.h>.
3248 (floatformat_binop): New function.
3249 (floatformat_compare): Likewise.
3250 (target_float_binop): Likewise.
3251 (target_float_compare): Likewise.
3252 * target-float.h: Include "expression.h".
3253 (target_float_binop): Add prototype.
3254 (target_float_compare): Likewise.
3255
3256 * valarith.c: Do not include "doublest.h" and "dfp.h".
3257 Include "common/byte-vector.h".
3258 (value_args_as_decimal): Remove, replace by ...
3259 (value_args_as_target_float): ... this function. Handle both
3260 binary and decimal target floating-point formats.
3261 (scalar_binop): Handle both binary and decimal FP using
3262 value_args_as_target_float and target_float_binop.
3263 (value_equal): Handle both binary and decimal FP using
3264 value_args_as_target_float and target_float_compare.
3265 (value_less): Likewise.
3266 (value_pos): Handle all scalar types as simple copy.
3267 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3268 * dfp.c (decimal_binop): Throw error instead of internal_error
3269 when called with an unsupported operation code.
3270
f69fdf9b
UW
32712017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3272
3273 * target-float.c (target_float_to_string): New function.
3274 (target_float_from_string): New function.
3275 * target-float.h (target_float_to_string): Add prototype.
3276 (target_float_from_string): Add prototype.
3277
3278 * valprint.c: Include "target-float.h". Do not include
3279 "doublest.h" and "dfp.h".
3280 (print_floating): Use target_float_to_string.
3281 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3282 (printf_floating): Use target_float_to_string.
3283 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3284 (print_i387_value): Use target_float_to_string.
3285 * mips-tdep.c: Include "target-float.h".
3286 (mips_print_fp_register): Use target_float_to_string.
3287 * sh64-tdep.c: Include "target-float.h".
3288 (sh64_do_fp_register): Use target_float_to_string.
3289
3290 * parse.c: Include "target-float.h". Do not include
3291 "doublest.h" and "dfp.h".
3292 (parse_float): Use target_float_from_string.
3293 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3294 (define_symbol): Use target_float_from_string.
3295 * gdbarch-selftests.c: Include "target-float.h".
3296 (register_to_value_test): Use target_float_from_string.
3297
70100014
UW
32982017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3299
3300 * Makefile.c (SFILES): Add target-float.c.
3301 (HFILES_NO_SRCDIR): Add target-float.h.
3302 (COMMON_OBS): Add target-float.o.
3303 * target-float.h: New file.
3304 * target-float.c: New file.
3305
3306 * doublest.c (floatformat_classify): Fix detection of float_zero.
3307
3308 * gdbtypes.c (is_floating_type): New function.
3309 * gdbtypes.h (is_floating_type): Add prototype.
3310
3311 * value.c: Do not include "floatformat.h".
3312 (unpack_double): Use target_float_is_valid.
3313 (is_floating_value): New function.
3314 * value.h (is_floating_value): Add prototype-
3315
3316 * valarith.c: Include "target-float.h".
3317 (value_logical_not): Use target_float_is_zero.
3318
3319 * python/py-value.c: Include "target-float.h".
3320 (valpy_nonzero): Use target_float_is_zero.
3321
ab4b1c46
TT
33222017-11-04 Tom Tromey <tom@tromey.com>
3323
3324 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3325
454dafbd
TT
33262017-11-04 Tom Tromey <tom@tromey.com>
3327
3328 * breakpoint.c (set_momentary_breakpoint): Return
3329 breakpoint_up.
3330 (until_break_command): Update.
3331 (new_until_break_fsm): Change argument types to
3332 breakpoint_up.
3333 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3334 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3335 Remove.
3336 * infcmd.c (finish_forward): Update.
3337 * breakpoint.h (set_momentary_breakpoint)
3338 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3339 (make_cleanup_delete_breakpoint): Remove.
3340 (struct breakpoint_deleter): New.
3341 (breakpoint_up): New typedef.
3342 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3343 (insert_exception_resume_breakpoint): Update.
3344 (insert_exception_resume_from_probe): Update.
3345 (insert_longjmp_resume_breakpoint): Update.
3346 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3347 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3348 * infcall.c (call_function_by_hand_dummy): Update
3349
331b71e5
TT
33502017-11-04 Tom Tromey <tom@tromey.com>
3351
3352 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3353
9f584b37
TT
33542017-11-04 Tom Tromey <tom@tromey.com>
3355
3356 * linux-tdep.c (linux_core_info_proc_mappings): Use
3357 gdb::def_vector.
3358 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3359 "size" argument.
3360 (linux_corefile_thread): Update.
3361 (linux_make_corefile_notes): Remove unused variable.
3362
779bc38e
TT
33632017-11-04 Tom Tromey <tom@tromey.com>
3364
3365 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3366 gdb::byte_vector.
3367
ed2b3126
TT
33682017-11-04 Tom Tromey <tom@tromey.com>
3369
3370 * objfiles.c (do_free_objfile_cleanup): Remove.
3371 * compile/compile-object-load.c (compile_object_load): Update.
3372 * objfiles.h (make_cleanup_free_objfile): Remove.
3373
7f6743fd
TT
33742017-11-04 Tom Tromey <tom@tromey.com>
3375
3376 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3377 (adi_read_versions): Change "tags" to "gdb_byte *".
3378 (adi_print_versions): Likewise.
3379
c80049d3
TT
33802017-11-04 Tom Tromey <tom@tromey.com>
3381
3382 * breakpoint.c
3383 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3384 from start_rbreak_breakpoints.
3385 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3386 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3387 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3388 * symtab.c (do_end_rbreak_breakpoints): Remove.
3389 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3390
167b0be1
TT
33912017-11-04 Tom Tromey <tom@tromey.com>
3392
3393 * cp-namespace.c (reset_directive_searched): Remove.
3394 (cp_lookup_symbol_via_imports): Use scoped_restore.
3395 * cp-support.c (reset_directive_searched): Remove.
3396 (make_symbol_overload_list_using): Use scoped_restore.
3397 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3398 (reset_directive_searched): Remove.
3399
5eae7aea
TT
34002017-11-04 Tom Tromey <tom@tromey.com>
3401
3402 * symfile.c (find_separate_debug_file_by_debuglink): Use
3403 unique_xmalloc_ptr.
3404
c6bcad5f
TT
34052017-11-04 Tom Tromey <tom@tromey.com>
3406
3407 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3408 type of "info".
3409 (compute_stack_depth): Likewise.
3410 (do_compile_dwarf_expr_to_c): Use std::vector.
3411
20dcd8ca
TT
34122017-11-04 Tom Tromey <tom@tromey.com>
3413
3414 * compile/compile-object-load.c (link_callbacks_einfo): Use
3415 std::string.
3416
33c7c59d
TT
34172017-11-04 Tom Tromey <tom@tromey.com>
3418
3419 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3420 Use scoped_free_pendings.
3421 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3422 scoped_free_pendings.
3423 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3424 (xcoff_initial_scan): Likewise.
3425 * buildsym.c (reset_symtab_globals): Update comment.
3426 (scoped_free_pendings): Rename from really_free_pendings.
3427 (prepare_for_building): Update comment.
3428 (buildsym_init): Likewise.
3429 * buildsym.h (class scoped_free_pendings): New class.
3430 (really_free_pendings): Don't declare.
3431
67fa57cf
UW
34322017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3433
3434 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3435 output when converting a zero value to a special byteorder format.
3436
f26ae15b
YQ
34372017-11-02 Yao Qi <yao.qi@linaro.org>
3438
3439 * frame.c (do_frame_register_read): Remove aspace.
3440 * jit.c (jit_frame_sniffer): Likwise.
3441 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3442 * regcache.c (regcache::regcache): Pass nullptr.
3443 (regcache_print): Caller updated.
3444 * regcache.h (regcache::regcache): Remove one constructor
3445 parameter aspace.
3446
6c6e9412
YQ
34472017-11-02 Yao Qi <yao.qi@linaro.org>
3448
3449 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3450
8b86c959
YQ
34512017-11-02 Yao Qi <yao.qi@linaro.org>
3452
3453 * breakpoint.c (insert_single_step_breakpoints): Update.
3454 * frame.c (struct frame_info) <aspace>: Add const.
3455 (frame_save_as_regcache): Add const.
3456 (get_frame_address_space): Return const address_space *.
3457 * frame.h (get_frame_address_space): Update declaration.
3458 * infrun.c (struct step_over_info) <aspace>: Add const.
3459 (set_step_over_info): Make aspace const.
3460 (displaced_step_prepare_throw): Change variable const.
3461 (resume): Likewise.
3462 (proceed): Likewise.
3463 (adjust_pc_after_break): Likewise.
3464 (save_waitstatus): Likewise.
3465 (handle_signal_stop): Likewise.
3466 (keep_going_pass_signal): Likewise.
3467 * jit.c (jit_frame_sniffer): Add const.
3468 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3469 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3470 * record-full.c (record_full_wait_1): Likewise.
3471 * regcache.c (regcache::regcache): Change parameter to const.
3472 * regcache.h (regcache::regcache): Likewise.
3473 (regcache::aspace): Return const address_space *.
3474 (regcache) <m_aspace>: Add const.
3475
a01bda52
YQ
34762017-11-02 Yao Qi <yao.qi@linaro.org>
3477
3478 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3479 * frame.c (create_sentinel_frame): Likewise.
3480 * infrun.c (displaced_step_prepare_throw): Likewise.
3481 (resume): Likewise.
3482 (thread_still_needs_step_over_bp): Likewise.
3483 (proceed): Likewise.
3484 (do_target_wait): Likewise.
3485 (adjust_pc_after_break): Likewise.
3486 (handle_syscall_event): Likewise.
3487 (save_waitstatus): Likewise.
3488 (handle_inferior_event_1): Likewise.
3489 (handle_signal_stop): Likewise.
3490 (keep_going_pass_signal): Likewise.
3491 * linux-nat.c (status_callback): Likewise.
3492 (save_stop_reason): Likewise.
3493 (resume_stopped_resumed_lwps): Likewise.
3494 * record-full.c (record_full_exec_insn): Likewise.
3495 (record_full_wait_1): Likewise.
3496 * regcache.c (get_regcache_aspace): Remove.
3497 * regcache.h (get_regcache_aspace): Remove.
3498
d999647b
YQ
34992017-11-02 Yao Qi <yao.qi@linaro.org>
3500
3501 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3502 (init_regcache_descr): Use gdbarch_num_regs.
3503 (regcache::regcache): Likewise.
3504 (regcache::get_register_status): Likewise.
3505 (regcache::assert_raw_regnum): Likewise.
3506 (regcache::cooked_read): Likewise.
3507 (regcache::cooked_read_value): Likewise.
3508 (regcache::cooked_write): Likewise.
3509 (regcache::dump): Likewise.
3510 (regcache::num_raw_registers): New method.
3511 * regcache.h (class regcache) <num_raw_registers>: New.
3512
4e888c28
YQ
35132017-11-02 Yao Qi <yao.qi@linaro.org>
3514
3515 * regcache.c (regcache::assert_regnum): New method.
3516 (regcache::invalidate): Call assert_regnum.
3517 (regcache::raw_update): Likewise.
3518 (regcache::raw_write): Likewise.
3519 (regcache::raw_read_part): Likewise.
3520 (regcache::raw_write_part): Likewise.
3521 (regcache::raw_supply): Likewise.
3522 (regcache::raw_supply_integer): Likewise.
3523 (regcache::raw_supply_zeroed): Likewise.
3524 (regcache::raw_collect): Likewise.
3525 (regcache::raw_collect_integer): Likewise.
3526 * regcache.h (regcache::assert_regnum): Declare.
3527
2e1b49b3
YQ
35282017-11-02 Yao Qi <yao.qi@linaro.org>
3529
3530 * regcache.c (regcache::dump): Remove code.
3531
6c5218df
YQ
35322017-11-02 Yao Qi <yao.qi@linaro.org>
3533
3534 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3535 Remove.
3536 <sizeof_cooked_register_status>: Remove.
3537 (init_regcache_descr): Update.
3538 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3539 (regcache::save): Likewise.
3540 (regcache::dump): Likewise.
3541
dcc31d28
JB
35422017-11-01 James Bowman <james.bowman@ftdichip.com>
3543
3544 * ft32-tdep.c (ft32_fetch_instruction): New function.
3545 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3546
3a87ae65
SM
35472017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3548
3549 * cli/cli-script.c (execute_control_command): Rename to ...
3550 (execute_control_command_1): ... this.
3551 (execute_control_command): New function.
3552
09b847f3
SM
35532017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3554
3555 * tracepoint.c (tfind_command): Remove const_cast.
3556
f871c485
MG
35572017-10-30 Mike Gulick <mgulick@mathworks.com>
3558
3559 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3560
b020ff80
SM
35612017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3562
3563 * common/common-utils.h (in_inclusive_range): New function.
3564 * arm-tdep.c (arm_record_extension_space): Use
3565 in_inclusive_range.
3566 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3567 * cris-tdep.c (cris_spec_reg_applicable): Use
3568 in_inclusive_range.
3569
1b81856f
PA
35702017-10-30 Pedro Alves <palves@redhat.com>
3571 Simon Marchi <simon.marchi@ericsson.com>
3572
3573 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3574 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3575
31b833b3
PA
35762017-10-30 Pedro Alves <palves@redhat.com>
3577
3578 * common/common-utils.c (string_appendf, string_vappendf): New
3579 functions.
3580 * common/common-utils.h (string_appendf, string_vappendf): New
3581 declarations.
3582 * unittests/common-utils-selftests.c (string_appendf_func)
3583 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3584 (string_vappendf_tests): New functions.
3585 (_initialize_common_utils_selftests): Register "string_appendf" and
3586 "string_vappendf tests".
3587
4a250334
PA
35882017-10-30 Pedro Alves <palves@redhat.com>
3589
3590 * unittests/common-utils-selftests.c (format_func): New typedef.
3591 (string_printf_tests, string_vprintf_tests): Tests factored out
3592 and merged to ...
3593 (test_format_func): ... this new function.
3594 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3595 test_format_func.
3596
16c5c17e
SM
35972017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3598
3599 * darwin-nat.c: Remove include of gdb.h.
3600
7ca51576
SM
36012017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3602
3603 * xtensa-xtregs.c: Fix formatting issues.
3604
c1342859
SM
36052017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3606
3607 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3608
484d8d36
MD
36092017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3610
3611 PR python/21213
3612 * python/py-infthread.c (thpy_get_inferior): Increment reference
3613 of inferior before returning it.
3614
b5540b5f
SM
36152017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3616
3617 * unittests/common-utils-selftests.c (format): Add
3618 ATTRIBUTE_PRINTF.
3619
5a9dcda1
SM
36202017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3621
3622 * xml-syscall.c (struct syscall_desc): Add constructor.
3623 <name>: Change type to std::string.
3624 (syscall_desc_up): New typedef.
3625 (syscall_desc_p): Remove typeder.
3626 (DEF_VEC_P(syscall_desc_p)): Remove.
3627 (struct syscall_group_desc): Add constructor.
3628 <name>: Change type to std::string.
3629 <syscalls>: Change type to std::vector.
3630 (syscall_group_desc_up): New typedef.
3631 (syscall_group_desc_p): Remove typedef.
3632 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3633 (struct syscalls_info) <syscalls>: Change type to std::vector of
3634 unique_ptr.
3635 <groups>: Likewise.
3636 <my_gdb_datadir>: Change type to std::string.
3637 (syscalls_info_up): New typedef.
3638 (allocate_syscalls_info): Remove.
3639 (syscalls_info_free_syscalls_desc): Remove.
3640 (syscalls_info_free_syscall_group_desc): Remove.
3641 (free_syscalls_info): Remove.
3642 (make_cleanup_free_syscalls_info): Remove.
3643 (syscall_group_create_syscall_group_desc): Adjust.
3644 (syscall_group_add_syscall): Adjust.
3645 (syscall_create_syscall_desc): Adjust.
3646 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3647 (init_syscalls_info): Adjust.
3648 (syscall_group_get_group_by_name): Adjust.
3649 (xml_get_syscall_number): Adjust.
3650 (xml_get_syscall_name): Adjust.
3651 (xml_list_of_syscalls): Adjust.
3652 (xml_list_syscalls_by_group): Adjust.
3653 (xml_list_of_groups): Adjust.
3654
45461e0d
SM
36552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3656
3657 * probe.h: Don't include gdb_vecs.h.
3658 (DEF_VEC_P (probe_p)): Remove.
3659 (find_probes_in_objfile): Return an std::vector.
3660 * probe.c (find_probes_in_objfile): Likewise.
3661 * breakpoint.c (breakpoint_objfile_data)
3662 <longjmp_probes>: Change type to std::vector.
3663 <exception_probes>: Likewise.
3664 (free_breakpoint_probes): Don't manually free vectors.
3665 (create_longjmp_master_breakpoint): Adjust.
3666 (create_exception_master_breakpoint): Adjust.
3667 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3668 parameter type, adjust.
3669 (svr4_create_solib_event_breakpoints): Adjust.
3670
43dce439
SM
36712017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3672
3673 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3674 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3675 with new.
3676 (free_breakpoint_probes): Rename to ...
3677 (free_breakpoint_objfile_data): ... this, and call delete on
3678 bp_objfile_data..
3679
6a1b9516
SM
36802017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3681
3682 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3683 (loaded_script_ptr): Remove typedef.
3684 (DEF_VEC_P (loaded_script_ptr)): Remove.
3685 (struct collect_matching_scripts_data): Add constructor.
3686 <scripts_p>: Change type to (pointer to) std::vector.
3687 (collect_matching_scripts_data): Adjust.
3688 (sort_scripts_by_name): Make suitable for std::sort.
3689 (print_scripts): Don't sort vector, adjust to std::vector.
3690 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3691
593e3209
SM
36922017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3693
3694 * symfile.c (filename_language): Make struct, not typedef. Add
3695 constructor.
3696 <ext>: Change type to std::string.
3697 (DEF_VEC_O (filename_language)): Remove.
3698 (filename_language_table): Change type to std::vector.
3699 (add_filename_language): Adjust.
3700 (set_ext_lang_command): Adjust.
3701 (info_ext_lang_command): Adjust.
3702 (deduce_language_from_filename): Adjust.
3703 (class scoped_restore_filename_language_table): Remove.
3704 (test_filename_language): Use scoped_restore.
3705 (test_set_ext_lang_command): Use scoped_restore, adjust to
3706 std::vector change.
3707
32fa66eb
SM
37082017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3709
3710 * symfile.c: Include selftest.h.
3711 (class scoped_restore_filename_language_table): New.
3712 (test_filename_language): New test.
3713 (test_set_ext_lang_command): New test.
3714 (_initialize_symfile): Register tests.
3715
4a27f119
KS
37162017-10-27 Keith Seitz <keiths@redhat.com>
3717
3718 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3719 in the bp_location, falling back to find_pc_sect_function when
3720 needed.
3721 (add_location_to_breakpoint): Save sal->symbol.
3722 * breakpoint.h (struct bp_location) <symbol>: New field.
3723 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3724 * symtab.h (struct symtab_and_line) <symbol>: New field.
3725
a43f3893
PF
37262017-10-26 Patrick Frants <osscontribute@gmail.com>
3727
7453e6b2 3728 PR gdb/13669
a43f3893
PF
3729 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3730 to rewind obstack.
3731
23cc4e1b
PA
37322017-10-26 Pedro Alves <palves@redhat.com>
3733
3734 * remote.c (remote_async_terminal_ours_p): Delete.
3735 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3736 Remove references to 'remote_async_terminal_ours_p'.
3737
6abc18bb
YQ
37382017-10-26 Yao Qi <yao.qi@linaro.org>
3739
3740 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3741
bd522513
YQ
37422017-10-26 Yao Qi <yao.qi@linaro.org>
3743
3744 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3745 aspace const.
3746 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3747 Likewise.
3748 * breakpoint.c (bpstat_check_location): Remove cast.
3749 (breakpoint_hit_catch_fork): Make aspce const.
3750 (breakpoint_hit_catch_solib): Likewise.
3751 (breakpoint_hit_catch_exec): Likewise.
3752 (breakpoint_hit_ranged_breakpoint): Likewise.
3753 (breakpoint_hit_watchpoint): Likewise.
3754 (base_breakpoint_breakpoint_hit): Likewise.
3755 (bkpt_breakpoint_hit): Likewise.
3756 (dprintf_breakpoint_hit): Likewise.
3757 (tracepoint_breakpoint_hit): Likewise.
3758 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3759
accd0bcd
YQ
37602017-10-26 Yao Qi <yao.qi@linaro.org>
3761
3762 * breakpoint.c (breakpoint_location_address_match): Change
3763 "struct address_space *" to "const address_space".
3764 (breakpoint_location_address_range_overlap): Likewise.
3765 (breakpoint_here_p): Likewise.
3766 (breakpoint_in_range_p): Likewise.
3767 (moribund_breakpoint_here_p): Likewise.
3768 (bp_location_inserted_here_p): Likewise.
3769 (software_breakpoint_inserted_here_p): Likewise.
3770 (hardware_breakpoint_inserted_here_p): Likewise.
3771 (hardware_watchpoint_inserted_in_range): Likewise.
3772 (bpstat_check_location): Likewise.
3773 (bpstat_stop_status): Likewise.
3774 (breakpoint_address_match): Likewise.
3775 (breakpoint_address_match_range): Likewise.
3776 (breakpoint_location_address_match): Likewise.
3777 (breakpoint_location_address_range_overlap): Likewise.
3778 (insert_single_step_breakpoint): Likewise.
3779 (breakpoint_has_location_inserted_here): Likewise.
3780 (single_step_breakpoint_inserted_here_p): Likewise.
3781 (pc_at_non_inline_function): Likewise.
3782 * breakpoint.h (bpstat_stop_status): Update declaration.
3783 (breakpoint_here_p): Likewise.
3784 (breakpoint_in_range_p): Likewise.
3785 (moribund_breakpoint_here_p): Likewise.
3786 (breakpoint_inserted_here_p): Likewise.
3787 (software_breakpoint_inserted_here_p): Likewise.
3788 (hardware_breakpoint_inserted_here_p): Likewise.
3789 (breakpoint_has_location_inserted_here): Likewise.
3790 (single_step_breakpoint_inserted_here_p): Likewise.
3791 (hardware_watchpoint_inserted_in_range): Likewise.
3792 (breakpoint_address_match): Likewise.
3793 (insert_single_step_breakpoint): Likewise.
3794 (pc_at_non_inline_function): Likewise.
3795 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3796 * record.c (record_check_stopped_by_breakpoint): Likewise.
3797 * record.h (record_check_stopped_by_breakpoint): Likewise.
3798 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3799
ac7936df
YQ
38002017-10-25 Yao Qi <yao.qi@linaro.org>
3801
3802 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3803 regcache->arch () instead get_regcache_arch.
3804 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3805 Likewise.
3806 (aarch64_fbsd_store_inferior_registers): Likewise.
3807 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3808 (store_gregs_to_thread): Likewise.
3809 (fetch_fpregs_from_thread): Likewise.
3810 (store_fpregs_to_thread): Likewise.
3811 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3812 (aarch64_store_return_value): Likewise.
3813 (aarch64_software_single_step): Likewise.
3814 * aix-thread.c (aix_thread_wait): Likewise.
3815 (supply_reg32): Likewise.
3816 (supply_sprs64): Likewise.
3817 (supply_sprs32): Likewise.
3818 (fill_gprs64): Likewise.
3819 (fill_gprs32): Likewise.
3820 (fill_sprs64): Likewise.
3821 (fill_sprs32): Likewise.
3822 (store_regs_user_thread): Likewise.
3823 (store_regs_kernel_thread): Likewise.
3824 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3825 (alphabsd_store_inferior_registers): Likewise.
3826 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3827 (alpha_store_return_value): Likewise.
3828 (alpha_deal_with_atomic_sequence): Likewise.
3829 (alpha_next_pc): Likewise.
3830 (alpha_software_single_step): Likewise.
3831 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3832 (amd64bsd_store_inferior_registers): Likewise.
3833 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3834 Likewise.
3835 (amd64_linux_store_inferior_registers): Likewise.
3836 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3837 (amd64_collect_native_gregset): Likewise.
3838 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3839 (amd64obsd_collect_uthread): Likewise.
3840 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3841 (amd64_collect_fpregset): Likewise.
3842 (amd64_supply_fxsave): Likewise.
3843 (amd64_supply_xsave): Likewise.
3844 (amd64_collect_fxsave): Likewise.
3845 (amd64_collect_xsave): Likewise.
3846 * arc-tdep.c (arc_write_pc): Likewise.
3847 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3848 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3849 (arm_fbsd_store_inferior_registers): Likewise.
3850 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3851 (store_vfp_regs): Likewise.
3852 (arm_linux_fetch_inferior_registers): Likewise.
3853 (arm_linux_store_inferior_registers): Likewise.
3854 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3855 (arm_linux_sigreturn_next_pc): Likewise.
3856 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3857 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3858 (fetch_register): Likewise.
3859 (store_register): Likewise.
3860 * arm-tdep.c (arm_is_thumb): Likewise.
3861 (displaced_in_arm_mode): Likewise.
3862 (bx_write_pc): Likewise.
3863 (arm_get_next_pcs_addr_bits_remove): Likewise.
3864 (arm_software_single_step): Likewise.
3865 (arm_extract_return_value): Likewise.
3866 (arm_store_return_value): Likewise.
3867 (arm_write_pc): Likewise.
3868 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3869 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3870 (bsd_uthread_store_registers): Likewise.
3871 * core-regset.c (fetch_core_registers): Likewise.
3872 * corelow.c (get_core_registers): Likewise.
3873 * cris-tdep.c (cris_store_return_value): Likewise.
3874 (cris_extract_return_value): Likewise.
3875 (find_step_target): Likewise.
3876 (find_step_target): Likewise.
3877 (cris_software_single_step): Likewise.
3878 * ctf.c (ctf_fetch_registers): Likewise.
3879 * darwin-nat.c (cancel_breakpoint): Likewise.
3880 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3881 * frv-tdep.c (frv_extract_return_value): Likewise.
3882 * ft32-tdep.c (ft32_store_return_value): Likewise.
3883 (ft32_extract_return_value): Likewise.
3884 * go32-nat.c (fetch_register): Likewise.
3885 (go32_fetch_registers): Likewise.
3886 (go32_store_registers): Likewise.
3887 (store_register): Likewise.
3888 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3889 (h8300_store_return_value): Likewise.
3890 * hppa-linux-nat.c (fetch_register): Likewise.
3891 (store_register): Likewise.
3892 (hppa_linux_fetch_inferior_registers): Likewise.
3893 (hppa_linux_store_inferior_registers): Likewise.
3894 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3895 (i386_darwin_store_inferior_registers): Likewise.
3896 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3897 (gnu_store_registers): Likewise.
3898 * i386-linux-nat.c (fetch_register): Likewise.
3899 (store_register): Likewise.
3900 (supply_gregset): Likewise.
3901 (fill_gregset): Likewise.
3902 (i386_linux_fetch_inferior_registers): Likewise.
3903 (i386_linux_store_inferior_registers): Likewise.
3904 (i386_linux_resume): Likewise.
3905 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3906 Likewise.
3907 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3908 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3909 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3910 (i386obsd_collect_uthread): Likewise.
3911 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3912 (i386_supply_gregset): Likewise.
3913 (i386_collect_gregset): Likewise.
3914 (i386_supply_fpregset): Likewise.
3915 (i386_collect_fpregset): Likewise.
3916 (i386_mpx_bd_base): Likewise.
3917 * i386-v4-nat.c (supply_fpregset): Likewise.
3918 (fill_fpregset): Likewise.
3919 * i387-tdep.c (i387_supply_fsave): Likewise.
3920 (i387_collect_fsave): Likewise.
3921 (i387_supply_fxsave): Likewise.
3922 (i387_collect_fxsave): Likewise.
3923 (i387_supply_xsave): Likewise.
3924 (i387_collect_xsave): Likewise.
3925 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3926 (ia64_linux_store_registers): Likewise.
3927 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3928 (ia64_extract_return_value): Likewise.
3929 (ia64_store_return_value): Likewise.
3930 (find_func_descr): Likewise.
3931 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3932 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3933 (inf_ptrace_store_registers): Likewise.
3934 * infrun.c (use_displaced_stepping): Likewise.
3935 (displaced_step_prepare_throw): Likewise.
3936 (resume): Likewise.
3937 (proceed): Likewise.
3938 (do_target_wait): Likewise.
3939 (adjust_pc_after_break): Likewise.
3940 (handle_inferior_event_1): Likewise.
3941 (handle_signal_stop): Likewise.
3942 (save_infcall_suspend_state): Likewise.
3943 (restore_infcall_suspend_state): Likewise.
3944 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3945 * jit.c (jit_frame_prev_register): Likewise.
3946 * linux-nat.c (save_stop_reason): Likewise.
3947 (linux_nat_wait_1): Likewise.
3948 (resume_stopped_resumed_lwps): Likewise.
3949 * linux-record.c (record_linux_sockaddr): Likewise.
3950 (record_linux_msghdr): Likewise.
3951 (record_linux_system_call): Likewise.
3952 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3953 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3954 (lm32_store_return_value): Likewise.
3955 * m32c-tdep.c (m32c_read_flg): Likewise.
3956 (m32c_pseudo_register_read): Likewise.
3957 (m32c_pseudo_register_write): Likewise.
3958 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3959 (m32r_linux_collect_gregset): Likewise.
3960 * m32r-tdep.c (m32r_store_return_value): Likewise.
3961 (m32r_extract_return_value): Likewise.
3962 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3963 (m68kbsd_collect_fpregset): Likewise.
3964 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3965 * m68k-linux-nat.c (fetch_register): Likewise.
3966 (old_fetch_inferior_registers): Likewise.
3967 (old_store_inferior_registers): Likewise.
3968 (store_regs): Likewise.
3969 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3970 (m68k_svr4_store_return_value): Likewise.
3971 * m88k-tdep.c (m88k_store_arguments): Likewise.
3972 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3973 (mi_cmd_data_write_register_values): Likewise.
3974 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3975 (mips_fbsd_store_inferior_registers): Likewise.
3976 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3977 (mips_fbsd_supply_gregs): Likewise.
3978 (mips_fbsd_collect_fpregs): Likewise.
3979 (mips_fbsd_collect_gregs): Likewise.
3980 (mips_fbsd_supply_fpregset): Likewise.
3981 (mips_fbsd_collect_fpregset): Likewise.
3982 (mips_fbsd_supply_gregset): Likewise.
3983 (mips_fbsd_collect_gregset): Likewise.
3984 * mips-linux-nat.c (supply_gregset): Likewise.
3985 (fill_gregset): Likewise.
3986 (supply_fpregset): Likewise.
3987 (fill_fpregset): Likewise.
3988 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3989 (mips_fill_gregset): Likewise.
3990 (mips_supply_fpregset): Likewise.
3991 (mips_fill_fpregset): Likewise.
3992 (mips64_supply_gregset): Likewise.
3993 (micromips_linux_sigframe_validate): Likewise.
3994 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3995 (mipsnbsd_fetch_inferior_registers): Likewise.
3996 (mipsnbsd_store_inferior_registers): Likewise.
3997 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3998 (mipsnbsd_supply_gregset): Likewise.
3999 (mipsnbsd_iterate_over_regset_sections): Likewise.
4000 (mipsnbsd_supply_reg): Likewise.
4001 (mipsnbsd_supply_fpreg): Likewise.
4002 * mips-tdep.c (mips_in_frame_stub): Likewise.
4003 (mips_dummy_id): Likewise.
4004 (is_octeon_bbit_op): Likewise.
4005 (micromips_bc1_pc): Likewise.
4006 (extended_mips16_next_pc): Likewise.
4007 (mips16_next_pc): Likewise.
4008 (deal_with_atomic_sequence): Likewise.
4009 * moxie-tdep.c (moxie_process_readu): Likewise.
4010 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4011 * nto-procfs.c (procfs_store_registers): Likewise.
4012 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4013 (ppcfbsd_store_inferior_registers): Likewise.
4014 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4015 (fetch_altivec_register): Likewise.
4016 (get_spe_registers): Likewise.
4017 (fetch_spe_register): Likewise.
4018 (fetch_altivec_registers): Likewise.
4019 (fetch_all_gp_regs): Likewise.
4020 (fetch_all_fp_regs): Likewise.
4021 (store_vsx_register): Likewise.
4022 (store_altivec_register): Likewise.
4023 (set_spe_registers): Likewise.
4024 (store_spe_register): Likewise.
4025 (store_altivec_registers): Likewise.
4026 (store_all_gp_regs): Likewise.
4027 (store_all_fp_regs): Likewise.
4028 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4029 (ppc_linux_collect_gregset): Likewise.
4030 (ppc_canonicalize_syscall): Likewise.
4031 (ppc_linux_record_signal): Likewise.
4032 (ppu2spu_prev_register): Likewise.
4033 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4034 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4035 (ppcobsd_store_registers): Likewise.
4036 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4037 Likewise.
4038 (ppc_ravenscar_generic_store_registers): Likewise.
4039 * procfs.c (procfs_fetch_registers): Likewise.
4040 (procfs_store_registers): Likewise.
4041 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4042 (ravenscar_store_registers): Likewise.
4043 (ravenscar_prepare_to_store): Likewise.
4044 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4045 * record-full.c (record_full_wait_1): Likewise.
4046 (record_full_registers_change): Likewise.
4047 (record_full_store_registers): Likewise.
4048 (record_full_core_fetch_registers): Likewise.
4049 (record_full_save): Likewise.
4050 (record_full_goto_insn): Likewise.
4051 * regcache.c (regcache_register_size): Likewise.
4052 (get_regcache_arch): Remove.
4053 (regcache_read_pc): Likewise.
4054 * regcache.h (get_regcache_arch): Remove.
4055 * remote-sim.c (gdbsim_fetch_register): Likewise.
4056 (gdbsim_store_register): Likewise.
4057 * remote.c (fetch_register_using_p): Likewise.
4058 (send_g_packet): Likewise.
4059 (remote_prepare_to_store): Likewise.
4060 (store_registers_using_G): Likewise.
4061 * reverse.c (save_bookmark_command): Likewise.
4062 (goto_bookmark_command): Likewise.
4063 * rs6000-aix-tdep.c (branch_dest): Likewise.
4064 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4065 (fetch_register): Likewise.
4066 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4067 (ppc_collect_reg): Likewise.
4068 (ppc_collect_gregset): Likewise.
4069 (ppc_collect_fpregset): Likewise.
4070 (ppc_collect_vsxregset): Likewise.
4071 (ppc_collect_vrregset): Likewise.
4072 (ppc_displaced_step_hw_singlestep): Likewise.
4073 (rs6000_pseudo_register_read): Likewise.
4074 (rs6000_pseudo_register_write): Likewise.
4075 * s390-linux-nat.c (supply_gregset): Likewise.
4076 (fill_gregset): Likewise.
4077 (s390_linux_fetch_inferior_registers): Likewise.
4078 * s390-linux-tdep.c (s390_write_pc): Likewise.
4079 (s390_software_single_step): Likewise.
4080 (s390_all_but_pc_registers_record): Likewise.
4081 (s390_linux_syscall_record): Likewise.
4082 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4083 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4084 (shnbsd_store_inferior_registers): Likewise.
4085 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4086 (sh_extract_return_value_fpu): Likewise.
4087 (sh_store_return_value_nofpu): Likewise.
4088 (sh_corefile_supply_regset): Likewise.
4089 (sh_corefile_collect_regset): Likewise.
4090 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4091 (sh64_store_return_value): Likewise.
4092 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4093 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4094 (sparc_store_inferior_registers): Likewise.
4095 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4096 (sparc_ravenscar_prepare_to_store): Likewise.
4097 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4098 (sparc_analyze_control_transfer): Likewise.
4099 (sparc_step_trap): Likewise.
4100 (sparc_software_single_step): Likewise.
4101 (sparc32_gdbarch_init): Likewise.
4102 (sparc_supply_rwindow): Likewise.
4103 (sparc_collect_rwindow): Likewise.
4104 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4105 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4106 (sparc64nbsd_collect_gregset): Likewise.
4107 (sparc64nbsd_supply_fpregset): Likewise.
4108 (sparc64nbsd_collect_fpregset): Likewise.
4109 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4110 (sparc64_supply_gregset): Likewise.
4111 (sparc64_collect_gregset): Likewise.
4112 (sparc64_supply_fpregset): Likewise.
4113 (sparc64_collect_fpregset): Likewise.
4114 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4115 * spu-tdep.c (spu_unwind_sp): Likewise.
4116 (spu2ppu_prev_register): Likewise.
4117 (spu_memory_remove_breakpoint): Likewise.
4118 * stack.c (return_command): Likewise.
4119 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4120 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4121 * tracefile.c (trace_save_ctf): Likewise.
4122 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4123 (do_windows_store_inferior_registers): Likewise.
4124 (windows_resume): Likewise.
4125 * xtensa-linux-nat.c (fill_gregset): Likewise.
4126 (supply_gregset_reg): Likewise.
4127 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4128 (xtensa_register_read_masked): Likewise.
4129 (xtensa_supply_gregset): Likewise.
4130 (xtensa_extract_return_value): Likewise.
4131 (xtensa_store_return_value): Likewise.
4132
edd079d9
UW
41332017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4134
4135 * doublest.c (floatformat_from_string): New function.
4136 * doublest.h (floatformat_from_string): Add prototype.
4137
4138 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4139 (OP_FLOAT): ... this.
4140 * expression.h: Do not include "doublest.h".
4141 (union exp_element): Replace doubleconst and decfloatconst by
4142 new element floatconst.
4143 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4144 (ada_evaluate_subexp): Likewise.
4145 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4146 OP_DOUBLE and OP_DECFLOAT.
4147 * expprint.c (print_subexp_standard): Likewise.
4148 (dump_subexp_body_standard): Likewise.
4149 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4150
4151 * parse.c: Include "dfp.h".
4152 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4153 (write_exp_elt_floatcst): New function.
4154 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4155 and OP_DECFLOAT.
4156 (operator_check_standard): Likewise.
4157 (parse_float): Do not accept suffix. Take type as input. Return bool.
4158 Return target format buffer instead of host DOUBLEST.
4159 Use floatformat_from_string and decimal_from_string to parse
4160 either binary or decimal floating-point types.
4161 (parse_c_float): Remove.
4162 * parser-defs.h: Do not include "doublest.h".
4163 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4164 (write_exp_elt_floatcst): Add prototype.
4165 (parse_float): Update prototype.
4166 (parse_c_float): Remove.
4167
4168 * c-exp.y: Do not include "dfp.h".
4169 (typed_val_float): Use byte buffer instead of DOUBLEST.
4170 (typed_val_decfloat): Remove.
4171 (DECFLOAT): Remove.
4172 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4173 (parse_number): Update to new parse_float interface.
4174 Parse suffixes and determine type before calling parse_float.
4175 Handle decimal and binary FP types the same way.
4176
4177 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4178 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4179 (parse_number): Update to new parse_float interface.
4180 Parse suffixes and determine type before calling parse_float.
4181
4182 * f-exp.y: Replace dval by typed_val_float.
4183 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4184 (parse_number): Use parse_float instead of atof.
4185
4186 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4187 (parse_go_float): Remove.
4188 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4189 (parse_number): Call parse_float instead of parse_go_float.
4190 Parse suffixes and determine type before calling parse_float.
4191
4192 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4193 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4194 (parse_number): Update to new parse_float interface.
4195 Parse suffixes and determine type before calling parse_float.
4196
4197 * m2-exp.y: Replace dval by byte buffer val.
4198 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4199 (parse_number): Call parse_float instead of atof.
4200
4201 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4202 (lex_number): Call parse_float instead of strtod.
4203 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4204 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4205 Use write_exp_elt_floatcst.
4206 (unit_testing): Remove static variable.
4207 (rust_type): Do not check unit_testing.
4208 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4209
4210 * ada-exp.y (type_float, type_double): Remove.
4211 (typed_val_float): Use byte buffer instead of DOUBLEST.
4212 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4213 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4214
cc628f3d
AH
42152017-10-25 Alan Hayward <alan.hayward@arm.com>
4216
4217 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4218 * arch/aarch64.h: New file.
4219
09a7c6aa
UW
42202017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4221
4222 * dfp.h (decimal_from_string): Use const reference for argument.
4223 * dfp.c (decimal_from_string): Likewise.
4224
8ba0dd51
UW
42252017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4226
4227 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4228 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4229 * mips-tdep.c (mips_print_fp_register): Likewise.
4230
16e812b2
UW
42312017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4232
4233 * common/format.h (enum argclass): Replace decfloat_arg by
4234 dec32float_arg, dec64float_arg, and dec128float_arg.
4235 * common/format.c (parse_format_string): Update to return
4236 new decimal float argument classes.
4237
4238 * printcmd.c (printf_decfloat): Rename to ...
4239 (printf_floating): ... this. Add argclass argument, and use it
4240 instead of parsing the format string again. Add support for
4241 binary floating-point values, using floatformat_to_string.
4242 Convert value to the target format if it doesn't already match.
4243 (ui_printf): Call printf_floating instead of printf_decfloat,
4244 also for double_arg / long_double_arg. Pass argclass.
4245
4246 * dfp.c (decimal_to_string): Add format string argument.
4247 * dfp.h (decimal_to_string): Likewise.
4248
4249 * doublest.c (floatformat_to_string): Add format string argument.
4250 * doublest.h (floatformat_to_string): Likewise.
4251
fdf0cbc2
UW
42522017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4253
4254 * doublest.c (floatformat_precision): New routine.
4255 (floatformat_to_string): Likewise.
4256 * doublest.c (floatformat_to_string): Add prototype.
4257
4258 * printcmd.c (print_scalar_formatted): Only call print_floating
4259 on floating-point types.
4260 * valprint.c: Do not include "floatformat.h".
4261 (generic_val_print_decfloat): Remove.
4262 (generic_val_print): Call generic_val_print_float for both
4263 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4264 (print_floating): Use floatformat_to_string. Handle decimal float.
4265 (print_decimal_floating): Remove, merge into floatformat_to_string.
4266 * value.h (print_decimal_floating): Remove.
4267
4268 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4269
5033013f
UW
42702017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4271
4272 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4273
a664f67e
SM
42742017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4275
4276 * memattr.h: Don't include vec.h.
4277 (struct mem_attrib): Initialize fields.
4278 <unknown>: New static method.
4279 (struct mem_region): Add constructors, operator<, initialize
4280 fields.
4281 * memattr.c: Include algorithm.
4282 (default_mem_attrib, unknown_mem_attrib): Remove.
4283 (user_mem_region_list): New global.
4284 (target_mem_region_list, mem_region_list): Change type to
4285 std::vector<mem_region>.
4286 (mem_use_target): Now a function.
4287 (target_mem_regions_valid): Change type to bool.
4288 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4289 (require_user_regions): Adjust.
4290 (require_target_regions): Adjust.
4291 (create_mem_region): Adjust.
4292 (lookup_mem_region): Adjust.
4293 (invalidate_target_mem_regions): Adjust.
4294 (mem_clear): Rename to...
4295 (user_mem_clear): ... this, and adjust.
4296 (mem_command): Adjust.
4297 (info_mem_command): Adjust.
4298 (mem_enable, enable_mem_command, mem_disable,
4299 disable_mem_command): Adjust.
4300 (mem_delete): Adjust.
4301 (delete_mem_command): Adjust.
4302 * memory-map.h (parse_memory_map): Return an std::vector.
4303 * memory-map.c (parse_memory_map): Likewise.
4304 (struct memory_map_parsing_data): Add constructor.
4305 <memory_map>: Point to std::vector.
4306 (memory_map_start_memory): Adjust.
4307 (memory_map_end_memory): Adjust.
4308 (memory_map_end_property): Adjust.
4309 (clear_result): Remove.
4310 * remote.c (remote_memory_map): Return an std::vector.
4311 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4312 Remove.
4313 (target_debug_print_mem_region_vector): New.
4314 * target-delegates.c: Regenerate.
4315 * target.h (mem_region_vector): New typedef.
4316 (to_memory_map): Return mem_region_vector.
4317 (target_memory_map): Return an std::vector.
4318 * target.c (target_memory_map): Return an std::vector.
4319 (flash_erase_command): Adjust.
4320
6e17c565
SM
43212017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4322
4323 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4324 Change type to std::string.
4325 (memory_map_start_property): Adjust.
4326 (memory_map_end_property): Adjust.
4327
cfba9872
SM
43282017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4329
4330 * infrun.h: Include common/byte-vector.h.
4331 (struct displaced_step_closure): New struct.
4332 (struct buf_displaced_step_closure): New struct.
4333 * infrun.c (displaced_step_closure::~displaced_step_closure):
4334 Provide default implementation.
4335 (displaced_step_clear): Deallocate step closure with delete.
4336 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4337 (aarch64_displaced_step_closure): ... this, extend
4338 displaced_step_closure.
4339 (aarch64_displaced_step_data) <dsc>: Change type to
4340 aarch64_displaced_step_closure.
4341 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4342 unique_ptr.
4343 (aarch64_displaced_step_fixup): Add cast for displaced step
4344 closure.
4345 * amd64-tdep.c (displaced_step_closure): Rename to ...
4346 (amd64_displaced_step_closure): ... this, extend
4347 displaced_step_closure.
4348 <insn_buf>: Change type to std::vector<gdb_byte>.
4349 <max_len>: Remove.
4350 (fixup_riprel): Change type of DSC parameter, adjust to type
4351 change of insn_buf.
4352 (fixup_displaced_copy): Change type of DSC parameter.
4353 (amd64_displaced_step_copy_insn): Instantiate
4354 amd64_displaced_step_closure.
4355 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4356 to type change of insn_buf.
4357 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4358 parameter DSC.
4359 (arm_linux_copy_svc): Likewise.
4360 (cleanup_kernel_helper_return): Likewise.
4361 (arm_catch_kernel_helper_return): Likewise.
4362 (arm_linux_displaced_step_copy_insn): Instantiate
4363 arm_displaced_step_closure.
4364 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4365 (displaced_read_reg): Change type of parameter DSC.
4366 (branch_write_pc): Likewise.
4367 (load_write_pc): Likewise.
4368 (alu_write_pc): Likewise.
4369 (displaced_write_reg): Likewise.
4370 (arm_copy_unmodified): Likewise.
4371 (thumb_copy_unmodified_32bit): Likewise.
4372 (thumb_copy_unmodified_16bit): Likewise.
4373 (cleanup_preload): Likewise.
4374 (install_preload): Likewise.
4375 (arm_copy_preload): Likewise.
4376 (thumb2_copy_preload): Likewise.
4377 (install_preload_reg): Likewise.
4378 (arm_copy_preload_reg): Likewise.
4379 (cleanup_copro_load_store): Likewise.
4380 (install_copro_load_store): Likewise.
4381 (arm_copy_copro_load_store) Likewise.
4382 (thumb2_copy_copro_load_store): Likewise.
4383 (cleanup_branch): Likewise.
4384 (install_b_bl_blx): Likewise.
4385 (arm_copy_b_bl_blx): Likewise.
4386 (thumb2_copy_b_bl_blx): Likewise.
4387 (thumb_copy_b): Likewise.
4388 (install_bx_blx_reg): Likewise.
4389 (arm_copy_bx_blx_reg): Likewise.
4390 (thumb_copy_bx_blx_reg): Likewise.
4391 (cleanup_alu_imm): Likewise.
4392 (arm_copy_alu_imm): Likewise.
4393 (thumb2_copy_alu_imm): Likewise.
4394 (cleanup_alu_reg): Likewise.
4395 (install_alu_reg): Likewise.
4396 (arm_copy_alu_reg): Likewise.
4397 (thumb_copy_alu_reg): Likewise.
4398 (cleanup_alu_shifted_reg): Likewise.
4399 (install_alu_shifted_reg): Likewise.
4400 (arm_copy_alu_shifted_reg): Likewise.
4401 (cleanup_load): Likewise.
4402 (cleanup_store): Likewise.
4403 (arm_copy_extra_ld_st): Likewise.
4404 (install_load_store): Likewise.
4405 (thumb2_copy_load_literal): Likewise.
4406 (thumb2_copy_load_reg_imm): Likewise.
4407 (arm_copy_ldr_str_ldrb_strb): Likewise.
4408 (cleanup_block_load_all): Likewise.
4409 (cleanup_block_store_pc): Likewise.
4410 (cleanup_block_load_pc): Likewise.
4411 (arm_copy_block_xfer): Likewise.
4412 (thumb2_copy_block_xfer): Likewise.
4413 (cleanup_svc): Likewise.
4414 (install_svc): Likewise.
4415 (arm_copy_svc): Likewise.
4416 (thumb_copy_svc): Likewise.
4417 (arm_copy_undef): Likewise.
4418 (thumb_32bit_copy_undef): Likewise.
4419 (arm_copy_unpred): Likewise.
4420 (arm_decode_misc_memhint_neon): Likewise.
4421 (arm_decode_unconditional): Likewise.
4422 (arm_decode_miscellaneous): Likewise.
4423 (arm_decode_dp_misc): Likewise.
4424 (arm_decode_ld_st_word_ubyte): Likewise.
4425 (arm_decode_media): Likewise.
4426 (arm_decode_b_bl_ldmstm): Likewise.
4427 (arm_decode_ext_reg_ld_st): Likewise.
4428 (thumb2_decode_dp_shift_reg): Likewise.
4429 (thumb2_decode_ext_reg_ld_st): Likewise.
4430 (arm_decode_svc_copro): Likewise.
4431 (thumb2_decode_svc_copro): Likewise.
4432 (install_pc_relative): Likewise.
4433 (thumb_copy_pc_relative_16bit): Likewise.
4434 (thumb_decode_pc_relative_16bit): Likewise.
4435 (thumb_copy_pc_relative_32bit): Likewise.
4436 (thumb_copy_16bit_ldr_literal): Likewise.
4437 (thumb_copy_cbnz_cbz): Likewise.
4438 (thumb2_copy_table_branch): Likewise.
4439 (cleanup_pop_pc_16bit_all): Likewise.
4440 (thumb_copy_pop_pc_16bit): Likewise.
4441 (thumb_process_displaced_16bit_insn): Likewise.
4442 (decode_thumb_32bit_ld_mem_hints): Likewise.
4443 (thumb_process_displaced_32bit_insn): Likewise.
4444 (thumb_process_displaced_insn): Likewise.
4445 (arm_process_displaced_insn): Likewise.
4446 (arm_displaced_init_closure): Likewise.
4447 (arm_displaced_step_fixup): Add cast for closure.
4448 * arm-tdep.h: Include infrun.h.
4449 (displaced_step_closure): Rename to ...
4450 (arm_displaced_step_closure): ... this, extend
4451 displaced_step_closure.
4452 <u::svc::copy_svc_os>: Change type of parameter DSC.
4453 <cleanup>: Likewise.
4454 (arm_process_displaced_insn): Likewise.
4455 (arm_displaced_init_closure): Likewise.
4456 (displaced_read_reg): Likewise.
4457 (displaced_write_reg): Likewise.
4458 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4459 Adjust.
4460 * i386-tdep.h: Include infrun.h.
4461 (i386_displaced_step_closure): New typedef.
4462 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4463 i386_displaced_step_closure.
4464 (i386_displaced_step_fixup): Adjust.
4465 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4466 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4467 and unique_ptr.
4468 (ppc_displaced_step_fixup): Adjust.
4469 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4470 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4471 and unique_ptr.
4472 (s390_displaced_step_fixup): Adjust.
4473
b392b304
SM
44742017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4475
4476 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4477 Remove declarations.
4478
d5833c62
TT
44792017-10-20 Tom Tromey <tom@tromey.com>
4480
4481 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4482 std::vector.
4483 (gdb_bfd_record_inclusion): Update.
4484 (bfdp): Remove typedef.
4485
06d5bbc8
TT
44862017-10-20 Tom Tromey <tom@tromey.com>
4487
4488 * gdb_bfd.c (gdb_bfd_ref): Use new.
4489 (struct gdb_bfd_data): Add constructor, destructor, and member
4490 initializers.
4491 (gdb_bfd_unref): Use delete.
4492
2712ce2e
TT
44932017-10-20 Tom Tromey <tom@tromey.com>
4494
4495 * exec.c (exec_file_attach): Use new_bfd_ref.
4496 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4497 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4498 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4499 new_bfd_ref.
4500 * gdb_bfd.h (new_bfd_ref): New function.
4501
fcc8fb2f
PA
45022017-10-20 Pedro Alves <palves@redhat.com>
4503
4504 * main.c (captured_command_loop): Add attribute noinline.
4505
4c2287b0
SM
45062017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4507
4508 * interps.c (struct interp_factory): Add constructor.
4509 (interp_factory_p): Remove typedef.
4510 (DEF_VEC_P(interp_factory_p)): Remove.
4511 (interpreter_factories): Change type to std::vector.
4512 (interp_factory_register): Adjust.
4513 (interp_lookup): Adjust.
4514 (interpreter_completer): Adjust.
4515
3d415c26
TT
45162017-10-19 Tom Tromey <tom@tromey.com>
4517
4518 * break-catch-syscall.c (catch_syscall_completer): Use
4519 std::string, gdb::unique_xmalloc_ptr.
4520
395423c4
TT
45212017-10-19 Tom Tromey <tom@tromey.com>
4522
4523 * infcall.c (call_function_by_hand_dummy): Use std::string.
4524
54f70bc1
TT
45252017-10-19 Tom Tromey <tom@tromey.com>
4526
4527 * mi/mi-main.c (mi_cmd_execute): Update.
4528 * top.h (prepare_execute_command): Return scoped_value_mark.
4529 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4530 Add move constructor.
4531 * top.c (prepare_execute_command): Return scoped_value_mark.
4532 (execute_command): Update.
4533
63929e84
PA
45342017-10-19 Pedro Alves <palves@redhat.com>
4535
4536 * xml-support.c (xml_fetch_content_from_file): Check fread's
4537 return.
4538
a75868f5
PA
45392017-10-19 Pedro Alves <palves@redhat.com>
4540
4541 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4542 async.
4543 (handle_error_fd): New function.
4544 (ser_base_async): Add/delete an event loop file handler for
4545 error_fd.
4546
2edf834e
PA
45472017-10-19 Pedro Alves <palves@redhat.com>
4548
4549 * xml-support.c (xml_fetch_content_from_file): Don't read in
4550 chunks. Instead use fseek to determine the file's size, and read
4551 it in one go.
4552
c8ba13ad
KS
45532017-11-18 Keith Seitz <keiths@redhat.com>
4554
4555 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4556 types.
4557 Add whitespace to front of type name.
4558
37534686
KS
45592017-10-18 Keith Seitz <keiths@redhat.com>
4560
4561 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4562 DW_AT_accessibility.
4563
28c7c158
YQ
45642017-10-18 Yao Qi <yao.qi@linaro.org>
4565
4566 * features/tic6x-c62x-linux.c: Remove.
4567
30f0b101
TT
45682017-10-17 Tom Tromey <tom@tromey.com>
4569
4570 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4571 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4572 (do_mixed_source_and_assembly): Likewise.
4573
57e12da9
TT
45742017-10-17 Tom Tromey <tom@tromey.com>
4575
4576 * regcache.c (regcache::xfer_part): Remove assertion.
4577
7b700999
PA
45782017-10-17 Pedro Alves <palves@redhat.com>
4579
4580 * xml-support.c (xml_fetch_content_from_file): Call
4581 unique_ptr::release() instead unique_ptr::get() when passing
4582 through xrealloc.
4583
d3037ba6
YQ
45842017-10-17 Yao Qi <yao.qi@linaro.org>
4585
4586 * regcache.c (regcache::xfer_part): Remove parameters read and
4587 write, add parameter is_raw. All callers are updated.
4588
83d5a34d
KS
45892017-10-16 Keith Seitz <keiths@redhat.com>
4590
4591 * c-typeprint.c (enum access_specifier): Moved here from
4592 c_type_print_base.
4593 (output_access_specifier): New function.
4594 (c_type_print_base): Consider typedefs when assessing
4595 whether access labels are needed.
4596 Use output_access_specifier as needed.
4597 Output access specifier for typedefs, if needed.
4598 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4599 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4600 fields.
4601 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4602 accessor macros.
4603
87028b87
TT
46042017-10-16 Tom Tromey <tom@tromey.com>
4605
4606 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4607 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4608 * target.c (target_fileio_read_stralloc): Update.
4609 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4610 * target.h (target_fileio_read_stralloc): Return
4611 unique_xmalloc_ptr.
4612
b7b030ad
TT
46132017-10-16 Tom Tromey <tom@tromey.com>
4614
4615 * xml-syscall.c (xml_init_syscalls_info): Update.
4616 * xml-support.c (xinclude_start_include): Update.
4617 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4618 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4619 (xml_fetch_content_from_file): Likewise.
4620 * osdata.c (get_osdata): Update.
4621 * target.h (target_read_stralloc, target_get_osdata): Return
4622 unique_xmalloc_ptr.
4623 * solib-aix.c (solib_aix_get_library_list): Update.
4624 * solib-target.c (solib_target_current_sos): Update.
4625 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4626 * xml-tdesc.c (fetch_available_features_from_target): Update.
4627 (target_fetch_description_xml): Update.
4628 (file_read_description_xml): Update.
4629 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4630 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4631 (remote_pid_to_exec_file): Update.
4632 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4633 (target_get_osdata): Likewise.
4634
b80406ac
TT
46352017-10-16 Tom Tromey <tom@tromey.com>
4636
4637 * remote.c (remote_register_number_and_offset): Use std::vector.
4638 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4639 (putpkt_binary): Use gdb::def_vector.
4640 (compare_sections_command): Use gdb::byte_vector.
4641
a90ecff8
TT
46422017-10-16 Tom Tromey <tom@tromey.com>
4643
4644 * ppc-linux-nat.c (hwdebug_insert_point): Use
4645 gdb::unique_xmalloc_ptr, XDUP.
4646
2dc0e219
TT
46472017-10-16 Tom Tromey <tom@tromey.com>
4648
4649 * probe.c (parse_probes): Use std::string.
4650 (info_probes_for_ops, enable_probes_command)
4651 (disable_probes_command): Remove cleanups.
4652
b05628f0
TT
46532017-10-16 Tom Tromey <tom@tromey.com>
4654
4655 * buildsym.c (block_compar): Remove.
4656 (end_symtab_get_static_block): Use std::vector.
4657
a79b1bc6
SM
46582017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4659
4660 * memrange.h (struct mem_range): Define operator< and operator==.
4661 (mem_range_s): Remove.
4662 (DEF_VEC_O (mem_range_s)): Remove.
4663 (normalize_mem_ranges): Change parameter type to std::vector.
4664 * memrange.c (compare_mem_ranges): Remove.
4665 (normalize_mem_ranges): Change parameter type to std::vector,
4666 adjust to vector change.
4667 * exec.c (section_table_available_memory): Return vector, remove
4668 parameter.
4669 (section_table_read_available_memory): Adjust to std::vector
4670 change.
4671 * remote.c (remote_read_bytes): Adjust to std::vector
4672 change.
4673 * tracepoint.h (traceframe_available_memory): Change parameter
4674 type to std::vector.
4675 * tracepoint.c (traceframe_available_memory): Change parameter
4676 type to std::vector, adjust.
4677 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4678 std::vector change.
4679 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4680 unittests/memrange-selftests.c.
4681 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4682 * gdb/unittests/memrange-selftests.c: New file.
4683
63f0e930
PA
46842017-10-16 Pedro Alves <palves@redhat.com>
4685
4686 * elfread.c (probe_key_free): Rename range-for variable.
4687 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4688 (find_probe_by_pc, collect_probes): Rename range-for variable.
4689
c40c7bfc
YQ
46902017-10-16 Yao Qi <yao.qi@linaro.org>
4691
4692 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4693 * features/tic6x-c62x.c: Remove.
4694 * features/tic6x-c64x-linux.c: Remove.
4695 * features/tic6x-c64x.c: Remove.
4696 * features/tic6x-c64xp-linux.c: Remove.
4697 * features/tic6x-c64xp.c: Remove.
4698 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4699 initialize_tdesc_tic6x_*_linux functions.
4700 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4701 initialize_tdesc_tic6x_* functions.
4702
df27ae6a
YQ
47032017-10-16 Yao Qi <yao.qi@linaro.org>
4704
4705 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4706 tic6x-c62x.
4707 * regformats/tic6x-c62x.dat: Remove.
4708 * regformats/tic6x-c64x.dat: Remove.
4709 * regformats/tic6x-c64xp.dat: Remove.
4710
86766165
SM
47112017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4712
4713 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4714 (the !HAVE_LIBEXPAT version).
4715
824dfcc3
SM
47162017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4717
4718 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4719 const.
4720
2098b393
SM
47212017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4722
4723 * target.h: Include tracepoint.h.
4724 (enum trace_find_type): Move to tracepoint.h.
4725 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4726 * tracepoint.h: Don't include target.h
4727 (enum trace_find_type): Move from target.h.
4728 (parse_traceframe_info): Return a unique ptr.
4729 * tracepoint.c (current_traceframe_info): Change type to unique
4730 ptr.
4731 (free_traceframe_info): Remove.
4732 (clear_traceframe_info): Don't manually free
4733 current_traceframe_info.
4734 (free_result): Remove.
4735 (parse_traceframe_info): Return a unique ptr.
4736 (get_traceframe_info): Adjust to unique ptr.
4737 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4738 * remote.c (remote_traceframe_info): Return a unique ptr.
4739 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4740 ptr.
4741 * target-debug.h (target_debug_print_traceframe_info_up): New
4742 macro.
4743 * target-delegates.c: Regenerate.
4744
4cdd21a8
SM
47452017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4746
4747 * memrange.h (struct mem_range): Add constructors.
4748 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4749 std::vector<mem_range>.
4750 * tracepoint.c (free_traceframe_info): Don't manually free
4751 vector.
4752 (traceframe_info_start_memory): Adjust to vector change.
4753 (traceframe_available_memory): Likewise.
4754 * tracefile-tfile.c (build_traceframe_info): Likewise.
4755 * ctf.c (ctf_traceframe_info): Likewise.
4756
d0d292a2
SM
47572017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4758
4759 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4760 std::vector<int>.
4761 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4762 (traceframe_info_start_tvar): Adjust to vector change.
4763 (parse_traceframe_info): Allocate with new.
4764 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4765 vector change.
4766 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4767 change.
4768 tfile_traceframe_info): Allocate with new.
4769 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4770 change.
4771
8d3c73ef
SM
47722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4773
4774 * tracepoint.c (traceframe_info): Rename to...
4775 (current_traceframe_info): ...this.
4776 (clear_traceframe_info): Adjust.
4777 (get_traceframe_info): Adjust.
4778
b129dcac
SM
47792017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4780
4781 * nat/linux-osdata.c: Include algorithm.
4782 (compare_processes): Remove.
4783 (struct pid_pgid_entry): New struct.
4784 (linux_xfer_osdata_processgroups): Use std::vector instead of
4785 XNEWVEC.
4786
af5bf4ad
SM
47872017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4788
4789 * objfiles.h: Don't include symfile.h.
4790 (struct partial_symbol): Remove forward-declaration.
4791 (struct objfile) <global_psymbols, static_psymbols>: Change type
4792 to std::vector<partial_symbol *>.
4793 * objfiles.c (objfile::objfile): Don't memset those fields.
4794 (objfile::~objfile): Don't free those fields.
4795 * psympriv.h (struct psymbol_allocation_list): Remove
4796 forward-declaration.
4797 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4798 to std::vector.
4799 (start_psymtab_common): Change parameters to std::vector.
4800 * psymtab.c: Include algorithm.
4801 (require_partial_symbols): Call shrink_to_fit.
4802 (find_pc_sect_psymbol): Adjust to vector change.
4803 (match_partial_symbol): Likewise.
4804 (lookup_partial_symbol): Likewise.
4805 (psym_relocate): Likewise.
4806 (dump_psymtab): Likewise.
4807 (recursively_search_psymtabs): Likewise.
4808 (compare_psymbols): Remove.
4809 (sort_pst_symbols): Adjust to vector change.
4810 (start_psymtab_common): Likewise.
4811 (end_psymtab_common): Likewise.
4812 (psymbol_bcache_full): De-constify return value.
4813 (add_psymbol_to_bcache): Likewise.
4814 (extend_psymbol_list): Remove.
4815 (append_psymbol_to_list): Adjust to vector change.
4816 (add_psymbol_to_list): Likewise.
4817 (init_psymbol_list): Likewise.
4818 (maintenance_info_psymtabs): Likewise.
4819 (maintenance_check_psymtabs): Likewise.
4820 * symfile.h (struct psymbol_allocation_list): Remove.
4821 * symfile.c (reread_symbols): Adjust to vector change.
4822 * dbxread.c (start_psymtab): Change type of parameters.
4823 (dbx_symfile_read): Adjust to vector change.
4824 (read_dbx_symtab): Likewise.
4825 (start_psymtab): Change type of parameters.
4826 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4827 (create_partial_symtab): Likewise.
4828 (add_partial_symbol): Likewise.
4829 (write_one_signatured_type): Likewise.
4830 (recursively_write_psymbols): Likewise.
4831 * mdebugread.c (parse_partial_symbols): Likewise.
4832 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4833 (scan_xcoff_symtab): Adjust to vector change.
4834 (xcoff_initial_scan): Likewise.
4835
3ec5942f
SM
48362017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4837
4838 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4839
2399fe6a
YQ
48402017-10-13 Yao Qi <yao.qi@linaro.org>
4841
4842 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4843 Remove s390x-*-expedite, add s390x-expedite.
4844
4bf3f4a8
YQ
48452017-10-13 Yao Qi <yao.qi@linaro.org>
4846
4847 * features/s390-gs-linux64.c: Regenerated.
4848 * features/s390x-gs-linux64.c: Regenerated.
4849
9e86da07
TT
48502017-10-13 Tom Tromey <tom@tromey.com>
4851
4852 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4853 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4854 delete.
4855 * symfile.c (symbol_file_add_with_addrs): Use new.
4856 (symbol_file_add_separate): Update comment.
4857 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4858 * jit.c (jit_object_close_impl): Use new.
4859 (jit_unregister_code): Use delete.
4860 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4861 (~objfile): Rename from free_objfile.
4862 (free_objfile_separate_debug, do_free_objfile_cleanup)
4863 (free_all_objfiles, objfile_purge_solibs): Use delete.
4864 * objfiles.h (struct objfile): Add constructor and destructor.
4865 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4866 (allocate_objfile, free_objfile): Don't declare.
4867 (struct objstats): Add initializers.
4868
c2508e90
SM
48692017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4870
4871 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4872 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4873 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4874 * gdbarch.h: Regenerate.
4875 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4876 Adjust comment.
4877 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4878 (i386_displaced_step_fixup): Adjust comment.
4879 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4880
a900ff72
TT
48812017-10-12 Tom Tromey <tom@tromey.com>
4882
4883 * prologue-value.h (pv_area::store_would_trash): Return bool.
4884 (pv_area::find_reg): Likewise.
4885 * prologue-value.c (pv_area::store_would_trash): Return bool.
4886 (pv_area::find_reg): Likewise.
4887
f7b7ed97
TT
48882017-10-12 Tom Tromey <tom@tromey.com>
4889
4890 * s390-linux-tdep.c (s390_store, s390_load)
4891 (s390_check_for_saved, s390_analyze_prologue): Update.
4892 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4893 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4894 * prologue-value.h (class pv_area): Move from prologue-value.c.
4895 Change names of members. Add constructor, destructor, member
4896 functions.
4897 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4898 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4899 (pv_area_fetch, pv_area_scan): Don't declare.
4900 * prologue-value.c (struct pv_area::area_entry): Now member of
4901 pv_area.
4902 (struct pv_area): Move to prologue-value.h.
4903 (pv_area::pv_area): Rename from make_pv_area.
4904 (pv_area::~pv_area): Rename from free_pv_area.
4905 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4906 (clear_entries, find_entry, overlaps, store_would_trash, store)
4907 (fetch, find_reg, scan): Now member of pv_area.
4908 Remove "area" argument. Update.
4909 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4910 Update.
4911 * mn10300-tdep.c (push_reg, check_for_saved)
4912 (mn10300_analyze_prologue): Update.
4913 * mep-tdep.c (is_arg_spill, check_for_saved)
4914 (mep_analyze_prologue): Update.
4915 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4916 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4917 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4918 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4919 Update.
4920 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4921 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4922
466eecee
SM
49232017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4924
4925 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4926 * linux-nat.c (linux_nat_delete_thread): New variable.
4927 (lwp_free): Invoke linux_nat_delete_thread if set.
4928 (linux_nat_set_delete_thread): New function.
4929 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4930 thread delete callback.
4931 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4932 (_initialize_arm_linux_nat): Assign thread delete callback.
4933 * s390-linux-nat.c (s390_delete_thread): New function.
4934 (_initialize_s390_nat): Assign thread delete callback.
4935 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4936 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4937 function.
4938 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4939 declaration.
4940 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4941 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4942
f71c8822
TT
49432017-10-09 Tom Tromey <tom@tromey.com>
4944
4945 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4946 std::string.
4947 * tui/tui-layout.c (enum tui_status): Use std::string.
4948
981a3fb3
TT
49492017-10-11 Tom Tromey <tom@tromey.com>
4950
4951 * gdbthread.h (thread_command): Constify.
4952 * inferior.h (detach_command): Constify.
4953 * top.h (set_history, show_history): Constify.
4954 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4955 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4956 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4957 * printcmd.c (set_command): Constify.
4958 (non_const_set_command): New function.
4959 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4960 * breakpoint.c (enable_command, disable_command, delete_command)
4961 (catch_command, tcatch_command, set_breakpoint_cmd)
4962 (show_breakpoint_cmd): Constify.
4963 * macrocmd.c (macro_command): Constify.
4964 * infcmd.c (unset_command, kill_command, detach_command)
4965 (info_proc_cmd): Constify.
4966 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4967 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4968 (info_auto_load_cmd): Constify.
4969 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4970 (unset_tdesc_cmd): Constify.
4971 * ada-lang.c (set_ada_command, show_ada_command)
4972 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4973 * guile/guile.c (set_guile_command, show_guile_command)
4974 (info_guile_command): Constify.
4975 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4976 Constify.
4977 * skip.c (skip_command): Constify.
4978 * compile/compile.c (_initialize_compile): Constify.
4979 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4980 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4981 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4982 (maint_btrace_pt_show_cmd): Constify.
4983 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4984 Constify.
4985 * python/python.c (user_show_python, user_set_python): Constify.
4986 * mips-tdep.c (set_mips_command, show_mips_command)
4987 (set_mipsfpu_command): Constify.
4988 * record-btrace.c (cmd_record_btrace_start)
4989 (cmd_set_record_btrace, cmd_show_record_btrace)
4990 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4991 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4992 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4993 Constify.
4994 * symfile.c (overlay_command): Constify.
4995 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4996 * cli/cli-logging.c (set_logging_command, show_logging_command):
4997 Constify.
4998 * cli/cli-dump.c (dump_command, append_command)
4999 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5000 (tekhex_dump_command, binary_dump_command)
5001 (binary_append_command): Constify.
5002 * cli/cli-decode.c (struct cmd_list_element): Change type of
5003 "fun".
5004 * cli/cli-cmds.c (info_command, show_command, set_debug)
5005 (show_debug): Constify.
5006 (show_command): Add non-const overload.
5007 * top.c (set_history, show_history): Constify.
5008 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5009 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5010 * target.c (target_command): Constify.
5011 * sparc64-tdep.c (info_adi_command): Constify.
5012 * record-full.c (cmd_record_full_start): Constify.
5013 (set_record_full_command): Constify. Fix typo.
5014 (show_record_full_command): Constify.
5015 * thread.c (thread_command, thread_apply_command): Constify.
5016 * memattr.c (dummy_cmd): Constify.
5017 * value.c (function_command): Constify.
5018 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5019 * probe.c (info_probes_command): Constify.
5020 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5021 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5022 (show_thread_cmd, set_thread_default_cmd)
5023 (show_thread_default_cmd): Constify.
5024 (check_empty): Constify.
5025 * tracepoint.c (tfind_command): Constify.
5026 * cp-support.c (maint_cplus_command): Constify.
5027 * windows-tdep.c (info_w32_command): Constify.
5028 * record.c (cmd_record_start, set_record_command)
5029 (show_record_command, info_record_command, cmd_record_goto):
5030 Constify.
5031 * ravenscar-thread.c (set_ravenscar_command)
5032 (show_ravenscar_command): Constify.
5033 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5034 Constify.
5035 (add_internal_problem_command): Remove casts.
5036 * arc-tdep.c (maintenance_print_arc_command): Constify.
5037 * valprint.c (set_print, show_print, set_print_raw)
5038 (show_print_raw): Constify.
5039 * maint.c (maintenance_command, maintenance_info_command)
5040 (maintenance_print_command, maintenance_set_cmd)
5041 (maintenance_show_cmd, set_per_command_cmd)
5042 (show_per_command_cmd, maintenance_check_command): Constify.
5043 * language.c (set_check, show_check): Constify.
5044 * typeprint.c (show_print_type, set_print_type): Constify.
5045 * go32-nat.c (go32_info_dos_command): Constify.
5046
fdf44873
TT
50472017-10-11 Tom Tromey <tom@tromey.com>
5048
5049 * breakpoint.c (prepare_re_set_context): Remove.
5050 (breakpoint_re_set_one): Update. Don't use cleanups.
5051 (breakpoint_re_set): Use scoped_restore, std::string, and
5052 scoped_restore_current_language.
5053
81b1e71c
TT
50542017-10-11 Tom Tromey <tom@tromey.com>
5055
5056 * breakpoint.c (commands_command_1): Use std::string.
5057 (cleanup_executing_breakpoints): Remove.
5058 (bpstat_do_actions_1): Use scoped_restore.
5059 (bpstat_check_watchpoint): Use std::string.
5060 (decode_static_tracepoint_spec): Likewise.
5061 (break_range_command): Likewise.
5062 (watch_command_1): Likewise.
5063 (compare_breakpoints): Change argument types.
5064 (clear_command): Use std::vector.
5065 (cleanup_executing_breakpoints): Remove.
5066 (update_global_location_list): Use unique_xmalloc_ptr.
5067 (strace_command): Remove unused declaration.
5068
4f9d9906
JB
50692017-10-11 John Baldwin <jhb@FreeBSD.org>
5070
5071 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5072 * NEWS: Mention new FreeBSD/arm native configuration.
5073 * configure.host: Add arm*-*-freebsd*.
5074 * configure.nat: Likewise.
5075 * arm-fbsd-nat.c: New file.
5076
7176dfd2
JB
50772017-10-11 John Baldwin <jhb@FreeBSD.org>
5078
5079 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5080 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5081 * NEWS: Mention new FreeBSD/arm target.
5082 * configure.tgt: Add arm*-*-freebsd*.
5083 * arm-fbsd-tdep.c: New file.
5084 * arm-fbsd-tdep.h: New file.
5085
fe220226
MR
50862017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5087
5088 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5089 `gdbarch_elfcore_write_linux_prpsinfo'.
5090 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5091 method.
5092 (elf_internal_linux_prpsinfo): Remove declaration.
5093 * gdbarch.h: Regenerate.
5094 * gdbarch.c: Regenerate.
5095
a2f63b2e
MR
50962017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5097
5098 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5099 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5100
458ca1d0
PA
51012017-10-11 Pedro Alves <palves@redhat.com>
5102
5103 * breakpoint.c (reattach_breakpoints): Delete.
5104 * breakpoint.h (reattach_breakpoints): Delete.
5105
905014d7
SM
51062017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5107
5108 * symfile.c (registered_sym_fns): Make struct, not typedef.
5109 (DEF_VEC_O (registered_sym_fns)): Remove.
5110 (symtab_fns): Change type to std::vector.
5111 (add_symtab_fns): Adjust.
5112 (find_sym_fns): Adjust.
5113
56d704da
AK
51142017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5115
5116 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5117 * arc-tdep.h (arc_arch_is_em): New function.
5118 (arc_arch_is_hs): Likewise.
5119
7fa29be9
EB
51202017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5121
5122 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5123 parentheses in the declaration.
5124 (macro_lookup_inclusion): Likewise.
5125 (macro_lookup_definition): Likewise.
5126 * p-lang.h (pascal_builtin_types): Likewise.
5127 * tui/tui-data.c (tui_win_list): Likewise.
5128 * tui/tui-data.h (tui_win_list): Likewise.
5129 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5130
d9b477e3
KB
51312017-10-11 Mark Rages <markrages@gmail.com>
5132
5133 * target-memory.c (block_boundaries): Fix for block address not
5134 aligned on block size.
5135
65630365
PA
51362017-10-10 Pedro Alves <palves@redhat.com>
5137 Tom Tromey <tom@tromey.com>
5138
5139 * breakpoint.c (struct captured_breakpoint_query_args)
5140 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5141 (print_breakpoint): New.
5142 * breakpoint.h (print_breakpoint): Declare.
5143 * common/common-exceptions.h (enum return_reason): Remove
5144 references to catch_exceptions.
5145 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5146 Delete.
5147 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5148 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5149 * gdb.h: Delete.
5150 * gdbthread.h (thread_select): Declare.
5151 * mi/mi-cmd-break.c: Don't include gdb.h.
5152 (breakpoint_notify): Use print_breakpoint.
5153 * mi/mi-cmd-catch.c: Don't include gdb.h.
5154 * mi/mi-interp.c: Don't include gdb.h.
5155 (mi_print_breakpoint_for_event): New.
5156 (mi_breakpoint_created, mi_breakpoint_modified): Use
5157 mi_print_breakpoint_for_event.
5158 * mi/mi-main.c: Don't include gdb.h.
5159 (mi_cmd_thread_select): Parse the global thread ID here. Use
5160 thread_select instead of gdb_thread_select.
5161 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5162 of using gdb_list_thread_ids.
5163 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5164 FILEIO_ENOSYS here.
5165 (remote_fileio_request): Use TRY/CATCH instead of
5166 catch_exceptions.
5167 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5168 (symbol_file_add_from_memory_wrapper): Delete.
5169 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5170 * thread.c: Don't include gdb.h.
5171 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5172 (thread_alive): Use thread_select.
5173 (do_captured_thread_select): Delete, parts salvaged as ...
5174 (thread_select): ... this new function.
5175 (gdb_thread_select): Delete.
5176
bf469271
PA
51772017-10-10 Pedro Alves <palves@redhat.com>
5178 Tom Tromey <tom@tromey.com>
5179
5180 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5181 and reverse logic.
5182 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5183 No longer macros. Instead ...
5184 (enum wp_check_result): They're now values of this new
5185 enumeration.
5186 (watchpoint_check): Change return type to wp_check_result and
5187 parameter type to bpstat.
5188 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5189 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5190 catch_errors. Reverse logic of watchpoint_check call.
5191 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5192 pointer as parameter.
5193 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5194 * common/common-exceptions.c (throw_exception_sjlj): Update
5195 comments to avoid mentioning catch_errors.
5196 * exceptions.c (catch_errors): Delete.
5197 * exceptions.h: Update comments to avoid mentioning catch_errors.
5198 (catch_errors_ftype, catch_errors): Delete.
5199 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5200 (hook_stop_stub): Delete.
5201 (restore_selected_frame): Change return type to void, and
5202 parameter type to const frame_id &.
5203 (restore_infcall_control_state): Use TRY/CATCH instead of
5204 catch_errors.
5205 * main.c (captured_command_loop): Return void and remove
5206 parameter. Remove references to catch_errors.
5207 (captured_main): Use TRY/CATCH instead of catch_errors.
5208 * objc-lang.c (objc_submethod_helper_data)
5209 (find_objc_msgcall_submethod_helper): Delete.
5210 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5211 catch_errors.
5212 * record-full.c (record_full_message): Return void.
5213 (record_full_message_args, record_full_message_wrapper): Delete.
5214 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5215 instead of catch_errors.
5216 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5217 parameter type to int.
5218 * solib-darwin.c (open_symbol_file_object): Ditto.
5219 * solib-dsbt.c (open_symbol_file_object): Ditto.
5220 * solib-frv.c (open_symbol_file_object): Ditto.
5221 * solib-svr4.c (open_symbol_file_object): Ditto.
5222 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5223 * solib.c (update_solib_list): Use TRY/CATCH instead of
5224 catch_errors.
5225 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5226 Change type.
5227 * symmisc.c (struct print_symbol_args): Remove.
5228 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5229 (print_symbol): Change type.
5230 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5231 and remove parameters.
5232 (catch_errors): New.
5233 (get_windows_debug_event): Adjust.
5234
1a56bfa5
TT
52352017-10-09 Tom Tromey <tom@tromey.com>
5236
5237 * mi/mi-main.c (free_splay_tree): Remove.
5238 (list_available_thread_groups): Use splay_tree_up.
5239 * common/gdb_splay_tree.h: New file.
5240
0c478e2d
TT
52412017-10-09 Tom Tromey <tom@tromey.com>
5242
5243 * mi/mi-main.c (do_nothing): Remove.
5244 (list_available_thread_groups): Update.
5245
cbd2b4e3
PA
52462017-10-09 Pedro Alves <palves@redhat.com>
5247
5248 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5249 reading registers when switching context.
5250
a181c0bf
JB
52512017-10-09 John Baldwin <jhb@FreeBSD.org>
5252
5253 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5254 (fbsd_convert_siginfo): Likewise.
5255 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5256
6e66f753
SM
52572017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5258
5259 * configure.ac (try_guile_versions): Remove guile-2.2.
5260 * configure: Regenerate.
5261
890e9790
TT
52622017-10-09 Tom Tromey <tom@tromey.com>
5263
5264 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5265 (COMPILE.pre): Use $(CXX).
5266
109483d9
PA
52672017-10-09 Pedro Alves <palves@redhat.com>
5268
5269 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5270 Use bool.
5271 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5272 * cp-support.h (cp_remove_params): Now returns a
5273 gdb::unique_xmalloc_ptr.
5274 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5275 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5276 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5277 returning a gdb::unique_xmalloc_ptr.
5278 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5279 * stack.c (find_frame_funname): Adjust to cp_remove_params
5280 returning a gdb::unique_xmalloc_ptr.
5281
791afaa2
TT
52822017-10-08 Tom Tromey <tom@tromey.com>
5283
5284 * dwarf2read.c (dwarf2_get_dwz_file): Use
5285 gdb::unique_xmalloc_ptr.
5286 (find_slot_in_mapped_hash): Likewise.
5287 (dwarf2_physname): Likewise.
5288 (create_dwo_unit_in_dwp_v1): Use std::string.
5289 (create_dwo_unit_in_dwp_v2): Likewise.
5290 (lookup_dwo_cutu): Likewise.
5291 (inherit_abstract_dies): Use std::vector.
5292 (read_array_type): Likewise.
5293 (dwarf_decode_macros): Remove unused declaration.
5294 (unsigned_int_compar): Remove.
5295 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5296 (psymtabs_addrmap_cleanup): Remove.
5297
30a9c02f
TT
52982017-10-08 Tom Tromey <tom@tromey.com>
5299
5300 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5301 * frame.h (frame_cleanup_after_sniffer): Declare.
5302 (frame_prepare_for_sniffer): Return void.
5303 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5304 type of argument.
5305 (frame_prepare_for_sniffer): Return void.
5306
757325a3
TT
53072017-10-08 Tom Tromey <tom@tromey.com>
5308
5309 * utils.h (make_cleanup_value_free): Remove.
5310 * utils.c (do_value_free, struct cleanup): Remove.
5311 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5312 Use gdb_value_up.
5313 * value.h (struct value_deleter): New.
5314 (gdb_value_up): New typedef.
5315
b9c04fb2
TT
53162017-10-08 Tom Tromey <tom@tromey.com>
5317
5318 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5319 (make_cleanup_free_search_symbols): Remove.
5320 (search_symbols): Return std::vector.
5321 (symbol_search::compare_search_syms): Now member of
5322 symbol_search. Change arguments.
5323 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5324 (symtab_symbol_info, rbreak_command): Update.
5325 * symtab.h (struct symbol_search) <next>: Remove.
5326 Add constructors.
5327 (symbol_search::operator<): New function.
5328 (symbol_search::operator==): New function.
5329 (search_symbols): Remove std::vector.
5330 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5331 (symbol_search::compare_search_syms): Declare.
5332
0d28b0a5
YQ
53332017-10-06 Yao Qi <yao.qi@linaro.org>
5334
5335 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5336 arch/aarch64-insn.o.
5337 Remove one rule.
5338 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5339
71917808
YQ
53402017-10-06 Yao Qi <yao.qi@linaro.org>
5341
5342 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5343 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5344 arch/arm-linux.o respectively.
5345 * configure.tgt: Likewise.
5346
2081b2b2
YQ
53472017-10-06 Yao Qi <yao.qi@linaro.org>
5348
5349 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5350 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5351
a1b85d28
PA
53522017-10-06 Pedro Alves <palves@redhat.com>
5353
5354 * windows-nat.c: Include <algorithm>.
5355
d97987e2
YQ
53562017-10-06 Yao Qi <yao.qi@linaro.org>
5357
5358 * configure.tgt (i386_tobjs): New variable.
5359 (amd64_tobjs): New variable.
5360 Set $cpu_obs and $os_obs.
5361
f38307f5
YQ
53622017-10-06 Yao Qi <yao.qi@linaro.org>
5363
5364 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5365 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5366 (clean): Remove object files and dependency files.
5367 (distclean): Remove the directory.
5368 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5369 * configure: Re-generated.
5370 * configure.tgt: Replace amd64.o with arch/amd64.o.
5371
2f924de6
JM
53722017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5373
5374 PR build/22188
5375 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5376 and SETEND.
5377
2fd9d7ca
PA
53782017-10-05 Pedro Alves <palves@redhat.com>
5379
5380 * linux-nat.c (linux_child_follow_fork): When following the parent
5381 and detaching the child, consult the parent thread's architecture
5382 instead of the child's.
5383
d13b8493
UW
53842017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5385
5386 * ax.h: Do not include "doublest.h".
5387 (union agent_val): Remove.
5388
3b4b2f16
UW
53892017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5390
5391 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5392 (decimal_to_string): Return std::string object.
5393 (decimal_from_string): Accept std::string object. Return bool.
5394 (decimal_from_integral, decimal_from_doublest): Remove.
5395 (decimal_from_longest): Add prototype.
5396 (decimal_from_ulongest): Likewise.
5397 (decimal_to_longest): Likewise.
5398 (decimal_from_doublest): Likewise.
5399 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5400 (MAX_DECIMAL_STRING): Move here.
5401 (decimal_to_string): Return std::string object.
5402 (decimal_from_string): Accept std::string object. Return bool.
5403 (decimal_from_integral): Remove, replace by ...
5404 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5405 (decimal_to_longest): New function.
5406 (decimal_from_floating): Remove, replace by ...
5407 (decimal_from_doublest): ... this new function.
5408 (decimal_to_doublest): Update to new decimal_to_string interface.
5409
5410 * value.c (unpack_long): Use decimal_to_longest.
5411 * valops.c (value_cast): Use decimal_from_doublest instead of
5412 decimal_from_floating. Use decimal_from_[u]longest isntead of
5413 decimal_from_integral.
5414 * valarith.c (value_args_as_decimal): Likewise.
5415 * valprint.c (print_decimal_floating): Update to new
5416 decimal_to_string interface.
5417 * printcmd.c (printf_decfloat): Likewise.
5418 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5419
1841ee5d
UW
54202017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5421
5422 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5423 * gdbtypes.c: Include "floatformat.h".
5424 * value.c: Likewise.
5425 * m68k-tdep.c: Likewise.
5426
5427 * findvar.c: Do not include "floatformat.h".
5428 * amd64-darwin-tdep.c: Likewise.
5429 * arm-linux-tdep.c: Likewise.
5430 * i386-darwin-tdep.c: Likewise.
5431 * i387-tdep.c: Likewise.
5432 * m68k-linux-tdep.c: Likewise.
5433 * mep-tdep.c: Likewise.
5434 * mips-tdep.c: Likewise.
5435 * nios2-tdep.c: Likewise.
5436 * s390-linux-tdep.c: Likewise.
5437 * sparc-obsd-tdep.c: Likewise.
5438 * sparc-tdep.c: Likewise.
5439 * sparc64-tdep.c: Likewise.
5440 * spu-tdep.c: Likewise.
5441 * tic6x-tdep.c: Likewise.
5442 * tilegx-tdep.c: Likewise.
5443 * vax-tdep.c: Likewise.
5444 * xstormy16-tdep.c: Likewise.
5445 * xtensa-tdep.c: Likewise.
5446
5447 * top.c: Do not include "doublest.h".
5448 * aarch64-tdep.c: Likewise.
5449 * alpha-tdep.c: Likewise.
5450 * arm-linux-tdep.c: Likewise.
5451 * m68k-linux-tdep.c: Likewise.
5452 * tilegx-tdep.c: Likewise.
5453 * xstormy16-tdep.c: Likewise.
5454
a80a6471
JB
54552017-10-05 John Baldwin <jhb@FreeBSD.org>
5456
5457 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5458 (mipsn32_fbsd_sigframe): Define.
5459 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5460 for FreeBSD/mipsn32.
5461
12c4bd7f
JB
54622017-10-05 John Baldwin <jhb@FreeBSD.org>
5463
5464 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5465 AT_HWCAP.
5466
c91933e9
TG
54672017-10-05 Tristan Gingold <tgingold@free.fr>
5468
5469 * MAINTAINERS (Misc): Update my email address.
5470
5cd63fda
PA
54712017-10-04 Pedro Alves <palves@redhat.com>
5472
5473 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5474 it instead of target_gdbarch.
5475 (get_remote_state, get_remote_packet_size): Adjust
5476 get_remote_arch_state calls, passing down target_gdbarch
5477 explicitly.
5478 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5479 'gdbarch' and use it instead of target_gdbarch.
5480 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5481 passing down target_gdbarch explicitly.
5482 (struct stop_reply) <arch>: New field.
5483 (remote_parse_stop_reply): Use the stopped thread's architecture,
5484 not the current inferior's. Save the architecture in the
5485 stop_reply.
5486 (process_stop_reply): Use the stop reply's architecture.
5487 (process_g_packet, remote_fetch_registers)
5488 (remote_prepare_to_store, store_registers_using_G)
5489 (remote_store_registers): Adjust get_remote_arch_state calls,
5490 using the regcache's architecture.
5491 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5492 passing down target_gdbarch explicitly.
5493 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5494 beneath instead of calling target_gdbarch.
5495 * target.c (default_thread_architecture): Use the specified
5496 inferior's architecture, instead of the current inferior's
5497 architecture (via target_gdbarch).
5498
ed4227b7
PA
54992017-10-04 Pedro Alves <palves@redhat.com>
5500
5501 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5502 case.
5503 (regcache_print): Handle !target_has_registers here instead.
5504
55b11ddf
PA
55052017-10-04 Pedro Alves <palves@redhat.com>
5506
5507 * frame.c (create_test_frame): Delete.
5508 * frame.h (create_test_frame): Delete.
5509 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5510 (class regcache_test): Delete.
5511 (test_target_has_registers, test_target_has_stack)
5512 (test_target_has_memory, test_target_prepare_to_store)
5513 (test_target_store_registers): New functions.
5514 (test_target_ops): New class.
5515 (register_to_value_test): Error out if there's already a
5516 process_stratum (or higher) target pushed. Create a fuller mock
5517 environment, with mock target_ops, inferior, address space, thread
5518 and inferior_ptid.
5519 * progspace.c (struct address_space): Move to ...
5520 * progspace.h (struct address_space): ... here.
5521 * regcache.h (regcache::~regcache, regcache::raw_write)
5522 [GDB_SELF_TEST]: No longer virtual.
5523
4c71c105
SM
55242017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5525
5526 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5527
73dcd72d
PA
55282017-10-04 Pedro Alves <palves@redhat.com>
5529
5530 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5531 out of 'between TRY and CATCH'.
5532
44704526
PA
55332017-10-04 Pedro Alves <palves@redhat.com>
5534
5535 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5536 * common/common-exceptions.h (TRY): Open an outermost scope.
5537 Expand intro comment.
5538 (CATCH): Reindent.
5539 (END_CATCH): Close the outermost scope.
5540 * completer.c (complete_line_internal): Add missing END_CATCH.
5541
bc3b087d
SDJ
55422017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5543
5544 * NEWS (Changes since GDB 8.0): Add entry about new
5545 'set-cwd-on-gdbserver' feature.
5546 (New remote packets): Add entry for QSetWorkingDir.
5547 * common/common-inferior.h (set_inferior_cwd): New prototype.
5548 * infcmd.c (set_inferior_cwd): Remove "static".
5549 (show_cwd_command): Expand text to include remote debugging.
5550 * remote.c: Add PACKET_QSetWorkingDir.
5551 (remote_protocol_features) <QSetWorkingDir>: New entry for
5552 PACKET_QSetWorkingDir.
5553 (extended_remote_set_inferior_cwd): New function.
5554 (extended_remote_create_inferior): Call
5555 "extended_remote_set_inferior_cwd".
5556 (_initialize_remote): Call "add_packet_config_cmd" for
5557 QSetWorkingDir.
5558
d092c5a2
SDJ
55592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5560
5561 * NEWS (New commands): Mention "set/show cwd".
5562 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5563 "cd" command's help text.
5564 * common/common-inferior.h (get_inferior_cwd): New prototype.
5565 * infcmd.c (inferior_cwd_scratch): New global variable.
5566 (set_inferior_cwd): New function.
5567 (get_inferior_cwd): Likewise.
5568 (set_cwd_command): Likewise.
5569 (show_cwd_command): Likewise.
5570 (_initialize_infcmd): Add "set/show cwd" commands.
5571 * inferior.h (class inferior) <cwd>: New field.
5572 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5573 (fork_inferior): Change inferior's cwd before its execution.
5574 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5575 to CreateProcess.
5576
7da0a886
SDJ
55772017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5578
5579 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5580 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5581 (COMMON_OBS): Add gdb_tilde_expand.o.
5582 * common/gdb_tilde_expand.c: New file.
5583 * common/gdb_tilde_expand.h: Likewise.
5584
db8dd160
MR
55852017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5586
5587 * gdbarch.sh (objfile): Remove duplicate declaration.
5588 * gdbarch.h: Regenerate.
5589
f8bfbf22
TT
55902017-10-03 Tom Tromey <tom@tromey.com>
5591
5592 * utils.c (internal_vproblem): Use string_vprintf.
5593
5178ed48
TT
55942017-10-03 Tom Tromey <tom@tromey.com>
5595
5596 * printcmd.c (info_symbol_command): Use std::string.
5597
8cff8730
TT
55982017-10-03 Tom Tromey <tom@tromey.com>
5599
5600 * top.c (gdb_safe_append_history): Use std::string.
5601
895b8f30
TT
56022017-10-03 Tom Tromey <tom@tromey.com>
5603
5604 * event-top.c (stdin_event_handler): Update.
5605 * main.c (captured_main_1): Update.
5606 * top.h (make_delete_ui_cleanup): Remove.
5607 (struct ui): Add constructor and destructor.
5608 (new_ui, delete_ui): Remove.
5609 * top.c (make_delete_ui_cleanup): Remove.
5610 (new_ui_command): Use std::unique_ptr.
5611 (delete_ui_cleanup): Remove.
5612 (ui::ui): Rename from new_ui. Update.
5613 (free_ui): Remove.
5614 (ui::~ui): Rename from delete_ui. Update.
5615
0efef640
TT
56162017-10-03 Tom Tromey <tom@tromey.com>
5617
5618 * symfile.c (load_progress): Use gdb::byte_vector.
5619
245ad7d3
TT
56202017-10-03 Tom Tromey <tom@tromey.com>
5621
5622 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5623 declaration.
5624 * printcmd.c (x_command): Remove unused declaration.
5625 * symfile.c (symbol_file_command): Remove unused declaration.
5626
e05550d7
TT
56272017-10-03 Tom Tromey <tom@tromey.com>
5628
5629 * utils.c (internal_vproblem): Use std::string.
5630 (defaulted_query): Likewise.
5631
b95de2b7
TT
56322017-10-03 Tom Tromey <tom@tromey.com>
5633
5634 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5635 * top.c (execute_command_to_string): Update.
5636 * utils.c (make_cleanup_restore_page_info): Remove.
5637 (do_restore_page_info_cleanup): Remove.
5638 (set_batch_flag_and_restore_page_info):
5639 New.
5640 (make_cleanup_restore_page_info): Remove.
5641 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5642 (~set_batch_flag_and_restore_page_info): New
5643 (make_cleanup_restore_uinteger): Remove.
5644 (make_cleanup_restore_integer): Remove.
5645 (struct restore_integer_closure): Remove.
5646 (restore_integer): Remove.
5647 * utils.h (struct set_batch_flag_and_restore_page_info): New
5648 class.
5649 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5650 (make_cleanup_restore_page_info): Remove.
5651 (make_cleanup_restore_uinteger) Remove.
5652 (make_cleanup_restore_integer) Remove.
5653
07036511
TT
56542017-10-03 Tom Tromey <tom@tromey.com>
5655
5656 * record-full.h (record_full_gdb_operation_disable_set): Return
5657 scoped_restore_tmpl<int>.
5658 * infrun.c (adjust_pc_after_break): Update.
5659 (handle_signal_stop): Update.
5660 * record-full.c (record_full_gdb_operation_disable_set): Return
5661 scoped_restore_tmpl<int>.
5662 (record_full_wait_1, record_full_insert_breakpoint)
5663 (record_full_remove_breakpoint, record_full_save)
5664 (record_full_goto_insn): Update.
5665
45320ffa
TT
56662017-10-02 Tom Tromey <tom@tromey.com>
5667
5668 PR rust/22236:
5669 * rust-lang.c (rust_val_print_str): New function.
5670 (val_print_struct): Call it.
5671 (rust_subscript): Preserve name of slice type.
5672
b3e3859b
TT
56732017-10-02 Tom Tromey <tom@tromey.com>
5674
5675 * rust-lang.c (rust_subscript): Handle slices in
5676 EVAL_AVOID_SIDE_EFFECTS case.
5677
01af5e0d
TT
56782017-10-02 Tom Tromey <tom@tromey.com>
5679
5680 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5681
888e3ddb
TT
56822017-10-02 Tom Tromey <tom@tromey.com>
5683
5684 * rust-lang.h (rust_slice_type): Add "extern".
5685
cc536b21
PA
56862017-10-02 Tom Tromey <tom@tromey.com>
5687 Pedro Alves <palves@redhat.com>
5688
5689 * ada-lang.h (ada_exc_info::operator<): Make const.
5690 (ada_exc_info::operator==): Make const.
5691 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5692 Make const.
5693
386c8614
TT
56942017-09-29 Tom Tromey <tom@tromey.com>
5695
5696 * target.c (read_whatever_is_readable): Change type of "result".
5697 Update.
5698 (free_memory_read_result_vector): Remove.
5699 (read_memory_robust): Change return type. Update.
5700 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5701 bin2hex, std::string.
5702 * target.h (memory_read_result_s): Remove typedef.
5703 (free_memory_read_result_vector): Remove.
5704 (read_memory_robust): Return std::vector.
5705
789c4b5e
TT
57062017-09-29 Tom Tromey <tom@tromey.com>
5707
5708 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5709
ab816a27
TT
57102017-09-29 Tom Tromey <tom@tromey.com>
5711
5712 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5713 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5714 operator< and operator==.
5715 (ada_exceptions_list): Return a std::vector.
5716 * ada-lang.c (ada_exc_info::operator<): Rename from
5717 compare_ada_exception_info.
5718 (ada_exc_info::operator==): New.
5719 (sort_remove_dups_ada_exceptions_list): Change type of
5720 "exceptions".
5721 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5722 (ada_add_global_exceptions): Likewise.
5723 (ada_exceptions_list_1): Return a std::vector.
5724 (ada_exceptions_list): Likewise.
5725
52f9abe4
TT
57262017-09-29 Tom Tromey <tom@tromey.com>
5727
5728 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5729 'std::set *'.
5730 (print_one_inferior): Update.
5731 (free_vector_of_ints): Remove.
5732 (list_available_thread_groups): Change "ids" to std::set.
5733 (mi_cmd_list_thread_groups): Update.
5734 (struct collect_cores_data) <core>: Now a std::set.
5735 (collect_cores): Update.
5736 (unique): Remove.
5737 (print_one_inferior): Update.
5738
dcd5ddcc
TT
57392017-09-29 Tom Tromey <tom@tromey.com>
5740
5741 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5742 (mi_execute_async_cli_command): Likewise.
5743 (mi_cmd_trace_frame_collected): Use field_fmt.
5744
45d288cc
TT
57452017-09-29 Tom Tromey <tom@tromey.com>
5746
5747 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5748 gdb::byte_vector.
5749
6afe2f4a
TT
57502017-09-29 Tom Tromey <tom@tromey.com>
5751
5752 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5753
9813429a
TT
57542017-09-29 Tom Tromey <tom@tromey.com>
5755
5756 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5757
2d6960b4
TT
57582017-09-29 Tom Tromey <tom@tromey.com>
5759
5760 * varobj.h (varobj_gen_name): Return std::string.
5761 * varobj.c (varobj_gen_name): Return std::string.
5762 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5763 (mi_cmd_var_delete): Don't copy "name".
5764
784c453a
TT
57652017-09-29 Tom Tromey <tom@tromey.com>
5766
5767 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5768 (mi_cmd_break_insert_1): Update.
5769
a9bc57b9
TT
57702017-09-29 Tom Tromey <tom@tromey.com>
5771
5772 * target.h (make_scoped_defer_target_commit_resume): Update.
5773 * target.c (make_scoped_defer_target_commit_resume): Rename from
5774 make_cleanup_defer_target_commit_resume. Return a
5775 scoped_restore.
5776 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5777
9754d8c4
TT
57782017-09-29 Tom Tromey <tom@tromey.com>
5779
5780 * main.c (captured_main_1): Remove unused declaration.
5781 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5782
99ef965c
TT
57832017-09-29 Tom Tromey <tom@tromey.com>
5784
5785 * symtab.c (search_symbols): Remove unused outer cleanup.
5786 (make_source_files_completion_list): Remove unused declaration.
5787
42518ba7
TT
57882017-09-29 Tom Tromey <tom@tromey.com>
5789
5790 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5791
726b2169
TT
57922017-09-29 Tom Tromey <tom@tromey.com>
5793
5794 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5795 gdb::byte_vector.
5796
55b06432
TT
57972017-09-29 Tom Tromey <tom@tromey.com>
5798
5799 * complaints.c (vcomplaint): Use std::string.
5800
8abcee91
TT
58012017-09-29 Tom Tromey <tom@tromey.com>
5802
5803 * tracepoint.c (trace_variable_command): Use std::string.
5804 (encode_actions_1): Remove unused declarations.
5805 (create_tsv_from_upload): Use std::string.
5806
6ad94bc7
TT
58072017-09-29 Tom Tromey <tom@tromey.com>
5808
5809 * cp-support.c (gdb_demangle): Use std::string.
5810
2003f3d8
TT
58112017-09-29 Tom Tromey <tom@tromey.com>
5812
5813 * stack.c (parse_frame_specification): Use std::string
5814 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5815
8f8accb5
TT
58162017-09-29 Tom Tromey <tom@tromey.com>
5817
5818 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5819
200aa7b1
TT
58202017-09-29 Tom Tromey <tom@tromey.com>
5821
5822 * utils.c (vfprintf_maybe_filtered): Use std::string.
5823 (vfprintf_unfiltered): Likewise.
5824
606aae8a
TT
58252017-09-29 Tom Tromey <tom@tromey.com>
5826
5827 * event-top.c (top_level_prompt): Return std::string.
5828 (display_gdb_prompt): Update.
5829
bd413795
TT
58302017-09-29 Tom Tromey <tom@tromey.com>
5831
5832 * unittests/common-utils-selftests.c (format): New function.
5833 (string_vprintf_tests): New function.
5834 (_initialize_common_utils_selftests): Register new tests.
5835 * common/common-utils.c (string_vprintf): New function.
5836 * common/common-utils.h (string_vprintf): Declare.
5837
256642e8
PA
58382017-09-29 Pedro Alves <palves@redhat.com>
5839
5840 * common/rsp-low.c (unpack_varlen_hex): Constify.
5841 * common/rsp-low.h (unpack_varlen_hex): Constify.
5842 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5843 Constify.
5844 * remote.c (remote_set_permissions, read_ptid)
5845 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5846 (remote_static_tracepoint_marker_at)
5847 (remote_static_tracepoint_markers_by_strid)
5848 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5849 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5850 (parse_tracepoint_definition, parse_tsv_definition)
5851 (parse_static_tracepoint_marker_definition): Constify.
5852 * tracepoint.h (parse_static_tracepoint_marker_definition)
5853 (parse_trace_status, parse_tracepoint_status)
5854 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5855
b6bb3468
PA
58562017-09-29 Pedro Alves <palves@redhat.com>
5857
5858 * remote.c (target_buf, target_buf_size): Delete.
5859 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5860 Use the connection's packet buffer instead.
5861 All callers adjusted.
5862 (_initialize_remote): Remove references to target_buf and
5863 target_buf_size.
5864
b2f8eb7a
PA
58652017-09-28 Pedro Alves <palves@redhat.com>
5866
5867 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5868 unittests/common-utils-selftests.c.
5869 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5870 (COMMON_OBS): Remove utils-selftests.o.
5871 * utils-selftests.c: Move to ...
5872 * unittests/common-utils-selftests.c: ... here and rename self
5873 test to "string_printf".
5874
08302ed2
DE
58752017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5876
5877 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5878 having NULL cus or tus.
5879
96a5a1d3
UW
58802017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5881
5882 * arm-tdep.c: (convert_from_extended): Remove.
5883 (convert_to_extended): Likewise.
5884 (arm_extract_return_value): Use convert_typed_floating.
5885 (arm_store_return_value): Likewise.
5886
5887 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5888 * sh-tdep.c: Do not include "floatformat.h".
5889 (sh_littlebyte_bigword_type): New function.
5890 (sh_register_convert_to_virtual): Use convert_typed_floating.
5891 (sh_register_convert_to_raw): Likewise.
5892 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5893 (sh64_littlebyte_bigword_type): New function.
5894 (sh64_extract_return_value): Use convert_typed_floating.
5895 (sh64_register_convert_to_virtual): Likewise.
5896 (sh64_register_convert_to_raw): Likewise.
5897
0db7851f
UW
58982017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5899
5900 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5901 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5902
5903 * gdbtypes.h (union type_specific): Make field floatformat hold
5904 just a single struct floatformat, not an array.
5905 (floatformat_from_type): Move here.
5906 * gdbtypes.c (floatformat_from_type): Move here. Update to
5907 changed TYPE_FLOATFORMAT definition.
5908 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5909 (recursive_dump_type): Likewise.
5910 (init_float_type): Install correct floatformat for byte order.
5911 (arch_float_type): Likewise.
5912
77b7c781
UW
59132017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5914
5915 * gdbtypes.c (init_type): Change incoming argument from
5916 length-in-bytes to length-in-bits. Assert length is a
5917 multiple of TARGET_CHAR_BITS.
5918 (arch_type, arch_flags_type): Likewise.
5919 (init_integer_type): Update call to init_type.
5920 (init_character_type): Likewise.
5921 (init_boolean_type): Likewise.
5922 (init_float_type): Likewise.
5923 (init_decfloat_type): Likewise.
5924 (init_complex_type): Likewise.
5925 (init_pointer_type): Likewise.
5926 (objfile_type): Likewise.
5927 (arch_integer_type): Update call to arch_type.
5928 (arch_character_type): Likewise.
5929 (arch_boolean_type): Likewise.
5930 (arch_float_type): Likewise.
5931 (arch_decfloat_type): Likewise.
5932 (arch_complex_type): Likewise.
5933 (arch_pointer_type): Likewise.
5934 (gdbtypes_post_init): Likewise.
5935
5936 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5937 (read_base_type): Likewise.
5938 * mdebugread.c (basic_type): Likewise.
5939 * stabsread.c (dbx_init_float_type): Likewise.
5940 (rs6000_builtin_type): Likewise.
5941 (read_range_type): Likewise. Also, fix call to init_integer_type
5942 with erroneous length argument.
5943
5944 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5945 * d-lang.c (build_d_types): Likewise.
5946 * f-lang.c (build_fortran_types): Likewise.
5947 * go-lang.c (build_go_types): Likewise.
5948 * opencl-lang.c (build_opencl_types): Likewise.
5949 * jit.c (finalize_symtab): Likewise.
5950 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5951 (build_std_type_info_type): Likewise.
5952 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5953 update call to arch_flags_type.
5954
5955 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5956 arch_type.
5957 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5958 * windows-tdep.c (windows_get_tlb_type): Likewise.
5959
5960 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5961 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5962 * m32c-tdep.c (make_types): Likewise.
5963 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5964 (rl78_psw_type): Update call to arch_flags_type.
5965 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5966 * rx-tdep.c (rx_psw_type): Likewise.
5967 (rx_fpsw_type): Likewise.
5968 * sparc-tdep.c (sparc_psr_type): Likewise.
5969 (sparc_fsr_type): Likewise.
5970 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5971 (sparc64_ccr_type): Likewise.
5972 (sparc64_fsr_type): Likewise.
5973 (sparc64_fprs_type): Likewise.
5974
f21b4d5c
TT
59752017-09-27 Tom Tromey <tom@tromey.com>
5976
5977 * findcmd.c (find_command): Constify.
5978
643c2ffa
TT
59792017-09-27 Tom Tromey <tom@tromey.com>
5980
5981 * ada-tasks.c (task_command_1, task_command): Constify.
5982
510e5e56
TT
59832017-09-27 Tom Tromey <tom@tromey.com>
5984
5985 * symtab.c (maintenance_print_symbol_cache)
5986 (maintenance_flush_symbol_cache)
5987 (maintenance_print_symbol_cache_statistics): Constify.
5988
e503b191
TT
59892017-09-27 Tom Tromey <tom@tromey.com>
5990
5991 * inferior.c (detach_inferior_command, kill_inferior_command)
5992 (inferior_command): Constify.
5993
4e001312
TT
59942017-09-27 Tom Tromey <tom@tromey.com>
5995
5996 * regcache.c (regcache_print, maintenance_print_registers)
5997 (maintenance_print_raw_registers)
5998 (maintenance_print_cooked_registers)
5999 (maintenance_print_register_groups)
6000 (maintenance_print_remote_registers): Constify.
6001
77763700
TT
60022017-09-27 Tom Tromey <tom@tromey.com>
6003
6004 * printcmd.c (map_display_numbers, undisplay_command)
6005 (enable_disable_display_command, enable_display_command)
6006 (disable_display_command): Constify.
6007
4495129a
TT
60082017-09-27 Tom Tromey <tom@tromey.com>
6009
6010 * breakpoint.h (delete_command): Don't declare.
6011 * breakpoint.c (delete_command, enable_once_command)
6012 (enable_count_command, enable_delete_command, breakpoint_1)
6013 (maintenance_info_breakpoints, stopin_command, stopat_command)
6014 (delete_command, delete_trace_command, save_breakpoints)
6015 (save_breakpoints_command, save_tracepoints_command): Constify.
6016
3088cf40
TT
60172017-09-27 Tom Tromey <tom@tromey.com>
6018
6019 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6020 (skip_ws, extract_identifier, macro_define_command)
6021 (macro_undef_command, macro_list_command): Constify.
6022
69f476a3
TT
60232017-09-27 Tom Tromey <tom@tromey.com>
6024
6025 * infcmd.c (environment_info, set_environment_command)
6026 (unset_environment_command, path_info, info_proc_cmd_1)
6027 (info_proc_cmd_mappings, info_proc_cmd_stat)
6028 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6029 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6030
c4a3e68e
TT
60312017-09-27 Tom Tromey <tom@tromey.com>
6032
6033 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6034 Constify.
6035
c9d31bd6
TT
60362017-09-27 Tom Tromey <tom@tromey.com>
6037
6038 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6039
1f3f85eb
TT
60402017-09-27 Tom Tromey <tom@tromey.com>
6041
6042 * demangle.c (demangle_command): Constify.
6043
9c504b5d
TT
60442017-09-27 Tom Tromey <tom@tromey.com>
6045
6046 * progspace.c (maintenance_info_program_spaces_command):
6047 Constify.
6048
6663cf91
TT
60492017-09-27 Tom Tromey <tom@tromey.com>
6050
6051 * compile/compile.c (check_raw_argument, compile_file_command)
6052 (compile_code_command, compile_print_command): Constify.
6053
34e5fa26
TT
60542017-09-27 Tom Tromey <tom@tromey.com>
6055
6056 * reggroups.c (maintenance_print_reggroups): Constify.
6057
8384c356
TT
60582017-09-27 Tom Tromey <tom@tromey.com>
6059
6060 * dwarf2read.c (save_gdb_index_command): Constify.
6061
884beb0c
TT
60622017-09-27 Tom Tromey <tom@tromey.com>
6063
6064 * stap-probe.c (info_probes_stap_command): Constify.
6065
e0b2930c
TT
60662017-09-27 Tom Tromey <tom@tromey.com>
6067
6068 * fork-child.c (unset_exec_wrapper_command): Constify.
6069
f938677d
TT
60702017-09-27 Tom Tromey <tom@tromey.com>
6071
6072 * btrace.c (get_uint, get_context_size, no_chunk)
6073 (maint_btrace_packet_history_cmd)
6074 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6075 (maint_info_btrace_cmd): Constify.
6076
8949cb87
TT
60772017-09-27 Tom Tromey <tom@tromey.com>
6078
6079 * reverse.c (delete_bookmark_command): Constify.
6080
ac88e2de
TT
60812017-09-27 Tom Tromey <tom@tromey.com>
6082
6083 * remote.c (set_memory_packet_size)
6084 (set_memory_write_packet_size, show_memory_write_packet_size)
6085 (set_memory_read_packet_size, show_memory_read_packet_size)
6086 (compare_sections_command, packet_command, remote_put_command)
6087 (remote_get_command, remote_delete_command): Constify.
6088
bd4c9dfe
TT
60892017-09-27 Tom Tromey <tom@tromey.com>
6090
6091 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6092 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6093 (set_mipsfpu_auto_command): Constify.
6094
5e93d4c6
TT
60952017-09-27 Tom Tromey <tom@tromey.com>
6096
6097 * cli/cli-cmds.h (cd_command): Constify.
6098 * cli/cli-cmds.c (cd_command): Constify.
6099
fc41a75b
TT
61002017-09-27 Tom Tromey <tom@tromey.com>
6101
6102 * thread.c (thread_name_command, thread_find_command): Constify.
6103
67810076
TT
61042017-09-27 Tom Tromey <tom@tromey.com>
6105
6106 * probe.c (enable_probes_command, disable_probes_command):
6107 Constify.
6108
1d8b34a7
TT
61092017-09-27 Tom Tromey <tom@tromey.com>
6110
6111 * symfile.c (symbol_file_command): Constify.
6112 * gdbcore.h (deprecated_file_changed_hook): Constify.
6113 * exec.c (deprecated_file_changed_hook, exec_file_command)
6114 (file_command): Constify.
6115 * defs.h (symbol_file_command): Constify.
6116
442019e1
TT
61172017-09-27 Tom Tromey <tom@tromey.com>
6118
6119 * remote-fileio.c (set_system_call_allowed)
6120 (show_system_call_allowed): Constify.
6121
2983f7cb
TT
61222017-09-27 Tom Tromey <tom@tromey.com>
6123
6124 * tracepoint.c (delete_trace_variable_command)
6125 (tfind_end_command, tfind_start_command, tfind_pc_command)
6126 (tfind_tracepoint_command, tfind_line_command)
6127 (tfind_range_command, tfind_outside_command): Constify.
6128
4fd41b24
TT
61292017-09-27 Tom Tromey <tom@tromey.com>
6130
6131 * ax-gdb.c (maint_agent_printf_command, agent_command)
6132 (agent_eval_command): Constify.
6133
f2fc3015
TT
61342017-09-27 Tom Tromey <tom@tromey.com>
6135
6136 * tracepoint.c (info_scope_command): Constify.
6137 * python/python.c (gdbpy_decode_line): Constify.
6138 * python/py-breakpoint.c (bppy_init): Constify.
6139 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6140 * location.h: (new_linespec_location)
6141 (string_to_event_location_basic, string_to_event_location):
6142 Constify.
6143 * location.c (new_linespec_location)
6144 (string_to_event_location_basic, string_to_event_location):
6145 Constify.
6146 * linespec.h (decode_line_with_current_source)
6147 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6148 * linespec.c (linespec_lex_to_end)
6149 (decode_line_with_current_source)
6150 (decode_line_with_last_displayed): Constify.
6151 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6152 Constify.
6153 * cli/cli-cmds.c (edit_command, list_command): Constify.
6154 * breakpoint.h (until_break_command, watch_command_wrapper)
6155 (awatch_command_wrapper, rwatch_command_wrapper)
6156 (init_ada_exception_breakpoint): Constify.
6157 * breakpoint.c (break_command_1, dprintf_command)
6158 (break_range_command, watch_command_wrapper)
6159 (rwatch_command_wrapper, awatch_command_wrapper)
6160 (until_break_command, init_ada_exception_breakpoint)
6161 (strace_marker_create_sals_from_location, trace_command)
6162 (ftrace_command, strace_command, struct tracepoint): Constify.
6163 * ax-gdb.c (agent_command_1): Constify.
6164 * ada-lang.c (ada_exception_sal): Constify.
6165
8c2f95f4
TT
61662017-09-27 Tom Tromey <tom@tromey.com>
6167
6168 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6169 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6170 (get_context_size, no_chunk, get_insn_history_modifiers)
6171 (cmd_record_insn_history, get_call_history_modifiers)
6172 (cmd_record_call_history): Constify.
6173
a0d65762
TT
61742017-09-27 Tom Tromey <tom@tromey.com>
6175
6176 * source.c (show_substitute_path_command)
6177 (unset_substitute_path_command, set_substitute_path_command):
6178 Constify.
6179
58971144
TT
61802017-09-27 Tom Tromey <tom@tromey.com>
6181
6182 * typeprint.c (maintenance_print_type): Constify.
6183 * maint.c (maintenance_dump_me, maintenance_demangle)
6184 (maintenance_time_display, maintenance_info_sections)
6185 (maintenance_print_statistics, maintenance_deprecate)
6186 (maintenance_undeprecate): Constify.
6187 (maintenance_do_deprecate): Constify. Use std::string.
6188 (maintenance_selftest): Constify.
6189 * gdbtypes.h (maintenance_print_type): Constify.
6190
c482f52c
TT
61912017-09-27 Tom Tromey <tom@tromey.com>
6192
6193 * hppa-tdep.c (unwind_command): Constify.
6194
e100df1a
TT
61952017-09-27 Tom Tromey <tom@tromey.com>
6196
6197 * target-descriptions.c (unset_tdesc_filename_cmd)
6198 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6199 Constify.
6200
31d56ade
TT
62012017-09-27 Tom Tromey <tom@tromey.com>
6202
6203 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6204
b961da0b
TT
62052017-09-27 Tom Tromey <tom@tromey.com>
6206
6207 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6208
e2d8ae16
TT
62092017-09-27 Tom Tromey <tom@tromey.com>
6210
6211 * tui/tui-regs.c (tui_reg_command): Constify.
6212
863779b0
TT
62132017-09-27 Tom Tromey <tom@tromey.com>
6214
6215 * skip.c (skip_file_command, skip_function_command)
6216 (skip_enable_command, skip_disable_command, skip_delete_command):
6217 Constify.
6218
cdb34d4a
TT
62192017-09-27 Tom Tromey <tom@tromey.com>
6220
6221 * record-btrace.c (cmd_record_btrace_bts_start)
6222 (cmd_record_btrace_pt_start): Constify.
6223
e99c83e7
TT
62242017-09-27 Tom Tromey <tom@tromey.com>
6225
6226 * symmisc.c (maintenance_print_symbols)
6227 (maintenance_print_msymbols, maintenance_print_objfiles)
6228 (maintenance_info_symtabs, maintenance_check_symtabs)
6229 (maintenance_expand_symtabs, maintenance_info_line_tables):
6230 Constify.
6231
32faf971
TT
62322017-09-27 Tom Tromey <tom@tromey.com>
6233
6234 * top.c (new_ui_command): Constify.
6235
2cf311eb
TT
62362017-09-27 Tom Tromey <tom@tromey.com>
6237
6238 * symfile.c (add_symbol_file_command)
6239 (remove_symbol_file_command, list_overlays_command)
6240 (map_overlay_command, unmap_overlay_command)
6241 (overlay_auto_command, overlay_manual_command)
6242 (overlay_off_command, overlay_load_command): Constify.
6243
e6738699
TT
62442017-09-27 Tom Tromey <tom@tromey.com>
6245
6246 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6247 (info_spu_mailbox_command, info_spu_dma_command)
6248 (info_spu_proxydma_command): Constify.
6249
aa360cd5
TT
62502017-09-27 Tom Tromey <tom@tromey.com>
6251
6252 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6253
898241a5
TT
62542017-09-27 Tom Tromey <tom@tromey.com>
6255
6256 * cli/cli-script.c (user_defined_command): Constify.
6257
2d0ac106
TT
62582017-09-27 Tom Tromey <tom@tromey.com>
6259
6260 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6261 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6262 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6263 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6264 (dump_binary_value, append_binary_memory, append_binary_value):
6265 Constify.
6266 (struct dump_context) <func>: Constify.
6267 (add_dump_command): Update.
6268
dede02ce
TT
62692017-09-27 Tom Tromey <tom@tromey.com>
6270
6271 * cli/cli-cmds.c (show_version, show_configuration)
6272 (source_command, show_user): Constify.
6273
d3cb6b99
TT
62742017-09-27 Tom Tromey <tom@tromey.com>
6275
6276 * target.c (maintenance_print_target_stack): Constify.
6277
1970a12f
TT
62782017-09-27 Tom Tromey <tom@tromey.com>
6279
6280 * interps.c (interpreter_exec_cmd): Constify.
6281
41243651
TT
62822017-09-27 Tom Tromey <tom@tromey.com>
6283
6284 * record-full.c (cmd_record_full_restore): Constify.
6285
4465d9db
TT
62862017-09-27 Tom Tromey <tom@tromey.com>
6287
6288 * memattr.c (enable_mem_command, disable_mem_command)
6289 (delete_mem_command): Constify.
6290
ad25e423
TT
62912017-09-27 Tom Tromey <tom@tromey.com>
6292
6293 * value.c (show_convenience): Constify.
6294
d64097b1
TT
62952017-09-27 Tom Tromey <tom@tromey.com>
6296
6297 * gdbcore.h (core_file_command): Update.
6298 * corefile.c (core_file_command): Constify.
6299
4d4589ef
TT
63002017-09-27 Tom Tromey <tom@tromey.com>
6301
6302 * user-regs.c (maintenance_print_user_registers): Constify.
6303
32a7bf17
TT
63042017-09-27 Tom Tromey <tom@tromey.com>
6305
6306 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6307
4a475551
TT
63082017-09-27 Tom Tromey <tom@tromey.com>
6309
6310 * cp-support.c (first_component_command): Constify.
6311
990b9f9f
TT
63122017-09-27 Tom Tromey <tom@tromey.com>
6313
6314 * psymtab.c (maintenance_print_psymbols)
6315 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6316 Constify.
6317
c281872e
TT
63182017-09-27 Tom Tromey <tom@tromey.com>
6319
6320 * windows-tdep.c (display_tib): Constify.
6321
5b64bf74
TT
63222017-09-27 Tom Tromey <tom@tromey.com>
6323
6324 * linux-fork.c (delete_checkpoint_command)
6325 (detach_checkpoint_command): Constify.
6326
4ada038f
TT
63272017-09-27 Tom Tromey <tom@tromey.com>
6328
6329 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6330
57f5a81b
TT
63312017-09-27 Tom Tromey <tom@tromey.com>
6332
6333 * arc-tdep.c (dump_arc_instruction_command): Constify.
6334
b0a8e6c4
TT
63352017-09-27 Tom Tromey <tom@tromey.com>
6336
6337 * valprint.c (set_radix, show_radix): Constify.
6338
8d97dc1c
TT
63392017-09-27 Tom Tromey <tom@tromey.com>
6340
6341 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6342
eb7c454d
TT
63432017-09-27 Tom Tromey <tom@tromey.com>
6344
6345 * command.h (not_just_help_class_command): Update.
6346 * cli/cli-decode.h (not_just_help_class_command): Update.
6347 * cli/cli-decode.c (not_just_help_class_command): Constify.
6348
e4e33335
TT
63492017-09-27 Tom Tromey <tom@tromey.com>
6350
6351 * gdb_bfd.c (maintenance_info_bfds): Constify.
6352
0450cc4c
TT
63532017-09-27 Tom Tromey <tom@tromey.com>
6354
6355 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6356 overloads.
6357 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6358 (do_const_cfunc): New function.
6359 (cmd_cfunc_eq): New overload.
6360 (cli_user_command_p): Check do_const_cfunc.
6361 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6362 const_cfunc.
6363 * command.h (add_cmd): Add const overload and no-function
6364 overload.
6365 (set_cmd_cfunc): Add const overload.
6366 (cmd_const_cfunc_ftype): Declare.
6367 (cmd_cfunc_eq): Add const overload.
6368 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6369 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6370 overload.
6371
a9bbfbd8
TT
63722017-09-27 Tom Tromey <tom@tromey.com>
6373
6374 * macroexp.c (get_next_token_for_substitution): New function.
6375 (substitute_args): Call it. Check for __VA_OPT__.
6376
5230b05a
WT
63772017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6378 Pedro Alves <palves@redhat.com>
6379
6380 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6381 producer_is_icc_lt_14.
6382 (producer_is_icc_lt_14): New function.
6383 (check_producer): Add code for checking version of ICC.
6384 (producer_is_icc): Move to producer.c.
6385 (read_structure_type): Restrict ICC workaround to ICC<14.
6386 * producer.c: Include selftest.h.
6387 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6388 New functions.
6389 * producer.h (producer_is_icc): New declaration.
6390
b32b108a
WT
63912017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6392
6393 * Makefile.in (SFILES): Add producer.c.
6394 (COMMON_OBS): Add producer.o
6395 * amd64-tdep.c (producer.h): Add new include.
6396 * dwarf2read.c (producer.h): Add new include.
6397 * producer.c: New file.
6398 * producer.h: New file.
6399 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6400 producer.c.
6401 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6402 producer.h.
6403
5007d765
MK
64042017-09-26 Matthias Klose <doko@ubuntu.com>
6405
6406 * configure.ac: Search ncursesw before ncurses.
6407 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6408 * gdb_curses.h: Include <ncursesw/ncurses.h>
6409 * config.in, configure: Regenerate.
6410
281c4447
RO
64112017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6412
6413 PR gdb/22185
6414 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6415 obsolete.
6416 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6417 Remove i386sol2 support.
6418 * configure.nat <i386sol2>: Remove.
6419 <sol2-64>: Fold into ...
6420 <sol2>: ... this.
6421 Move common settings to default section.
6422 Add sol-thread.o.
6423 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6424 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6425 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6426 <i[34567]86-*-solaris*>: Remove.
6427 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6428
6429 * configure.ac: Remove wctype in libw check.
6430 (_MSE_INT_H): Don't define on Solaris 7-9.
6431 <solaris*>: Remove libthread_db.so.1 check.
6432 * configure: Regenerate.
6433 * config.in: Regenerate.
6434
6435 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6436 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6437 (gdb_ps_size_t): Remove.
6438 Use base types in users.
6439 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6440
6441 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6442
39b06c20
RO
64432017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6444
6445 PR build/22206
6446 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6447 (adi_is_addr_mapped): Likewise.
6448 (PSR_ICC): Don't redefine.
6449 (PSR_IMPL): Likewise.
6450
6c3e20f1
TT
64512017-09-25 Tom Tromey <tom@tromey.com>
6452
6453 * regcache.c (regcache::dump): Use string_printf.
6454
b292235f
TT
64552017-09-25 Tom Tromey <tom@tromey.com>
6456
6457 * regcache.c (class regcache_invalidator): New.
6458 (struct register_to_invalidate): Remove.
6459 (make_cleanup_regcache_invalidate): Remove.
6460 (regcache::raw_write): Use regcache_invalidator.
6461
9ac86b52
TT
64622017-09-25 Tom Tromey <tom@tromey.com>
6463
6464 * spu-tdep.c (spu2ppu_sniffer): Update.
6465 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6466 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6467 Remove.
6468 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6469 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6470 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6471 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6472 (frame_pop): Update.
6473
c0e383c6
TT
64742017-09-25 Tom Tromey <tom@tromey.com>
6475
6476 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6477 * regcache.h (regcache_xfree): Don't declare.
6478 * regcache.c (regcache_xfree): Remove.
6479 (do_regcache_xfree): Use delete.
6480 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6481 * linux-fork.c (free_fork): Use delete.
6482 (fork_save_infrun_state): Likewise.
6483 * jit.c (jit_dealloc_cache): Use delete.
6484 * infrun.c (discard_infcall_suspend_state): Use delete.
6485
791199cc
TT
64862017-09-25 Tom Tromey <tom@tromey.com>
6487
6488 * regcache.h (regcache_xmalloc): Don't declare.
6489 (regcache_raw_set_cached_value): Update comment.
6490 * regcache.c (regcache_xmalloc): Remove.
6491 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6492 * jit.c (jit_frame_sniffer): Use new.
6493 * frame.c (frame_save_as_regcache): Use new.
6494
289e23aa
AA
64952017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6496
6497 * NEWS: Advertise support for guarded-storage registers on IBM z.
6498
1b63490c
AA
64992017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6500
6501 * s390-linux-nat.c (have_regset_gs): New static variable.
6502 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6503 control block and guarded-storage broadcast control regsets.
6504 (s390_read_description): Detect whether the target has
6505 guarded-storage support, return appropriate tdesc.
6506 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6507 (features/s390x-gs-linux64.c): Likewise.
6508 (struct gdbarch_tdep) <have_gs>: New field.
6509 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6510 (s390_gsbc_regset): New variables.
6511 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6512 and s390_gsbc_regset, if applicable.
6513 (s390_core_read_description): Check whether core file was from a
6514 target with guarded-storage support; include appropriate regsets.
6515 (s390_gdbarch_init): Add registers for guarded-storage support.
6516 (_initialize_s390_tdep): Initialize new target descriptions that
6517 include registers for guarded-storage support.
6518 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6519 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6520 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6521 (S390_NUM_REGS): Adjust macro definition.
6522 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6523 (tdesc_s390x_gs_linux64): New declarations.
6524
96235dc1
AA
65252017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6526
6527 * features/s390-gs-linux64.xml: New file.
6528 * features/s390-gs.xml: New file.
6529 * features/s390-gsbc.xml: New file.
6530 * features/s390x-gs-linux64.xml: New file.
6531 * features/Makefile (WHICH): Add s390-gs-linux64 and
6532 s390x-gs-linux64.
6533 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6534 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6535 * features/s390-gs-linux64.c: New generated file.
6536 * features/s390x-gs-linux64.c: New file.
6537 * regformats/s390-gs-linux64.dat: New file.
6538 * regformats/s390x-gs-linux64.dat: New file.
6539
b4a7c699
TT
65402017-09-23 Tom Tromey <tom@tromey.com>
6541
6542 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6543
c2f97536
TT
65442017-09-22 Tom Tromey <tom@tromey.com>
6545
6546 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6547 type to scoped_restore_tmpl.
6548 <scoped_input_handler>: Initialize m_quit_handler directly.
6549
43573013
SDJ
65502017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6551
6552 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6553 (cd_command): Likewise. Free "current_directory" before
6554 assigning to it.
6555 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6556 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6557 * top.c (gdb_dirbuf): Remove global declaration.
6558 * top.h (gdb_dirbuf): Likewise.
6559
6ec2e0f5
SDJ
65602017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6561
6562 * gnulib/aclocal.m4: Regenerate.
6563 * gnulib/config.in: Regenerate.
6564 * gnulib/configure: Regenerate.
6565 * gnulib/import/Makefile.am: Regenerate.
6566 * gnulib/import/Makefile.in: Regenerate.
6567 * gnulib/import/assure.h: New file.
6568 * gnulib/import/at-func.c: Likewise
6569 * gnulib/import/chdir-long.c: New file.
6570 * gnulib/import/chdir-long.h: New file.
6571 * gnulib/import/cloexec.c: New file.
6572 * gnulib/import/cloexec.h: New file.
6573 * gnulib/import/close.c: New file.
6574 * gnulib/import/closedir.c: New file.
6575 * gnulib/import/dirent-private.h: New file.
6576 * gnulib/import/dup-safer.c: New file.
6577 * gnulib/import/dup.c: New file.
6578 * gnulib/import/dup2.c: New file.
6579 * gnulib/import/error.c: New file.
6580 * gnulib/import/error.h: New file.
6581 * gnulib/import/exitfail.c: New file.
6582 * gnulib/import/exitfail.h: New file.
6583 * gnulib/import/fchdir.c: New file.
6584 * gnulib/import/fcntl.c: New file.
6585 * gnulib/import/fcntl.in.h: New file.
6586 * gnulib/import/fd-hook.c: New file.
6587 * gnulib/import/fd-hook.h: New file.
6588 * gnulib/import/fd-safer.c: New file.
6589 * gnulib/import/fdopendir.c: New file.
6590 * gnulib/import/filename.h: New file.
6591 * gnulib/import/filenamecat-lgpl.c: New file.
6592 * gnulib/import/filenamecat.h: New file.
6593 * gnulib/import/fstat.c: New file.
6594 * gnulib/import/fstatat.c: New file.
6595 * gnulib/import/getcwd-lgpl.c: New file.
6596 * gnulib/import/getcwd.c: New file.
6597 * gnulib/import/getdtablesize.c: New file.
6598 * gnulib/import/getlogin_r.c: New file.
6599 * gnulib/import/getprogname.c: New file.
6600 * gnulib/import/getprogname.h: New file.
6601 * gnulib/import/gettext.h: New file.
6602 * gnulib/import/glob-libc.h: New file.
6603 * gnulib/import/glob.c: New file.
6604 * gnulib/import/glob.in.h: New file.
6605 * gnulib/import/intprops.h: New file.
6606 * gnulib/import/m4/chdir-long.m4: New file.
6607 * gnulib/import/m4/close.m4: New file.
6608 * gnulib/import/m4/closedir.m4: New file.
6609 * gnulib/import/m4/d-ino.m4: New file.
6610 * gnulib/import/m4/d-type.m4: New file.
6611 * gnulib/import/m4/dup.m4: New file.
6612 * gnulib/import/m4/dup2.m4: New file.
6613 * gnulib/import/m4/error.m4: New file.
6614 * gnulib/import/m4/fchdir.m4: New file.
6615 * gnulib/import/m4/fcntl.m4: New file.
6616 * gnulib/import/m4/fcntl_h.m4: New file.
6617 * gnulib/import/m4/fdopendir.m4: New file.
6618 * gnulib/import/m4/filenamecat.m4: New file.
6619 * gnulib/import/m4/fstat.m4: New file.
6620 * gnulib/import/m4/fstatat.m4: New file.
6621 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6622 * gnulib/import/m4/getcwd-path-max.m4: New file.
6623 * gnulib/import/m4/getcwd.m4: New file.
6624 * gnulib/import/m4/getdtablesize.m4: New file.
6625 * gnulib/import/m4/getlogin_r.m4: New file.
6626 * gnulib/import/m4/getprogname.m4: New file.
6627 * gnulib/import/m4/glob.m4: New file.
6628 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6629 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6630 * gnulib/import/m4/mempcpy.m4: New file.
6631 * gnulib/import/m4/memrchr.m4: New file.
6632 * gnulib/import/m4/mode_t.m4: New file.
6633 * gnulib/import/m4/msvc-inval.m4: New file.
6634 * gnulib/import/m4/msvc-nothrow.m4: New file.
6635 * gnulib/import/m4/open.m4: New file.
6636 * gnulib/import/m4/openat.m4: New file.
6637 * gnulib/import/m4/opendir.m4: New file.
6638 * gnulib/import/m4/readdir.m4: New file.
6639 * gnulib/import/m4/realloc.m4: New file.
6640 * gnulib/import/m4/rewinddir.m4: New file.
6641 * gnulib/import/m4/save-cwd.m4: New file.
6642 * gnulib/import/m4/strdup.m4: New file.
6643 * gnulib/import/m4/strerror.m4: New file.
6644 * gnulib/import/m4/unistd-safer.m4: New file.
6645 * gnulib/import/mempcpy.c: New file.
6646 * gnulib/import/memrchr.c: New file.
6647 * gnulib/import/msvc-inval.c: New file.
6648 * gnulib/import/msvc-inval.h: New file.
6649 * gnulib/import/msvc-nothrow.c: New file.
6650 * gnulib/import/msvc-nothrow.h: New file.
6651 * gnulib/import/open.c: New file.
6652 * gnulib/import/openat-die.c: New file.
6653 * gnulib/import/openat-priv.h: New file.
6654 * gnulib/import/openat-proc.c: New file.
6655 * gnulib/import/openat.c: New file.
6656 * gnulib/import/openat.h: New file.
6657 * gnulib/import/opendir.c: New file.
6658 * gnulib/import/pipe-safer.c: New file.
6659 * gnulib/import/readdir.c: New file.
6660 * gnulib/import/realloc.c: New file.
6661 * gnulib/import/rewinddir.c: New file.
6662 * gnulib/import/save-cwd.c: New file.
6663 * gnulib/import/save-cwd.h: New file.
6664 * gnulib/import/strdup.c: New file.
6665 * gnulib/import/strerror-override.c: New file.
6666 * gnulib/import/strerror-override.h: New file.
6667 * gnulib/import/strerror.c: New file.
6668 * gnulib/import/unistd--.h: New file.
6669 * gnulib/import/unistd-safer.h: New file.
6670 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6671 "getcwd" and "glob".
6672 * ser-tcp.c: Undefine "close" before redefining it.
6673
432ae719
SM
66742017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6675
6676 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6677 get rid of res_val.
6678
4fa7574e
RO
66792017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6680
6681 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6682 <sol2,sparc>: Likewise.
6683 <sol2-64,i386>: Likewise.
6684
6685 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6686 -Wdeprecated-declarations on *-*-solaris*.
6687 * configure: Regenerate.
6688
6689 * procfs.c: Include "nat/inferior.h".
6690 (procfs_info_proc): Fix typo.
6691
f6327dcb
KB
66922017-09-21 Kevin Buettner <kevinb@redhat.com>
6693
6694 * remote.c (vector): Include.
6695 (struct private_thread_info): Add field, thread_handle.
6696 (free_private_thread_info): Deallocate storage associated with
6697 thread handle.
6698 (get_private_info_thread): Initialize `thread_handle' field.
6699 (struct thread_item): Add field, thread_handle.
6700 (clear_threads_listing_context): Deallocate storage associated
6701 with thread handle.
6702 (start_thread): Add support for "handle" attribute.
6703 (thread_attributes): Add "handle".
6704 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6705 field.
6706 (remote_update_thread_list): Update thread_handle.
6707 (remote_thread_handle_to_thread_info): New function.
6708 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6709
fbbe5337
KB
67102017-09-21 Kevin Buettner <kevinb@redhat.com>
6711
6712 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6713 function.
6714 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6715 * python/python-internal.h (thread_object_type): Declare.
6716
e04ee09e
KB
67172017-09-21 Kevin Buettner <kevinb@redhat.com>
6718
6719 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6720 (target_thread_handle_to_thread_info): Declare.
6721 * target.c (target_thread_handle_to_thread_info): New function.
6722 * target-delegates.c: Regenerate.
6723 * gdbthread.h (find_thread_by_handle): Declare.
6724 * thread.c (find_thread_by_handle): New function.
6725 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6726 function.
6727 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6728
1e5b66ed
SM
67292017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6730
6731 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6732
ebe48ba0
SM
67332017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6734
6735 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6736
0a0bf5dc
YQ
67372017-09-21 Yao Qi <yao.qi@linaro.org>
6738
6739 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6740 to gdb_target_obs.
6741
d1b0a7bf
TT
67422017-09-20 Tom Tromey <tom@tromey.com>
6743
6744 * breakpoint.c (struct counted_command_line): Remove.
6745 (breakpoint_commands): Update.
6746 (alloc_counted_command_line, incref_counted_command_line)
6747 (decref_counted_command_line, do_cleanup_counted_command_line)
6748 (make_cleanup_decref_counted_command_line): Remove.
6749 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6750 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6751 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6752 (save_breakpoints): Update.
6753 * breakpoint.h (counted_command_line): Now a typedef to
6754 shared_ptr.
6755 (struct breakpoint) <commands>: Now a counted_command_line.
6756 (struct bpstats) <command>: Likewise.
6757
48649e1b
TT
67582017-09-20 Tom Tromey <tom@tromey.com>
6759
6760 * breakpoint.c (struct commands_info, do_map_commands_command):
6761 Remove.
6762 (commands_command_1): Update.
6763 (iterate_over_related_breakpoints): Take a function_view.
6764 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6765 (delete_command): Update.
6766 (map_breakpoint_numbers): Take a function_view.
6767 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6768 (disable_command): Update.
6769 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6770 (enable_command): Update.
6771 (struct disp_data, do_enable_breakpoint_disp)
6772 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6773 (do_map_enable_delete_breakpoint): Remove.
6774 (enable_once_command, enable_count_command, enable_delete_command)
6775 (delete_trace_variable_command): Update.
6776
04afa70c
TT
67772017-09-20 Tom Tromey <tom@tromey.com>
6778
6779 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6780 (bpstat_clear): Use delete.
6781 (bpstats): New constructors.
6782 (bpstat_copy, bpstat_stop_status): Use new.
6783 (dprintf_after_condition_true): Update.
6784 * breakpoint.h (bpstats::bpstats): Add constructors.
6785 (bpstats::~bpstats): Add destructor.
6786
c83833f4
PA
67872017-09-20 Pedro Alves <palves@redhat.com>
6788
6789 * eval.c (make_params): Delete, refactored as ...
6790 (class fake_method): ... this new type's ctor.
6791 (fake_method::~fake_method): New.
6792 (evaluate_subexp_standard): Use 'fake_method'.
6793
223ffa71
TT
67942017-09-20 Tom Tromey <tom@tromey.com>
6795
6796 * windows-nat.c (get_windows_debug_event, windows_wait)
6797 (do_initial_windows_stuff, windows_attach): Update.
6798 * utils.c (vwarning, internal_vproblem): Update.
6799 (ui_unregister_input_event_handler_cleanup)
6800 (prepare_to_handle_input): Remove.
6801 (class scoped_input_handler): New.
6802 (defaulted_query, prompt_for_continue): Update.
6803 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6804 Update.
6805 * top.c (undo_terminal_modifications_before_exit): Update.
6806 * target/target.h (target_terminal_init, target_terminal_inferior)
6807 (target_terminal_ours): Don't declare.
6808 (class target_terminal): New.
6809 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6810 (target_terminal_ours_for_output)
6811 (make_cleanup_restore_target_terminal): Don't declare.
6812 (target_terminal_info): Remove.
6813 * target.c (enum terminal_state, terminal_state): Remove.
6814 (target_terminal::terminal_state): Define.
6815 (target_terminal::init): Rename from target_terminal_init.
6816 (target_terminal::inferior): Rename from
6817 target_terminal_inferior.
6818 (target_terminal::ours): Rename from target_terminal_ours.
6819 (target_terminal::ours_for_output): Rename from
6820 target_terminal_ours_for_output.
6821 (target_terminal::info): New method.
6822 (cleanup_restore_target_terminal)
6823 (make_cleanup_restore_target_terminal): Remove.
6824 * solib.c (handle_solib_event): Update.
6825 * remote.c (remote_serial_quit_handler): Update.
6826 (remote_terminal_inferior, remote_wait_as): Update.
6827 * record-full.c (record_full_wait_1): Update.
6828 * nto-procfs.c (procfs_create_inferior): Update.
6829 * nat/fork-inferior.c (startup_inferior): Update.
6830 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6831 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6832 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6833 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6834 (mi_breakpoint_created, mi_breakpoint_deleted)
6835 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6836 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6837 (mi_user_selected_context_changed, report_initial_inferior):
6838 Update.
6839 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6840 (linux_nat_terminal_inferior): Update.
6841 * infrun.c (follow_fork_inferior)
6842 (handle_vfork_child_exec_or_exit, do_target_resume)
6843 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6844 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6845 Update.
6846 * inflow.c (child_terminal_init, info_terminal_command): Update.
6847 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6848 (attach_command): Update.
6849 * infcall.c (call_thread_fsm_should_stop): Update.
6850 * gnu-nat.c (gnu_attach): Update.
6851 * extension.c (struct active_ext_lang_state)
6852 (restore_active_ext_lang): Update.
6853 * exceptions.c (print_flush): Update.
6854 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6855 (struct quit_handler_cleanup_data, restore_quit_handler)
6856 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6857 Remove.
6858 * cp-support.c (gdb_demangle): Update.
6859 * breakpoint.c (update_inserted_breakpoint_locations)
6860 (insert_breakpoint_locations, handle_jit_event)
6861 (disable_breakpoints_in_unloaded_shlib): Update.
6862 * annotate.c (annotate_breakpoints_invalid)
6863 (annotate_frames_invalid): Update.
6864
013af3fc
TT
68652017-09-20 Tom Tromey <tom@tromey.com>
6866
6867 * main.c (catch_command_errors): Rename from
6868 catch_command_errors_const.
6869 (captured_main_1): Update.
6870
06871ae8
PA
68712017-09-20 Pedro Alves <palves@redhat.com>
6872
6873 * cli/cli-cmds.c (list_command): Use print_sal_location.
6874 (print_sal_location): New function.
6875 (ambiguous_line_spec): Use print_sal_location.
6876 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6877 * symtab.c (find_function_start_sal): Likewise.
6878 * symtab.h (symtab_and_line::symbol): New field.
6879
e5f25bc5
PA
68802017-09-20 Pedro Alves <palves@redhat.com>
6881
6882 * linespec.c (minsym_found): Handle non-text minsyms.
6883 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6884
1b7fa39e
WT
68852017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6886
6887 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6888 backslash.
6889
37dd0825
WT
68902017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6891
6892 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6893 vmovups instead vmovaps.
6894 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6895
4e5a4f58
JB
68962017-09-19 John Baldwin <jhb@FreeBSD.org>
6897
6898 * NEWS (Changes since GDB 8.0): Add starti.
6899 * infcmd.c (enum run_break): New.
6900 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6901 case.
6902 (run_command): Use enum run_how.
6903 (start_command): Likewise.
6904 (starti_command): New function.
6905 (RUN_ARGS_HELP): New macro.
6906 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6907 commands. Add starti command.
6908
aa70c9f1
YQ
69092017-09-19 Yao Qi <yao.qi@linaro.org>
6910
6911 * Makefile.in (monitor.o): Remove the rule.
6912
d6541620
YQ
69132017-09-19 Yao Qi <yao.qi@linaro.org>
6914
6915 * annotate.h (struct annotate_arg_emitter): Use
6916 DISABLE_COPY_AND_ASSIGN.
6917 * common/refcounted-object.h (refcounted_object): Likewise.
6918 * completer.h (struct completion_result): Likewise.
6919 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6920 * filename-seen-cache.h (filename_seen_cache): Likewise.
6921 * gdbcore.h (thread_section_name): Likewise.
6922 * gdb_regex.h (compiled_regex): Likewise.
6923 * gdbthread.h (scoped_restore_current_thread): Likewise.
6924 * inferior.h (scoped_restore_current_inferior): Likewise.
6925 * jit.c (jit_reader): Likewise.
6926 * linespec.h (struct linespec_result): Likewise.
6927 * mi/mi-parse.h (struct mi_parse): Likewise.
6928 * nat/fork-inferior.c (execv_argv): Likewise.
6929 * progspace.h (scoped_restore_current_program_space): Likewise.
6930 * python/python-internal.h (class gdbpy_enter): Likewise.
6931 * regcache.h (regcache): Likewise.
6932 * target-descriptions.c (struct tdesc_reg): Likewise.
6933 (struct tdesc_type): Likewise.
6934 (struct tdesc_feature): Likewise.
6935 * ui-out.h (ui_out_emit_type): Likewise.
6936
0615127c
SM
69372017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6938
6939 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6940 label abort_expression.
6941
5e187554
SM
69422017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6943
6944 * common/buffer.c (buffer_xml_printf): Adjust.
6945 * common/xml-utils.c (xml_escape_text): Change return type to
6946 std::string, update code accordingly.
6947 * common/xml-utils.h (xml_escape_text): Change return type to
6948 std::string.
6949 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6950 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6951 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6952 Adjust.
6953
c3d7b541
SM
69542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6955
6956 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6957 (SUBDIR_UNITTESTS_OBS): Add new object file.
6958 * unittests/xml-utils-selftests.c: New file.
6959
1526853e
SM
69602017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6961
6962 * common/selftest.h (selftest): New struct/interface.
6963 (register_test): Add name parameter, add new overload.
6964 (run_tests): Add filter parameter.
6965 (for_each_selftest_ftype): New typedef.
6966 (for_each_selftest): New declaration.
6967 * common/selftest.c (tests): Change type to
6968 map<string, unique_ptr<selftest>>.
6969 (simple_selftest): New struct.
6970 (register_test): New function.
6971 (register_test): Add name parameter and use it.
6972 (run_tests): Add filter parameter and use it. Add prints.
6973 Adjust to vector -> map change.
6974 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6975 registering selftests.
6976 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6977 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6978 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6979 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6980 * findvar.c (_initialize_findvar): Likewise.
6981 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6982 * maint.c (maintenance_selftest): Update call to run_tests.
6983 (maintenance_info_selftests): New function.
6984 (_initialize_maint_cmds): Register "maintenance info selftests"
6985 command. Update "maintenance selftest" doc.
6986 * regcache.c (_initialize_regcache): Add names when registering
6987 selftests.
6988 * rust-exp.y (_initialize_rust_exp): Likewise.
6989 * selftest-arch.c (gdbarch_selftest): New struct.
6990 (gdbarch_tests): Remove.
6991 (register_test_foreach_arch): Add name parameter. Call
6992 register_test.
6993 (tests_with_arch): Remove, move most content to
6994 gdbarch_selftest::operator().
6995 (_initialize_selftests_foreach_arch): Remove.
6996 * selftest-arch.h (register_test_foreach_arch): Add name
6997 parameter.
6998 (run_tests_with_arch): New declaration.
6999 * utils-selftests.c (_initialize_utils_selftests): Add names
7000 when registering selftests.
7001 * utils.c (_initialize_utils): Likewise.
7002 * unittests/array-view-selftests.c
7003 (_initialize_array_view_selftests): Likewise.
7004 * unittests/environ-selftests.c (_initialize_environ_selftests):
7005 Likewise.
7006 * unittests/function-view-selftests.c
7007 (_initialize_function_view_selftests): Likewise.
7008 * unittests/offset-type-selftests.c
7009 (_initialize_offset_type_selftests): Likewise.
7010 * unittests/optional-selftests.c
7011 (_initialize_optional_selftests): Likewise.
7012 * unittests/scoped_restore-selftests.c
7013 (_initialize_scoped_restore_selftests): Likewise.
7014 * NEWS: Document "maintenance selftest" and "maint info
7015 selftests".
7016
5846367a
SM
70172017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7018
7019 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7020 scoped_restore.
7021
bd77e8ff
SM
70222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7023
7024 * mi/mi-main.c (mi_load_progress): Make uiout variable
7025 a unique_ptr.
7026
26a67918
PA
70272017-09-15 Pedro Alves <palves@redhat.com>
7028
7029 * compile/compile-c-types.c (convert_enum, convert_int)
7030 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7031
3f8a7804
SM
70322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7033
7034 * dwarf2read.c (copy_string): Remove.
7035 (parse_macro_definition): Replace copy_string with savestring.
7036
8d200706
YQ
70372017-09-15 Yao Qi <yao.qi@linaro.org>
7038
7039 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7040 gdb_target_obs.
7041 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7042 Likewise.
7043 (i[34567]86-*-linux*): Likewise.
7044
d185219d
SM
70452017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7046
7047 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7048 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7049 <stack>: Change type to std::vector.
7050 <stack_len, stack_allocated>: Remove.
7051 <grow_stack>: Remove.
7052 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7053 (dwarf_expr_context::~dwarf_expr_context): Remove.
7054 (dwarf_expr_context::grow_stack): Remove.
7055 (dwarf_expr_context::push): Adjust.
7056 (dwarf_expr_context::pop): Adjust.
7057 (dwarf_expr_context::fetch): Adjust.
7058 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7059 (dwarf_expr_context::stack_empty_p): Adjust.
7060 (dwarf_expr_context::execute_stack_op): Adjust.
7061
eccd80d6
SM
70622017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7063
7064 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7065 return type to bool.
7066 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7067
69009882
SM
70682017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7069
7070 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7071 Change type to bool.
7072 (dwarf_stack_value) <in_stack_memory>: Likewise.
7073 (dwarf_expr_context) <push_address>: Change parameter type to
7074 bool.
7075 <fetch_in_stack_memory>: Change return type to bool.
7076 <push>: Change parameter type to bool.
7077 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7078 to bool.
7079 (dwarf_expr_context::push_address): Likewise.
7080 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7081 to bool.
7082 (dwarf_expr_context::execute_stack_op): Adjust.
7083 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7084
1e467161
SM
70852017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7086
7087 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7088 (struct dwarf_expr_context) <n_pieces>: Remove.
7089 <pieces>: Change type to std::vector.
7090 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7091 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7092 pieces.
7093 (dwarf_expr_context::add_piece): Adjust.
7094 * dwarf2loc.c (struct piece_closure): Initialize fields.
7095 <n_pieces>: Remove.
7096 <pieces>: Change type to std::vector.
7097 (allocate_piece_closure): Adjust, change parameter to
7098 std::vector rvalue and std::move it to piece_closure.
7099 (rw_pieced_value): Adjust.
7100 (check_pieced_synthetic_pointer): Adjust.
7101 (indirect_synthetic_pointer): Adjust.
7102 (coerce_pieced_ref): Adjust.
7103 (free_pieced_value_closure): Adjust. Use delete to free
7104 piece_closure.
7105 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7106 to allocate_piece_closure.
7107 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7108
0782db84
SM
71092017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7110
7111 * probe.h (probe_ops_cp): Remove typedef.
7112 (DEF_VEC_P (probe_ops_cp)): Remove.
7113 (all_probe_ops): Change type to std::vector.
7114 * probe.c (info_probes_for_ops): Adjust to vector change.
7115 (probe_linespec_to_ops): Likewise.
7116 (all_probe_ops): Change type to std::vector.
7117 (_initialize_probe): Adjust to vector change.
7118 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7119 * elfread.c (elf_get_probes): Likewise.
7120 * stap-probe.c (_initialize_stap_probe): Likewise.
7121
1eac6bea
SM
71222017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7123
7124 * probe.h (struct bound_probe): Define constructors.
7125 * probe.c (bound_probe_s): Remove typedef.
7126 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7127 (collect_probes): Change return type to std::vector, remove
7128 cleanup.
7129 (compare_probes): Return bool, change parameter type. Change
7130 semantic to "less than".
7131 (gen_ui_out_table_header_info): Change parameter to std::vector
7132 and update.
7133 (exists_probe_with_pops): Likewise.
7134 (info_probes_for_ops): Update to std::vector change.
7135 (enable_probes_command): Likewise.
7136 (disable_probes_command): Likewise.
7137
aaa63a31
SM
71382017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7139
7140 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7141 vec to std::vector.
7142 * probe.c (parse_probes_in_pspace): Update.
7143 (find_probes_in_objfile): Update.
7144 (find_probe_by_pc): Update.
7145 (collect_probes): Update.
7146 (probe_any_get_probes): Update.
7147 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7148 return type to reference to std::vector.
7149 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7150 std::vector and update.
7151 (dtrace_process_dof): Likewise.
7152 (dtrace_get_probes): Likewise.
7153 * elfread.c (elf_get_probes): Change return type to std::vector,
7154 store an std::vector in bfd_data.
7155 (probe_key_free): Update to std::vector.
7156 * stap-probe.c (handle_stap_probe): Change parameter to
7157 std::vector and update.
7158 (stap_get_probes): Likewise.
7159 * symfile-debug.c (debug_sym_get_probes): Change return type to
7160 std::vector and update.
7161
cb85b21b
TT
71622017-09-11 Tom Tromey <tom@tromey.com>
7163
7164 * breakpoint.c (program_breakpoint_here_p): Update.
7165 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7166 from make_show_memory_breakpoints_cleanup. Return a
7167 scoped_restore_tmpl<int>.
7168 (restore_show_memory_breakpoints): Remove.
7169 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7170 * mem-break.c (memory_validate_breakpoint): Update.
7171 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7172 (ia64_memory_remove_breakpoint): Update.
7173 (ia64_breakpoint_from_pc): Update.
7174 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7175 from make_show_memory_breakpoints_cleanup.
7176
8fbc99ef
TT
71772017-09-11 Tom Tromey <tom@tromey.com>
7178
7179 * d-namespace.c (d_lookup_symbol): Use std::string.
7180 (find_symbol_in_baseclass): Likewise.
7181
50feb4bd
TT
71822017-09-11 Tom Tromey <tom@tromey.com>
7183
7184 * ctf.c (ctf_start): Use std::string.
7185
c6dc63a1
TT
71862017-09-11 Tom Tromey <tom@tromey.com>
7187
7188 * ada-lang.c (is_known_support_routine): Update.
7189 (ada_unhandled_exception_name_addr_from_raise): Update.
7190 * guile/scm-frame.c (gdbscm_frame_name): Update.
7191 * python/py-frame.c (frapy_name): Update.
7192 (frapy_function): Update.
7193 * stack.h (find_frame_funname): Update.
7194 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7195 (print_frame): Update.
7196
d6b9b80f
TT
71972017-09-11 Tom Tromey <tom@tromey.com>
7198
7199 * findcmd.c (put_bits): Take a gdb::byte_vector.
7200 (parse_find_args): Return gdb::byte_vector. "args" now const.
7201 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7202 cleanups.
7203 (find_command): Update.
7204
a9921622
TT
72052017-09-11 Tom Tromey <tom@tromey.com>
7206
7207 * cli/cli-script.c (class scoped_restore_hook_in): New.
7208 (clear_hook_in_cleanup): Remove.
7209 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7210 scoped_restore_hook_in.
7211
be0d7abb
TT
72122017-09-11 Tom Tromey <tom@tromey.com>
7213
7214 * cli/cli-script.c (restore_interp): Remove.
7215 (read_command_lines): Use scoped_restore_interp.
7216 * interps.c (scoped_restore_interp::set_temp): Rename from
7217 interp_set_temp.
7218 * interps.h (class scoped_restore_interp): New.
7219 (interp_set_temp): Remove.
7220
00f675ff
TT
72212017-09-11 Tom Tromey <tom@tromey.com>
7222
7223 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7224 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7225 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7226 scoped_restore.
7227 (mi_cmd_break_insert_1): Update.
7228 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7229 scoped_restore.
7230
cb791d59
TT
72312017-09-11 Tom Tromey <tom@tromey.com>
7232
7233 * demangle.c (demangle_command): Update.
7234 * breakpoint.c (disable_command): Update.
7235 (enable_command): Update.
7236 (find_location_by_number): Make "number" const. Use
7237 get_number_trailer.
7238 * cli/cli-utils.c (extract_arg): Return std::string.
7239 * probe.c (parse_probe_linespec): Update. Change types.
7240 (collect_probes): Take string arguments.
7241 (parse_probe_linespec): Likewise.
7242 (info_probes_for_ops): Update.
7243 (enable_probes_command): Update.
7244 (disable_probes_command): Update.
7245 * break-catch-sig.c (catch_signal_split_args): Update.
7246 * mi/mi-parse.c (mi_parse): Update.
7247
2039bd9f
TT
72482017-09-11 Tom Tromey <tom@tromey.com>
7249
7250 * language.h (language_enum): Make argument const.
7251 * language.c (language_enum): Make argument const.
7252
f1735a53
TT
72532017-09-11 Tom Tromey <tom@tromey.com>
7254
7255 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7256 as function.
7257 (skip_to_space): Rename from skip_to_space_const.
7258 * common/common-utils.c (skip_to_space): New function.
7259 (skip_to_space): Rename from skip_to_space_const.
7260 * cli/cli-utils.h (get_number): Rename from get_number_const.
7261 (extract_arg): Rename from extract_arg_const.
7262 * cli/cli-utils.c (get_number): Rename from get_number_const.
7263 (extract_arg): Rename from extract_arg_const.
7264 (number_or_range_parser::get_number): Use ::get_number.
7265 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7266 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7267 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7268 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7269 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7270 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7271 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7272 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7273
7d221d74
TT
72742017-09-11 Tom Tromey <tom@tromey.com>
7275
7276 * python/python.c (do_start_initialization): Use
7277 py-event-types.def to initialize types.
7278 Define all object type structures.
7279 * python/python-internal.h: Don't declare event initialization
7280 functions.
7281 * python/py-threadevent.c (thread_event_object_type): Don't
7282 define.
7283 * python/py-stopevent.c (stop_event_object_type): Don't define.
7284 * python/py-signalevent.c (signal_event_object_type): Don't
7285 declare or define.
7286 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7287 (clear_objfiles_event_object_type): Don't declare or define.
7288 * python/py-infevents.c (inferior_call_pre_event_object_type)
7289 (inferior_call_post_event_object_type)
7290 (register_changed_event_object_type)
7291 (memory_changed_event_object_type): Don't declare or define.
7292 * python/py-inferior.c (new_thread_event_object_type)
7293 (new_inferior_event_object_type)
7294 (inferior_deleted_event_object_type): Don't declare or define.
7295 * python/py-exitedevent.c (exited_event_object_type): Don't
7296 declare or define.
7297 * python/py-evts.c (gdbpy_initialize_py_events): Use
7298 py-all-events.def.
7299 * python/py-events.h (thread_event_object_type): Don't declare.
7300 (events_object): Use py-all-events.def.
7301 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7302 py-event-types.def.
7303 * python/py-event-types.def: New file.
7304 * python/py-continueevent.c (create_continue_event_object): Don't
7305 declare or define.
7306 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7307 declare or define.
7308 * python/py-all-events.def: New file.
7309
35c61a1d
TT
73102017-09-11 Tom Tromey <tom@tromey.com>
7311
7312 * python/py-threadevent.c (create_thread_event_object): Return
7313 gdbpy_ref.
7314 * python/py-stopevent.h (create_stop_event_object)
7315 (create_breakpoint_event_object, create_signal_event_object):
7316 Update.
7317 * python/py-stopevent.c (create_stop_event_object): Return
7318 gdbpy_ref.
7319 (emit_stop_event): Update.
7320 * python/py-signalevent.c (create_signal_event_object): Return
7321 gdbpy_ref.
7322 * python/py-infevents.c (create_inferior_call_event_object):
7323 Update.
7324 * python/py-event.h (create_event_object)
7325 (create_thread_event_object): Update.
7326 * python/py-event.c (create_event_object): Return gdbpy_ref.
7327 * python/py-continueevent.c: Return gdbpy_ref.
7328 * python/py-bpevent.c (create_breakpoint_event_object): Return
7329 gdbpy_ref.
7330
7c96f8c1
TT
73312017-09-11 Tom Tromey <tom@tromey.com>
7332
7333 PR python/15622:
7334 * NEWS: Add entry.
7335 * python/python.c (do_start_initialization): Initialize new event
7336 types.
7337 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7338 (gdbpy_initialize_inferior_deleted_event)
7339 (gdbpy_initialize_new_thread_event): Declare.
7340 * python/py-threadevent.c (create_thread_event_object): Add option
7341 "thread" parameter.
7342 * python/py-inferior.c (new_thread_event_object_type)
7343 (new_inferior_event_object_type)
7344 (inferior_deleted_event_object_type): Declare.
7345 (python_new_inferior, python_inferior_deleted): New functions.
7346 (add_thread_object): Emit new_thread event.
7347 (gdbpy_initialize_inferior): Attach new functions to corresponding
7348 observers.
7349 (new_thread, new_inferior, inferior_deleted): Define new event
7350 types.
7351 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7352 registries.
7353 * python/py-events.h (events_object) <new_inferior,
7354 inferior_deleted, new_thread>: New fields.
7355 * python/py-event.h (create_thread_event_breakpoint): Add optional
7356 "thread" parameter.
7357
72542b8e
AB
73582017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7359
7360 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7361 check current_ui instead.
7362 (internal_vproblem): Likewise.
7363
0d64823e
SM
73642017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7365
7366 * thread.c (print_thread_info_1): Remove unnecessary calls to
7367 uiout->is_mi_like_p.
7368
eb1e02fd
TT
73692017-09-09 Tom Tromey <tom@tromey.com>
7370
7371 * namespace.h (add_using_directive): Update.
7372 * namespace.c (add_using_directive): Change type of excludes to
7373 std::vector.
7374 * dwarf2read.c (read_import_statement): Use std::vector.
7375 (read_namespace): Update.
7376 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7377
0fc21fd8
TT
73782017-09-09 Tom Tromey <tom@tromey.com>
7379
7380 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7381
49663d05
TT
73822017-09-09 Tom Tromey <tom@tromey.com>
7383
7384 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7385
0b868b60
TT
73862017-09-09 Tom Tromey <tom@tromey.com>
7387
7388 * stack.c (func_command): Use gdb::def_vector.
7389
c0470d48
TT
73902017-09-09 Tom Tromey <tom@tromey.com>
7391
7392 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7393 ui_out_emit_list, ui_out_emit_tuple.
7394 (mi_cmd_var_update): Likewise.
7395
ca5909c7
TT
73962017-09-09 Tom Tromey <tom@tromey.com>
7397
7398 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7399 ui_out_redirect_pop.
7400 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7401 ui_out_redirect_pop.
7402 * utils.c (do_ui_out_redirect_pop)
7403 (make_cleanup_ui_out_redirect_pop): Remove.
7404 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7405 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7406 * ui-out.h (ui_out_redirect_pop): New class.
7407
e6a2252a
TT
74082017-09-09 Tom Tromey <tom@tromey.com>
7409
7410 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7411 (list_available_thread_groups, mi_cmd_list_thread_groups)
7412 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7413 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7414 Likewise.
7415
393702cd
TT
74162017-09-09 Tom Tromey <tom@tromey.com>
7417
7418 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7419 ui_out_emit_tuple.
7420
76f9c9cf
TT
74212017-09-09 Tom Tromey <tom@tromey.com>
7422
7423 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7424 * stack.c (print_frame): Use ui_out_emit_tuple.
7425 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7426 (info_spu_mailbox_command, info_spu_dma_command)
7427 (info_spu_proxydma_command): Likewise.
7428 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7429 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7430 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7431 ui_out_emit_tuple.
7432 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7433
dc9fe180
TT
74342017-09-09 Tom Tromey <tom@tromey.com>
7435
7436 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7437 (class ui_out_emit_table): Update comment.
7438 * ui-out.c (do_cleanup_table_end)
7439 (make_cleanup_ui_out_table_begin_end): Remove.
7440 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7441 (info_spu_dma_cmdlist): Likewise.
7442 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7443 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7444 ui_out_emit_table.
7445
f8cc3da6
TT
74462017-09-09 Tom Tromey <tom@tromey.com>
7447
7448 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7449 ui_out_emit_list, gdb::optional.
7450
481695ed
JB
74512017-09-09 John Baldwin <jhb@FreeBSD.org>
7452
7453 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7454 prototype.
7455 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7456 prototype.
7457 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7458 prototype.
7459 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7460 * ada-exp.y: Remove _initialize_ada_exp prototype.
7461 * ada-lang.c: Remove _initialize_ada_language prototype.
7462 * ada-tasks.c: Remove _initialize_tasks prototype.
7463 * addrmap.c: Remove _initialize_addrmap prototype.
7464 * agent.c: Remove _initialize_agent prototype.
7465 * aix-thread.c: Remove _initialize_aix_thread prototype.
7466 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7467 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7468 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7469 prototype.
7470 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7471 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7472 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7473 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7474 prototype.
7475 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7476 prototype.
7477 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7478 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7479 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7480 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7481 prototype.
7482 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7483 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7484 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7485 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7486 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7487 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7488 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7489 prototype.
7490 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7491 prototype.
7492 * annotate.c: Remove _initialize_annotate prototype.
7493 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7494 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7495 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7496 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7497 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7498 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7499 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7500 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7501 prototype.
7502 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7503 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7504 * auto-load.c: Remove _initialize_auto_load prototype.
7505 * auxv.c: Remove _initialize_auxv prototype.
7506 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7507 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7508 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7509 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7510 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7511 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7512 prototype.
7513 * break-catch-throw.c: Remove _initialize_break_catch_throw
7514 prototype.
7515 * breakpoint.c: Remove _initialize_breakpoint prototype.
7516 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7517 * btrace.c: Remove _initialize_btrace prototype.
7518 * charset.c: Remove _initialize_charset prototype.
7519 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7520 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7521 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7522 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7523 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7524 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7525 * coffread.c: Remove _initialize_coffread prototype.
7526 * compile/compile.c: Remove _initialize_compile prototype.
7527 * complaints.c: Remove _initialize_complaints prototype.
7528 * completer.c: Remove _initialize_completer prototype.
7529 * copying.awk: Remove _initialize_copying prototype.
7530 * copying.c: Regenerate.
7531 * core-regset.c: Remove _initialize_core_regset prototype.
7532 * corefile.c: Remove _initialize_core prototype.
7533 * corelow.c: Remove _initialize_corelow prototype.
7534 * cp-abi.c: Remove _initialize_cp_abi prototype.
7535 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7536 * cp-support.c: Remove _initialize_cp_support prototype.
7537 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7538 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7539 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7540 * ctf.c: Remove _initialize_ctf prototype.
7541 * d-lang.c: Remove _initialize_d_language prototype.
7542 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7543 prototype.
7544 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7545 * dbxread.c: Remove _initialize_dbxread prototype.
7546 * dcache.c: Remove _initialize_dcache prototype.
7547 * demangle.c: Remove _initialize_demangler prototype.
7548 * disasm-selftests.c: Remove _initialize_disasm_selftests
7549 prototype.
7550 * disasm.c: Remove _initialize_disasm prototype.
7551 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7552 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7553 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7554 prototype.
7555 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7556 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7557 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7558 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7559 * elfread.c: Remove _initialize_elfread prototype.
7560 * exec.c: Remove _initialize_exec prototype.
7561 * extension.c: Remove _initialize_extension prototype.
7562 * f-lang.c: Remove _initialize_f_language prototype.
7563 * f-valprint.c: Remove _initialize_f_valprint prototype.
7564 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7565 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7566 * filesystem.c: Remove _initialize_filesystem prototype.
7567 * findcmd.c: Remove _initialize_mem_search prototype.
7568 * fork-child.c: Remove _initialize_fork_child prototype.
7569 * frame-base.c: Remove _initialize_frame_base prototype.
7570 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7571 * frame.c: Remove _initialize_frame prototype.
7572 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7573 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7574 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7575 * gcore.c: Remove _initialize_gcore prototype.
7576 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7577 * gdbarch.c: Regenerate.
7578 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7579 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7580 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7581 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7582 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7583 * go-lang.c: Remove _initialize_go_language prototype.
7584 * go32-nat.c: Remove _initialize_go32_nat prototype.
7585 * guile/guile.c: Remove _initialize_guile prototype.
7586 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7587 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7588 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7589 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7590 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7591 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7592 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7593 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7594 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7595 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7596 prototype.
7597 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7598 prototype.
7599 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7600 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7601 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7602 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7603 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7604 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7605 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7606 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7607 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7608 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7609 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7610 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7611 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7612 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7613 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7614 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7615 prototype.
7616 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7617 prototype.
7618 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7619 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7620 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7621 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7622 * infcall.c: Remove _initialize_infcall prototype.
7623 * infcmd.c: Remove _initialize_infcmd prototype.
7624 * inferior.c: Remove _initialize_inferiors prototype.
7625 * inflow.c: Remove _initialize_inflow prototype.
7626 * infrun.c: Remove _initialize_infrun prototype.
7627 * interps.c: Remove _initialize_interpreter prototype.
7628 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7629 * jit.c: Remove _initialize_jit prototype.
7630 * language.c: Remove _initialize_language prototype.
7631 * linux-fork.c: Remove _initialize_linux_fork prototype.
7632 * linux-nat.c: Remove _initialize_linux_nat prototype.
7633 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7634 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7635 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7636 * m2-lang.c: Remove _initialize_m2_language prototype.
7637 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7638 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7639 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7640 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7641 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7642 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7643 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7644 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7645 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7646 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7647 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7648 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7649 * machoread.c: Remove _initialize_machoread prototype.
7650 * macrocmd.c: Remove _initialize_macrocmd prototype.
7651 * macroscope.c: Remove _initialize_macroscope prototype.
7652 * maint.c: Remove _initialize_maint_cmds prototype.
7653 * mdebugread.c: Remove _initialize_mdebugread prototype.
7654 * memattr.c: Remove _initialize_mem prototype.
7655 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7656 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7657 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7658 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7659 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7660 * microblaze-linux-tdep.c: Remove
7661 _initialize_microblaze_linux_tdep prototype.
7662 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7663 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7664 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7665 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7666 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7667 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7668 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7669 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7670 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7671 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7672 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7673 prototype.
7674 * mipsread.c: Remove _initialize_mipsread prototype.
7675 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7676 prototype.
7677 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7678 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7679 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7680 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7681 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7682 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7683 prototype.
7684 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7685 * nto-procfs.c: Remove _initialize_procfs prototype.
7686 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7687 * objc-lang.c: Remove _initialize_objc_language prototype.
7688 * objfiles.c: Remove _initialize_objfiles prototype.
7689 * observer.c: Remove observer_test_first_notification_function,
7690 observer_test_second_notification_function,
7691 observer_test_third_notification_function, and
7692 _initialize_observer prototypes.
7693 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7694 * osabi.c: Remove _initialize_gdb_osabi prototype.
7695 * osdata.c: Remove _initialize_osdata prototype.
7696 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7697 * parse.c: Remove _initialize_parse prototype.
7698 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7699 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7700 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7701 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7702 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7703 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7704 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7705 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7706 * printcmd.c: Remove _initialize_printcmd prototype.
7707 * probe.c: Remove _initialize_probe prototype.
7708 * proc-api.c: Remove _initialize_proc_api prototype.
7709 * proc-events.c: Remove _initialize_proc_events prototype.
7710 * proc-service.c: Remove _initialize_proc_service prototype.
7711 * procfs.c: Remove _initialize_procfs prototype.
7712 * psymtab.c: Remove _initialize_psymtab prototype.
7713 * python/python.c: Remove _initialize_python prototype.
7714 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7715 * record-btrace.c: Remove _initialize_record_btrace prototype.
7716 * record-full.c: Remove _initialize_record_full prototype.
7717 * record.c: Remove _initialize_record prototype.
7718 * regcache.c: Remove _initialize_regcache prototype.
7719 * reggroups.c: Remove _initialize_reggroup prototype.
7720 * remote-notif.c: Remove _initialize_notif prototype.
7721 * remote-sim.c: Remove _initialize_remote_sim prototype.
7722 * remote.c: Remove _initialize_remote prototype.
7723 * reverse.c: Remove _initialize_reverse prototype.
7724 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7725 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7726 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7727 prototype.
7728 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7729 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7730 * rust-exp.y: Remove _initialize_rust_exp prototype.
7731 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7732 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7733 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7734 * score-tdep.c: Remove _initialize_score_tdep prototype.
7735 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7736 prototype.
7737 * ser-go32.c: Remove _initialize_ser_dos prototype.
7738 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7739 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7740 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7741 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7742 * serial.c: Remove _initialize_serial prototype.
7743 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7744 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7745 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7746 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7747 * skip.c: Remove _initialize_step_skip prototype.
7748 * sol-thread.c: Remove _initialize_sol_thread prototype.
7749 * solib-aix.c: Remove _initialize_solib_aix prototype.
7750 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7751 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7752 * solib-frv.c: Remove _initialize_frv_solib prototype.
7753 * solib-spu.c: Remove _initialize_spu_solib prototype.
7754 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7755 * solib-target.c: Remove _initialize_solib_target prototype.
7756 * solib.c: Remove _initialize_solib prototype.
7757 * source.c: Remove _initialize_source prototype.
7758 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7759 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7760 prototype.
7761 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7762 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7763 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7764 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7765 prototype.
7766 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7767 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7768 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7769 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7770 prototype.
7771 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7772 prototype.
7773 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7774 prototype.
7775 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7776 prototype.
7777 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7778 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7779 prototype.
7780 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7781 prototype.
7782 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7783 prototype.
7784 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7785 prototype.
7786 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7787 prototype.
7788 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7789 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7790 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7791 * stabsread.c: Remove _initialize_stabsread prototype.
7792 * stack.c: Remove _initialize_stack prototype.
7793 * stap-probe.c: Remove _initialize_stap_probe prototype.
7794 * std-regs.c: Remove _initialize_frame_reg prototype.
7795 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7796 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7797 * symfile.c: Remove _initialize_symfile prototype.
7798 * symmisc.c: Remove _initialize_symmisc prototype.
7799 * symtab.c: Remove _initialize_symtab prototype.
7800 * target-dcache.c: Remove _initialize_target_dcache prototype.
7801 * target-descriptions.c: Remove _initialize_target_descriptions
7802 prototype.
7803 * thread.c: Remove _initialize_thread prototype.
7804 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7805 prototype.
7806 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7807 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7808 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7809 prototype.
7810 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7811 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7812 * tracefile.c: Remove _initialize_tracefile prototype.
7813 * tracepoint.c: Remove _initialize_tracepoint prototype.
7814 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7815 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7816 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7817 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7818 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7819 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7820 * tui/tui.c: Remove _initialize_tui prototype.
7821 * typeprint.c: Remove _initialize_typeprint prototype.
7822 * user-regs.c: Remove _initialize_user_regs prototype.
7823 * utils.c: Remove _initialize_utils prototype.
7824 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7825 * valarith.c: Remove _initialize_valarith prototype.
7826 * valops.c: Remove _initialize_valops prototype.
7827 * valprint.c: Remove _initialize_valprint prototype.
7828 * value.c: Remove _initialize_values prototype.
7829 * varobj.c: Remove _initialize_varobj prototype.
7830 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7831 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7832 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7833 * windows-nat.c: Remove _initialize_windows_nat,
7834 _initialize_check_for_gdb_ini, and _initialize_loadable
7835 prototypes.
7836 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7837 * xcoffread.c: Remove _initialize_xcoffread prototype.
7838 * xml-support.c: Remove _initialize_xml_support prototype.
7839 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7840 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7841 prototype.
7842 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7843 prototype.
7844 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7845
a611b5cb
KS
78462017-09-08 Keith Seitz <keiths@redhat.com>
7847
7848 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7849 field.
7850
469412dd
CW
78512017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7852
7853 * f-valprint.c (f_val_print): Remove check for one byte
7854 sized integers. Remove printing of character type.
7855
a5ad232b
FP
78562017-09-08 Frank Penczek <frank.penczek@intel.com>
7857 Christoph Weinmann <christoph.t.weinmann@intel.com>
7858 Bernhard Heckel <bernhard.heckel@intel.com>
7859
7860 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7861 to maintain proper indentation when printing pointers/refs.
7862
e5014227
JB
78632017-09-07 Joel Brobecker <brobecker@adacore.com>
7864
7865 GDB 8.0.1 released.
7866
63c99141
JB
78672017-09-07 Joel Brobecker <brobecker@adacore.com>
7868
7869 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7870
69c1e056
TT
78712017-09-05 Tom Tromey <tom@tromey.com>
7872
7873 * parse.c (funcall_chain): Now a std::vector.
7874 (start_arglist, end_arglist): Simplify.
7875 (free_funcalls): Remove.
7876 (parse_exp_in_context_1): Remove cleanup.
7877
fef704bf
TT
78782017-09-05 Tom Tromey <tom@tromey.com>
7879
7880 * go-exp.y (go_parse): Don't create a cleanup.
7881
5613c585
TT
78822017-09-05 Tom Tromey <tom@tromey.com>
7883
7884 * d-exp.y (PrimaryExpression): Use std::string.
7885 (d_parse): Don't create a cleanup.
7886
eae49211
TT
78872017-09-05 Tom Tromey <tom@tromey.com>
7888
7889 * utils.c (do_clear_parser_state): Remove.
7890 (make_cleanup_clear_parser_state): Remove.
7891 * p-exp.y (pascal_parse): Use scoped_restore.
7892 * m2-exp.y (m2_parse): Use scoped_restore.
7893 * f-exp.y (f_parse): Use scoped_restore.
7894 * d-exp.y (d_parse): Use scoped_restore.
7895 * c-exp.y (c_parse): Use scoped_restore.
7896 * ada-exp.y (ada_parse): Use scoped_restore.
7897 * utils.h (make_cleanup_clear_parser_state): Remove.
7898
73b9be8b
KS
78992017-09-06 Keith Seitz <keiths@redhat.com>
7900
7901 * dwarf2read.c (dw2_linkage_name_attr): New function.
7902 (dw2_linkage_name): New function.
7903 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7904 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7905 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7906
a102602b
KR
79072017-09-06 Kamil Rytarowski <n54@gmx.com>
7908
7909 * config/djgpp/djconfig.sh: Correct shell portability issue.
7910
28ad437d
KR
79112017-09-06 Kamil Rytarowski <n54@gmx.com>
7912
7913 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7914
351787dd
JB
79152017-09-06 John Baldwin <jhb@FreeBSD.org>
7916
7917 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7918 * NEWS: Mention new FreeBSD/mips native configuration.
7919 * configure.host: Add aarch64*-*-freebsd*.
7920 * configure.nat: Likewise.
7921 * aarch64-fbsd-nat.c: New file.
7922
c0f84956
JB
79232017-09-06 John Baldwin <jhb@FreeBSD.org>
7924
7925 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7926 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7927 * NEWS: Mention new FreeBSD/aarch64 target.
7928 * configure.tgt: Add aarch64*-*-freebsd*.
7929 * aarch64-fbsd-tdep.c: New file.
7930 * aarch64-fbsd-tdep.h: New file.
7931
7610297a
KR
79322017-09-06 Kamil Rytarowski <n54@gmx.com>
7933
7934 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7935
fbd1b771
JK
79362017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7937
7938 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7939 of TLS symbols.
7940
5ca79eae
PW
79412017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7942
7943 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7944 call.
7945
bf93d7ba
SM
79462017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7947
7948 * infrun.c (follow_exec): Call add_thread after
7949 target_find_description.
7950
1bb7c059
SM
79512017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7952
7953 * infrun.c (handle_inferior_event_1): When exec'ing, read
7954 stop_pc after follow_exec.
7955
fc809827
SM
79562017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7957
7958 * remote.c (process_g_packet): Update error message.
7959
d2fcdd85
YQ
79602017-09-05 Yao Qi <yao.qi@linaro.org>
7961
7962 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7963 targets.
7964
e69570ee
PA
79652017-09-05 Pedro Alves <palves@redhat.com>
7966
7967 * eval.c (eval_call, evaluate_funcall): New functions, factored
7968 out from ...
7969 (evaluate_subexp_standard): ... this.
7970
22916b07
YQ
79712017-09-05 Yao Qi <yao.qi@linaro.org>
7972
7973 * amd64-tdep.c (amd64_target_description): Create target
7974 descriptions.
7975 (_initialize_amd64_tdep): Don't call functions
7976 initialize_tdesc_amd64_*. Add self tests.
7977 * arch/amd64.c (amd64_create_target_description): Add parameter
7978 is_linux. Call set_tdesc_osabi if is_linux is true.
7979 * arch/amd64.h (amd64_create_target_description): Update the
7980 declaration.
7981 * arch/i386.c (i386_create_target_description): Add parameter
7982 is_linux. Call set_tdesc_osabi if is_linux is true.
7983 * arch/i386.h (i386_create_target_description): Update
7984 declaration.
7985 * configure.tgt: Add i386.o to gdb_target_obs.
7986 * features/Makefile (XMLTOC): Remove i386/*.xml.
7987 * features/i386/amd64-avx-avx512.c: Remove.
7988 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7989 * features/i386/amd64-avx-mpx.c: Remove.
7990 * features/i386/amd64-avx.c: Remove.
7991 * features/i386/amd64-mpx.c: Remove.
7992 * features/i386/amd64.c: Remove.
7993 * features/i386/i386-avx-avx512.c: Remove.
7994 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7995 * features/i386/i386-avx-mpx.c: Remove.
7996 * features/i386/i386-avx.c: Remove.
7997 * features/i386/i386-mmx.c: Remove.
7998 * features/i386/i386-mpx.c: Remove.
7999 * features/i386/i386.c: Remove.
8000 * i386-tdep.c: Don't include features/i386/i386*.c., include
8001 target-descriptions.h and arch/i386.h.
8002 (i386_target_description): Create target descriptions.
8003 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8004 functions. Do self tests.
8005
0854b7b1
YQ
80062017-09-05 Yao Qi <yao.qi@linaro.org>
8007
8008 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8009 * features/i386/amd64-avx-avx512-linux.c: Removed.
8010 * features/i386/amd64-avx-linux.c: Removed.
8011 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8012 * features/i386/amd64-avx-mpx-linux.c: Removed.
8013 * features/i386/amd64-linux.c: Removed.
8014 * features/i386/amd64-mpx-linux.c: Removed.
8015 * features/i386/x32-avx-avx512-linux.c: Removed.
8016 * features/i386/x32-avx-linux.c: Removed.
8017 * features/i386/x32-linux.c: Removed.
8018
b4570e4b
YQ
80192017-09-05 Yao Qi <yao.qi@linaro.org>
8020
8021 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8022 features/i386/*.c.
8023 (amd64_linux_read_description): Call
8024 amd64_create_target_description.
8025 * arch/amd64.c: New file.
8026 * arch/amd64.h: New file.
8027 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8028 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8029
6c73f67f
YQ
80302017-09-05 Yao Qi <yao.qi@linaro.org>
8031
8032 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8033 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8034 (amd64_linux_read_description): Create target descriptions.
8035 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8036 functions. Add unit tests.
8037 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8038 x32-core.xml.
8039 * features/i386/64bit-avx.c: Generated.
8040 * features/i386/64bit-avx512.c: Generated.
8041 * features/i386/64bit-core.c: Generated.
8042 * features/i386/64bit-linux.c: Generated.
8043 * features/i386/64bit-mpx.c: Generated.
8044 * features/i386/64bit-pkeys.c: Generated.
8045 * features/i386/64bit-segments.c: Generated.
8046 * features/i386/64bit-sse.c: Generated.
8047 * features/i386/x32-core.c: Generated.
8048 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8049 c files for amd64-linux and x32-linux.
8050
9d3d478b
YQ
80512017-09-05 Yao Qi <yao.qi@linaro.org>
8052
8053 * amd64-linux-tdep.c (amd64_linux_read_description): New
8054 function.
8055 (amd64_linux_core_read_description): Call
8056 amd64_linux_read_description.
8057 (amd64_linux_init_abi): Likewise.
8058 (amd64_x32_linux_init_abi): Likewise.
8059 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8060 * x86-linux-nat.c (x86_linux_read_description): Call
8061 amd64_linux_read_description.
8062
b9f1d50f
YQ
80632017-09-05 Yao Qi <yao.qi@linaro.org>
8064
8065 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8066 comments.
8067
188c9e6d
YQ
80682017-09-05 Yao Qi <yao.qi@linaro.org>
8069
8070 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8071 * features/i386/i386-avx-avx512-linux.c: Remove.
8072 * features/i386/i386-avx-linux.c: Remove.
8073 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8074 * features/i386/i386-avx-mpx-linux.c: Remove.
8075 * features/i386/i386-linux.c: Remove.
8076 * features/i386/i386-mmx-linux.c: Remove.
8077 * features/i386/i386-mpx-linux.c: Remove.
8078
5f035c07
YQ
80792017-09-05 Yao Qi <yao.qi@linaro.org>
8080
8081 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8082 (SFILES): Add arch/i386.c.
8083 (HFILES_NO_SRCDIR): Add arch/i386.h.
8084 * arch/i386.c: New file.
8085 * arch/i386.h: New file.
8086 * arch/tdesc.h (allocate_target_description): Declare.
8087 (set_tdesc_architecture): Declare.
8088 (set_tdesc_osabi): Declare.
8089 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8090 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8091 include arch/i386.h.
8092 (i386_linux_read_description): Remove code and call
8093 i386_create_target_description.
8094 (set_tdesc_architecture): New function.
8095 (set_tdesc_osabi): New function.
8096 * target-descriptions.h (allocate_target_description): Remove.
8097
0abe8a89
YQ
80982017-09-05 Yao Qi <yao.qi@linaro.org>
8099
8100 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8101 * target-descriptions.c (tdesc_create_feature): Likewise, and
8102 adjust code.
8103 * features/i386/32bit-avx.c: Re-generated.
8104 * features/i386/32bit-avx512.c: Re-generated.
8105 * features/i386/32bit-core.c: Re-generated.
8106 * features/i386/32bit-linux.c: Re-generated.
8107 * features/i386/32bit-mpx.c: Re-generated.
8108 * features/i386/32bit-pkeys.c: Re-generated.
8109 * features/i386/32bit-sse.c: Re-generated.
8110
0a188386
YQ
81112017-09-05 Yao Qi <yao.qi@linaro.org>
8112
8113 * regformats/regdef.h (struct reg): Override operator == and !=.
8114
f49ff000
YQ
81152017-09-05 Yao Qi <yao.qi@linaro.org>
8116
8117 * arch/tdesc.h: New file.
8118 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8119 * target-descriptions.c: Update comments.
8120 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8121 declarations.
8122 * features/i386/32bit-avx.c: Re-generated.
8123 * features/i386/32bit-avx512.c: Re-generated.
8124 * features/i386/32bit-core.c: Re-generated.
8125 * features/i386/32bit-linux.c: Re-generated.
8126 * features/i386/32bit-mpx.c: Re-generated.
8127 * features/i386/32bit-pkeys.c: Re-generated.
8128 * features/i386/32bit-sse.c: Re-generated.
8129
f7000548
YQ
81302017-09-05 Yao Qi <yao.qi@linaro.org>
8131
8132 * regformats/regdat.sh: Update generated code.
8133
c9a5e2a5
YQ
81342017-09-05 Yao Qi <yao.qi@linaro.org>
8135
8136 * regformats/regdat.sh: Adjust code order.
8137
d6b687ac
SM
81382017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8139
8140 * expprint.c (dump_subexp_body_standard): Use constant format
8141 string in fprintf_filtered call.
8142
a379bfd0
JB
81432017-09-04 John Baldwin <jhb@FreeBSD.org>
8144
8145 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8146 NetBSD/i386.
8147 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8148
f7efc967
JB
81492017-09-04 John Baldwin <jhb@FreeBSD.org>
8150
8151 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8152
c49fbc6c
JB
81532017-09-04 John Baldwin <jhb@FreeBSD.org>
8154
8155 * bsd-kvm.o: Define _KMEMUSER.
8156 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8157 * configure: Regenerate.
8158
26562e73
JB
81592017-09-04 John Baldwin <jhb@FreeBSD.org>
8160
8161 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8162 * i386-fbsd-nat.c: Likewise.
8163
31cf1487
JB
81642017-09-04 John Baldwin <jhb@FreeBSD.org>
8165
8166 * unittests/array-view-selftests.c: Add include of <array>.
8167
5b9f8a7c
JB
81682017-09-04 John Baldwin <jhb@FreeBSD.org>
8169
8170 * spu-tdep.c (flush_ea_cache): Add missing argument to
8171 call_function_by_hand.
8172
d69cf9b2
PA
81732017-09-04 Pedro Alves <palves@redhat.com>
8174
8175 * NEWS (Safer support for debugging with no debug info): New.
8176
3693fdb3
PA
81772017-09-04 Pedro Alves <palves@redhat.com>
8178
8179 * c-exp.y (function_method, function_method_void): Add current
8180 instance flags to TYPE_INSTANCE.
8181 * dwarf2read.c (check_modifier): New.
8182 (compute_delayed_physnames): Assert that only C++ adds delayed
8183 physnames. Mark fn_fields as const/volatile depending on
8184 physname.
8185 * eval.c (make_params): New type_instance_flags parameter. Use
8186 it as the new type's instance flags.
8187 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8188 flags element and pass it to make_params.
8189 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8190 instance flags element.
8191 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8192 * gdbtypes.h: Include "enum-flags.h".
8193 (type_instance_flags): New enum-flags type.
8194 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8195 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8196 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8197 (follow_type_instance_flags): New function.
8198 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8199 * parser-defs.h (follow_type_instance_flags): Declare.
8200 * valops.c (value_struct_elt_for_reference): const/volatile must
8201 match too.
8202
e68cb8e0
PA
82032017-09-04 Pedro Alves <palves@redhat.com>
8204
8205 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8206 function/method scopes; lookup the nested name as a function local
8207 static variable.
8208
858be34c
PA
82092017-09-04 Pedro Alves <palves@redhat.com>
8210
8211 (%type <voidval>): Add function_method.
8212 * c-exp.y (exp): New production for calls with no arguments.
8213 (function_method, function_method_void_or_typelist): New
8214 productions.
8215 (exp): New production for "method()::static_var".
8216 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8217 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8218 Handle OP_FUNC_STATIC_VAR.
8219 * parse.c (operator_length_standard):
8220 Handle OP_FUNC_STATIC_VAR.
8221
dd5901a6
PA
82222017-09-04 Pedro Alves <palves@redhat.com>
8223
8224 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8225 handling.
8226 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8227 Ditto.
8228 * parse.c (operator_length_standard, operator_check_standard):
8229 Ditto.
8230 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8231
46a4882b
PA
82322017-09-04 Pedro Alves <palves@redhat.com>
8233
8234 * ax-gdb.c: Include "typeprint.h".
8235 (gen_expr_for_cast): New function.
8236 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8237 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8238 type is unknown.
8239 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8240 nodebug_data_symbol.
8241 * eval.c: Include "typeprint.h".
8242 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8243 Error out if symbol has unknown type.
8244 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8245 evaluate_subexp_for_cast.
8246 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8247 OP_VAR_MSYM_VALUE.
8248 (evaluate_subexp_for_cast): New function.
8249 * gdbtypes.c (init_nodebug_var_type): New function.
8250 (objfile_type): Use it to initialize types of variables with no
8251 debug info.
8252 * typeprint.c (error_unknown_type): New.
8253 * typeprint.h (error_unknown_type): New declaration.
8254 * compile/compile-c-types.c (convert_type_basic): Handle
8255 TYPE_CODE_ERROR; warn and fallback to int for variables with
8256 unknown type.
8257
fe13dfec
PA
82582017-09-04 Pedro Alves <palves@redhat.com>
8259
8260 * eval.c (evaluate_var_value): New function, factored out from ...
8261 (evaluate_subexp_standard): ... here.
8262
d008ee21
PA
82632017-09-04 Pedro Alves <palves@redhat.com>
8264
8265 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8266 Remove useless assignments to 'op'.
8267
827d0c51
PA
82682017-09-04 Pedro Alves <palves@redhat.com>
8269
8270 * eval.c (eval_skip_value): New function.
8271 (evaluate_subexp_standard): Use it.
8272
2c5a2be1
PA
82732017-09-04 Pedro Alves <palves@redhat.com>
8274
8275 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8276 function name from symbol/minsym and pass it to
8277 error_call_unknown_return_type.
8278
74ea4be4
PA
82792017-09-04 Pedro Alves <palves@redhat.com>
8280
8281 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8282 * ax-gdb.c (gen_msym_var_ref): New function.
8283 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8284 * eval.c (evaluate_var_msym_value): New function.
8285 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8286 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8287 to call_function_by_hand.
8288 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8289 Handle OP_VAR_MSYM_VALUE.
8290 (union exp_element) <msymbol>: New field.
8291 * minsyms.h (struct type): Forward declare.
8292 (find_minsym_type_and_address): Declare.
8293 * parse.c (write_exp_elt_msym): New function.
8294 (write_exp_msymbol): Delete, refactored as ...
8295 (find_minsym_type_and_address): ... this new function.
8296 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8297 (operator_length_standard, operator_check_standard): Handle
8298 OP_VAR_MSYM_VALUE.
8299 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8300
7022349d
PA
83012017-09-04 Pedro Alves <palves@redhat.com>
8302
8303 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8304 TYPE_GNU_IFUNC specially here. Throw error if return type is
8305 unknown.
8306 * ada-typeprint.c (print_func_type): Handle functions with unknown
8307 return type.
8308 * c-typeprint.c (c_type_print_base): Handle functions and methods
8309 with unknown return type.
8310 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8311 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8312 * compile/compile-c-types.c: Include "objfiles.h".
8313 (convert_func): For functions with unknown return type, warn and
8314 default to int.
8315 * compile/compile-object-run.c (compile_object_run): Adjust call
8316 to call_function_by_hand_dummy.
8317 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8318 call_function_by_hand.
8319 * eval.c (evaluate_subexp_standard): Adjust calls to
8320 call_function_by_hand. Handle functions and methods with unknown
8321 return type. Pass expect_type to call_function_by_hand.
8322 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8323 return type.
8324 * gcore.c (call_target_sbrk): Adjust call to
8325 call_function_by_hand.
8326 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8327 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8328 an integer address type instead of nodebug.
8329 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8330 call_function_by_hand.
8331 * infcall.c (error_call_unknown_return_type): New function.
8332 (call_function_by_hand): New "default_return_type" parameter.
8333 Pass it down.
8334 (call_function_by_hand_dummy): New "default_return_type"
8335 parameter. Use it instead of defaulting to int. If there's no
8336 default and the return type is unknown, throw an error. If
8337 there's a default return type, and the called function has no
8338 debug info, then assume the function is prototyped.
8339 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8340 New "default_return_type" parameter.
8341 (error_call_unknown_return_type): New declaration.
8342 * linux-fork.c (call_lseek): Cast return type of lseek.
8343 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8344 call_function_by_hand.
8345 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8346 calls to call_function_by_hand.
8347 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8348 return type.
8349 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8350 (value_nsstring, print_object_command): Adjust calls to
8351 call_function_by_hand.
8352 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8353 functions with unknown return type.
8354 (pascal_type_print_func_varspec_suffix): New function.
8355 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8356 TYPE_CODE_METHOD>: Use it.
8357 * python/py-value.c (valpy_call): Adjust call to
8358 call_function_by_hand.
8359 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8360 call_function_by_hand.
8361 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8362 call_function_by_hand.
8363 * valops.c (value_allocate_space_in_inferior): Adjust call to
8364 call_function_by_hand.
8365 * typeprint.c (type_print_unknown_return_type): New function.
8366 * typeprint.h (type_print_unknown_return_type): New declaration.
8367
54990598
PA
83682017-09-04 Pedro Alves <palves@redhat.com>
8369
8370 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8371 types with more than one parameter as prototyped.
8372
9a24775b
PA
83732017-09-04 Pedro Alves <palves@redhat.com>
8374
8375 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8376 (disassemble_command): Use gdb_disassembly_flags instead of bare
8377 int.
8378 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8379 (dump_insns, do_mixed_source_and_assembly_deprecated)
8380 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8381 Use gdb_disassembly_flags instead of bare int.
8382 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8383 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8384 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8385 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8386 (enum gdb_disassembly_flag): ... values of this new enumeration.
8387 (gdb_disassembly_flags): Define.
8388 (gdb_disassembly)
8389 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8390 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8391 gdb_disassembly_flags instead of bare int.
8392 * record-btrace.c (btrace_insn_history)
8393 (record_btrace_insn_history, record_btrace_insn_history_range)
8394 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8395 instead of bare int.
8396 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8397 Use gdb_disassembly_flags instead of bare int.
8398 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8399 Define.
8400 * target-delegates.c: Regenerate.
8401 * target.c (target_insn_history, target_insn_history_from)
8402 (target_insn_history_range): Use gdb_disassembly_flags instead of
8403 bare int.
8404 * target.h: Include "disasm.h".
8405 (struct target_ops) <to_insn_history, to_insn_history_from,
8406 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8407 int.
8408 (target_insn_history, target_insn_history_from)
8409 (target_insn_history_range): Use gdb_disassembly_flags instead of
8410 bare int.
8411
80a65e9b
SM
84122017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8413
8414 * cli/cli-script.c (build_command_line): For if/while commands,
8415 check whether args is empty.
8416
6b66338c
SM
84172017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8418
8419 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8420 (enum command_control_type): Likewise.
8421 (struct command_line): Likewise.
8422 (free_command_lines): Likewise.
8423 (struct command_lines_deleter): Likewise.
8424 (command_line_up): Likewise.
8425 (read_command_lines): Likewise.
8426 (read_command_lines_1): Likewise.
8427 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8428 (enum command_control_type): Likewise.
8429 (struct command_line): Likewise.
8430 (free_command_lines): Likewise.
8431 (struct command_lines_deleter): Likewise.
8432 (command_line_up): Likewise.
8433 (read_command_lines): Likewise.
8434 (read_command_lines_1): Likewise.
8435 * breakpoint.h: Include cli/cli-script.h.
8436 * extension-priv.h: Likewise.
8437 * gdbcmd.h: Likewise.
8438
51abb421
PA
84392017-09-04 Pedro Alves <palves@redhat.com>
8440
8441 * ada-lang.c (is_known_support_routine): Move sal declaration to
8442 where it is initialized.
8443 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8444 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8445 (clear_command, update_static_tracepoint): Remove init_sal
8446 references. Move declarations closer to initializations.
8447 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8448 initializations.
8449 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8450 references. Move sal declarations closer to initializations.
8451 * frame.c (find_frame_sal): Return a symtab_and_line via function
8452 return instead of output parameter. Remove init_sal references.
8453 * frame.h (find_frame_sal): Return a symtab_and_line via function
8454 return instead of output parameter.
8455 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8456 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8457 instead of memset.
8458 (gdbscm_find_pc_line): Remove init_sal reference.
8459 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8460 references. Move declarations closer to initializations.
8461 * infcmd.c (set_step_frame): Update. Move declarations closer to
8462 initializations.
8463 (finish_backward): Remove init_sal references. Move declarations
8464 closer to initializations.
8465 * infrun.c (process_event_stop_test, handle_step_into_function)
8466 (insert_hp_step_resume_breakpoint_at_frame)
8467 (insert_step_resume_breakpoint_at_caller): Likewise.
8468 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8469 (symbol_to_sal): Likewise.
8470 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8471 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8472 to its initialization.
8473 * reverse.c (save_bookmark_command): Use new/delete. Remove
8474 init_sal references. Move declarations closer to initializations.
8475 * source.c (get_current_source_symtab_and_line): Remove brace
8476 initialization.
8477 (set_current_source_symtab_and_line): Now takes the sal by const
8478 reference. Remove brace initialization.
8479 (line_info): Remove init_sal reference.
8480 * source.h (set_current_source_symtab_and_line): Now takes a
8481 symtab_and_line via const reference.
8482 * stack.c (set_current_sal_from_frame): Adjust.
8483 (print_frame_info): Adjust.
8484 (get_last_displayed_sal): Return the sal via function return
8485 instead of via output parameter. Simplify.
8486 (frame_info): Adjust.
8487 * stack.h (get_last_displayed_sal): Return the sal via function
8488 return instead of via output parameter.
8489 * symtab.c (init_sal): Delete.
8490 (find_pc_sect_line): Remove init_sal references. Move
8491 declarations closer to initializations.
8492 (find_function_start_sal): Remove init_sal references. Move
8493 declarations closer to initializations.
8494 * symtab.h (struct symtab_and_line): In-class initialize all
8495 fields.
8496 * tracepoint.c (set_traceframe_context)
8497 (print_one_static_tracepoint_marker): Remove init_sal references.
8498 Move declarations closer to initializations.
8499 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8500 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8501 declarations closer to initializations.
8502 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8503 init_sal references. Adjust.
8504
6c5b2ebe
PA
85052017-09-04 Pedro Alves <palves@redhat.com>
8506
8507 * ax-gdb.c (agent_command_1): Use range-for.
8508 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8509 * breakpoint.c: Include "common/array-view.h".
8510 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8511 parameter from struct symtabs_and_lines to
8512 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8513 (breakpoint_sals_to_pc): Change sals parameter from struct
8514 symtabs_and_lines to std::vector reference.
8515 (check_fast_tracepoint_sals): Change sals parameter from struct
8516 symtabs_and_lines to std::array_view. Use range-for.
8517 (decode_static_tracepoint_spec): Return a std::vector instead of
8518 symtabs_and_lines. Update.
8519 (create_breakpoint): Update.
8520 (break_range_command, until_break_command, clear_command): Update.
8521 (base_breakpoint_decode_location, bkpt_decode_location)
8522 (bkpt_probe_create_sals_from_location)
8523 (bkpt_probe_decode_location, tracepoint_decode_location)
8524 (tracepoint_probe_decode_location)
8525 (strace_marker_create_sals_from_location): Return a std::vector
8526 instead of symtabs_and_lines.
8527 (strace_marker_create_breakpoints_sal): Update.
8528 (strace_marker_decode_location): Return a std::vector instead of
8529 symtabs_and_lines. Update.
8530 (update_breakpoint_locations): Change struct symtabs_and_lines
8531 parameters to gdb::array_view. Adjust.
8532 (location_to_sals): Return a std::vector instead of
8533 symtabs_and_lines. Update.
8534 (breakpoint_re_set_default): Use std::vector instead of struct
8535 symtabs_and_lines.
8536 (decode_location_default): Return a std::vector instead of
8537 symtabs_and_lines. Update.
8538 * breakpoint.h: Include "common/array-view.h".
8539 (struct breakpoint_ops) <decode_location>: Now returns a
8540 std::vector instead of returning a symtabs_and_lines via output
8541 parameter.
8542 (update_breakpoint_locations): Change sals parameters to use
8543 gdb::array_view.
8544 * cli/cli-cmds.c (edit_command, list_command): Update to use
8545 std::vector and gdb::array_view.
8546 (ambiguous_line_spec): Adjust to use gdb::array_view and
8547 range-for.
8548 (compare_symtabs): Rename to ...
8549 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8550 const reference and adjust.
8551 (filter_sals): Rewrite using std::vector and standard algorithms.
8552 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8553 (jump_command): Update to use std::vector.
8554 * linespec.c (struct linespec_state) <canonical_names>: Update
8555 comment.
8556 (add_sal_to_sals_basic): Delete.
8557 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8558 (decode_line_2, create_sals_line_offset)
8559 (convert_address_location_to_sals, convert_linespec_to_sals)
8560 (convert_explicit_location_to_sals, parse_linespec)
8561 (event_location_to_sals, decode_line_full, decode_line_1)
8562 (decode_line_with_current_source)
8563 (decode_line_with_last_displayed, decode_objc)
8564 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8565 (linespec_result::~linespec_result): Adjust to use std::vector
8566 instead of symtabs_and_lines.
8567 * linespec.h (linespec_sals::sals): Now a std::vector.
8568 (struct linespec_result): Use std::vector, bool, and in-class
8569 initialization.
8570 (decode_line_1, decode_line_with_current_source)
8571 (decode_line_with_last_displayed): Return std::vector.
8572 * macrocmd.c (info_macros_command): Use std::vector.
8573 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8574 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8575 std::vector.
8576 * probe.h (parse_probes): Return a std::vector.
8577 * python/python.c (gdbpy_decode_line): Use std::vector and
8578 gdb::array_view.
8579 * source.c (select_source_symtab, line_info): Use std::vector.
8580 * stack.c (func_command): Use std::vector.
8581 * symtab.h (struct symtabs_and_lines): Delete.
8582 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8583
7c44b49c
PA
85842017-09-04 Pedro Alves <palves@redhat.com>
8585
8586 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8587 unittests/array-view-selftests.c.
8588 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8589 * common/array-view.h: New file.
8590 * unittests/array-view-selftests.c: New file.
8591
e439fa14
PA
85922017-09-04 Pedro Alves <palves@redhat.com>
8593
8594 * cli/cli-cmds.c (edit_command): Pass message to
8595 ambiguous_line_spec.
8596 (list_command): Pass message to ambiguous_line_spec. Say
8597 "first"/"last" instead of "start" and "end" to be consistent with
8598 the manual.
8599 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8600 them to print formatted message.
8601
7525b645
PA
86022017-09-04 Pedro Alves <palves@redhat.com>
8603
8604 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8605 ftrace_update_insns by reference instead of pointer.
8606
badc0020
YQ
86072017-09-04 Yao Qi <yao.qi@linaro.org>
8608
8609 * i386-go32-tdep.c: Include x86-xstate.h.
8610 (i386_go32_init_abi): Call i386_target_description.
8611 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8612 if xcr0 is X86_XSTATE_X87_MASK.
8613 * i386-tdep.h (tdesc_i386): Remove the declaration.
8614 (tdesc_i386_mmx): Likewise.
8615
d78bdb54
YQ
86162017-09-04 Yao Qi <yao.qi@linaro.org>
8617
8618 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8619 X86_XSTATE_SSE_MASK instead of 0.
8620
ca1fa5ee
YQ
86212017-09-04 Yao Qi <yao.qi@linaro.org>
8622
8623 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8624 i386_target_description.
8625 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8626 i386_target_description.
8627 * i386-tdep.c (i386_gdbarch_init): Likewise.
8628
2434b019
YQ
86292017-09-04 Yao Qi <yao.qi@linaro.org>
8630
8631 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8632 (x86_darwin_init_abi_64): Call amd64_target_description.
8633 * amd64-dicos-tdep.c: Likewise.
8634 * amd64-fbsd-nat.c: Likewise.
8635 * amd64-fbsd-tdep.c: Likewise.
8636 * amd64-nbsd-tdep.c: Likewise.
8637 * amd64-obsd-tdep.c: Likewise.
8638 * amd64-sol2-tdep.c: Likewise.
8639 * amd64-windows-tdep.c: Likewise.
8640 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8641
0860c437
SM
86422017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8643
8644 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8645 (btrace_function) <insn>: Change type to use std::vector.
8646 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8647 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8648 ftrace_update_insns, ftrace_compute_global_level_offset,
8649 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8650 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8651 change to std::vector.
8652 (ftrace_update_insns): Adjust to change to std::vector, change
8653 type of INSN parameter.
8654 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8655 * record-btrace.c (btrace_call_history_insn_range,
8656 btrace_compute_src_line_range,
8657 record_btrace_frame_prev_register): Adjust to change to
8658 std::vector.
8659 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8660 to change to std::vector.
8661
0638b7f9
TT
86622017-09-03 Tom Tromey <tom@tromey.com>
8663
8664 * corefile.c (reopen_exec_file): Use std::string.
8665
8f84fb0e
TT
86662017-09-03 Tom Tromey <tom@tromey.com>
8667
8668 * compile/compile.c (compile_register_name_mangled): Return
8669 std::string.
8670 * compile/compile-loc2c.c (pushf_register_address): Update.
8671 (pushf_register): Update.
8672 * compile/compile-c-types.c (convert_array): Update.
8673 * compile/compile-c-symbols.c (generate_vla_size): Update.
8674 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8675 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8676 (convert_one_symbol): Update.
8677 (generate_c_for_for_one_variable): Update.
8678 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8679 std::string.
8680 (generate_register_struct): Update.
8681 * compile/compile-internal.h (c_get_range_decl_name): Return a
8682 std::string.
8683 (compile_register_name_mangled): Return std::string.
8684
18e9961f
TT
86852017-09-03 Tom Tromey <tom@tromey.com>
8686
8687 * utils.c (perror_string): Return a std::string.
8688 (throw_perror_with_name, perror_warning_with_name): Update.
8689
45343786
TT
86902017-09-03 Tom Tromey <tom@tromey.com>
8691
8692 * demangle.c (demangle_command): Use std::string,
8693 unique_xmalloc_ptr.
8694
b57af503
TT
86952017-09-03 Tom Tromey <tom@tromey.com>
8696
8697 * cli/cli-setshow.c (do_set_command): Use std::string.
8698
6eecf35f
TT
86992017-09-03 Tom Tromey <tom@tromey.com>
8700
8701 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8702
56496dd4
TT
87032017-09-03 Tom Tromey <tom@tromey.com>
8704
8705 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8706
e91a1fa7
TT
87072017-09-03 Tom Tromey <tom@tromey.com>
8708
8709 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8710 gdb::unique_xmalloc_ptr.
8711
7ffd83d7
TT
87122017-09-03 Tom Tromey <tom@tromey.com>
8713
8714 * thread.c (print_thread_info_1): Use string_printf.
8715 (thread_apply_command, thread_apply_all_command): Use
8716 std::string.
8717
1ccbe998
TT
87182017-09-03 Tom Tromey <tom@tromey.com>
8719
8720 * valprint.c (val_print_string): Update.
8721 * gdbcore.h (memory_error_message): Return std::string.
8722 * corefile.c (memory_error_message): Return std::string.
8723 (memory_error): Update.
8724 * breakpoint.c (insert_bp_location): Update.
8725
23fdd69e
SM
87262017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8727
8728 * target/waitstatus.h (target_waitstatus_to_string): Change
8729 return type to std::string.
8730 * target/waitstatus.c (target_waitstatus_to_string): Return
8731 std::string.
8732 * target.h (target_waitstatus_to_string): Remove declaration.
8733 * infrun.c (resume, clear_proceed_status_thread,
8734 print_target_wait_results, do_target_wait, save_waitstatus,
8735 stop_all_threads): Adjust.
8736 * record-btrace.c (record_btrace_wait): Adjust.
8737 * target-debug.h
8738 (target_debug_print_struct_target_waitstatus_p): Adjust.
8739
5c811d30
JK
87402017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8741
8742 PR gdb/22046
8743 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8744 detection.
8745
0a2dde4a
SDJ
87462017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8747
8748 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8749 for setting/unsetting environment variables on the remote target.
8750 (New remote packets): Add entries for QEnvironmentHexEncoded,
8751 QEnvironmentUnset and QEnvironmentReset.
8752 * common/environ.c (gdb_environ::operator=): Extend method to
8753 handle m_user_set_env_list and m_user_unset_env_list.
8754 (gdb_environ::clear): Likewise.
8755 (match_var_in_string): Change type of first parameter from 'char
8756 *' to 'const char *'.
8757 (gdb_environ::set): Extend method to handle
8758 m_user_set_env_list and m_user_unset_env_list.
8759 (gdb_environ::unset): Likewise.
8760 (gdb_environ::clear_user_set_env): New method.
8761 (gdb_environ::user_set_envp): Likewise.
8762 (gdb_environ::user_unset_envp): Likewise.
8763 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8764 m_user_unset_env_list on move constructor/assignment.
8765 (unset): Add new default parameter 'update_unset_list = true'.
8766 (clear_user_set_env): New method.
8767 (user_set_envp): Likewise.
8768 (user_unset_envp): Likewise.
8769 (m_user_set_env_list): New std::set.
8770 (m_user_unset_env_list): Likewise.
8771 * common/rsp-low.c (hex2str): New function.
8772 (bin2hex): New overload for bin2hex function.
8773 * common/rsp-low.c (hex2str): New prototype.
8774 (str2hex): New overload prototype.
8775 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8776 QEnvironmentUnset and QEnvironmentReset.
8777 (remote_protocol_features): Add QEnvironmentHexEncoded,
8778 QEnvironmentUnset and QEnvironmentReset packets.
8779 (send_environment_packet): New function.
8780 (extended_remote_environment_support): Likewise.
8781 (extended_remote_create_inferior): Call
8782 extended_remote_environment_support.
8783 (_initialize_remote): Add QEnvironmentHexEncoded,
8784 QEnvironmentUnset and QEnvironmentReset packet configs.
8785 * unittests/environ-selftests.c (gdb_selftest_env_var):
8786 New variable.
8787 (test_vector_initialization): New function.
8788 (test_init_from_host_environ): Likewise.
8789 (test_reinit_from_host_environ): Likewise.
8790 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8791 Likewise.
8792 (test_unset_set_empty_vector): Likewise.
8793 (test_vector_clear): Likewise.
8794 (test_std_move): Likewise.
8795 (test_move_constructor):
8796 (test_self_move): Likewise.
8797 (test_set_unset_reset): Likewise.
8798 (run_tests): Rewrite in terms of the functions above.
8799
654670a4
WP
88002017-08-31 Weimin Pan <weimin.pan@oracle.com>
8801
8802 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8803 (adi_available): Use a temp variable of type CORE_ADDR as argument
8804 3 when calling target_auxv_search.
8805 (adi_normalize_address): Use masks and xor operators to calculate
8806 normalized address.
8807 (adi_read_versions, adi_write_versions, adi_print_versions)
8808 (do_examine, do_assign): Use paddress.
8809
7755ddb7
JB
88102017-08-29 John Baldwin <jhb@FreeBSD.org>
8811
8812 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8813 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8814 out of loop and add supply of FIR.
8815 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8816 add collect of FIR.
8817
fd437cbc
SM
88182017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8819
3804a343 8820 PR gdb/21827
fd437cbc
SM
8821 * cli/cli-script.c (define_command): Don't convert command name
8822 to lower case.
8823
988f6b3d
JB
88242017-08-25 Joel Brobecker <brobecker@adacore.com>
8825
8826 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8827 Update all callers accordingly. Remove all code blocks handling
8828 the case where DISPP is not NULL.
8829
663c44ac
JK
88302017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8831
8832 PR symtab/22003
8833 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8834 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8835 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8836
f1902523
JK
88372017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8838
8839 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8840 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8841 (read_comp_units_from_section): New parameter abbrev_section, use
8842 read_and_check_comp_unit_head, allocate signatured_type if needed.
8843 (create_all_comp_units): Update read_comp_units_from_section caller.
8844
87215ad1
SDJ
88452017-08-23 Pedro Alves <palves@redhat.com>
8846
8847 PR remote/21852
8848 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8849 to null_ptid and switch to thread without reading the registers
8850 after adding the inferior.
8851
6e41ddec
JK
88522017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8853
8854 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8855 compile-gcc.
8856 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8857 (compile_to_object): Implement compile_gcc.
8858 (_initialize_compile): Install "set compile-gcc". Initialize
8859 compile_gcc.
8860
e68c32d5
JK
88612017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8862
8863 * compile/compile.c (compile_to_object): Conditionally call
8864 set_verbose. Conditionally call compile or compile_v0.
8865
58afddc6
WP
88662017-08-07 Weimin Pan <weimin.pan@oracle.com>
8867
8868 * sparc64-tdep.h: (adi_normalize_address): New export.
8869 * sparc-nat.h: (open_adi_tag_fd): New export.
8870 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8871 * sparc64-linux-tdep.c:
8872 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8873 (sparc64_linux_handle_segmentation_fault): New function.
8874 (sparc64_linux_init_abi): Register
8875 sparc64_linux_handle_segmentation_fault
8876 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8877 (sparc64_addr_bits_remove): New function.
8878 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8879 (MAX_PROC_NAME_SIZE): New macro.
8880 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8881 (sparc64adilist): New variable.
8882 (adi_proc_list): New variable.
8883 (find_adi_info): New function.
8884 (add_adi_info): New function.
8885 (get_adi_info_proc): New function.
8886 (get_adi_info): New function.
8887 (info_adi_command): New function.
8888 (read_maps_entry): New function.
8889 (adi_available): New function.
8890 (adi_normalize_address): New function.
8891 (adi_align_address): New function.
8892 (adi_convert_byte_count): New function.
8893 (adi_tag_fd): New function.
8894 (adi_is_addr_mapped): New function.
8895 (adi_read_versions): New function.
8896 (adi_write_versions): New function.
8897 (adi_print_versions): New function.
8898 (do_examine): New function.
8899 (do_assign): New function.
8900 (adi_examine_command): New function.
8901 (adi_assign_command): New function.
8902 (_initialize_sparc64_adi_tdep): New function.
8903
11db9430
SM
89042017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8905
8906 * breakpoint.c (breakpoints_info): Rename to ...
8907 (info_breakpoints_command): ... this.
8908 (watchpoints_info): Rename to ...
8909 (info_watchpoints_command): ... this.
8910 (tracepoints_info): Rename to ...
8911 (info_tracepoints_command): ... this.
8912 (_initialize_breakpoint): Adjust.
8913 * dcache.c (dcache_info): Rename to ...
8914 (info_display_command): ... this.
8915 (_initialize_dcache): Adjust.
8916 * frame.h (args_info): Rename to ...
8917 (info_args_command): ... this.
8918 (locals_info): Rename to ...
8919 (info_locals_command): ... this.
8920 * infcmd.c (nofp_registers_info): Rename to ...
8921 (info_registers_command): ... this.
8922 (float_info): Rename to ...
8923 (info_float_command): ... this.
8924 (program_info): Rename to ...
8925 (info_program_command): ... this.
8926 (all_registers_info): Rename to ...
8927 (info_all_registers_command): ... this.
8928 (vector_info): Rename to ...
8929 (info_vector_command): ... this.
8930 (float_info): Rename to ...
8931 (info_float_command): ... this.
8932 (_initialize_infcmd): Adjust.
8933 * inferior.h (term_info): Rename to ...
8934 (info_terminal_command): ... this.
8935 * inflow.c (term_info): Rename to ...
8936 (info_terminal_command): ... this.
8937 (_initialize_inflow): Adjust.
8938 * infrun.c (signals_info): Rename to ...
8939 (info_signals_command): ... this.
8940 (_initialize_infrun): Adjust.
8941 * objc-lang.c (classes_info): Rename to ...
8942 (info_classes_command): ... this.
8943 (selectors_info): Rename to ...
8944 (info_selectors_command): ... this.
8945 (_initialize_objc_language): Adjust.
8946 * printcmd.c (sym_info): Rename to ...
8947 (info_symbol_command): ... this.
8948 (address_info): Rename to ...
8949 (info_address_command): ... this.
8950 (display_info): Rename to ...
8951 (info_display_command): ... this.
8952 (_initialize_printcmd): Adjust.
8953 * reverse.c (bookmarks_info): Rename to ...
8954 (info_breakpoints_command): ... this.
8955 (_initialize_reverse): Adjust.
8956 * ser-go32.c (dos_info): Rename to ...
8957 (info_serial_command): ... this.
8958 (_initialize_ser_dos): Adjust.
8959 * skip.c (skip_info): Rename to ...
8960 (info_skip_command): ... this.
8961 (_initialize_step_skip): Adjust.
8962 * source.c (line_info): Rename to ...
8963 (info_line_command): ... this.
8964 (source_info): Rename to ...
8965 (info_source_command)
8966 * stack.c (frame_info): Rename to ...
8967 (info_frame_command): ... this.
8968 (locals_info): Rename to ...
8969 (info_locals_command): ... this.
8970 (args_info): Rename to ...
8971 (info_args_command): ... this.
8972 (_initialize_stack): Adjust.
8973 * symtab.c (sources_info): Rename to ...
8974 (info_sources_command): ... this.
8975 (variables_info): Rename to ...
8976 (info_variables_command): ... this.
8977 (functions_info): Rename to ...
8978 (info_functions_command): ... this.
8979 (types_info): Rename to ...
8980 (info_types_command): ... this.
8981 (_initialize_symtab): Adjust.
8982 * target.c (target_info): Rename to ...
8983 (info_target_command): ... this.
8984 (initialize_targets): Adjust.
8985 * tracepoint.c (tvariables_info): Rename to ...
8986 (info_tvariables_command): ... this.
8987 (scope_info): Rename to ...
8988 (info_scope_command): ... this.
8989 (trace_dump_actions): Adjust.
8990 (_initialize_tracepoint): Adjust.
8991
b270e6f9
TT
89922017-08-22 Tom Tromey <tom@tromey.com>
8993
8994 * breakpoint.h (install_breakpoint): Update.
8995 * breakpoint.c (add_solib_catchpoint): Update.
8996 (install_breakpoint): Change argument to a std::unique_ptr.
8997 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8998 (create_breakpoint_sal, create_breakpoint): Update.
8999 (watch_command_1, catch_exec_command_1)
9000 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9001 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9002 Return the breakpoint.
9003 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9004 (new_single_step_breakpoint): Update.
9005 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9006 std::unique_ptr.
9007 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9008 std::unique_ptr.
9009 * break-catch-sig.c (create_signal_catchpoint): Use
9010 std::unique_ptr.
9011 * ada-lang.c (create_ada_exception_catchpoint): Use
9012 std::unique_ptr.
9013
36bd8eaa
TT
90142017-08-22 Tom Tromey <tom@tromey.com>
9015
9016 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9017
56f37645
TT
90182017-08-22 Tom Tromey <tom@tromey.com>
9019
9020 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9021 (lookup_partial_symbol): Update.
9022
0b581c69
TT
90232017-08-22 Tom Tromey <tom@tromey.com>
9024
9025 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9026 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9027 (find_and_open_source, symtab_to_fullname): Update.
9028 * psymtab.c (psymtab_to_fullname): Update.
9029
14278e1f
TT
90302017-08-22 Tom Tromey <tom@tromey.com>
9031
9032 * exec.c (exec_file_attach): Update.
9033 * linux-thread-db.c (try_thread_db_load): Update.
9034 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9035 * utils.c (gdb_realpath): Change return type.
9036 (gdb_realpath_keepfile): Update.
9037 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9038 (_initialize_utils): Register the new self test.
9039 * source.c (openp): Update.
9040 (find_and_open_source): Update.
9041 * nto-tdep.c (nto_find_and_open_solib): Update.
9042 * main.c (set_gdb_data_directory): Update.
9043 (captured_main_1): Update.
9044 * dwarf2read.c (dwarf2_get_dwz_file): Update
9045 (dw2_map_symbol_filenames): Update.
9046 * auto-load.c (auto_load_safe_path_vec_update): Update.
9047 (filename_is_in_auto_load_safe_path_vec): Change type of
9048 "filename_realp".
9049 (auto_load_objfile_script): Update.
9050 (file_is_auto_load_safe): Update. Use std::string.
9051 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9052
4971c9a7
TT
90532017-08-22 Tom Tromey <tom@tromey.com>
9054
9055 * utils.c (gdb_realpath_keepfile): Return a
9056 gdb::unique_xmalloc_ptr.
9057 * exec.c (exec_file_attach): Update.
9058 * utils.h (gdb_realpath_keepfile): Return a
9059 gdb::unique_xmalloc_ptr.
9060
e3e41d58
TT
90612017-08-22 Tom Tromey <tom@tromey.com>
9062
9063 * compile/compile.c (compile_file_command): Use
9064 gdb::unique_xmalloc_ptr, std::string.
9065 * utils.c (gdb_abspath): Change return type.
9066 * source.c (openp): Update.
9067 * objfiles.c (allocate_objfile): Update.
9068 * main.c (set_gdb_data_directory): Update.
9069 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9070
0d999a6e
ZZ
90712017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9072
9073 * cli-cmds.c (list_commands): List actual code around more than
9074 one location.
9075
329d5e7e
JB
90762017-08-21 John Baldwin <jhb@FreeBSD.org>
9077
9078 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9079
bf223d3e
PA
90802017-08-21 Pedro Alves <palves@redhat.com>
9081
9082 PR gdb/19487
9083 * c-exp.y (variable production): Handle function aliases.
9084 * minsyms.c (msymbol_is_text): New function.
9085 * minsyms.h (msymbol_is_text): Declare.
9086 * symtab.c (find_function_alias_target): New function.
9087 * symtab.h (find_function_alias_target): Declare.
9088
c973d0aa
PA
90892017-08-21 Pedro Alves <palves@redhat.com>
9090
9091 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9092 typedefs.
9093 * typeprint.c (whatis_exp): If handling "whatis", and expression
9094 is OP_TYPE, strip one typedef level. Otherwise don't strip
9095 typedefs here.
9096 * valops.c (value_cast): Save "to" type before resolving
9097 stubs/typedefs. Use that type as resulting value's type.
9098
2989a365
TT
90992017-08-18 Tom Tromey <tom@tromey.com>
9100 Pedro Alves <palves@redhat.com>
9101
9102 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9103 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9104 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9105 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9106 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9107 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9108 (linux_get_siginfo_data): Add "thread" argument. Use
9109 scoped_restore.
9110 * linux-nat.c (linux_child_follow_fork)
9111 (check_stopped_by_watchpoint): Use scoped_restore.
9112 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9113 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9114 (restore_inferior_ptid, save_inferior_ptid): Remove.
9115 * btrace.c (btrace_fetch): Use scoped_restore.
9116 * bsd-uthread.c (bsd_uthread_fetch_registers)
9117 (bsd_uthread_store_registers): Use scoped_restore.
9118 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9119 scoped_restore.
9120 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9121 (aix_thread_xfer_partial): Use scoped_restore.
9122 * inferior.h (save_inferior_ptid): Remove.
9123
e60eb288
YQ
91242017-08-18 Yao Qi <yao.qi@linaro.org>
9125
9126 PR tdep/21818
9127 * arm-tdep.c (gdb_print_insn_arm): Mark
9128 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9129
6d580b63
YQ
91302017-08-18 Yao Qi <yao.qi@linaro.org>
9131
9132 * NEWS: Mention GDBserver's new option "--selftest".
9133 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9134 * selftest.c: Move it to common/selftest.c.
9135 * selftest.h: Move it to common/selftest.h.
9136 * selftest-arch.c (reset): New function.
9137 (tests_with_arch): Call reset.
9138
86dcbf50
YQ
91392017-08-18 Yao Qi <yao.qi@linaro.org>
9140
9141 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9142 instead of exception_fprintf and printf_filtered.
9143
7649770c
YQ
91442017-08-18 Yao Qi <yao.qi@linaro.org>
9145
9146 * selftest.c (register_self_test): Rename it to
9147 selftests::register_test.
9148 (run_self_tests): selftest::run_tests.
9149 * selftest.h: Update declarations.
9150 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9151 selftests::register_test_foreach_arch.
9152 * selftest-arch.h: Update declaration.
9153 * aarch64-tdep.c: Update.
9154 * arm-tdep.c: Likewise.
9155 * disasm-selftests.c: Likewise.
9156 * dwarf2loc.c: Likewise.
9157 * dwarf2-frame.c: Likewise.
9158 * findvar.c: Likewise.
9159 * gdbarch-selftests.c: Likewise.
9160 * maint.c (maintenance_selftest): Likewise.
9161 * regcache.c: Likewise.
9162 * rust-exp.y: Likewise.
9163 * selftest-arch.c: Likewise.
9164 * unittests/environ-selftests.c: Likewise.
9165 * unittests/function-view-selftests.c: Likewise.
9166 * unittests/offset-type-selftests.c: Likewise.
9167 * unittests/optional-selftests.c: Likewise.
9168 * unittests/scoped_restore-selftests.c: Likewise.
9169 * utils-selftests.c: Likewise.
9170
b0cba12e
PA
91712017-08-17 Pedro Alves <palves@redhat.com>
9172
9173 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9174 local.
9175
4c8aa72d
PA
91762017-08-17 Pedro Alves <palves@redhat.com>
9177
9178 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9179 field.
9180 (reset_die_in_process): Delete, replaced by ...
9181 (process_die_scope): ... this new class. Make it responsible for
9182 freeing cu->line_header too.
9183 (process_die): Use process_die_scope.
9184 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9185 cu->line_header_die_owner. Don't release the line header if it's
9186 owned by the CU.
9187 (setup_type_unit_groups): Make the CU/DIE own the line header.
9188 Don't release the line header here.
9189
ba713918
AL
91902017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9191
9192 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9193
44d0fb3a
RK
91942017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9195
9196 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9197 Single-Key mode
9198
a5afdb16
RK
91992017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9200
9201 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9202 mode command list.
9203
47613aeb
SH
92042017-08-15 Stafford Horne <shorne@gmail.com>
9205
9206 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9207
9c3cc999
SH
92082017-08-15 Stafford Horne <shorne@gmail.com>
9209
9210 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9211
206726fb
SDJ
92122017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9213
9214 PR gdb/21954
9215 * infcmd.c (unset_environment_command): Use the 'clear' method on
9216 the environment instead of resetting it.
9217
0335ac6d
JB
92182017-08-15 John Baldwin <jhb@FreeBSD.org>
9219
9220 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9221 platforms.
9222
d3abe1c8
TT
92232017-08-14 Tom Tromey <tom@tromey.com>
9224
9225 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9226 (print_binary_chars): Likewise.
9227 (BITS_IN_BYTES): Remove.
9228
d6382fff
TT
92292017-08-14 Tom Tromey <tom@tromey.com>
9230
9231 PR gdb/21675
9232 * valprint.c (LOW_ZERO): Change value to 034.
9233 (print_octal_chars): Add static_asserts for octal constants.
9234 * printcmd.c (print_scalar_formatted): Add 'd' case.
9235
f978cb06
TT
92362017-08-11 Tom Tromey <tom@tromey.com>
9237
9238 * symfile.c (add_symbol_file_command): Use std::vector.
9239
2f5404b3
TT
92402017-08-14 Tom Tromey <tom@tromey.com>
9241
9242 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9243 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9244 std::move.
9245 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9246
de7985c3
PA
92472017-08-11 Pedro Alves <palves@redhat.com>
9248
9249 * infrun.c (process_event_stop_test): Adjust
9250 function_name_is_marked_for_skip call.
9251 * skip.c: Include <list>.
9252 (skiplist_entry): Make it a class with private fields, and
9253 getters/setters.
9254 (skiplist_entry_chain): Delete.
9255 (skiplist_entries): New.
9256 (skiplist_entry_count): Delete.
9257 (highest_skiplist_entry_num): New.
9258 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9259 (add_skiplist_entry): Delete.
9260 (skiplist_entry::skiplist_entry): New.
9261 (skiplist_entry::add_entry): New.
9262 (skip_file_command, skip_function): Adjust.
9263 (compile_skip_regexp): Delete.
9264 (skip_command): Don't compile regexp here. Adjust to use
9265 skiplist_entry::add_entry.
9266 (skip_info): Adjust to use range-for and getters.
9267 (skip_enable_command, skip_disable_command): Adjust to use
9268 range-for and setters.
9269 (skip_delete_command): Adjust to use std::list.
9270 (add_skiplist_entry): Delete.
9271 (skip_file_p): Delete, refactored as ...
9272 (skiplist_entry::do_skip_file_p): ... this new method.
9273 (skip_gfile_p): Delete, refactored as ...
9274 (skiplist_entry::do_gskip_file_p): ... this new method.
9275 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9276 (skiplist_entry::skip_function_p): ... this new method.
9277 (function_name_is_marked_for_skip): Now returns bool, and takes
9278 the function sal by const reference. Adjust to use range-for and
9279 skiplist_entry methods.
9280 (_initialize_step_skip): Remove references to
9281 skiplist_entry_chain, skiplist_entry_count.
9282 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9283 takes the function sal by const reference.
9284
be7d3cd5
YQ
92852017-08-11 Yao Qi <yao.qi@linaro.org>
9286
9287 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9288 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9289 (dwarf2_frame_cache):
9290 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9291 RETURN_MASK_ALL and set *this_case to NULL.
9292 * frame-unwind.h: Update comments.
9293
1c90d9f0
YQ
92942017-08-11 Yao Qi <yao.qi@linaro.org>
9295
9296 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9297 (dwarf2_frame_state_copy_regs): Remove.
9298 (dwarf2_frame_state_free_regs): Remove.
9299 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9300 (dwarf2_restore_rule): Call method .alloc_regs instead of
9301 dwarf2_frame_state_alloc_regs.
9302 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9303 constructor. Call std::move.
9304 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9305 (dwarf2_frame_cache): Likewise.
9306
9307 [GDB_SELF_TEST]: Include selftest.h and
9308 selftest-arch.h.
9309 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9310 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9311 execute_cfa_program_test.
9312
9313 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9314 copy ctor, assignment operator, move assignment.
9315 <alloc_regs>: New method.
9316 <swap>: New method.
9317 (struct dwarf2_frame_state): Delete dtor.
9318 (dwarf2_frame_state_alloc_regs): Remove declaration.
9319 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9320 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9321
afe37d6b
YQ
93222017-08-11 Yao Qi <yao.qi@linaro.org>
9323
9324 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9325 (dwarf2_frame_state::dwarf2_frame_state): New.
9326 (dwarf2_frame_state::~dwarf2_frame_state): New.
9327 (dwarf2_fetch_cfa_info): Update.
9328 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9329 rather than a pointer. Update code.
9330 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9331 dtor.
9332 <data_align, code_align, retaddr_column>: Change them to const.
9333 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9334 to bool.
9335
b348037f
YQ
93362017-08-11 Yao Qi <yao.qi@linaro.org>
9337
9338 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9339 <loc.exp>: New field.
9340 * dwarf2-frame.c (execute_cfa_program): Update.
9341 (dwarf2_frame_prev_register): Update.
9342
e7c9de26
PA
93432017-08-10 Pedro Alves <palves@redhat.com>
9344
9345 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9346
e8c6b620
JB
93472017-08-09 John Baldwin <jhb@FreeBSD.org>
9348
9349 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9350 (fbsd_pending_children): Use std::list.
9351 (fbsd_remember_child): Likewise.
9352 (fbsd_is_child_pending): Likewise.
9353 (fbsd_pending_vfork_done): Use std::forward_list.
9354 (fbsd_add_vfork_done): Likewise.
9355 (fbsd_is_vfork_done_pending): Likewise.
9356 (fbsd_next_vfork_done): Likewise.
9357
e4a26669
JB
93582017-08-09 John Baldwin <jhb@FreeBSD.org>
9359
9360 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9361 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9362 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9363 for `mapfilename'.
9364 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 9365 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 9366
142311d3
JB
93672017-08-09 John Baldwin <jhb@FreeBSD.org>
9368
9369 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9370 "filestuff.h".
9371 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9372
42fa2e0e
TT
93732017-08-09 Tom Tromey <tom@tromey.com>
9374
9375 * skip.c (skiplist_entry): New constructor.
9376 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9377 (skiplist_entry::file_is_glob): Now bool.
9378 (skiplist_entry::file, skiplist_entry::function): Now
9379 std::string.
9380 (make_skip_entry): Return a unique_ptr. Use new.
9381 (free_skiplist_entry, free_skiplist_entry_cleanup)
9382 (make_free_skiplist_entry_cleanup): Remove.
9383 (skip_command, skip_disable_command, add_skiplist_entry)
9384 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9385 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9386 (function_name_is_marked_for_skip): Update.
9387 (skip_delete_command): Update. Use delete.
9388
cd3af38d
JW
93892017-08-09 Jiong Wang <jiong.wang@arm.com>
9390
9391 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9392 (aarch64_linux_core_read_description): New function.
9393 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9394
29592bde
PA
93952017-08-09 Pedro Alves <palves@redhat.com>
9396
9397 * cp-name-parser.y (cp_comp_to_string): Return a
9398 gdb::unique_xmalloc_ptr<char>.
9399 * cp-support.c (replace_typedefs_qualified_name)
9400 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9401 (cp_canonicalize_string_full): Use op= instead of explicit
9402 convertion.
9403 (cp_class_name_from_physname, method_name_from_physname)
9404 (cp_func_name, cp_remove_params): Adjust to use
9405 gdb::unique_xmalloc_ptr<char>.
9406 * cp-support.h (cp_comp_to_string): Return a
9407 gdb::unique_xmalloc_ptr<char>.
9408 * python/py-type.c (typy_lookup_type): Adjust to use
9409 gdb::unique_xmalloc_ptr<char>.
9410
b3340438
L
94112017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9412
9413 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9414
e88e8651
YQ
94152017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9416 Yao Qi <yao.qi@linaro.org>
9417
9418 * cp-support.c (cp_canonicalize_string_full): Use
9419 gdb::unique_xmalloc_ptr<char>.
9420 (cp_canonicalize_string): Likewise.
9421
f5a29eb0
YQ
94222017-08-09 Yao Qi <yao.qi@linaro.org>
9423
9424 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9425 * regformats/i386/amd64-avx-avx512.dat: Remove.
9426 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9427 * regformats/i386/amd64-avx-mpx.dat:Remove.
9428 * regformats/i386/amd64-avx.dat: Remove.
9429 * regformats/i386/amd64-mpx.dat: Remove.
9430 * regformats/i386/i386-avx-avx512.dat: Remove.
9431 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9432 * regformats/i386/i386-avx-mpx.dat: Remove.
9433 * regformats/i386/i386-mmx.dat: Remove.
9434 * regformats/i386/i386-mpx.dat: Remove.
9435
57757c2f
YQ
94362017-08-09 Yao Qi <yao.qi@linaro.org>
9437
9438 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9439 * amd64-tdep.c: Don't include features/i386/x32*.c.
9440 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9441 functions.
9442 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9443 and i386/x32-avx-avx512.
9444 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9445 and i386/x32.xml.
9446 * features/i386/x32-avx-avx512.c: Removed.
9447 * features/i386/x32-avx-avx512.xml: Removed.
9448 * features/i386/x32-avx.c: Removed.
9449 * features/i386/x32-avx.xml: Removed.
9450 * features/i386/x32.c: Removed.
9451 * features/i386/x32.xml: Removed.
9452 * regformats/i386/x32-avx-avx512.dat: Removed.
9453 * regformats/i386/x32-avx.dat: Removed.
9454 * regformats/i386/x32.dat: Removed.
9455
ba7b109b
MR
94562017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9457
9458 PR breakpoints/21886
9459 * mem-break.c (default_memory_insert_breakpoint): Use
9460 `->placed_address' rather than `->reqstd_address' for the
9461 breakpoint location.
9462
e347efc3
MR
94632017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9464
9465 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9466 assertions.
9467
0dba2a6c
MR
94682017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9469
9470 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9471 a union of `tdep_info', `tdesc_data' and `id'.
9472 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9473 rather than `info.tdep_info'.
9474 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9475 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9476 * i386-tdep.c (i386_gdbarch_init): Likewise.
9477 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9478 * mips-tdep.c (mips_gdbarch_init): Likewise.
9479 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9480 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9481 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9482 `info.tdep_info'.
9483 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9484 `info.tdep_info'.
9485 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9486 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9487 `info.tdep_info'.
9488 * spu-tdep.c (spu_gdbarch_init): Likewise.
9489 * gdbarch.h: Regenerate.
9490
16eb6b2d
LS
94912017-08-07 Leszek Swirski <leszeks@google.com>
9492
7b005726 9493 PR symtab/20899
16eb6b2d
LS
9494 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9495
74cbb09e
SM
94962017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9497
9498 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9499 (gdbsim_open): Rename gdb_argv args object to argv.
9500
ee0c3293
TT
95012017-08-05 Tom Tromey <tom@tromey.com>
9502
9503 * compile/compile-object-load.c (compile_object_load): Use
9504 gdb::unique_xmalloc_ptr.
9505 * cli/cli-dump.c (scan_filename): Rename from
9506 scan_filename_with_cleanup. Change return type.
9507 (scan_expression): Rename from scan_expression_with_cleanup.
9508 Change return type.
9509 (dump_memory_to_file, dump_value_to_file, restore_command):
9510 Use gdb::unique_xmalloc_ptr. Update.
9511 * cli/cli-cmds.c (find_and_open_script): Use
9512 gdb::unique_xmalloc_ptr.
9513 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9514 * symmisc.c (maintenance_print_symbols)
9515 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9516 * symfile.c (symfile_bfd_open, generic_load)
9517 (add_symbol_file_command, remove_symbol_file_command): Use
9518 gdb::unique_xmalloc_ptr.
9519 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9520 * psymtab.c (maintenance_print_psymbols): Use
9521 gdb::unique_xmalloc_ptr.
9522 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9523 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9524 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9525 (reload_shared_libraries_1): Likewise.
9526
3232fabd
TT
95272017-08-05 Tom Tromey <tom@tromey.com>
9528
9529 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9530 (rust_op_vector, rust_set_vector): New typedefs.
9531 (current_parser): New global.
9532 (work_obstack): Change to pointer type. Update all users.
9533 (rust_ast, pstate): Remove globals.
9534 (struct rust_parser): New.
9535 (%union) <params, field_inits>: Change type.
9536 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9537 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9538 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9539 (convert_params_to_types, convert_params_to_expression): Change
9540 type of "params".
9541 (ast_string): Change type of "fields".
9542 (rust_parse): Make a rust_parser. Remove cleanups.
9543 (rust_lex_tests): Make and install an auto_obstack.
9544
f02fd774
YQ
95452017-08-04 Yao Qi <yao.qi@linaro.org>
9546
9547 * configure.srv (ipa_x32_linux_regobj): New.
9548 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9549 instead of X86_TDESC_AVX512.
9550 (initialize_low_tracepoint): Call
9551 init_registers_x32_avx_avx512_linux.
9552
91975afd
YQ
95532017-08-04 Yao Qi <yao.qi@linaro.org>
9554
9555 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9556
2331fa3a
RK
95572017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9558
9559 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9560
744e4fe1
TT
95612017-08-03 Tom Tromey <tom@tromey.com>
9562
9563 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9564 Remove.
9565 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9566
1c034b67
TT
95672017-08-03 Tom Tromey <tom@tromey.com>
9568
9569 * python/py-param.c (compute_enum_values): Use gdb_argv.
9570
773a1edc
TT
95712017-08-03 Tom Tromey <tom@tromey.com>
9572
9573 * utils.h (struct gdb_argv_deleter): New.
9574 (gdb_argv): New class.
9575 * utils.c (gdb_argv::reset): New method.
9576 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9577 * tracefile.c (tsave_command): Use gdb_argv.
9578 * top.c (new_ui_command): Use gdb_argv.
9579 * symmisc.c (maintenance_print_symbols)
9580 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9581 * symfile.c (symbol_file_command, generic_load)
9582 (remove_symbol_file_command): Use gdb_argv.
9583 * stack.c (backtrace_command): Use gdb_argv.
9584 * source.c (add_path, show_substitute_path_command)
9585 (unset_substitute_path_command, set_substitute_path_command):
9586 Use gdb_argv.
9587 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9588 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9589 * remote.c (extended_remote_run, remote_put_command)
9590 (remote_get_command, remote_delete_command): Use gdb_argv.
9591 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9592 (gdbsim_open): Use gdb_argv.
9593 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9594 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9595 * procfs.c (procfs_info_proc): Use gdb_argv.
9596 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9597 * infrun.c (handle_command): Use gdb_argv.
9598 * inferior.c (add_inferior_command, clone_inferior_command):
9599 Use gdb_argv.
9600 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9601 * exec.c (exec_file_command): Use gdb_argv.
9602 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9603 * compile/compile.c (build_argc_argv): Use gdb_argv.
9604
0d50bde3
TT
96052017-08-03 Tom Tromey <tom@tromey.com>
9606
9607 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9608
7f968c89
TT
96092017-08-03 Tom Tromey <tom@tromey.com>
9610
9611 * python/python.c (compute_python_string): Return std::string.
9612 (gdbpy_eval_from_control_command): Update.
9613 (do_start_initialization): Use std::string.
9614 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9615 xstrprintf.
9616 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9617 xstrprintf.
9618
3c9ebddd
TT
96192017-08-03 Tom Tromey <tom@tromey.com>
9620
9621 * top.h (do_restore_instream_cleanup): Remove.
9622 * top.c (do_restore_instream_cleanup): Remove.
9623 (read_command_file): Use scoped_restore.
9624 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9625
b51b225e
TT
96262017-08-03 Tom Tromey <tom@tromey.com>
9627
9628 * cli/cli-script.c (execute_user_command)
9629 (execute_control_command): Use scoped_restore.
9630
ac991630
TT
96312017-08-03 Tom Tromey <tom@tromey.com>
9632
9633 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9634 (execute_user_command): Remove user_call_depth; use
9635 user_args_stack's size instead.
9636
898e0c8e
TT
96372017-08-03 Tom Tromey <tom@tromey.com>
9638
9639 * top.h (in_user_command): Remove.
9640 * top.c (in_user_command): Remove.
9641 * cli/cli-script.c (do_restore_user_call_depth)
9642 (execute_user_command): Update.
9643
26fcd5d7
TT
96442017-08-03 Tom Tromey <tom@tromey.com>
9645
9646 * valops.c (search_struct_method): Use gdb::byte_vector.
9647 * valarith.c (value_concat): Use std::vector.
9648 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9649 (simple_search_memory): Likewise.
9650 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9651 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9652 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9653 * elfread.c (elf_rel_plt_read): Use std::string.
9654 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9655 * cli/cli-dump.c (restore_section_callback): Use
9656 gdb::byte_vector.
9657
7c218e6c
TT
96582017-08-03 Tom Tromey <tom@tromey.com>
9659
9660 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9661
31b68d4a
TT
96622017-08-03 Tom Tromey <tom@tromey.com>
9663
9664 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9665 (tui_register_format): Use scoped_restore.
9666
2ec845e7
TT
96672017-08-03 Tom Tromey <tom@tromey.com>
9668
9669 * reverse.c (exec_direction_default): Remove.
9670 (exec_reverse_once): Use scoped_restore.
9671 * remote.c (restore_remote_timeout): Remove.
9672 (remote_flash_erase, remote_flash_write, remote_flash_done)
9673 (readchar, remote_serial_write): Use scoped_restore.
9674 * cli/cli-script.c (struct source_cleanup_lines_args)
9675 (source_cleanup_lines): Remove.
9676 (script_from_file): Use scoped_restore.
9677 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9678 (source_command): Use scoped_restore.
9679
b3bc8453
TT
96802017-08-03 Tom Tromey <tom@tromey.com>
9681
9682 * utils.h (make_cleanup_free_so): Remove.
9683 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9684 * solist.h (struct so_deleter): New.
9685 (so_list_up): New typedef.
9686 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9687
e3ad2841
TT
96882017-08-03 Tom Tromey <tom@tromey.com>
9689
9690 * utils.h (make_cleanup_restore_current_language): Remove.
9691 * utils.c (do_restore_current_language)
9692 (make_cleanup_restore_current_language): Remove.
9693 * parse.c (parse_exp_in_context_1)
9694 (parse_expression_with_language): Use
9695 scoped_restore_current_language.
9696 * mi/mi-main.c (mi_cmd_execute): Use
9697 scoped_restore_current_language.
9698 * language.h (scoped_restore_current_language): New class.
9699
b80cf838
TT
97002017-08-03 Tom Tromey <tom@tromey.com>
9701
9702 * compile/compile.c (cleanup_unlink_file): Remove.
9703 (compile_to_object): Use gdb::unlinker.
9704 (eval_compile_command): Likewise.
9705
fad0444a
TT
97062017-08-03 Tom Tromey <tom@tromey.com>
9707
9708 * utils.h (make_cleanup_fclose): Remove.
9709 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9710
6e7bc05c
TT
97112017-08-03 Tom Tromey <tom@tromey.com>
9712
9713 * top.c (open_terminal_stream): Return gdb_file_up.
9714 (new_ui_command): Update.
9715
4a45905b
TT
97162017-08-03 Tom Tromey <tom@tromey.com>
9717
9718 * source.c (print_source_lines_base, forward_search_command)
9719 (reverse_search_command): Use gdb_file_up.
9720
7cd06d6e
TT
97212017-08-03 Tom Tromey <tom@tromey.com>
9722
9723 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9724
ed166945
TT
97252017-08-03 Tom Tromey <tom@tromey.com>
9726
9727 * cli/cli-cmds.c (find_and_open_script): Change return type.
9728 Remove "streamp" and "full_path" parameters.
9729 (source_script_with_search): Update.
9730 * auto-load.c (source_script_file): Update.
9731 * cli/cli-cmds.h (find_and_open_script): Change type.
9732 (open_script): New struct.
9733
d419f42d
TT
97342017-08-03 Tom Tromey <tom@tromey.com>
9735
9736 * xml-support.c (xml_fetch_content_from_file): Update.
9737 * ui-file.c (stdio_file::open): Update.
9738 * tracefile-tfile.c (tfile_start): Update.
9739 * remote.c (remote_file_put, remote_file_get): Update.
9740 * nat/linux-procfs.c (linux_proc_get_int)
9741 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9742 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9743 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9744 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9745 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9746 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9747 * linux-nat.c (linux_proc_pending_signals): Update.
9748 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9749 (file_closer): Remove.
9750 * compile/compile.c (compile_to_object): Update.
9751 * common/filestuff.h (struct gdb_file_deleter): New.
9752 (gdb_file_up): New typedef.
9753 (gdb_fopen_cloexec): Change return type.
9754 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9755 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9756 (dump_binary_file, restore_binary_file): Update.
9757 * auto-load.c (auto_load_objfile_script_1): Update.
9758
4a2b031d
TT
97592017-08-03 Tom Tromey <tom@tromey.com>
9760
9761 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9762 (info_static_tracepoint_markers_command): Likewise.
9763 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9764 * skip.c (skip_info): Use ui_out_emit_table.
9765 * progspace.c (print_program_space): Use ui_out_emit_table.
9766 * osdata.c (info_osdata): Use ui_out_emit_table.
9767 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9768 ui_out_emit_table.
9769 * linux-thread-db.c (info_auto_load_libthread_db): Use
9770 ui_out_emit_table.
9771 * inferior.c (print_inferior): Use ui_out_emit_table.
9772 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9773 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9774 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9775 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9776 * ui-out.h (class ui_out_emit_table): New.
9777
a4f320fd
MR
97782017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9779
9780 * mips-tdep.c (mips_fpu_type_str): New function.
9781 (mips_dump_tdep): Call it.
9782
a2f1f308
MR
97832017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9784
9785 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9786 `->mips_fpu_type'.
9787
7e5ed83b
XR
97882017-07-31 Xavier Roirand <roirand@adacore.com>
9789
9790 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9791
4c9dc811
XR
97922017-07-27 Xavier Roirand <roirand@adacore.com>
9793
9794 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9795
27d41eac
YQ
97962017-07-26 Yao Qi <yao.qi@linaro.org>
9797
9798 * cli/cli-cmds.c (maintenancechecklist): New variable.
9799 * gdbcmd.h (maintenancechecklist): Declare it.
9800 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9801 Call i386_linux_read_description with different masks.
9802 * maint.c (maintenance_check_command): New function.
9803 (_initialize_maint_cmds): Call add_prefix_cmd.
9804 * target-descriptions.c (tdesc_reg): override operator != and ==.
9805 (tdesc_type): Likewise.
9806 (tdesc_feature): Likewise.
9807 (target_desc): Likewise.
9808 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9809 (maintenance_check_xml_descriptions): New function.
9810 (_initialize_target_descriptions) Add command "xml-descriptions".
9811 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9812
ea03d0d3
YQ
98132017-07-26 Yao Qi <yao.qi@linaro.org>
9814
9815 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9816 Include features/i386/32bit-*.c.
9817 (i386_linux_read_description): Generate target description if it
9818 doesn't exist.
9819 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9820 functions.
9821 * features/i386/32bit-linux.c: Re-generated.
9822 * features/i386/32bit-sse.c: Likewise.
9823 * target-descriptions.c (print_c_feature::visit): Print code to
9824 set register number if needed.
9825 (print_c_feature) <m_next_regnum>: New field.
9826
25aa13e5
YQ
98272017-07-26 Yao Qi <yao.qi@linaro.org>
9828
9829 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9830 (FEATURE_XMLFILES): New.
9831 (FEATURE_CFILES): New.
9832 New rules.
9833 (clean-cfiles): Remove generated c files.
9834 * features/i386/32bit-avx.c: Generated.
9835 * features/i386/32bit-avx512.c: Generated.
9836 * features/i386/32bit-core.c: Generated.
9837 * features/i386/32bit-linux.c: Generated.
9838 * features/i386/32bit-mpx.c: Generated.
9839 * features/i386/32bit-pkeys.c: Generated.
9840 * features/i386/32bit-sse.c: Generated.
9841 * target-descriptions.c: Include algorithm.
9842 (tdesc_element_visitor): Add method visit_end.
9843 (print_c_tdesc): Implement visit_end.
9844 (print_c_tdesc:: m_filename_after_features): Move it to
9845 protected.
9846 (print_c_feature): New class.
9847 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9848 name starts with "i386/32bit-".
9849
6eb1e6a8
YQ
98502017-07-26 Yao Qi <yao.qi@linaro.org>
9851
9852 * target-descriptions.c (tdesc_element_visitor): New class.
9853 (tdesc_element): New class.
9854 (tdesc_reg): Inherit from tdesc_element.
9855 (tdesc_reg::accept): New function.
9856 (tdesc_type): Inherit from tdesc_element.
9857 (tdesc_type::accept): New function.
9858 (tdesc_feature): Inherit from tdesc_element.
9859 (tdesc_feature::accept): New function.
9860 (target_desc): Inherit from tdesc_element.
9861 (target_desc::target_desc): New.
9862 (target_desc::~target_desc): New.
9863 (target_desc::accept): New.
9864 (allocate_target_description): Use new.
9865 (free_target_description): Use delete.
9866 (print_c_tdesc): New class.
9867 (maint_print_c_tdesc_cmd): Adjust.
9868
9869 * features/aarch64.c: Re-generated.
9870 * features/arc-arcompact.c: Re-generated.
9871 * features/arc-v2.c: Re-generated.
9872 * features/arm/arm-with-iwmmxt.c: Re-generated.
9873 * features/arm/arm-with-m.c: Re-generated.
9874 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9875 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9876 * features/arm/arm-with-neon.c: Re-generated.
9877 * features/arm/arm-with-vfpv2.c: Re-generated.
9878 * features/arm/arm-with-vfpv3.c: Re-generated.
9879 * features/i386/amd64-avx-avx512.c: Re-generated.
9880 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9881 * features/i386/amd64-avx.c: Re-generated.
9882 * features/i386/amd64-avx-linux.c: Re-generated.
9883 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9884 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9885 * features/i386/amd64-avx-mpx.c: Re-generated.
9886 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9887 * features/i386/amd64.c: Re-generated.
9888 * features/i386/amd64-linux.c: Re-generated.
9889 * features/i386/amd64-mpx.c: Re-generated.
9890 * features/i386/amd64-mpx-linux.c: Re-generated.
9891 * features/i386/i386-avx-avx512.c: Re-generated.
9892 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9893 * features/i386/i386-avx.c: Re-generated.
9894 * features/i386/i386-avx-linux.c: Re-generated.
9895 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9896 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9897 * features/i386/i386-avx-mpx.c: Re-generated.
9898 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9899 * features/i386/i386.c: Re-generated.
9900 * features/i386/i386-linux.c: Re-generated.
9901 * features/i386/i386-mmx.c: Re-generated.
9902 * features/i386/i386-mmx-linux.c: Re-generated.
9903 * features/i386/i386-mpx.c: Re-generated.
9904 * features/i386/i386-mpx-linux.c: Re-generated.
9905 * features/i386/x32-avx-avx512.c: Re-generated.
9906 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9907 * features/i386/x32-avx.c: Re-generated.
9908 * features/i386/x32-avx-linux.c: Re-generated.
9909 * features/i386/x32.c: Re-generated.
9910 * features/i386/x32-linux.c: Re-generated.
9911 * features/microblaze.c: Re-generated.
9912 * features/microblaze-with-stack-protect.c: Re-generated.
9913 * features/mips64-dsp-linux.c: Re-generated.
9914 * features/mips64-linux.c: Re-generated.
9915 * features/mips-dsp-linux.c: Re-generated.
9916 * features/mips-linux.c: Re-generated.
9917 * features/nds32.c: Re-generated.
9918 * features/nios2.c: Re-generated.
9919 * features/nios2-linux.c: Re-generated.
9920 * features/rs6000/powerpc-32.c: Re-generated.
9921 * features/rs6000/powerpc-32l.c: Re-generated.
9922 * features/rs6000/powerpc-403.c: Re-generated.
9923 * features/rs6000/powerpc-403gc.c : Re-generated.
9924 * features/rs6000/powerpc-405.c: Re-generated.
9925 * features/rs6000/powerpc-505.c: Re-generated.
9926 * features/rs6000/powerpc-601.c: Re-generated.
9927 * features/rs6000/powerpc-602.c: Re-generated.
9928 * features/rs6000/powerpc-603.c: Re-generated.
9929 * features/rs6000/powerpc-604.c: Re-generated.
9930 * features/rs6000/powerpc-64.c: Re-generated.
9931 * features/rs6000/powerpc-64l.c: Re-generated.
9932 * features/rs6000/powerpc-7400.c: Re-generated.
9933 * features/rs6000/powerpc-750.c: Re-generated.
9934 * features/rs6000/powerpc-860.c: Re-generated.
9935 * features/rs6000/powerpc-altivec32.c: Re-generated.
9936 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9937 * features/rs6000/powerpc-altivec64.c: Re-generated.
9938 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9939 * features/rs6000/powerpc-cell32l.c: Re-generated.
9940 * features/rs6000/powerpc-cell64l.c: Re-generated.
9941 * features/rs6000/powerpc-e500.c: Re-generated.
9942 * features/rs6000/powerpc-e500l.c: Re-generated.
9943 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9944 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9945 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9946 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9947 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9948 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9949 * features/rs6000/powerpc-vsx32.c: Re-generated.
9950 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9951 * features/rs6000/powerpc-vsx64.c: Re-generated.
9952 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9953 * features/rs6000/rs6000.c: Re-generated.
9954 * features/s390-linux32.c: Re-generated.
9955 * features/s390-linux32v1.c: Re-generated.
9956 * features/s390-linux32v2.c: Re-generated.
9957 * features/s390-linux64.c: Re-generated.
9958 * features/s390-linux64v1.c: Re-generated.
9959 * features/s390-linux64v2.c: Re-generated.
9960 * features/s390-te-linux64.c: Re-generated.
9961 * features/s390-tevx-linux64.c: Re-generated.
9962 * features/s390-vx-linux64.c: Re-generated.
9963 * features/s390x-linux64.c: Re-generated.
9964 * features/s390x-linux64v1.c: Re-generated.
9965 * features/s390x-linux64v2.c: Re-generated.
9966 * features/s390x-te-linux64.c: Re-generated.
9967 * features/s390x-tevx-linux64.c: Re-generated.
9968 * features/s390x-vx-linux64.c: Re-generated.
9969 * features/sparc/sparc32-solaris.c: Re-generated.
9970 * features/sparc/sparc64-solaris.c: Re-generated.
9971 * features/tic6x-c62x.c: Re-generated.
9972 * features/tic6x-c62x-linux.c: Re-generated.
9973 * features/tic6x-c64x.c: Re-generated.
9974 * features/tic6x-c64x-linux.c: Re-generated.
9975 * features/tic6x-c64xp.c: Re-generated.
9976 * features/tic6x-c64xp-linux.c: Re-generated.
9977
35b4818d
YQ
99782017-07-26 Yao Qi <yao.qi@linaro.org>
9979
9980 * i386-linux-tdep.c (i386_linux_read_description): New function.
9981 (i386_linux_core_read_description): Call
9982 i386_linux_read_description.
9983 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9984 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9985 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9986 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9987 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9988 * x86-linux-nat.c (x86_linux_read_description): Call
9989 i386_linux_read_description.
9990
8e2141c6
YQ
99912017-07-26 Yao Qi <yao.qi@linaro.org>
9992
9993 * NEWS: Mention it.
9994 * features/Makefile (%.c: %.xml): Pass the xml file name to
9995 command "maint print c-tdesc".
9996 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9997 name from 'arg'.
9998
b468ff4c
YQ
99992017-07-26 Yao Qi <yao.qi@linaro.org>
10000
10001 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10002 in-class initialization.
10003 (tdesc_create_feature): Call new instead of XCNEW.
10004 (free_target_description): Ue delete.
10005
b9c0e1b4
JB
100062017-07-25 John Baldwin <jhb@FreeBSD.org>
10007
10008 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10009
a04b5337
YQ
100102017-07-25 Yao Qi <yao.qi@linaro.org>
10011
10012 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10013 constant.
10014 (amd64_x32_init_abi): Likewise.
10015 * amd64-tdep.h (amd64_init_abi): Update declaration.
10016 (amd64_x32_init_abi): Likewise.
10017
02ad7fc2
YQ
100182017-07-25 Yao Qi <yao.qi@linaro.org>
10019
10020 PR tdep/21717
10021 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10022 condition for FPSCR.
10023 (arm_linux_store_inferior_registers): Likewise.
10024
b6f48cb0
TT
100252017-07-22 Tom Tromey <tom@tromey.com>
10026
10027 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10028 <syscalls_counts>: Now a std::vector.
10029 (get_catch_syscall_inferior_data): Use "new".
10030 (catch_syscall_inferior_data_cleanup): Use "delete".
10031 (insert_catch_syscall, remove_catch_syscall)
10032 (clear_syscall_counts): Update.
10033
e12c9b7a
TT
100342017-07-22 Tom Tromey <tom@tromey.com>
10035
10036 * break-catch-syscall.c (syscall_catchpoint)
10037 <syscalls_to_be_caught>: Now a std::vector<int>
10038 (~syscall_catchpoint): Remove.
10039 (insert_catch_syscall, remove_catch_syscall)
10040 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10041 (print_mention_catch_syscall, print_recreate_catch_syscall):
10042 Update.
10043 (create_syscall_event_catchpoint): Change type of "filter"
10044 parameter.
10045 (catch_syscall_split_args): Return a std::vector.
10046 (catch_syscall_command_1, catching_syscall_number_1): Update.
10047
4fa8aeac
TT
100482017-07-22 Tom Tromey <tom@tromey.com>
10049
10050 * break-catch-throw.c (struct exception_catchpoint)
10051 <exception_rx>: Now a std::string.
10052 (~exception_catchpoint): Remove.
10053 (print_one_detail_exception_catchpoint): Update.
10054 (handle_gnu_v3_exceptions): Change type of except_rx.
10055 (extract_exception_regexp): Return a std::string.
10056 (catch_exception_command_1): Update.
10057
f746a154
TT
100582017-07-22 Tom Tromey <tom@tromey.com>
10059
10060 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10061 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10062 std::vector.
10063 <catch_all>: Now a bool.
10064 (~signal_catchpoint): Remove.
10065 (signal_catchpoint_insert_location)
10066 (signal_catchpoint_remove_location)
10067 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10068 (signal_catchpoint_print_mention)
10069 (signal_catchpoint_print_recreate)
10070 (signal_catchpoint_explains_signal): Update.
10071 (create_signal_catchpoint): Change type of "filter" and
10072 "catch_all".
10073 (catch_signal_split_args): Return a std::vector. Change type of
10074 "catch_all".
10075 (catch_signal_command): Update.
10076
47e77640
PA
100772017-07-20 Pedro Alves <palves@redhat.com>
10078
10079 * ada-lang.c (ada_language_defn): Make extern.
10080 (_initialize_ada_language): Remove add_language call.
10081 * c-lang.c (c_language_defn, cplus_language_defn)
10082 (asm_language_defn, minimal_language_defn): Make extern.
10083 (_initialize_c_language): Delete.
10084 * completer.c (compare_cstrings): Delete, moved to utils.h.
10085 * d-lang.c (d_language_defn): Make extern.
10086 (_initialize_d_language): Remove add_language calls.
10087 * defs.h (enum language): Add comment.
10088 * f-lang.c (f_language_defn): Make extern.
10089 (_initialize_f_language): Remove add_language call.
10090 * go-lang.c (go_language_defn): Make extern.
10091 (_initialize_go_language): Remove add_language call.
10092 * language.c: Include <algorithm>.
10093 (languages): Redefine as const array.
10094 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10095 (set_language_command): Handle "local". Use for-range loop.
10096 (set_language): Remove loop.
10097 (language_enum): Rewrite.
10098 (language_def, language_str): Remove loops.
10099 (add_language): Delete.
10100 (add_set_language_command): New, based on add_languages.
10101 (skip_language_trampoline): Adjust.
10102 (local_language_defn): Delete.
10103 (language_gdbarch_post_init): Adjust.
10104 (_initialize_language): Remove add_language calls. Call
10105 add_set_language_command.
10106 * language.h (add_language): Delete.
10107 (auto_language_defn)
10108 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10109 (asm_language_defn, c_language_defn, cplus_language_defn)
10110 (d_language_defn, f_language_defn, go_language_defn)
10111 (m2_language_defn, objc_language_defn, opencl_language_defn)
10112 (pascal_language_defn, rust_language_defn): Declare.
10113 * m2-lang.c (m2_language_defn): Make extern.
10114 (_initialize_m2_language): Remove add_language call.
10115 * objc-lang.c (objc_language_defn): Make extern.
10116 (_initialize_objc_language): Remove add_language call.
10117 * opencl-lang.c (opencl_language_defn): Make extern.
10118 (_initialize_opencl_language): Remove add_language call.
10119 * p-lang.c (pascal_language_defn): Make extern.
10120 (_initialize_pascal_language): Delete.
10121 * rust-lang.c (rust_language_defn): Make extern.
10122 (_initialize_rust_language): Delete.
10123 * utils.h (compare_cstrings): New static inline function.
10124
edb0c9cb
PA
101252017-07-20 Pedro Alves <palves@redhat.com>
10126
10127 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10128 (get_var_value): Constify parameters.
10129 (get_int_var_value): Change prototype.
10130 (to_fixed_range_type): Adjust.
10131 * ada-lang.h (get_int_var_value): Change prototype.
10132
a778f165
PA
101332017-07-20 Pedro Alves <palves@redhat.com>
10134
10135 * dwarf2read.c (dw2_lookup_symbol): Use
10136 SYMBOL_MATCHES_SEARCH_NAME.
10137 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10138
42edd901
PA
101392017-07-20 Pedro Alves <palves@redhat.com>
10140
10141 * block.c (block_iter_name_step, block_iter_name_first)
10142 (block_iter_name_next): Delete.
10143 (block_lookup_symbol_primary): Adjust to use
10144 dict_iter_match_first/dict_iter_match_next.
10145 * block.h (block_iter_name_first, block_iter_name_next): Delete
10146 declarations.
10147 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10148 dict_iter_match_first/dict_iter_match_next.
10149
cf325299
PA
101502017-07-20 Pedro Alves <palves@redhat.com>
10151
10152 * cp-support.c (cp_find_first_component_aux): Add missing case for
10153 end of string.
10154
c5ed0576
DB
101552017-07-18 David Blaikie <dblaikie@gmail.com>
10156
10157 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10158 of dwo_cu's dwo_file.
10159
27841e76
YQ
101602017-07-18 Yao Qi <yao.qi@linaro.org>
10161
10162 * remote.c (store_registers_using_G): Remove one line comment.
10163
cfb7e58b
YQ
101642017-07-18 Yao Qi <yao.qi@linaro.org>
10165
10166 * regcache.c (regcache_cpy): Simplify it.
10167 (regcache::cpy_no_passthrough): Remove it.
10168 * regcache.h (cpy_no_passthrough): Remove it.
10169 (regcache_dup, regcache_cpy): Update comments.
10170
386535dd
PA
101712017-07-18 Pedro Alves <palves@redhat.com>
10172
10173 * remote-sim.c (sim_command_completer): Adjust to work with a
10174 completion_tracker instead of a VEC.
10175
c45ec17c
PA
101762017-07-17 Pedro Alves <palves@redhat.com>
10177
10178 * completer.c (complete_source_filenames): New function.
10179 (complete_address_and_linespec_locations): New function.
10180 (location_completer): Use complete_address_and_linespec_locations.
10181 (completion_tracker::build_completion_result): Honor the tracker's
10182 request to suppress append.
10183 * completer.h (completion_tracker::suppress_append_ws)
10184 (completion_tracker::set_suppress_append_ws): New methods.
10185 (completion_tracker::m_suppress_append_ws): New field.
10186 (complete_source_filenames): New declaration.
10187 * linespec.c (linespec_complete_what): New.
10188 (struct ls_parser) <complete_what, completion_word,
10189 completion_quote_char, completion_quote_end, completion_tracker>:
10190 New fields.
10191 (string_find_incomplete_keyword_at_end): New.
10192 (linespec_lexer_lex_string): Record quote char. If in completion
10193 mode, don't throw.
10194 (linespec_lexer_consume_token): Advance the completion word point.
10195 (linespec_lexer_peek_token): Save/restore completion info.
10196 (save_stream_and_consume_token): New.
10197 (set_completion_after_number): New.
10198 (linespec_parse_basic): Set what to complete next depending on
10199 token. Handle function and label completions specially.
10200 (parse_linespec): Disable objc shortcut in completion mode. Set
10201 what to complete next depending on token type. Skip keyword if in
10202 completion mode.
10203 (complete_linespec_component, linespec_complete): New.
10204 * linespec.h (linespec_complete): Declare.
10205
be966d42
PA
102062017-07-17 Pedro Alves <palves@redhat.com>
10207
10208 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10209 Handle 'operator<' / 'operator<<'.
10210
a2459270
PA
102112017-07-17 Pedro Alves <palves@redhat.com>
10212
10213 * completer.c (collect_explicit_location_matches): Handle
10214 MATCH_LABEL.
10215 (convert_explicit_location_to_linespec): New, factored out from
10216 ...
10217 (convert_explicit_location_to_sals): ... this.
10218 (complete_label): New.
10219 (linespec_complete_label, find_label_symbols_in_block): New.
10220 (find_label_symbols): Add completion_mode parameter and adjust to
10221 call find_label_symbols_in_block.
10222 * linespec.h (linespec_complete_label): Declare.
10223
c6756f62
PA
102242017-07-17 Pedro Alves <palves@redhat.com>
10225
10226 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10227 complete_symbol_mode parameter.
10228 * cli/cli-cmds.c (complete_command): Get the completion result out
10229 of the handle_brkchars tracker if used a custom word point.
10230 * completer.c: Include "linespec.h".
10231 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10232 (advance_to_expression_complete_word_point): New.
10233 (completion_tracker::completes_to_completion_word): New.
10234 (complete_files_symbols): Pass down
10235 complete_symbol_mode::EXPRESSION.
10236 (explicit_options, probe_options): New.
10237 (collect_explicit_location_matches): Complete on the
10238 explictit_loc->foo instead of word. Use
10239 linespec_complete_function. Handle MATCH_LINE. Handle offering
10240 keyword and options completions.
10241 (backup_text_ptr): Delete.
10242 (skip_keyword): New.
10243 (complete_explicit_location): Remove 'word' parameter. Add
10244 language, quoted_arg_start and quoted_arg_end parameters.
10245 Rewrite, parsing left to right.
10246 (location_completer): Rewrite.
10247 (location_completer_handle_brkchars): New function.
10248 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10249 (enum complete_line_internal_reason): Adjust comments.
10250 (completion_tracker::discard_completions): New.
10251 (completer_handle_brkchars_func_for_completer): Handle
10252 location_completer.
10253 (gdb_custom_word_point_brkchars)
10254 (gdb_org_rl_basic_quote_characters): New.
10255 (gdb_completion_word_break_characters_throw)
10256 (completion_find_completion_word): Handle trackers that use a
10257 custom word point.
10258 (completion_tracker::advance_custom_word_point_by): New.
10259 (completion_tracker::build_completion_result): Don't rely on
10260 readline appending the quote char.
10261 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10262 use a custom word point.
10263 (gdb_rl_attempted_completion_function): Restore
10264 rl_basic_quote_characters.
10265 * completer.h (class completion_tracker): Extend intro comment.
10266 (completion_tracker::set_quote_char)
10267 (completion_tracker::quote_char)
10268 (completion_tracker::set_use_custom_word_point)
10269 (completion_tracker::use_custom_word_point)
10270 (completion_tracker::custom_word_point)
10271 (completion_tracker::set_custom_word_point)
10272 (completion_tracker::advance_custom_word_point_by)
10273 (completion_tracker::completes_to_completion_word)
10274 (completion_tracker::discard_completions): New methods.
10275 (completion_tracker::m_quote_char)
10276 (completion_tracker::m_use_custom_word_point)
10277 (completion_tracker::m_custom_word_point): New fields.
10278 (advance_to_expression_complete_word_point): Declare.
10279 * f-lang.c (f_collect_symbol_completion_matches): Add
10280 complete_symbol_mode parameter.
10281 * language.h (struct language_defn)
10282 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10283 parameter.
10284 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10285 (linespec_complete_function): New function.
10286 (linespec_lexer_lex_keyword): Adjust.
10287 * linespec.h (linespec_keywords, linespec_complete_function): New
10288 declarations.
10289 * location.c (find_end_quote): New function.
10290 (explicit_location_lex_one): Add explicit_completion_info
10291 parameter. Save quoting info. Don't throw if being called for
10292 completion. Don't handle Ada operators here.
10293 (is_cp_operator, skip_op_false_positives, first_of)
10294 (explicit_location_lex_one_function): New function.
10295 (string_to_explicit_location): Replace 'dont_throw' parameter with
10296 an explicit_completion_info pointer parameter. Handle it. Don't
10297 use explicit_location_lex_one to lex function names. Use
10298 explicit_location_lex_one_function instead.
10299 * location.h (struct explicit_completion_info): New.
10300 (string_to_explicit_location): Replace 'dont_throw' parameter with
10301 an explicit_completion_info pointer parameter.
10302 * symtab.c (default_collect_symbol_completion_matches_break_on):
10303 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10304 (default_collect_symbol_completion_matches)
10305 (collect_symbol_completion_matches): Add complete_symbol_mode
10306 parameter.
10307 (collect_symbol_completion_matches_type): Pass down
10308 complete_symbol_mode::EXPRESSION.
10309 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10310 parameter. Handle LINESPEC mode.
10311 * symtab.h (complete_symbol_mode): New.
10312 (default_collect_symbol_completion_matches_break_on)
10313 (default_collect_symbol_completion_matches)
10314 (collect_symbol_completion_matches)
10315 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10316 parameter.
10317
1d550c82
PA
103182017-07-17 Pedro Alves <palves@redhat.com>
10319
10320 * utils.c (enum class strncmp_iw_mode): New.
10321 (strcmp_iw): Rename to ...
10322 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10323 parameters. Handle them.
10324 (strncmp_iw): New.
10325 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10326 * utils.h (strncmp_iw): Declare.
10327 (strcmp_iw): Move describing comments here.
10328
8090b426
PA
103292017-07-17 Pedro Alves <palves@redhat.com>
10330
10331 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10332 CP_OPERATOR_STR.
10333 * c-typeprint.c (is_type_conversion_operator): Use
10334 CP_OPERATOR_STR.
10335 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10336 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10337 CP_OPERATOR_LEN.
10338 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10339 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10340 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10341 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10342 CP_OPERATOR_STR.
10343 * location.c: Include "cp-support.h".
10344 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10345 CP_OPERATOR_STR.
10346 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10347 CP_OPERATOR_LEN.
10348
6a2c1b87
PA
103492017-07-17 Pedro Alves <palves@redhat.com>
10350
10351 * cli/cli-cmds.c (complete_command): Use a completion tracker
10352 along with completion_find_completion_word for handle_brkchars
10353 phase.
10354 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10355 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10356 (struct gdb_rl_completion_word_info): New.
10357 (gdb_rl_find_completion_word): New.
10358 (completion_find_completion_word): New.
10359 * completer.h (completion_find_completion_word): Declare.
10360
eb3ff9a5
PA
103612017-07-17 Pedro Alves <palves@redhat.com>
10362
10363 * ada-lang.c (symbol_completion_match): Adjust comments.
10364 (symbol_completion_add): Replace vector parameter with
10365 completion_tracker parameter. Use it.
10366 (ada_make_symbol_completion_list): Rename to...
10367 (ada_collect_symbol_completion_matches): ... this. Add
10368 completion_tracker parameter and use it.
10369 (ada_language_defn): Adjust.
10370 * break-catch-syscall.c (catch_syscall_completer): Adjust
10371 prototype and work with completion_tracker instead of VEC.
10372 * breakpoint.c (condition_completer): Adjust prototype and work
10373 with completion_tracker instead of VEC.
10374 * c-lang.c (c_language_defn, cplus_language_defn)
10375 (asm_language_defn, minimal_language_defn): Adjust to renames.
10376 * cli/cli-cmds.c (complete_command): Rework using
10377 completion_tracker. Catch exceptions when completing.
10378 * cli/cli-decode.c (integer_unlimited_completer)
10379 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10380 with completion_tracker instead of VEC.
10381 * command.h (struct completion_tracker): Forward declare.
10382 (completer_ftype, completer_handle_brkchars_ftype): Change
10383 types.
10384 (complete_on_cmdlist, complete_on_enum): Adjust.
10385 * completer.c: Include <algorithm>.
10386 (struct gdb_completer_state): New.
10387 (current_completion): New global.
10388 (readline_line_completion_function): Delete.
10389 (noop_completer, filename_completer)
10390 (filename_completer_handle_brkchars, complete_files_symbols)
10391 (linespec_location_completer): Adjust to work with a
10392 completion_tracker instead of a VEC.
10393 (string_or_empty): New.
10394 (collect_explicit_location_matches): Adjust to work with a
10395 completion_tracker instead of a VEC.
10396 (explicit_location_completer): Rename to ...
10397 (complete_explicit_location): ... this and adjust to work with a
10398 completion_tracker instead of a VEC.
10399 (location_completer): Adjust to work with a completion_tracker
10400 instead of a VEC.
10401 (add_struct_fields): Adjust to work with a completion_list instead
10402 of VEC.
10403 (expression_completer): Rename to ...
10404 (complete_expression): ... this and adjust to work with a
10405 completion_tracker instead of a VEC. Use complete_files_symbols.
10406 (expression_completer): Reimplement on top of complete_expression.
10407 (symbol_completer): Adjust to work with a completion_tracker
10408 instead of a VEC.
10409 (enum complete_line_internal_reason): Add describing comments.
10410 (complete_line_internal_normal_command): Adjust to work with a
10411 completion_tracker instead of a VEC.
10412 (complete_line_internal): Rename to ...
10413 (complete_line_internal_1): ... this and adjust to work with a
10414 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10415 handle_brkchars phase.
10416 (new_completion_tracker): Delete.
10417 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10418 complete_line_internal_1.
10419 (free_completion_tracker): Delete.
10420 (INITIAL_COMPLETION_HTAB_SIZE): New.
10421 (completion_tracker::completion_tracker)
10422 (completion_tracker::~completion_tracker): New.
10423 (maybe_add_completion): Delete.
10424 (completion_tracker::maybe_add_completion)
10425 (completion_tracker::add_completion)
10426 (completion_tracker::add_completions): New.
10427 (throw_max_completions_reached_error): Delete.
10428 (complete_line): Adjust to work with a completion_tracker instead
10429 of a VEC. Don't create a completion_tracker_t or check for max
10430 completions here.
10431 (command_completer, command_completer_handle_brkchars)
10432 (signal_completer, reg_or_group_completer_1)
10433 (reg_or_group_completer, default_completer_handle_brkchars):
10434 Adjust to work with a completion_tracker.
10435 (gdb_completion_word_break_characters_throw): New.
10436 (gdb_completion_word_break_characters): Reimplement.
10437 (line_completion_function): Delete.
10438 (completion_tracker::recompute_lowest_common_denominator)
10439 (expand_preserving_ws)
10440 (completion_tracker::build_completion_result)
10441 (completion_result::completion_result)
10442 (completion_result::completion_result)
10443 (completion_result::~completion_result)
10444 (completion_result::completion_result)
10445 (completion_result::release_match_list, compare_cstrings)
10446 (completion_result::sort_match_list)
10447 (completion_result::reset_match_list)
10448 (gdb_rl_attempted_completion_function_throw)
10449 (gdb_rl_attempted_completion_function): New.
10450 * completer.h (completion_list, struct completion_result)
10451 (class completion_tracker): New.
10452 (complete_line): Add completion_tracker parameter.
10453 (readline_line_completion_function): Delete.
10454 (gdb_rl_attempted_completion_function): New.
10455 (noop_completer, filename_completer, expression_completer)
10456 (location_completer, symbol_completer, command_completer)
10457 (signal_completer, reg_or_group_completer): Update prototypes.
10458 (completion_tracker_t, new_completion_tracker)
10459 (make_cleanup_free_completion_tracker): Delete.
10460 (enum maybe_add_completion_enum): Delete.
10461 (maybe_add_completion): Delete.
10462 (throw_max_completions_reached_error): Delete.
10463 * corefile.c (complete_set_gnutarget): Adjust to work with a
10464 completion_tracker instead of a VEC.
10465 * cp-abi.c (cp_abi_completer): Adjust to work with a
10466 completion_tracker instead of a VEC.
10467 * d-lang.c (d_language_defn): Adjust.
10468 * disasm.c (disassembler_options_completer): Adjust to work with a
10469 completion_tracker instead of a VEC.
10470 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10471 (f_collect_symbol_completion_matches): ... this. Adjust to work
10472 with a completion_tracker instead of a VEC.
10473 (f_language_defn): Adjust.
10474 * go-lang.c (go_language_defn): Adjust.
10475 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10476 Adjust to work with a completion_tracker instead of a VEC.
10477 * infrun.c (handle_completer): Likewise.
10478 * interps.c (interpreter_completer): Likewise.
10479 * interps.h (interpreter_completer): Likewise.
10480 * language.c (unknown_language_defn, auto_language_defn)
10481 (local_language_defn): Adjust.
10482 * language.h (language_defn::la_make_symbol_completion_list):
10483 Rename to ...
10484 (language_defn::la_collect_symbol_completion_matches): ... this
10485 and adjust to work with a completion_tracker instead of a VEC.
10486 * m2-lang.c (m2_language_defn): Adjust.
10487 * objc-lang.c (objc_language_defn): Adjust.
10488 * opencl-lang.c (opencl_language_defn): Adjust.
10489 * p-lang.c (pascal_language_defn): Adjust.
10490 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10491 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10492 with a completion_tracker.
10493 * rust-lang.c (rust_language_defn): Adjust.
10494 * symtab.c (free_completion_list, do_free_completion_list)
10495 (return_val, completion_tracker): Delete.
10496 (completion_list_add_name, completion_list_add_symbol)
10497 (completion_list_add_msymbol, completion_list_objc_symbol)
10498 (completion_list_add_fields, add_symtab_completions): Add
10499 completion_tracker parameter and use it.
10500 (default_make_symbol_completion_list_break_on_1): Rename to...
10501 (default_collect_symbol_completion_matches_break_on): ... this.
10502 Add completion_tracker parameter and use it instead of allocating
10503 a completion tracker here.
10504 (default_make_symbol_completion_list_break_on): Delete old
10505 implementation.
10506 (default_make_symbol_completion_list): Delete.
10507 (default_collect_symbol_completion_matches): New.
10508 (make_symbol_completion_list): Delete.
10509 (collect_symbol_completion_matches): New.
10510 (make_symbol_completion_type): Rename to ...
10511 (collect_symbol_completion_matches_type): ... this. Add
10512 completion_tracker parameter and use it instead of VEC.
10513 (make_file_symbol_completion_list_1): Rename to...
10514 (collect_file_symbol_completion_matches): ... this. Add
10515 completion_tracker parameter and use it instead of VEC.
10516 (make_file_symbol_completion_list): Delete.
10517 (add_filename_to_list): Use completion_list instead of a VEC.
10518 (add_partial_filename_data::list): Now a completion_list.
10519 (make_source_files_completion_list): Work with a completion_list
10520 instead of a VEC.
10521 * symtab.h: Include "completer.h".
10522 (default_make_symbol_completion_list_break_on)
10523 (default_make_symbol_completion_list, make_symbol_completion_list)
10524 (make_symbol_completion_type, make_file_symbol_completion_list)
10525 (make_source_files_completion_list): Delete.
10526 (default_collect_symbol_completion_matches_break_on)
10527 (default_collect_symbol_completion_matches)
10528 (collect_symbol_completion_matches)
10529 (collect_symbol_completion_matches_type)
10530 (collect_file_symbol_completion_matches)
10531 (make_source_files_completion_list): New.
10532 * top.c (init_main): Don't install a rl_completion_entry_function
10533 hook. Install a rl_attempted_completion_function hook instead.
10534 * tui/tui-layout.c (layout_completer): Adjust to work with a
10535 completion_tracker.
10536 * tui/tui-regs.c (tui_reggroup_completer):
10537 * tui/tui-win.c (window_name_completer, focus_completer)
10538 (winheight_completer): Adjust to work with a completion_tracker.
10539 * value.c: Include "completer.h".
10540 (complete_internalvar): Adjust to work with a completion_tracker.
10541 * value.h (complete_internalvar): Likewise.
10542
6e1dbf8c
PA
105432017-07-17 Pedro Alves <palves@redhat.com>
10544
10545 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10546 renames.
10547 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10548 comments to completer_ftype's declaration.
10549 <completer_handle_brkchars>: Change type to
10550 completer_handle_brkchars_ftype.
10551 * command.h (completer_ftype): Add describing comment and give
10552 names to parameters.
10553 (completer_ftype_void): Rename to ...
10554 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10555 (set_cmd_completer_handle_brkchars): Adjust.
10556 * completer.c (filename_completer_handle_brkchars): New function.
10557 (complete_line_internal_normal_command): New function, factored
10558 out from ...
10559 (complete_line_internal): ... here.
10560 (command_completer_handle_brkchars)
10561 (default_completer_handle_brkchars)
10562 (completer_handle_brkchars_func_for_completer): New functions.
10563 * completer.h (set_gdb_completion_word_break_characters): Delete
10564 declaration.
10565 (completer_handle_brkchars_func_for_completer): New declaration.
10566 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10567 completer_handle_brkchars_func_for_completer.
10568
78b13106
PA
105692017-07-17 Pedro Alves <palves@redhat.com>
10570
10571 * completer.c (symbol_completer): New function, based on
10572 make_symbol_completion_list_fn.
10573 * completer.h (symbol_completer): New declaration.
10574 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10575 * python/py-cmd.c (completers): Adjust.
10576 * symtab.c (make_symbol_completion_list_fn): Delete.
10577 * symtab.h (make_symbol_completion_list_fn): Delete.
10578 * cli/cli-decode.c (add_cmd): Adjust.
10579
bbf2f4df
PA
105802017-07-17 Pedro Alves <palves@redhat.com>
10581
10582 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10583 * dwarf2read.c: Include "filename-seen-cache.h".
10584 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10585 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10586 * filename-seen-cache.c: New file.
10587 * filename-seen-cache.h: New file.
10588 * symtab.c: Include "filename-seen-cache.h".
10589 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10590 (create_filename_seen_cache, clear_filename_seen_cache)
10591 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10592 to filename-seen-cache.h/filename-seen-cache.c.
10593 (output_source_filename, sources_info)
10594 (maybe_add_partial_symtab_filename)
10595 (make_source_files_completion_list): Adjust to use
10596 filename_seen_cache.
10597
330cdd98
PA
105982017-07-17 Pedro Alves <palves@redhat.com>
10599
10600 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10601 fields.
10602 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10603 dwarf2_debug_sections*)): New.
10604 (dwarf2_per_objfile::dwarf2_per_objfile(const
10605 dwarf2_per_objfile&)): Declare as deleted.
10606 (dwarf2_per_objfile::operator=): Declare as deleted.
10607 (dwarf2_per_objfile::dwarf2_per_objfile)
10608 (dwarf2_per_objfile::~dwarf2_per_objfile)
10609 (dwarf2_per_objfile::free_cached_comp_units): New.
10610 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10611 ctor. Call dwarf2_per_objfile's ctor manually.
10612 (dwarf2_locate_sections): Deleted/refactored as ...
10613 (dwarf2_per_objfile::locate_sections): ... this new method.
10614 (free_cached_comp_units): Defer to
10615 dwarf2_per_objfile::free_cached_comp_units.
10616 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10617
8880f2a9
TT
106182017-07-14 Tom Tromey <tom@tromey.com>
10619
10620 PR rust/21764:
10621 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10622 parameter.
10623 <UNOP_SIZEOF>: Split into separate case.
10624 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10625
65547233
TT
106262017-07-14 Tom Tromey <tom@tromey.com>
10627
10628 PR rust/21763:
10629 * symtab.c (symbol_matches_domain): Add language_rust to special
10630 case.
10631 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10632 treat LOC_TYPEDEF symbols as variables.
10633
8f14146e
PA
106342017-07-14 Pedro Alves <palves@redhat.com>
10635
10636 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10637 symtabs matching all symtabs with SRCFILE as file name instead of
10638 only considering the first hit, with lookup_symtab.
10639
2347965c
SM
106402017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10641
10642 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10643 operator_name parameters.
10644 (gen_expr): Update function call.
10645
40f4af28
SM
106462017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10647
10648 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10649 parameter.
10650 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10651 Likewise.
10652 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10653 parameter, use agent_expr::gdbarch instead, update function
10654 calls.
10655 (locexpr_tracepoint_var_ref): Likewise.
10656 (loclist_tracepoint_var_ref): Likewise.
10657 * ax-gdb.c (gen_trace_static_fields): Likewise.
10658 (gen_traced_pop): Likewise.
10659 (gen_frame_args_address): Likewise.
10660 (gen_frame_locals_address): Likewise.
10661 (gen_var_ref): Likewise.
10662 (gen_struct_ref_recursive): Likewise.
10663 (gen_static_field): Likewise.
10664 (gen_maybe_namespace_elt): Likewise.
10665 (gen_expr): Likewise.
10666 (gen_trace_for_var): Likewise.
10667 (gen_trace_for_expr): Likewise.
10668 (gen_trace_for_return_address): Likewise.
10669
053f8057
SM
106702017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10671
10672 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10673 parameter.
10674 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10675
6661ad48
SM
106762017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10677
10678 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10679 from ax, update calls.
10680 (gen_usual_arithmetic): Likewise.
10681 (gen_integral_promotions): Likewise.
10682 (gen_bitfield_ref): Likewise.
10683 (gen_primitive_field): Likewise.
10684 (gen_struct_ref_recursive): Likewise.
10685 (gen_struct_ref): Likewise.
10686 (gen_maybe_namespace_elt): Likewise.
10687 (gen_struct_elt_for_reference): Likewise.
10688 (gen_namespace_elt): Likewise.
10689 (gen_aggregate_elt_ref): Likewise.
10690 (gen_expr): Get gdbarch from ax, update calls.
10691 (gen_expr_binop_rest): Likewise.
10692
c55a47e7
PA
106932017-07-13 Pedro Alves <palves@redhat.com>
10694
10695 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10696 as default tdesc.
10697 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10698 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10699 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10700 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10701 tdep.
10702 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10703 Get final tdesc from the tdep.
10704 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10705 default tdesc.
10706 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10707 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10708 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10709 Use it as default tdesc.
10710 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10711 down to amd_init_abi. No longer handle fallback tdesc here.
10712 * amd64-tdep.h (tdesc_x32): Declare.
10713 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10714 parameter.
10715 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10716 as default tdesc.
10717
55efceab
AA
107182017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10719
10720 * s390-linux-tdep.c (s390_process_record): Add support for
10721 instructions new in arch12.
10722
0aa37b65
JB
107232017-07-11 John Baldwin <jhb@FreeBSD.org>
10724
10725 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10726 PT_GETFSBASE and PT_GETGSBASE.
10727 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10728 PT_SETGSBASE.
10729
48aeef91
JB
107302017-07-11 John Baldwin <jhb@FreeBSD.org>
10731
10732 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10733 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10734 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10735 those rules.
10736 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10737 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10738 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10739 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10740 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10741 * features/i386/amd64.xml: Add 64bit-segments.xml.
10742 * features/i386/amd64-avx-avx512.c: Regenerated.
10743 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10744 * features/i386/amd64-avx-mpx.c: Regenerated.
10745 * features/i386/amd64-avx.c: Regenerated.
10746 * features/i386/amd64-mpx.c: Regenerated.
10747 * features/i386/amd64.c: Regenerated.
10748 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10749 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10750 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10751 * regformats/i386/amd64-avx.dat: Regenerated.
10752 * regformats/i386/amd64-mpx.dat: Regenerated.
10753 * regformats/i386/amd64.dat: Regenerated.
10754
77c501bc
YQ
107552017-07-10 Yao Qi <yao.qi@linaro.org>
10756
10757 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10758 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10759
6dc8d757
AK
107602017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10761
10762 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10763 unsetenv.
10764 * gnulib/aclocal.m4: Regenerate.
10765 * gnulib/config.in: Regenerate.
10766 * gnulib/configure: Regenerate.
10767 * gnulib/import/Makefile.am: Regenerate.
10768 * gnulib/import/Makefile.in: Regenerate.
10769 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10770 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10771 * gnulib/import/m4/environ.m4: New file.
10772 * gnulib/import/m4/setenv.m4: New file.
10773 * gnulib/import/setenv.c: New file.
10774 * gnulib/import/unsetenv.c: New file.
10775
266934d1
SM
107762017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10777
10778 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10779 address when op is DW_OP_addr.
10780
03278692
TT
107812017-07-09 Tom Tromey <tom@tromey.com>
10782
10783 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10784 check and apply to outer type.
10785
4b654465
JB
107862017-07-07 John Baldwin <jhb@FreeBSD.org>
10787
10788 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10789 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10790 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10791 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10792
2af9fc44
JB
107932017-07-07 John Baldwin <jhb@FreeBSD.org>
10794
10795 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10796
382b69bb
JB
107972017-07-07 John Baldwin <jhb@FreeBSD.org>
10798
10799 * corelow.c (get_core_siginfo): Remove.
10800 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10801 instead of get_core_siginfo.
10802 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10803 * gdbarch.h: Re-generate.
10804 * gdbarch.c: Re-generate.
10805 * linux-tdep.c (linux_core_xfer_siginfo): New.
10806 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10807
6e5eab33
JB
108082017-07-07 John Baldwin <jhb@FreeBSD.org>
10809
10810 * corelow.c (thread_section_name): Move to ...
10811 * gdbcore.h (thread_section_name): ... here.
10812
929edea9
JB
108132017-07-07 John Baldwin <jhb@FreeBSD.org>
10814
10815 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10816 (struct siginfo32): New.
10817 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10818 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10819 via ptrace(PT_LWPINFO).
10820
762c974a
JB
108212017-07-07 John Baldwin <jhb@FreeBSD.org>
10822
10823 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10824 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10825 (fbsd_get_siginfo_type): New.
10826 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10827 (_initialize_fbsd_tdep): New.
10828
33c5cd75
DB
108292017-07-06 David Blaikie <dblaikie@gmail.com>
10830
10831 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10832 a singular dwo_unit*) to support multiple CUs in the same way that
10833 multiple TUs are supported.
10834 (create_cus_hash_table): Replace create_dwo_cu with a function for
10835 parsing multiple CUs from a DWO file.
10836 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10837 create_dwo_cu.
10838 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10839 htab_find, rather than comparing the signature to a singleton CU in
10840 the dwo_file.
10841
8455d262
PA
108422017-07-06 Pedro Alves <palves@redhat.com>
10843
10844 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10845
4da3eb35
PA
108462017-07-04 Pedro Alves <palves@redhat.com>
10847
10848 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10849 * gdbtypes.h (TYPE_STATIC): Delete.
10850 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10851 is_synchronized, is_native>: Delete.
10852 <dummy>: Bump.
10853 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10854 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10855 (TYPE_FN_FIELD_ABSTRACT): Delete.
10856
5bfd255c
SM
108572017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10858
10859 * buffer.h (buffer_finish): Fix spelling mistakes.
10860
25c54127
EZ
108612017-07-01 Eli Zaretskii <eliz@gnu.org>
10862
10863 * .dir-locals.el: Automatically switch to C-style comments in
10864 versions of Emacs that support the feature.
10865
dc4bde35
SDJ
108662017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10867 Pedro Alves <palves@redhat.com>
10868
10869 PR cli/21688
10870 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10871 (process_next_line): New variable 'inline_cmd'.
10872 Adjust 'if' clauses for "python", "compile" and "guile" to use
10873 'command_name_equals' and check for '!inline_cmd'.
10874
51ed89aa
SDJ
108752017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10876
10877 PR cli/21688
10878 * cli/cli-script.c (command_name_equals_not_inline): New function.
10879 (process_next_line): Adjust 'if' clauses for "python", "compile"
10880 and "guile" to use command_name_equals_not_inline.
10881
eb17d413
PA
108822017-06-29 Pedro Alves <palves@redhat.com>
10883
10884 * completer.c (expression_completer): Call
10885 linespec_location_completer instead of location_completer.
10886
195bcdd5
PA
108872017-06-29 Pedro Alves <palves@redhat.com>
10888
10889 * completer.c (expression_completer): Remove code that recomputes
10890 'text' from 'word'.
10891
adc764e7
YQ
108922017-06-29 Yao Qi <yao.qi@linaro.org>
10893
10894 * regformats/regdat.sh: Generate code with
10895 "ifndef IN_PROCESS_AGENT".
10896
6e75794e
PA
108972017-06-28 Pedro Alves <palves@redhat.com>
10898
10899 * command.h: Include "common/scoped_restore.h".
10900
bc491f2e
YQ
109012017-06-28 Yao Qi <yao.qi@linaro.org>
10902
10903 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10904 instead of obstack_grow.
10905
41664b45
DG
109062017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10907
10908 PR gdb/21337
10909 * symfile.c (reread_symbols): Call objfiles_changed just before
10910 read_symbols.
10911
6da67eb1
PA
109122017-06-27 Pedro Alves <palves@redhat.com>
10913
10914 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10915 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10916 (completion_list_add_symbol, completion_list_add_msymbol):
10917 ... these new functions.
10918 (add_symtab_completions)
10919 (default_make_symbol_completion_list_break_on_1): Adjust.
10920
23732b1e
PA
109212017-06-27 Pedro Alves <palves@redhat.com>
10922
10923 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10924 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10925 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10926 dtor.
10927 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10928 'storage_obstack' field an auto_obstack. In-class initialize all
10929 non-bitfield fields. Make minsyms_read bool.
10930 * symfile.c (read_symbols): Adjust.
10931
a4d1e79a
AH
109322017-06-27 Alan Hayward <alan.hayward@arm.com>
10933
10934 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10935 (gdbsim_store_register): Likewise.
10936
8268c778
PA
109372017-06-27 Pedro Alves <palves@redhat.com>
10938
10939 * c-exp.y (name_obstack): Now an auto_obstack.
10940 (yylex): Use auto_obstack::clear.
10941 (c_parse): Use auto_obstack::clear instead of reinitializing and
10942 freeing the obstack.
10943 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10944 * d-exp.y (name_obstack): Now an auto_obstack.
10945 (yylex): Use auto_obstack::clear.
10946 (d_parse): Use auto_obstack::clear instead of reinitializing and
10947 freeing the obstack.
10948 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10949 auto_obstack.
10950 * dwarf2read.c (create_addrmap_from_index)
10951 (dwarf2_build_psymtabs_hard)
10952 (update_enumeration_type_from_children): Likewise.
10953 * gdb_obstack.h (auto_obstack): New type.
10954 * go-exp.y (name_obstack): Now an auto_obstack.
10955 (build_packaged_name): Use auto_obstack::clear.
10956 (go_parse): Use auto_obstack::clear instead of reinitializing and
10957 freeing the obstack.
10958 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10959 auto_obstack.
10960 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10961 * rust-exp.y (work_obstack): Now an auto_obstack.
10962 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10963 reinitializing and freeing the obstack.
10964 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10965 (host_char_to_target): Use auto_obstack.
10966 * utils.h (make_cleanup_obstack_free): Delete declaration.
10967 * valprint.c (generic_emit_char, generic_printstr): Use
10968 auto_obstack.
10969
db665f42
SM
109702017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10971
10972 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10973 thread.
10974 (darwin_init_thread_list): Don't update dummy thread.
10975 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10976
873c0814
SM
109772017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10978
10979 * record-full.c (netorder16): Remove.
10980
8b5a7a6e
SM
109812017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10982
10983 * common/diagnostics.h: Define macros for GCC.
10984 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10985 * common/vec.h: Include diagnostics.h.
10986 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10987 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10988 warning.
10989
d1435379
SM
109902017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10991
10992 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10993 New macro.
10994 * ada-lex.l: Ignore deprecated register warnings.
10995
cc75e0fd
SM
109962017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10997
10998 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10999 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11000
07809eaf
SM
110012017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11002
11003 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11004 its own line.
11005
f076f034
SM
110062017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11007
11008 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11009
0dd5cbc5
AH
110102017-06-23 Alan Hayward <alan.hayward@arm.com>
11011
11012 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11013 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11014 (xtensa_register_read_masked): Likewise.
11015
d4c6ce5b
SDJ
110162017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11017
11018 * common/environ.c (gdb_environ::unset): Update comment.
11019
16892a03
AH
110202017-06-22 Alan Hayward <alan.hayward@arm.com>
11021
11022 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11023 registers.
11024
d7dcbefc
AH
110252017-06-22 Alan Hayward <alan.hayward@arm.com>
11026
11027 * record-full.c (record_full_exec_insn): Use byte_vector.
11028
b30ff123
YQ
110292017-06-22 Yao Qi <yao.qi@linaro.org>
11030
11031 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11032 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11033
4fa847d7
AH
110342017-06-22 Alan Hayward <alan.hayward@arm.com>
11035
11036 * remote.c (cached_reg): Move from here...
11037 * regcache.h (cached_reg): ...to here.
11038 * python/py-unwind.c (struct reg_info): Remove.
11039 (cached_frame_info): Use cached_reg_t.
11040 (pyuw_prev_register): Likewise.
11041 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11042 (pyuw_dealloc_cache): Free all registers.
11043
f4906a9a
PA
110442017-06-22 Pedro Alves <palves@redhat.com>
11045 Simon Marchi <simon.marchi@ericsson.com>
11046
11047 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11048 warning.
11049 * common/diagnostics.h: New file.
11050
b45a1208
PA
110512017-06-22 Pedro Alves <palves@redhat.com>
11052
11053 * common/agent.h: Add include guards.
11054
e4da2c61
SM
110552017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11056
11057 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11058 talk about addressable units instead of bytes.
11059
96160d60
SDJ
110602017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11061
11062 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11063 of '::const_iterator'.
11064
9a6c7d9c
SDJ
110652017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11066
11067 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11068 'unittests/environ-selftests.c'.
11069 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11070 * charset.c (find_charset_names): Declare object 'iconv_env'.
11071 Update code to use 'iconv_env' object. Remove call to
11072 'free_environ'.
11073 * common/environ.c: Include <utility>.
11074 (make_environ): Delete function.
11075 (free_environ): Delete function.
11076 (gdb_environ::clear): New function.
11077 (gdb_environ::operator=): New function.
11078 (gdb_environ::get): Likewise.
11079 (environ_vector): Delete function.
11080 (set_in_environ): Delete function.
11081 (gdb_environ::set): New function.
11082 (unset_in_environ): Delete function.
11083 (gdb_environ::unset): New function.
11084 (gdb_environ::envp): Likewise.
11085 * common/environ.h: Include <vector>.
11086 (struct gdb_environ): Delete; transform into...
11087 (class gdb_environ): ... this class.
11088 (free_environ): Delete prototype.
11089 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11090 environ_vector): Likewise.
11091 * infcmd.c (run_command_1): Update code to call
11092 'envp' from 'gdb_environ' class.
11093 (environment_info): Update code to call methods from 'gdb_environ'
11094 class.
11095 (unset_environment_command): Likewise.
11096 (path_info): Likewise.
11097 (path_command): Likewise.
11098 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11099 (inferior::inferior): Initialize 'environment' using the host's
11100 information.
11101 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11102 Include "environ.h".
11103 (class inferior) <environment>: Change type from 'struct
11104 gdb_environ' to 'gdb_environ'.
11105 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11106 methods from 'gdb_environ' class.
11107 * solib.c (solib_find_1): Likewise
11108 * unittests/environ-selftests.c: New file.
11109
75c554cf
YQ
111102017-06-20 Yao Qi <yao.qi@linaro.org>
11111
11112 * features/i386/i386-linux.xml: Exchange the order of including
11113 32bit-linux.xml and 32bit-sse.xml.
11114 * features/i386/i386-linux.c: Regenerated.
11115
72ddacb7
YQ
111162017-06-20 Yao Qi <yao.qi@linaro.org>
11117
11118 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11119 Delete copy ctor and assignment operator.
11120 (tdesc_type): Likewise.
11121 (tdesc_feature): Likewise.
11122 (tdesc_free_reg): Remove.
11123 (tdesc_create_reg): Use new.
11124 (tdesc_free_type): Remove.
11125 (tdesc_create_vector): Use new.
11126 (tdesc_create_union): Likewise.
11127 (tdesc_create_flags): Likewise.
11128 (tdesc_create_enum): Likewise.
11129 (tdesc_free_feature): Delete.
11130 (free_target_description): Use delete.
11131
325c9fd4
JB
111322017-06-19 John Baldwin <jhb@FreeBSD.org>
11133
11134 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11135 registers.
11136
16b7a719
PA
111372017-06-19 Pedro Alves <palves@redhat.com>
11138
11139 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11140 after gdb::unlinker.
11141
1c8e01c9
SDJ
111422017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11143
11144 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11145 gdb_environ to access an environment variable.
11146
ffce45d2
TP
111472017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11148
11149 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11150 gdb_byte*.
11151
1d4fbac9
SM
111522017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11153
11154 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11155
8465943a
SM
111562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11157
11158 * configure: Re-generate.
11159 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11160
3e019bdc
SM
111612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11162
11163 * configure: Re-generate.
11164 * warning.m4: Pass -Werror to compiler when checking for
11165 supported warning flags.
11166
cf0dd6f0
SM
111672017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11168
11169 * Makefile.in (COMPILE.pre): Add "-x c++".
11170
6f98355c
YQ
111712017-06-16 Alan Hayward <alan.hayward@arm.com>
11172 Pedro Alves <palves@redhat.com>
11173 Yao Qi <yao.qi@linaro.org>
11174
11175 * defs.h (RequireLongest): New.
11176 (extract_integer): Declare function template.
11177 (extract_signed_integer): Remove the declaration, but define it
11178 static inline.
11179 (extract_unsigned_integer): Likewise.
11180 (store_integer): Declare function template.
11181 (store_signed_integer): Remove the declaration, but define it
11182 static inline.
11183 (store_unsigned_integer): Likewise.
11184 * findvar.c (extract_integer): New function template.
11185 (extract_signed_integer): Remove.
11186 (extract_unsigned_integer): Remove.
11187 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11188 instantiations.
11189 (store_integer): New function template.
11190 (store_signed_integer): Remove.
11191 (store_unsigned_integer): Remove.
11192 (store_integer): Explicit instantiations.
11193 * regcache.c (regcache_raw_read_signed): Update.
11194 (regcache::raw_read): New function.
11195 (regcache::raw_read_signed): Remove.
11196 (regcache::raw_read_unsigned): Remove.
11197 (regcache_raw_read_unsigned): Update.
11198 (regcache_raw_write_unsigned): Update.
11199 (regcache::raw_write_signed): Remove.
11200 (regcache::raw_write): New function.
11201 (regcache_cooked_read_signed): Update.
11202 (regcache::raw_write_unsigned): Remove.
11203 (regcache::cooked_read_signed): Remove.
11204 (regcache_cooked_read_unsigned): Update.
11205 (regcache::cooked_read_unsigned): Remove.
11206 (regcache_cooked_write_signed): Update.
11207 (regcache_cooked_write_unsigned): Update.
11208 * regcache.h (regcache) <raw_read_signed>: Remove.
11209 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11210 <raw_read, raw_write>: New.
11211 <cooked_read_signed, cooked_write_signed>: Remove.
11212 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11213 <cooked_read, cooked_write>: New.
11214 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11215 (sh64_pseudo_register_write): Update.
11216
a87dc45a
AK
112172017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11218
11219 * arc-tdep.c (arc_disassembler_options): New variable.
11220 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11221 of default_print_insn.
11222 (arc_delayed_print_insn): Set info->section when needed,
11223 use default_print_insn to retrieve a disassembler.
11224
45159d6a
SDJ
112252017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11226
11227 PR gdb/21574
11228 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11229 to mention $SHELL and startup-with-shell.
11230
b46c4cf0
MF
112312017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11232
11233 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11234
6394c606
YQ
112352017-06-14 Yao Qi <yao.qi@linaro.org>
11236
11237 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11238 default_print_insn instead of print_insn_aarch64.
11239 * arm-tdep.c (gdb_print_insn_arm): Call
11240 default_print_insn instead of print_insn_big_arm
11241 and print_insn_little_arm.
11242 * i386-tdep.c (i386_print_insn): Call default_print_insn
11243 instead of print_insn_i386.
11244 * ia64-tdep.c (ia64_print_insn): Call
11245 default_print_insn instead of print_insn_ia64.
11246 * mips-tdep.c (gdb_print_insn_mips): Call
11247 default_print_insn instead of print_insn_big_mips
11248 and print_insn_little_mips.
11249 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11250 instead of print_insn_spu.
11251
d5722aa2
PA
112522017-06-14 Pedro Alves <palves@redhat.com>
11253
11254 * ada-lang.c: Include "common/byte-vector.h".
11255 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11256 * charset.c (wchar_iterator::iterate): Resize the vector instead
11257 of reserving it.
11258 * common/byte-vector.h: Include "common/def-vector.h".
11259 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11260 * cli/cli-dump.c: Include "common/byte-vector.h".
11261 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11262 * common/byte-vector.h: New file.
11263 * common/def-vector.h: New file.
11264 * common/default-init-alloc.h: New file.
11265 * dwarf2loc.c: Include "common/byte-vector.h".
11266 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11267 instead of reserving it.
11268 * dwarf2read.c: Include "common/byte-vector.h".
11269 (data_buf::m_vec): Now a gdb::byte_vector.
11270 * gdb_regex.c: Include "common/def-vector.h".
11271 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11272 * mi/mi-main.c: Include "common/byte-vector.h".
11273 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11274 * printcmd.c: Include "common/byte-vector.h".
11275 (print_scalar_formatted): Use gdb::byte_vector.
11276 * valprint.c: Include "common/byte-vector.h".
11277 (maybe_negate_by_bytes, print_decimal_chars): Use
11278 gdb::byte_vector.
11279
01ec7a27
SM
112802017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11281
11282 * darwin-nat.c: Include "nat/fork-inferior.h".
11283
848d9074
SM
112842017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11285
11286 * configure.nat: Factor out Darwin bits that are not
11287 architecture-specific. Add fork-inferior.o.
11288
3b912944
SM
112892017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11290
11291 * configure.nat: Factor out AIX bits that are not
11292 architecture-specific. Add fork-inferior.o.
11293
55acdf22
AA
112942017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11295
11296 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11297 (read_pieced_value, write_pieced_value): ...here. Reduce to
11298 wrappers that just call rw_pieced_value.
11299
f65e2044
AA
113002017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11301
11302 * dwarf2loc.c (write_pieced_value): When writing the data for a
11303 memory piece, use write_memory_with_notification instead of
11304 write_memory.
11305
23f945bf
AA
113062017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11307
11308 * valops.c (read_value_memory): Change embedded_offset to
11309 represent a bit offset instead of a byte offset.
11310 * value.h (read_value_memory): Adjust comment.
11311
f236533e
AA
113122017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11313
11314 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11315 dest_offset_bits and source_offset_bits.
11316 (write_pieced_value): Likewise.
11317
65d84b76
AA
113182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11319
11320 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11321 given by DW_OP_bit_piece.
11322 (write_pieced_value): Likewise.
11323
242d31ab
AA
113242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11325
11326 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11327 some other preparations to the places where sufficient information
11328 is available.
11329 (write_pieced_value): Likewise.
11330
03c8af18
AA
113312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11332
11333 * dwarf2loc.c (bits_to_bytes): New function.
11334 (read_pieced_value): Fix offset calculations for register pieces
11335 on big-endian targets.
11336 (write_pieced_value): Likewise.
11337
840989c1
AA
113382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11339
11340 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11341 (write_pieced_value): Likewise.
11342
359b19bb
AA
113432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11344
11345 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11346 transfer the source value's least significant bits, instead of its
11347 lowest-addressed ones. Rename type_len to max_offset.
11348 (read_pieced_value): Mirror above changes to write_pieced_value as
11349 applicable.
11350
07c9ca3b
AA
113512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11352
11353 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11354 truncate full bytes from dest_offset_bits before using it as an
11355 offset into the buffer.
11356
f1cc9874
AA
113572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11358
11359 * dwarf2loc.c (write_pieced_value): Include transfer size in
11360 byte-wise check.
11361
cdaac320
AA
113622017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11363
11364 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11365 calculation of this_size.
11366
af547a96
AA
113672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11368
11369 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11370 when targeting a bit-field.
11371 (write_pieced_value): Likewise.
11372
ddd7882a
AA
113732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11374
11375 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11376 (allocate_piece_closure): Drop addr_size parameter.
11377 (dwarf2_evaluate_loc_desc_full): Adjust call to
11378 allocate_piece_closure.
11379
e9352324
AA
113802017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11381
11382 PR gdb/21226
11383 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11384 the LSB end, independent of endianness.
11385
d5d1163e
AA
113862017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11387
11388 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11389 size capping.
11390
032bb6ea
YQ
113912017-06-13 Yao Qi <yao.qi@linaro.org>
11392
11393 * mips-linux-nat.c: Move include features/mips*-linux.c to
11394 mips-linux-tdep.c.
11395 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11396 to mips-linux-tdep.c.
11397 * mips-linux-tdep.c: Include features/mips*-linux.c
11398 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11399 functions.
11400 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11401 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11402 (tdesc_mips64_dsp_linux): Declare.
11403
f12f6bad
TT
114042017-06-12 Tom Tromey <tom@tromey.com>
11405
11406 * valprint.h (val_print_type_code_int): Remove.
11407 * valprint.c (generic_val_print_int): Always call
11408 val_print_scalar_formatted.
11409 (val_print_type_code_int): Remove.
11410 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11411 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11412 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11413 * ada-valprint.c (ada_val_print_num): Use
11414 val_print_scalar_formatted.
11415
d9109c80
TT
114162017-06-12 Tom Tromey <tom@tromey.com>
11417
11418 * printcmd.c (print_scalar_formatted): Unify the two switches.
11419 Don't convert scalars to LONGEST.
11420
4ac0cb1c
TT
114212017-06-12 Tom Tromey <tom@tromey.com>
11422
11423 PR exp/16225:
11424 * valprint.h (print_decimal_chars): Update.
11425 * valprint.c (maybe_negate_by_bytes): New function.
11426 (print_decimal_chars): Add "is_signed" argument.
11427 * printcmd.c (print_scalar_formatted): Update.
11428
30a25466
TT
114292017-06-12 Tom Tromey <tom@tromey.com>
11430
11431 PR exp/16225:
11432 * valprint.h (print_binary_chars, print_hex_chars): Update.
11433 * valprint.c (val_print_type_code_int): Update.
11434 (print_binary_chars): Add "zero_pad" argument.
11435 (emit_octal_digit): New function.
11436 (print_octal_chars): Don't zero-pad.
11437 (print_decimal_chars): Likewise.
11438 (print_hex_chars): Add "zero_pad" argument.
11439 * sh64-tdep.c (sh64_do_fp_register): Update.
11440 * regcache.c (regcache::dump): Update.
11441 * printcmd.c (print_scalar_formatted): Update.
11442 * infcmd.c (default_print_one_register_info): Update.
11443
b3464d03
PA
114442017-06-12 Pedro Alves <palves@redhat.com>
11445 Alan Hayward <alan.hayward@arm.com>
11446
11447 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11448 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11449 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11450 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11451 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11452
4b76cda9
PA
114532017-06-12 Pedro Alves <palves@redhat.com>
11454
11455 * dwarf2read.c (mapped_symtab::data): Now a vector of
11456 symtab_index_entry instead of vector of
11457 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11458 whether an element's name is NULL instead of checking whether the
11459 element itself is NULL.
11460 (find_slot): Change return type. Adjust.
11461 (hash_expand, , add_index_entry, uniquify_cu_indices)
11462 (write_hash_table): Adjust.
11463
e8f8bcb3
PA
114642017-06-12 Pedro Alves <palves@redhat.com>
11465
11466 * dwarf2read.c (recursively_count_psymbols): New function.
11467 (write_psymtabs_to_index): Call it to compute number of psyms and
11468 pass estimate size of psyms_seen to unordered_set's ctor.
11469
70a1152b
PA
114702017-06-12 Pedro Alves <palves@redhat.com>
11471
11472 * dwarf2read.c (write_hash_table): Check if key already exists
11473 before emplacing.
11474
c2f134ac
PA
114752017-06-12 Pedro Alves <palves@redhat.com>
11476
11477 * dwarf2read.c (data_buf::append_space): Rename to...
11478 (data_buf::grow): ... this, and make private. Adjust all callers.
11479 (data_buf::append_uint): New method.
11480 (add_address_entry, write_one_signatured_type)
11481 (write_psymtabs_to_index): Use it.
11482
a81e6d4d
PA
114832017-06-12 Pedro Alves <palves@redhat.com>
11484
11485 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11486 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11487 (data_buf::file_write): Call ::fwrite directly.
11488
6fd931f2
PA
114892017-06-12 Pedro Alves <palves@redhat.com>
11490
11491 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11492 std::vector::erase.
11493
bc8f2430
JK
114942017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11495
11496 Code cleanup: C++ify .gdb_index producer.
11497 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11498 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11499 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11500 (create_strtab, add_string): Remove.
11501 (file_write, data_buf): New.
11502 (struct symtab_index_entry): Use std::vector for cu_indices.
11503 (struct mapped_symtab): Use std::vector for data.
11504 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11505 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11506 Remove.
11507 (find_slot): Change return type. Update it to the new data structures.
11508 (hash_expand, add_index_entry): Update it to the new data structures.
11509 (offset_type_compare): Remove.
11510 (uniquify_cu_indices): Update it to the new data structures.
11511 (c_str_view, c_str_view_hasher, vector_hasher): New.
11512 (add_indices_to_cpool): Remove.
11513 (write_hash_table): Update it to the new data structures.
11514 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11515 (eq_psymtab_cu_index): Remove.
11516 (psym_index_map): New typedef.
11517 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11518 reference and std::unordered_map for cu_index_htab.
11519 (add_address_entry, add_address_entry_worker, write_address_map)
11520 (write_psymbols): Update it to the new data structures.
11521 (write_obstack): Remove.
11522 (struct signatured_type_index_data): Change types_list to a data_buf
11523 reference and psyms_seen to a std::unordered_set reference.
11524 (write_one_signatured_type, recursively_write_psymbols)
11525 (write_psymtabs_to_index): Update it to the new data structures.
11526
c4dcb155
SM
115272017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11528
11529 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11530 separate-debug-file commands.
11531 * symfile.h (separate_debug_file_debug): New global.
11532 * symfile.c (separate_debug_file_debug): New global.
11533 (separate_debug_file_exists, find_separate_debug_file): Add
11534 debug output.
11535 (_initialize_symfile): Add "set debug separate-debug-file"
11536 command.
11537 * build-id.c (build_id_to_debug_bfd,
11538 find_separate_debug_file_by_buildid): Add debug output.
11539
6d45d4b4
SM
115402017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11541
11542 * gdbarch.sh (displaced_step_free_closure): Remove.
11543 * gdbarch.h, gdbarch.c: Re-generate.
11544 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11545 displaced_step_free_closure.
11546 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11547 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11548 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11549 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11550 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11551 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11552 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11553 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11554 * infrun.c (displaced_step_clear): Call xfree instead of
11555 gdbarch_displaced_step_free_closure.
11556
2f91880f
SDJ
115572017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11558
11559 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11560 NULL".
11561
b8b6e72f
AH
115622017-06-08 Alan Hayward <alan.hayward@arm.com>
11563
11564 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11565 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11566 (mn10300_push_dummy_call): Likewise.
11567
5369082e
AH
115682017-06-08 Alan Hayward <alan.hayward@arm.com>
11569
11570 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11571
ff4ca5ac
AH
115722017-06-08 Alan Hayward <alan.hayward@arm.com>
11573
11574 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11575
aefd8b33
SDJ
115762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11577
11578 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11579 able to start inferiors using a shell.
11580 (New remote packets): Announce new packet "QStartupWithShell".
11581 * remote.c: Add PACKET_QStartupWithShell.
11582 (extended_remote_create_inferior): Handle new
11583 PACKET_QStartupWithShell.
11584 (remote_protocol_features) <QStartupWithShell>: New entry for
11585 PACKET_QStartupWithShell.
11586 (_initialize_remote): Call "add_packet_config_cmd" for
11587 QStartupShell.
11588
2090129c
SDJ
115892017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11590 Pedro Alves <palves@redhat.com>
11591
11592 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11593 and "nat/fork-inferior.h".
11594 * common/common-inferior.h: New file, with contents from
11595 "gdb/inferior.h".
11596 * commom/common-utils.c: Include "common-utils.h".
11597 (stringify_argv): New function.
11598 * common/common-utils.h (stringify_argv): New prototype.
11599 * configure.nat: Add "fork-inferior.o" as a dependency for
11600 "*linux*", "fbsd*" and "nbsd*" hosts.
11601 * corefile.c (get_exec_file): Update comment.
11602 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11603 instead of "startup_inferior".
11604 (darwin_create_inferior): Call "add_thread_silent" after
11605 "fork_inferior".
11606 * fork-child.c: Cleanup unnecessary includes.
11607 (SHELL_FILE): Move to "common/common-fork-child.c".
11608 (environ): Likewise.
11609 (exec_wrapper): Initialize.
11610 (get_exec_wrapper): New function.
11611 (breakup_args): Move to "common/common-fork-child.c"; rename to
11612 "breakup_args_for_exec".
11613 (escape_bang_in_quoted_argument): Move to
11614 "common/common-fork-child.c".
11615 (saved_ui): New variable.
11616 (prefork_hook): New function.
11617 (postfork_hook): Likewise.
11618 (postfork_child_hook): Likewise.
11619 (gdb_startup_inferior): Likewise.
11620 (fork_inferior): Move to "common/common-fork-child.c". Update
11621 function to support gdbserver.
11622 (startup_inferior): Likewise.
11623 * gdbcore.h (get_exec_file): Remove declaration.
11624 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11625 instead of "startup_inferior". Call "add_thread_silent" after
11626 "fork_inferior".
11627 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11628 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11629 instead of "startup_inferior". Call "add_thread_silent" after
11630 "fork_inferior".
11631 * inferior.h: Include "common-inferior.h".
11632 (trace_start_error): Move to "common/common-utils.h".
11633 (trace_start_error_with_name): Likewise.
11634 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11635 (startup_inferior): Likewise.
11636 (gdb_startup_inferior): New prototype.
11637 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11638 * nat/fork-inferior.h: New file.
11639 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11640 instead of "startup_inferior". Call "add_thread_silent" after
11641 "fork_inferior".
11642 * target.h (target_terminal_init): Move prototype to
11643 "target/target.h".
11644 (target_terminal_inferior): Likewise.
11645 (target_terminal_ours): Likewise.
11646 * target/target.h (target_terminal_init): New prototype, moved
11647 from "target.h".
11648 (target_terminal_inferior): Likewise.
11649 (target_terminal_ours): Likewise.
11650 * utils.c (gdb_flush_out_err): New function.
11651
043a4934
SDJ
116522017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11653
11654 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11655 * common/common-gdbthread.h: New file, with parts from
11656 "gdb/gdbthread.h".
11657 * gdbthread.h: Include "common-gdbthread.h".
11658 (switch_to_thread): Moved to "common/common-gdbthread.h".
11659
15652511
SDJ
116602017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11661
11662 * Makefile.in (SFILES): Add "common/job-control.c".
11663 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11664 (COMMON_OBS): Add "job-control.o".
11665 * common/job-control.c: New file, with contents from
11666 "gdb/inflow.c".
11667 * common/job-control.h: New file, with contents from "terminal.h".
11668 * fork-child.c: Include "job-control.h".
11669 * inflow.c: Include "job-control.h".
11670 (gdb_setpgid): Move to "common/common-inflow.c".
11671 (_initialize_inflow): Move setting of "job_control" to
11672 "handle_job_control".
11673 * terminal.h (job_control): Moved to "common/common-terminal.h".
11674 (gdb_setpgid): Likewise.
11675 * top.c: Include "job_control.h".
11676 * utils.c: Likewise.
11677 (job_control): Moved to "job-control.c".
11678
2d7cc5c7
PA
116792017-06-07 Pedro Alves <palves@redhat.com>
11680
11681 * Makefile.in (SFILES): Add gdb_regex.c.
11682 (COMMON_OBS): Add gdb_regex.o.
11683 * ada-lang.c (ada_add_standard_exceptions)
11684 (ada_add_exceptions_from_frame, name_matches_regex)
11685 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11686 parameter type to compiled_regex. Adjust.
11687 (ada_exceptions_list): Use compiled_regex.
11688 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11689 std::unique_ptr<compiled_regex>.
11690 (exception_catchpoint::~exception_catchpoint): Remove regfree
11691 call.
11692 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11693 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11694 * breakpoint.c (solib_catchpoint::compiled): Now a
11695 std::unique_ptr<compiled_regex>.
11696 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11697 (check_status_catch_solib): Adjust to use compiled_regex.
11698 (add_solib_catchpoint): Adjust to use compiled_regex.
11699 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11700 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11701 compiled_regex reference. Adjust to use it.
11702 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11703 declaration. Include "gdb_regex.h".
11704 (apropos_cmd): Change regex parameter to compiled_regex reference.
11705 * gdb_regex.c: New file.
11706 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11707 declarations.
11708 (class compiled_regex): New.
11709 * linux-tdep.c: Include "common/gdb_optional.h".
11710 (struct mapping_regexes): New, factored out from
11711 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11712 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11713 gdb::optional and remove cleanups. Adjust to compiled_regex.
11714 * probe.c: Include "common/gdb_optional.h".
11715 (collect_probes): Use compiled_regex and gdb::optional and remove
11716 cleanups.
11717 * skip.c: Include "common/gdb_optional.h".
11718 (skiplist_entry::compiled_function_regexp): Now a
11719 gdb::optional<compiled_regex>.
11720 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11721 (free_skiplist_entry): Remove regfree call.
11722 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11723 compiled_regex and gdb::optional.
11724 * symtab.c: Include "common/gdb_optional.h".
11725 (search_symbols): Use compiled_regex and gdb::optional.
11726 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11727 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11728 to gdb_regex.c.
11729
50d6adef
AH
117302017-06-07 Alan Hayward <alan.hayward@arm.com>
11731
11732 * regcache.c (regcache::save): Avoid buffer use.
11733 (regcache::dump): Likewise.
11734
4a8a33c8
AH
117352017-06-07 Alan Hayward <alan.hayward@arm.com>
11736
11737 * sh-tdep.c (sh_pseudo_register_read): Remove
11738 MAX_REGISTER_SIZE.
11739 (sh_pseudo_register_write): Likewise.
11740 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11741 (sh64_pseudo_register_write): Likewise
11742
d1be909e
AH
117432017-06-07 Alan Hayward <alan.hayward@arm.com>
11744
11745 * aarch64-tdep.c (aarch64_store_return_value): Use
11746 V_REGISTER_SIZE.
11747 (aarch64_pseudo_read_value): Likewise.
11748 (aarch64_pseudo_write): Likewise.
11749
f4a65042
YQ
117502017-06-06 Yao Qi <yao.qi@linaro.org>
11751
11752 * regformats/regdef.h (set_register_cache): Remove the
11753 declaration.
11754
9f7fb0aa
AH
117552017-06-06 Alan Hayward <alan.hayward@arm.com>
11756
11757 * frame.c (frame_unwind_register_signed): Use
11758 frame_unwind_register_value.
11759
e1e01040
PA
117602017-06-06 Pedro Alves <palves@redhat.com>
11761
11762 PR breakpoints/21553
11763 * breakpoint.c (create_breakpoints_sal_default)
11764 (init_breakpoint_sal, create_breakpoint_sal): Use
11765 gdb::unique_xmalloc_ptr for string parameters.
11766 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11767 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11768 (base_breakpoint_create_breakpoints_sal)
11769 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11770 (strace_marker_create_breakpoints_sal)
11771 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11772 string parameters.
11773 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11774 gdb::unique_xmalloc_ptr for string parameters.
11775 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11776 parameters.
11777
fbe654c8
AH
117782017-06-06 Alan Hayward <alan.hayward@arm.com>
11779
11780 * alpha-tdep.c (alpha_register_to_value): Use
11781 get_frame_register_value.
11782 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11783
ae0d01d6
AH
117842017-06-06 Alan Hayward <alan.hayward@arm.com>
11785
11786 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11787 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11788 (ia64_value_to_register): Likewise.
11789 (ia64_extract_return_value): Likewise.
11790 (ia64_store_return_value): Likewise.
11791 (ia64_push_dummy_call): Likewise.
11792
49cf576c
JB
117932017-06-04 Joel Brobecker <brobecker@adacore.com>
11794
11795 GDB 8.0 released.
11796
26b6a6ab
SM
117972017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11798
11799 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11800
22827c51
SM
118012017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11802
11803 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11804 parameter.
11805 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11806
0e05cf3a
SM
118072017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11808
11809 * event-loop.c (poll_timers): Unallocate timer using delete
11810 instead of xfree.
11811
c1fc2657
SM
118122017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11813
11814 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11815 (struct breakpoint) <~breakpoint>: New.
11816 (struct watchpoint): Inherit from breakpoint.
11817 <~watchpoint>: New.
11818 <base>: Remove.
11819 (struct tracepoint): Inherit from breakpoint.
11820 <base>: Remove.
11821 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11822 (struct longjmp_breakpoint): Inherit from breakpoint.
11823 <~longjmp_breakpoint>: New.
11824 <base>: Remove.
11825 (new_breakpoint_from_type): Remove casts.
11826 (watchpoint_in_thread_scope): Remove reference to base field.
11827 (watchpoint_del_at_next_stop): Likewise.
11828 (update_watchpoint): Likewise.
11829 (watchpoint_check): Likewise.
11830 (bpstat_check_watchpoint): Likewise.
11831 (set_longjmp_breakpoint): Likewise.
11832 (struct fork_catchpoint): Inherit from breakpoint.
11833 <base>: Remove.
11834 (struct solib_catchpoint): Inherit from breakpoint.
11835 <~solib_catchpoint>: New.
11836 <base>: Remove.
11837 (dtor_catch_solib): Change to ...
11838 (solib_catchpoint::~solib_catchpoint): ... this.
11839 (breakpoint_hit_catch_solib): Remove reference to base field.
11840 (add_solib_catchpoint): Likewise.
11841 (create_fork_vfork_event_catchpoint): Likewise.
11842 (struct exec_catchpoint): Inherit from breakpoint.
11843 <~exec_catchpoint>: New.
11844 <base>: Remove.
11845 (dtor_catch_exec): Change to ...
11846 (exec_catchpoint::~exec_catchpoint): ... this.
11847 (dtor_watchpoint): Change to ...
11848 (watchpoint::~watchpoint): ... this.
11849 (watch_command_1): Remove reference to base field.
11850 (catch_exec_command_1): Likewise.
11851 (base_breakpoint_dtor): Change to ...
11852 (breakpoint::~breakpoint): ... this.
11853 (base_breakpoint_ops): Remove dtor field value.
11854 (longjmp_bkpt_dtor): Change to ...
11855 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11856 (strace_marker_create_breakpoints_sal): Remove reference to base
11857 field.
11858 (delete_breakpoint): Don't manually call breakpoint destructor.
11859 (create_tracepoint_from_upload): Remove reference to base field.
11860 (trace_pass_set_count): Likewise.
11861 (initialize_breakpoint_ops): Don't initialize
11862 momentary_breakpoint_ops, don't set dtors.
11863 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11864 <~ada_catchpoint>: New.
11865 <base>: Remove.
11866 (create_excep_cond_exprs): Remove reference to base field.
11867 (dtor_exception): Change to ...
11868 (ada_catchpoint::~ada_catchpoint): ... this.
11869 (dtor_catch_exception): Remove.
11870 (dtor_catch_exception_unhandled): Remove.
11871 (dtor_catch_assert): Remove.
11872 (create_ada_exception_catchpoint): Remove reference to base
11873 field.
11874 (initialize_ada_catchpoint_ops): Don't set dtors.
11875 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11876 breakpoint.
11877 <~signal_catchpoint>: New.
11878 <base>: Remove.
11879 (signal_catchpoint_dtor): Change to ...
11880 (signal_catchpoint::~signal_catchpoint): ... this.
11881 (create_signal_catchpoint): Remove reference to base field.
11882 (initialize_signal_catchpoint_ops): Don't set dtor.
11883 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11884 from breakpoint.
11885 <~syscall_catchpoint>: New.
11886 <base>: Remove.
11887 (dtor_catch_syscall): Change to ...
11888 (syscall_catchpoint::~syscall_catchpoint): ... this.
11889 (create_syscall_event_catchpoint): Remove reference to base
11890 field.
11891 (initialize_syscall_catchpoint_ops): Don't set dtor.
11892 * break-catch-throw.c (struct exception_catchpoint): Inherit
11893 from breakpoint.
11894 <~exception_catchpoint>: New.
11895 <base>: Remove.
11896 (dtor_exception_catchpoint): Change to ...
11897 (exception_catchpoint::~exception_catchpoint): ... this.
11898 (handle_gnu_v3_exceptions): Remove reference to base field.
11899 (initialize_throw_catchpoint_ops): Don't set dtor.
11900 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11901 field.
11902 * remote.c (remote_get_tracepoint_status): Likewise.
11903 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11904 * tracefile.c (tracefile_fetch_registers): Likewise.
11905 * tracepoint.c (actions_command): Likewise.
11906 (validate_actionline): Likewise.
11907 (tfind_1): Likewise.
11908 (get_traceframe_location): Likewise.
11909 (find_matching_tracepoint_location): Likewise.
11910 (parse_tracepoint_status): Likewise.
11911 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11912
3b0871f4
SM
119132017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11914
11915 * breakpoint.c (struct longjmp_breakpoint): New struct.
11916 (is_tracepoint_type): Change return type to bool.
11917 (is_longjmp_type): New function.
11918 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11919 (set_raw_breakpoint_without_location): Use
11920 new_breakpoint_from_type.
11921 (set_raw_breakpoint): Likewise.
11922
a5e364af
SM
119232017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11924
11925 * breakpoint.c (new_breakpoint_from_type): New function.
11926 (create_breakpoint_sal): Use new_breakpoint_from_type and
11927 unique_ptr.
11928 (create_breakpoint): Likewise.
11929
ae3b3f34
SM
119302017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11931
11932 * memattr.c (mem_info_command): Rename to ...
11933 (info_mem_command): ... this.
11934 (mem_enable_command): Rename to ...
11935 (enable_mem_command): ... this.
11936 (mem_disable_command): Rename to ...
11937 (disable_mem_command): ... this.
11938 (mem_delete_command): Rename to ...
11939 (delete_mem_command): ... this.
11940 (_initialize_mem): Adjust function names.
11941
13ace077
MM
119422017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11943
11944 * btrace.c (handle_pt_insn_events): New.
11945 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11946 STATUS. Split into this and ...
11947 (handle_pt_insn_event_flags): ... this.
11948
c56ccc05
MM
119492017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11950
11951 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11952 and struct pt_insn.resynced.
11953 * configure: Regenerated.
11954 * config.in: Regenerated.
11955
08c3f6d2
TW
119562017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11957
11958 * btrace.c (ftrace_find_call_by_number): New function.
11959 (ftrace_new_function): Store objects, not pointers.
11960 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11961 ftrace_new_gap, ftrace_update_function,
11962 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11963 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11964 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11965 btrace_ends_with_single_insn, btrace_call_get): Account for
11966 btrace_thread_info::functions now storing objects.
11967 * btrace.h (struct btrace_thread_info): Add constructor.
11968 (struct btrace_thread_info) <functions>: Make std::vector.
11969 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11970 Initialize with default values.
11971 * record-btrace.c (record_btrace_frame_sniffer): Account for
11972 btrace_thread_info::functions now storing objects.
11973
8ffd39f2
TW
119742017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11975
11976 * btrace.c: Remove typedef bfun_s.
11977 (ftrace_new_gap): Directly add gaps to the list of gaps.
11978 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11979 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11980 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11981 instead of gdb VEC.
11982
4aeb0dfc
TW
119832017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11984
11985 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11986 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11987 with btrace_thread_info::next_segment and
11988 btrace_thread_info::prev_segment.
11989 * btrace.h: Remove struct btrace_func_link.
11990 (struct btrace_function): Replace pair of function segment pointers
11991 with pair of indices.
11992 * python/py-record-btrace.c (btpy_call_prev_sibling,
11993 btpy_call_next_sibling): Replace references to
11994 btrace_thread_info::segment with btrace_thread_info::next_segment and
11995 btrace_thread_info::prev_segment.
11996 * record-btrace.c (record_btrace_frame_this_id): Use
11997 btrace_find_call_by_number.
11998
eb8f2b9c
TW
119992017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12000
12001 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12002 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12003 btrace_insn_next, btrace_insn_prev): Remove references to
12004 btrace_thread_info::flow.
12005 * btrace.h (struct btrace_function): Remove FLOW.
12006
42bfe59e
TW
120072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12008
12009 * btrace.c (ftrace_find_call_by_number): New function.
12010 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12011 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12012 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12013 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12014 index.
12015 * btrace.h (struct btrace_function): Turn UP into an index.
12016 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12017 as an index.
12018 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12019 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12020 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12021
b54b03bd
TW
120222017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12023
12024 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12025 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12026 ftrace_update_function, ftrace_compute_global_level_offset,
12027 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12028 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12029 btrace_insn_end, btrace_is_empty): Remove references to
12030 btrace_thread_info::begin and btrace_thread_info::end.
12031 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12032 (struct btrace_thread_info) <functions>: Adjust comment.
12033 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12034 btrace_thread_info::begin.
12035
8286623c
TW
120362017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12037
12038 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12039 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12040 ftrace_update_function): Remove arguments that implicitly were always
12041 BTINFO->END.
12042 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12043 Don't pass BTINFO->END.
12044
a0f1b963
TW
120452017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12046
12047 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12048 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12049 btrace_find_insn_by_number): Replace function segment pointer with
12050 index.
12051 (btrace_insn_cmp): Simplify.
12052 * btrace.h: (struct btrace_insn_iterator) Rename index to
12053 insn_index. Replace function segment pointer with index into function
12054 segment vector.
12055 * record-btrace.c (record_btrace_call_history): Replace function
12056 segment pointer use with index.
12057 (record_btrace_frame_sniffer): Retrieve function call segment through
12058 vector.
12059 (record_btrace_set_replay): Remove defunc't safety check.
12060
f158f208
TW
120612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12062
12063 * btrace.c (btrace_ends_with_single_insn): New function.
12064 (btrace_call_get, btrace_call_number, btrace_call_begin,
12065 btrace_call_end, btrace_call_next, btrace_call_prev,
12066 btrace_find_call_by_number): Use index into call segment vector
12067 instead of pointer.
12068 (btrace_call_cmp): Simplify.
12069 * btrace.h (struct btrace_call_iterator): Replace function call segment
12070 pointer with index into vector.
12071 * record-btrace.c (record_btrace_call_history): Use index instead of
12072 pointer.
12073
521103fd
TW
120742017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12075
12076 * btrace.c (btrace_insn_begin, btrace_insn_end,
12077 btrace_find_insn_by_number): Add btinfo to iterator.
12078 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12079
17b89b34
TW
120802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12081
12082 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12083 and save pointers directly.
12084 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12085 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12086 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12087 changed signature of functions.
12088 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12089 (btrace_fetch): Remove code that adds btrace_function pointers to
12090 vector of btrace_functions.
12091 (btrace_clear): Simplify freeing vector of btrace_functions.
12092
2b51eddc
TW
120932017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12094
12095 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12096 Replace VEC_* with std::vector functions.
12097 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12098 (struct btrace_thread_info)<functions>: Change type to std::vector.
12099
db6be0d5
SM
121002017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12101
12102 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12103 "Removed targets and native configurations" up. Merge duplicate
12104 "New commands" sub-sections. Add "New options" sub-sections.
12105
b057297a
AH
121062017-05-26 Alan Hayward <alan.hayward@arm.com>
12107
12108 * defs.h (copy_integer_to_size): New declaration.
12109 * findvar.c (copy_integer_to_size): New function.
12110 (do_cint_test): New selftest function.
12111 (copy_integer_to_size_test): Likewise.
12112 (_initialize_findvar): Likewise.
12113 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12114 (mips_fbsd_collect_reg): Use raw_collect_integer.
12115 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12116 (mips64_fill_gregset): Use raw_collect_integer
12117 (mips64_fill_fpregset): Use raw_supply_integer.
12118 * regcache.c (regcache::raw_supply_integer): New function.
12119 (regcache::raw_collect_integer): Likewise.
12120 * regcache.h: (regcache::raw_supply_integer): New declaration.
12121 (regcache::raw_collect_integer): Likewise.
12122
b77b02a5
YQ
121232017-05-24 Yao Qi <yao.qi@linaro.org>
12124
12125 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12126 (COMMON_OBS): Add gdbarch-selftests.o.
12127 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12128 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12129 * gdbarch-selftests.c: New file.
12130 * regcache.h (regcache) <~regcache>: Mark it virtual if
12131 GDB_SELF_TEST.
12132 <raw_write>: Likewise.
12133
e521e87e
YQ
121342017-05-24 Yao Qi <yao.qi@linaro.org>
12135
12136 * regcache.c (current_regcache): Change it to
12137 regcache::current_regcache.
12138 (regcache_observer_target_changed): Update.
12139 (regcache_thread_ptid_changed): Make it a regcache static
12140 method.
12141 (regcache_thread_ptid_changed): Update.
12142 (class regcache_access): New.
12143 (current_regcache_test): Update.
12144 (_initialize_regcache): Update.
12145 * regcache.h: Include forward_list.
12146 (regcache): Declare regcache_thread_ptid_changed and declare
12147 registers_changed_ptid as friend.
12148
d8e07dda
YQ
121492017-05-24 Yao Qi <yao.qi@linaro.org>
12150
12151 * i387-tdep.c (i387_register_to_value): Use register_size
12152 instead of TYPE_LENGTH.
12153 * m68k-tdep.c (m68k_register_to_value): Likewise.
12154
8c8f9122
YQ
121552017-05-24 Yao Qi <yao.qi@linaro.org>
12156
12157 * i387-tdep.c (i387_convert_register_p): Return false if type
12158 code isn't TYPE_CODE_FLT.
12159
68fce50f
YQ
121602017-05-24 Yao Qi <yao.qi@linaro.org>
12161
12162 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12163 length is 4.
12164 (alpha_register_to_value): Remove type length check.
12165 (alpha_value_to_register): Likewise.
12166
88954b49
YQ
121672017-05-24 Yao Qi <yao.qi@linaro.org>
12168
12169 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12170 TYPE_CODE_FLT.
12171
e3ec9b69
YQ
121722017-05-24 Yao Qi <yao.qi@linaro.org>
12173
12174 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12175 TYPE_CODE_FLT or not.
12176
cdd238da
YQ
121772017-05-24 Yao Qi <yao.qi@linaro.org>
12178
12179 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12180 * avr-tdep.c (avr_gdbarch_init): Likewise.
12181 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12182 * cris-tdep.c (cris_gdbarch_init): Likewise.
12183 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12184 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12185 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12186 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12187 * mep-tdep.c (mep_gdbarch_init): Likewise.
12188 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12189 * mips-tdep.c (mips_gdbarch_init): Likewise.
12190 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12191 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12192 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12193 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12194 * v850-tdep.c (v850_gdbarch_init): Likewise.
12195
7a3929c4
YQ
121962017-05-24 Yao Qi <yao.qi@linaro.org>
12197
12198 * selftest-arch.c (tests_with_arch): Call registers_changed
12199 and reinit_frame_cache.
12200 * selftest.c (run_self_tests): Likewise.
12201
f4985dba
YQ
122022017-05-24 Yao Qi <yao.qi@linaro.org>
12203
12204 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12205 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12206
ab20fa4a
YQ
122072017-05-24 Yao Qi <yao.qi@linaro.org>
12208
12209 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12210 set_gdbarch_print_insn.
12211
f532ab94
YQ
122122017-05-24 Yao Qi <yao.qi@linaro.org>
12213
12214 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12215 set_gdbarch_print_insn.
12216
39503f82
YQ
122172017-05-24 Yao Qi <yao.qi@linaro.org>
12218
12219 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12220 set_gdbarch_print_insn.
12221 * arc-tdep.c (arc_gdbarch_init): Likewise.
12222 * arch-utils.c: include dis-asm.h.
12223 (default_print_insn): New function.
12224 * arch-utils.h (default_print_insn): Declare.
12225 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12226 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12227 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12228 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12229 * frv-tdep.c (frv_gdbarch_init): Likewise.
12230 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12231 * gdbarch.sh (print_insn): Use default_print_insn.
12232 * gdbarch.c: Regenerated.
12233 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12234 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12235 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12236 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12237 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12238 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12239 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12240 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12241 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12242 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12243 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12244 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12245 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12246 * mt-tdep.c (mt_gdbarch_init): Likewise.
12247 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12248 * nios2-tdep.c (nios2_print_insn): Remove.
12249 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12250 * rx-tdep.c (rx_gdbarch_init): Likewise.
12251 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12252 * score-tdep.c (score_print_insn): Remove.
12253 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12254 * sh-tdep.c (sh_gdbarch_init): Likewise.
12255 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12256 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12257 * tic6x-tdep.c (tic6x_print_insn): Remove.
12258 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12259 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12260 * v850-tdep.c (v850_gdbarch_init): Likewise.
12261 * vax-tdep.c (vax_gdbarch_init): Likewise.
12262 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12263 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12264
f7241d4f
JB
122652017-05-23 John Baldwin <jhb@FreeBSD.org>
12266
12267 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12268 (MIPS_FP0_REGNUM): Remove.
12269 (MIPS_FSR_REGNUM): Remove.
12270 (mips_fbsd_supply_fpregs): Use mips_regnum.
12271 (mips_fbsd_supply_gregs): Likewise.
12272 (mips_fbsd_collect_fpregs): Likewise.
12273 (mips_fbsd_collect_gregs): Likewise.
12274
d489d81d
JB
122752017-05-23 John Baldwin <jhb@FreeBSD.org>
12276
12277 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12278 (getpfpregs_supplies): New function.
12279 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12280 getfpregs_supplies.
12281 (mips_fbsd_store_inferior_registers): Likewise.
12282
e11b3cdc
PA
122832017-05-22 Pedro Alves <palves@redhat.com>
12284
12285 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12286 maintainer.
12287
0f068fb5
AH
122882017-05-22 Alan Hayward <alan.hayward@arm.com>
12289
12290 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12291 (store_register): Likewise.
12292 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12293 (get_decimal_float_return_value): Likewise.
12294 (do_ppc_sysv_return_value): Likewise.
12295 (ppc64_sysv_abi_push_integer): Likewise.
12296 (ppc64_sysv_abi_push_freg): Likewise.
12297 (ppc64_sysv_abi_return_value_base): Likewise.
12298 (ppc64_sysv_abi_return_value): Likewise.
12299 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12300 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12301 * rs6000-nat.c: Likewise.
12302 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12303 (rs6000_value_to_register): Likewise.
12304 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12305
e6cf65f2
TT
123062017-05-21 Tom Tromey <tom@tromey.com>
12307
12308 PR rust/21466:
12309 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12310 arrays as "[T]", not "[T; ]".
12311
43cc5389
TT
123122017-05-19 Tom Tromey <tom@tromey.com>
12313
12314 PR rust/21484:
12315 * rust-lang.c (exp_descriptor_rust): New function.
12316 (rust_language_defn): Use it.
12317 * p-lang.c (pascal_language_defn): Update.
12318 * opencl-lang.c (opencl_language_defn): Update.
12319 * objc-lang.c (objc_language_defn): Update.
12320 * m2-lang.c (m2_language_defn): Update.
12321 * language.h (struct language_defn)
12322 <la_watch_location_expression>: New member.
12323 * language.c (unknown_language_defn, auto_language_defn)
12324 (local_language_defn): Update.
12325 * go-lang.c (go_language_defn): Update.
12326 * f-lang.c (f_language_defn): Update.
12327 * d-lang.c (d_language_defn): Update.
12328 * c-lang.h (c_watch_location_expression): Declare.
12329 * c-lang.c (c_watch_location_expression): New function.
12330 (c_language_defn, cplus_language_defn, asm_language_defn)
12331 (minimal_language_defn): Use it.
12332 * breakpoint.c (watch_command_1): Call
12333 la_watch_location_expression.
12334 * ada-lang.c (ada_language_defn): Update.
12335
7a6e7fcc
RO
123362017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12337
6e7e1744
RO
12338 PR tui/21482
12339 * gdb_curses.h (NOMACROS): Define.
12340 (NCURSES_NOMACROS): Define.
12341
123422017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12343
12344 PR tui/21482
7a6e7fcc
RO
12345 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12346 arg to char *.
12347 * tui/tui-wingeneral.c (box_win): Likewise.
12348 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12349 (tui_show_source_line): Likewise.
12350 (tui_show_exec_info_content): Likewise.
12351
1933fd8e
VM
123522017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12353
12354 * sparc-tdep.c (sparc_structure_return_p)
12355 (sparc_arg_on_registers_p): New functions.
12356 (sparc32_store_arguments): Use them.
12357 * sparc64-tdep.c (sparc64_16_byte_align_p)
12358 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12359 Handle TYPE_CODE_ARRAY.
12360
21873064
YQ
123612017-05-17 Yao Qi <yao.qi@linaro.org>
12362
12363 * cli/cli-decode.c (add_alias_cmd): New function.
12364 * command.h (add_alias_cmd): Declare.
12365 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12366 instead call add_alias_cmd.
12367
2b351b19
PA
123682017-05-17 Pedro Alves <palves@redhat.com>
12369
12370 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12371 (nat_makefile_frag): ... this. All references updated.
12372 * configure.ac: Likewise.
12373 * configure.nat: Likewise. Enhance comments.
12374 * configure: Regenerate.
12375
5f2ad7a3
RO
123762017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12377
12378 * procfs.c (procfs_create_inferior): Change prototype to match
12379 definition.
12380
adf3dde5
EZ
123812017-05-13 Eli Zaretskii <eliz@gnu.org>
12382
12383 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12384 C++ compiler warning.
12385
6830f270
TT
123862017-05-12 Tom Tromey <tom@tromey.com>
12387
12388 PR rust/21483:
12389 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12390 recurse, just call value_struct_elt directly.
12391
68f2f2e3
TT
123922017-05-12 Tom Tromey <tom@tromey.com>
12393
12394 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12395 OP_RUST_ARRAY>: Fix.
12396
256afbc2
TT
123972017-05-12 Tom Tromey <tom@tromey.com>
12398
12399 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12400
94bb8dfe
YQ
124012017-05-09 Yao Qi <yao.qi@linaro.org>
12402
12403 * regcache.c: Include <forward_list>.
12404 (struct regcache_list): Remove.
12405 (current_regcache): Update.
12406 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12407 (regcache_thread_ptid_changed): Likewise.
12408 (registers_changed_ptid): Likewise.
12409 (current_regcache_size): Likewise.
12410
8248946c
YQ
124112017-05-09 Yao Qi <yao.qi@linaro.org>
12412
12413 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12414 (current_regcache_size): New function.
12415 (current_regcache_test): New function.
12416 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12417
313c5961
AH
124182017-05-08 Alan Hayward <alan.hayward@arm.com>
12419
12420 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12421 (print_gp_register_row): Use get_frame_register_value.
12422
27bfc1d1
AH
124232017-05-08 Alan Hayward <alan.hayward@arm.com>
12424
12425 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12426 (mips_supply_fpregset): Likewise.
12427 (mips64_supply_gregset): Likewise.
12428
146e6c5c
AH
124292017-05-08 Alan Hayward <alan.hayward@arm.com>
12430
12431 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12432 regcache->raw_supply_zeroed.
12433
e50f25ec
SDJ
124342017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12435
12436 * configure.nat: Rearrange 'case' statements to match
12437 host before cpu.
12438
21ea5acd
SDJ
124392017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12440
12441 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12442 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12443 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12444 "@nat_extra_makefile_frag@".
12445 (Makefile): Remove dependency on "@frags@".
12446 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12447 (data-directory/Makefile): Likewise.
12448 * config/aarch64/linux.mh: Deleted; moved contents to
12449 "gdb/configure.nat".
12450 * config/alpha/alpha-linux.mh: Likewise.
12451 * config/alpha/nbsd.mh: Likewise.
12452 * config/arm/linux.mh: Likewise.
12453 * config/arm/nbsdelf.mh: Likewise.
12454 * config/i386/cygwin.mh: Likewise.
12455 * config/i386/cygwin64.mh: Likewise.
12456 * config/i386/darwin.mh: Likewise.
12457 * config/i386/fbsd.mh: Likewise.
12458 * config/i386/fbsd64.mh: Likewise.
12459 * config/i386/go32.mh: Likewise.
12460 * config/i386/i386gnu.mh: Likewise.
12461 * config/i386/i386sol2.mh: Likewise.
12462 * config/i386/linux.mh: Likewise.
12463 * config/i386/linux64.mh: Likewise.
12464 * config/i386/mingw.mh: Likewise.
12465 * config/i386/mingw64.mh: Likewise.
12466 * config/i386/nbsd64.mh: Likewise.
12467 * config/i386/nbsdelf.mh: Likewise.
12468 * config/i386/nto.mh: Likewise.
12469 * config/i386/obsd.mh: Likewise.
12470 * config/i386/obsd64.mh: Likewise.
12471 * config/i386/sol2-64.mh: Likewise.
12472 * config/ia64/linux.mh: Likewise.
12473 * config/m32r/linux.mh: Likewise.
12474 * config/m68k/linux.mh: Likewise.
12475 * config/m68k/nbsdelf.mh: Likewise.
12476 * config/m68k/obsd.mh: Likewise.
12477 * config/m88k/obsd.mh: Likewise.
12478 * config/mips/fbsd.mh: Likewise.
12479 * config/mips/linux.mh: Likewise.
12480 * config/mips/nbsd.mh: Likewise.
12481 * config/mips/obsd64.mh: Likewise.
12482 * config/pa/linux.mh: Likewise.
12483 * config/pa/nbsd.mh: Likewise.
12484 * config/pa/obsd.mh: Likewise.
12485 * config/powerpc/aix.mh: Likewise.
12486 * config/powerpc/fbsd.mh: Likewise.
12487 * config/powerpc/linux.mh: Likewise.
12488 * config/powerpc/nbsd.mh: Likewise.
12489 * config/powerpc/obsd.mh: Likewise.
12490 * config/powerpc/ppc64-linux.mh: Likewise.
12491 * config/powerpc/spu-linux.mh: Likewise.
12492 * config/s390/linux.mh: Likewise.
12493 * config/sh/nbsd.mh: Likewise.
12494 * config/sparc/fbsd.mh: Likewise.
12495 * config/sparc/linux.mh: Likewise.
12496 * config/sparc/linux64.mh: Likewise.
12497 * config/sparc/nbsd64.mh: Likewise.
12498 * config/sparc/nbsdelf.mh: Likewise.
12499 * config/sparc/obsd64.mh: Likewise.
12500 * config/sparc/sol2.mh: Likewise.
12501 * config/tilegx/linux.mh: Likewise.
12502 * config/vax/nbsdelf.mh: Likewise.
12503 * config/vax/obsd.mh: Likewise.
12504 * config/xtensa/linux.mh: Likewise.
12505 * config/i386/i386gnu.mn: New file, with excerpts from
12506 "config/i386/i386gnu.mh".
12507 * configure: Regenerate.
12508 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12509 *.mh files under "gdb/config".
12510 * configure.nat: New file, with contents from the
12511 "gdb/config/*/*.mh" files.
12512
7ed1acaf
TW
125132017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12514
12515 * btrace.c (btrace_clear): Free insn vector.
12516
e13cb306
PA
125172017-05-05 Pedro Alves <palves@redhat.com>
12518
12519 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12520 * configure: Regenerate.
12521
5ed8105e
PA
125222017-05-04 Pedro Alves <palves@redhat.com>
12523
12524 * Makefile.in (SFILES): Add progspace-and-thread.c.
12525 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12526 (COMMON_OBS): Add progspace-and-thread.o.
12527 * breakpoint.c: Include "progspace-and-thread.h".
12528 (update_inserted_breakpoint_locations)
12529 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12530 Use scoped_restore_current_pspace_and_thread.
12531 (create_std_terminate_master_breakpoint): Use
12532 scoped_restore_current_program_space.
12533 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12534 (print_breakpoint_location): Use
12535 scoped_restore_current_program_space.
12536 (bp_loc_is_permanent): Use
12537 scoped_restore_current_pspace_and_thread.
12538 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12539 (download_tracepoint_locations): Use
12540 scoped_restore_current_pspace_and_thread.
12541 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12542 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12543 (enum step_over_calls_kind): Moved from inferior.h.
12544 (class scoped_restore_current_thread): New class.
12545 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12546 declaration.
12547 (scoped_restore_current_thread): New class.
12548 * infcmd.c: Include "common/gdb_optional.h".
12549 (continue_1, proceed_after_attach): Use
12550 scoped_restore_current_thread.
12551 (notice_new_inferior): Use scoped_restore_current_thread.
12552 * inferior.c: Include "progspace-and-thread.h".
12553 (restore_inferior, save_current_inferior): Delete.
12554 (add_inferior_command, clone_inferior_command): Use
12555 scoped_restore_current_pspace_and_thread.
12556 * inferior.h (scoped_restore_current_inferior): New class.
12557 * infrun.c: Include "progspace-and-thread.h" and
12558 "common/gdb_optional.h".
12559 (follow_fork_inferior): Use
12560 scoped_restore_current_pspace_and_thread.
12561 (scoped_restore_exited_inferior): New class.
12562 (handle_vfork_child_exec_or_exit): Use
12563 scoped_restore_exited_inferior,
12564 scoped_restore_current_pspace_and_thread,
12565 scoped_restore_current_thread and scoped_restore.
12566 (fetch_inferior_event): Use scoped_restore_current_thread.
12567 * linespec.c (decode_line_full, decode_line_1): Use
12568 scoped_restore_current_program_space.
12569 * mi/mi-main.c: Include "progspace-and-thread.h".
12570 (exec_continue): Use scoped_restore_current_thread.
12571 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12572 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12573 * proc-service.c (ps_pglobal_lookup): Use
12574 scoped_restore_current_program_space.
12575 * progspace-and-thread.c: New file.
12576 * progspace-and-thread.h: New file.
12577 * progspace.c (release_program_space, clone_program_space): Use
12578 scoped_restore_current_program_space.
12579 (restore_program_space, save_current_program_space)
12580 (save_current_space_and_thread): Delete.
12581 (switch_to_program_space_and_thread): Moved to
12582 progspace-and-thread.c.
12583 * progspace.h (save_current_program_space)
12584 (save_current_space_and_thread): Delete declarations.
12585 (scoped_restore_current_program_space): New class.
12586 * remote.c (remote_btrace_maybe_reopen): Use
12587 scoped_restore_current_thread.
12588 * symtab.c: Include "progspace-and-thread.h".
12589 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12590 * thread.c (print_thread_info_1): Use
12591 scoped_restore_current_thread.
12592 (struct current_thread_cleanup): Delete.
12593 (do_restore_current_thread_cleanup)
12594 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12595 (scoped_restore_current_thread::~scoped_restore_current_thread):
12596 ... this new dtor.
12597 (make_cleanup_restore_current_thread): Rename/convert to ...
12598 (scoped_restore_current_thread::scoped_restore_current_thread):
12599 ... this new ctor.
12600 (thread_apply_all_command): Use scoped_restore_current_thread.
12601 (thread_apply_command): Use scoped_restore_current_thread.
12602 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12603 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12604
f6223dbb
PA
126052017-05-04 Pedro Alves <palves@redhat.com>
12606
12607 * thread.c (make_cleanup_restore_current_thread): Move
12608 find_thread_ptid call before the is_stopped call. Assert that the
12609 thread is found. Replace is_stopped call by checking the thread's
12610 state directly. Remove unnecessary NULL-thread check.
12611
3c3ae77e
PA
126122017-05-04 Pedro Alves <palves@redhat.com>
12613
12614 * corelow.c (thread_section_name): New class.
12615 (get_core_register_section, get_core_siginfo): Use it.
12616
45eba0ab
AA
126172017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12618
12619 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12620 (get_core_register_section): Remove xfree of NULL pointer.
12621
f81fdd35
AH
126222017-05-03 Alan Hayward <alan.hayward@arm.com>
12623
12624 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12625 * regcache.c (regcache::raw_supply_zeroed): New function.
12626 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12627
35837774
SM
126282017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12629
12630 * gdbarch.sh: Remove commented out definition of
12631 TARGET_CHAR_BIT.
12632 * gdbarch.h: Re-generate.
12633
c94fee56
SDJ
126342017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12635
12636 * configure: Regenerate.
12637
d17f7b36
SM
126382017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12639
12640 * solib-target.c (solib_target_relocate_section_addresses):
12641 Remove num_section_bases, num_bases, segment_bases variables.
12642
b560ebd6
SM
126432017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12644
12645 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12646
f2f46dfc
SM
126472017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12648
12649 * solib-target.c: Include <vector>
12650 (struct lm_info_target) <~lm_info_target>: Remove.
12651 <segment_bases, section_bases>: Change type to
12652 std::vector<CORE_ADDR>.
12653 (library_list_start_segment, library_list_start_section,
12654 library_list_end_library,
12655 solib_target_relocate_section_addresses): Adjust.
12656
a0ff9e1a
SM
126572017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12658
12659 * gdbarch.sh (software_single_step): Change return type to
12660 std::vector<CORE_ADDR>.
12661 * gdbarch.c, gdbarch.h: Re-generate.
12662 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12663 Adjust.
12664 (arm_deal_with_atomic_sequence_raw): Adjust.
12665 (thumb_get_next_pcs_raw): Adjust.
12666 (arm_get_next_pcs_raw): Adjust.
12667 (arm_get_next_pcs): Adjust.
12668 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12669 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12670 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12671 (alpha_software_single_step): Adjust.
12672 * alpha-tdep.h (alpha_software_single_step): Adjust.
12673 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12674 * arm-tdep.c (arm_software_single_step): Adjust.
12675 (arm_breakpoint_kind_from_current_state): Adjust.
12676 * arm-tdep.h (arm_software_single_step): Adjust.
12677 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12678 * cris-tdep.c (cris_software_single_step): Adjust.
12679 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12680 (micromips_deal_with_atomic_sequence): Adjust.
12681 (deal_with_atomic_sequence): Adjust.
12682 (mips_software_single_step): Adjust.
12683 * mips-tdep.h (mips_software_single_step): Adjust.
12684 * moxie-tdep.c (moxie_software_single_step): Adjust.
12685 * nios2-tdep.c (nios2_software_single_step): Adjust.
12686 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12687 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12688 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12689 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12690 * sparc-tdep.c (sparc_software_single_step): Adjust.
12691 * spu-tdep.c (spu_software_single_step): Adjust.
12692 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12693
ea480a30
SM
126942017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12695
12696 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12697 * gdbarch.h: Re-generate.
12698
d050f7d7
TW
126992017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12700
12701 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12702 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12703 * python/py-instruction.c, python/py-instruction.h: New file.
12704 * python/py-record.c: Add py-instruction.h include.
12705 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12706 gdb.RecordInstruction.
12707 * python/python-internal.h: Add gdbpy_initialize_instruction
12708 declaration.
12709 * python/python.c (do_start_initialization): Add
12710 gdbpy_initialize_instruction.
12711
14f819c8
TW
127122017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12713
12714 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12715 Remove.
12716 (btrace_func_from_recpy_func): New function.
12717 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12718 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12719 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12720 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12721 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12722 Also, use new helper functions.
12723 (btpy_list_item): Use new helper functions.
12724 (recpy_bt_function_call_history): Use new type name.
12725 (btpy_call_getset): Remove.
12726 (gdbpy_initialize_btrace): Remove code to initialize
12727 gdb.BtraceFunctionCall.
12728 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12729 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12730 recpy_bt_func_prev, recpy_bt_func_next): New export.
12731 * python/py-record.c (recpy_func_type): New static object.
12732 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12733 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12734 recpy_func_next): New function.
12735 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12736 (recpy_func_getset): New static object.
12737 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12738 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12739
0ed5da75
TW
127402017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12741
12742 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12743 (btpy_object, btpy_insn_type, btpy_new): Remove.
12744 (btpy_list_object): Use gdb.RecordInstruction type instead of
12745 gdb.BtraceInstruction type.
12746 (btrace_insn_from_recpy_insn): New function.
12747 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12748 btpy_new.
12749 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12750 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12751 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12752 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12753 instead of btpy_object.
12754 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12755 btpy_insn_data, btpy_insn_decode): Rename to ...
12756 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12757 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12758 recpy_bt_insn_decode): This. Also, use new helper functions.
12759 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12760 recpy_insn_type.
12761 (btpy_insn_getset): Remove.
12762 (gdbpy_initialize_btrace): Remove code to initialize
12763 gdb.BtraceInstruction. Use recpy_element_object.
12764 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12765 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12766 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12767 * python/py-record.c (recpy_insn_type): New static object.
12768 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12769 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12770 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12771 New function.
12772 (recpy_insn_getset): New static object.
12773 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12774 * python/py-record.h (recpy_element_object): New typedef.
12775 (recpy_insn_type, recpy_insn_new): New export.
12776
913aeadd
TW
127772017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12778
12779 * py-record-btrace.c (btpy_insn_new): Removed.
12780 (btpy_insn_or_gap_new): New function.
12781 (btpy_insn_error): Removed.
12782 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12783 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12784 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12785 btpy_insn_or_gap_new instead of btpy_insn_new.
12786 (btpy_insn_getset): Remove btpy_insn_error.
12787 * py-record.c (recpy_gap_type): New static object.
12788 (recpy_gap_object): New typedef.
12789 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12790 recpy_gap_reason_string): New function.
12791 (recpy_gap_getset): New static object.
12792 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12793 * py-record.h (recpy_gap_new): New export.
12794
a3be24ad
TW
127952017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12796
12797 * python/py-record.c (recpy_ptid): Remove.
12798 (recpy_record_getset): Remove recpy_ptid.
12799
ae20e79a
TW
128002017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12801
12802 * btrace.c (btrace_fetch): Set inferior_ptid.
12803 * python/py-record-btrace.c: Add "py-record.h" include.
12804 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12805 recpy_bt_end, recpy_bt_instruction_history,
12806 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12807 in gdb.Record object instead of current ptid.
12808 * python/py-record.c: Include new "py-record.h" file.
12809 (recpy_record_object): Moved to py-record.h.
12810 * python/py-record.h: New file.
12811
8d0050ea
TW
128122017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12813
12814 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12815 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12816 indentation.
12817
3f380b50
JB
128182017-05-01 Joel Brobecker <brobecker@adacore.com>
12819
12820 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12821 the past maintainers section.
12822
07495424
YQ
128232017-04-28 Yao Qi <yao.qi@linaro.org>
12824
12825 * infcmd.c (get_return_value): Use regcache ctor, and remove
12826 cleanup.
12827
deb1fa3e
YQ
128282017-04-28 Yao Qi <yao.qi@linaro.org>
12829 Pedro Alves <palves@redhat.com>
12830
12831 * regcache.c (regcache::regcache): New tag dispatch ctor.
12832 (do_cooked_read): Moved above.
12833 (regcache_dup): Use the tag dispatch ctor..
12834 * regcache.h (regcache): Declare ctor, delete copy ctor and
12835 assignment operator, remove friend regcache_dup.
12836
b421c83c
YQ
128372017-04-28 Yao Qi <yao.qi@linaro.org>
12838
12839 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12840 call method save instead of regcache_cpy.
12841 * regcache.h (struct regcache): Make regcache_dup a friend.
12842
ef79d9a3
YQ
128432017-04-28 Yao Qi <yao.qi@linaro.org>
12844
12845 * regcache.c (struct regcache): Move to regcache.h
12846 (regcache::arch): New method.
12847 (regcache_get_ptid): Update.
12848 (get_regcache_arch): Call arch method.
12849 (get_regcache_aspace): Call method aspace.
12850 (register_buffer): Change it to method.
12851 (regcache_save): Change it to regcache::save.
12852 (regcache_restore): Likewise.
12853 (regcache_cpy_no_passthrough): Remove the declaration.
12854 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12855 (regcache_cpy_no_passthrough): Change it to method
12856 cpy_no_passthrough.
12857 (regcache_register_status): Change it to method
12858 get_register_status.
12859 (regcache_invalidate): Change it to method invalidate.
12860 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12861 (regcache_raw_update): Change it to method raw_update.
12862 (regcache_raw_read): Likewise.
12863 (regcache_raw_read_signed): Likewise.
12864 (regcache_raw_read_unsigned): Likewise.
12865 (regcache_raw_write_signed): Likewise.
12866 (regcache_raw_write_unsigned): Likewise.
12867 (regcache_cooked_read): Likewise.
12868 (regcache_cooked_read_value): Likewise.
12869 (regcache_cooked_read_signed): Likewise.
12870 (regcache_cooked_read_unsigned): Likewise.
12871 (regcache_cooked_write_signed): Likewise.
12872 (regcache_cooked_write_unsigned): Likewise.
12873 (regcache_raw_set_cached_value): Likewise.
12874 (regcache_raw_write): Likewise.
12875 (regcache_cooked_write): Likewise.
12876 (regcache_xfer_part): Likewise.
12877 (regcache_raw_read_part): Likewise.
12878 (regcache_raw_write_part): Likewise.
12879 (regcache_cooked_read_part): Likewise.
12880 (regcache_cooked_write_part): Likewise.
12881 (regcache_raw_supply): Likewise.
12882 (regcache_raw_collect): Likewise.
12883 (regcache_transfer_regset): Likewise.
12884 (regcache_supply_regset): Likewise.
12885 (regcache_collect_regset): Likewise.
12886 (regcache_debug_print_register): Likewise.
12887 (enum regcache_dump_what): Move it to regcache.h.
12888 (regcache_dump): Change it to method dump.
12889 * regcache.h (enum regcache_dump_what): New.
12890 (class regcache): New.
12891 * target.c (target_fetch_registers): Call method
12892 debug_print_register.
12893 (target_store_registers): Likewise.
12894
f8fdb78e
SM
128952017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12896
12897 * windows-nat.c (struct lm_info_windows): Initialize field.
12898 (windows_make_so): Allocate lm_info_windows with new.
12899 (windows_free_so): Free lm_info_windows with delete.
12900
9ccbfd7b
SM
129012017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12902
12903 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12904 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12905 cleanup.
12906 (darwin_free_so): Free lm_info_darwin with delete.
12907
76e75227
SM
129082017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12909
12910 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12911 <l_addr_p>: Change type to bool.
12912 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12913 (svr4_free_so): Free lm_info_svr4 with delete.
12914 (svr4_copy_library_list): Replace memcpy with call to copy
12915 constructor.
12916 (library_list_start_library, svr4_default_sos): Allocate
12917 lm_info_svr4 with new.
12918
51046d9e
SM
129192017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12920
12921 * solib-target.c (struct lm_info_target): Add destructor,
12922 initialize fields.
12923 <name>: Change type to std::string.
12924 (library_list_start_library): Allocate lm_info_target with new.
12925 (solib_target_free_library_list): Free lm_info_target with
12926 delete.
12927 (solib_target_current_sos): Adapt to std::string.
12928 (solib_target_free_so): Free lm_info_target with delete.
12929
4023ae76
SM
129302017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12931
12932 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12933 fields.
12934 (frv_current_sos): Allocate lm_info_frv with new.
12935 (frv_relocate_main_executable): Free lm_info_frv with delete,
12936 allocate with new.
12937 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12938
af43057b
SM
129392017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12940
12941 * solib-frv.c (struct lm_info_frv): Fix indentation.
12942
b0911207
SM
129432017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12944
12945 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12946 map field.
12947 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12948 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12949 and allocate with new.
12950 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12951
6c401f72
SM
129522017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12953
12954 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12955 <filename, member_name>: Change type to std::string.
12956 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12957 (library_list_start_library): Allocate lm_info_aix with new.
12958 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12959 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12960 with copy constructor.
12961
d0e449a1
SM
129622017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12963
12964 * solist.h (struct lm_info): Remove.
12965 (struct lm_info_base): New class.
12966 (struct so_list) <lm_info>: Change type to lm_info_base *.
12967 * nto-tdep.c (struct lm_info): Remove.
12968 (lm_addr): Adjust.
12969 * solib-aix.c (struct lm_info): Rename to ...
12970 (struct lm_info_aix): ... this. Extend lm_info_base.
12971 (lm_info_p): Rename to ...
12972 (lm_info_aix_p): ... this, and adjust.
12973 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12974 solib_aix_parse_libraries, library_list_start_library,
12975 solib_aix_free_library_list, solib_aix_parse_libraries,
12976 solib_aix_get_library_list,
12977 solib_aix_relocate_section_addresses, solib_aix_free_so,
12978 solib_aix_get_section_offsets,
12979 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12980 Adjust.
12981 (struct solib_aix_inferior_data) <library_list>: Adjust.
12982 * solib-darwin.c (struct lm_info): Rename to ...
12983 (struct lm_info_darwin): ... this. Extend lm_info_base.
12984 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12985 * solib-dsbt.c (struct lm_info): Rename to ...
12986 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12987 (struct dsbt_info) <main_executable_lm_info): Adjust.
12988 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12989 dsbt_relocate_section_addresses): Adjust.
12990 * solib-frv.c (struct lm_info): Rename to ...
12991 (struct lm_info_frv): ... this. Extend lm_info_base.
12992 (main_executable_lm_info): Adjust.
12993 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12994 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12995 find_canonical_descriptor_in_load_object,
12996 frv_fdpic_find_canonical_descriptor): Adjust.
12997 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12998 to lm_info_svr4.
12999 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13000 svr4_clear_so, svr4_copy_library_list,
13001 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13002 svr4_current_sos, svr4_fetch_objfile_link_map,
13003 solist_update_incremental): Adjust.
13004 * solib-svr4.h (struct lm_info_svr4): Move here from
13005 solib-svr4.c.
13006 * solib-target.c (struct lm_info): Rename to ...
13007 (struct lm_info_target): ... this. Extend lm_info_base.
13008 (lm_info_p): Rename to ...
13009 (lm_info_target_p): ... this.
13010 (solib_target_parse_libraries, library_list_start_segment,
13011 library_list_start_section, library_list_start_library,
13012 library_list_end_library, solib_target_free_library_list,
13013 solib_target_current_sos, solib_target_free_so,
13014 solib_target_relocate_section_addresses): Adjust.
13015 * windows-nat.c (struct lm_info): Rename to ...
13016 (struct lm_info_windows): ... this. Extend lm_info_base.
13017 (windows_make_so, handle_load_dll, handle_unload_dll,
13018 windows_xfer_shared_libraries): Adjust.
13019
434a4023
SM
130202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13021
13022 * solib-darwin.c (struct darwin_so_list): Remove.
13023 (darwin_current_sos): Allocate an so_list object instead of a
13024 darwin_so_list, separately allocate an lm_info object.
13025 (darwin_free_so): Free lm_info.
13026
428544e8
JB
130272017-04-28 John Baldwin <jhb@FreeBSD.org>
13028
13029 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13030 with fprintf_filtered.
13031
4621115f
YQ
130322017-04-28 Yao Qi <yao.qi@linaro.org>
13033
13034 * regcache.c (regcache::regcache): New function.
13035 (regcache::~regcache): New function.
13036 (regcache_xmalloc_1): Remove.
13037 (regcache_xmalloc): Call new regcache.
13038 (regcache_xfree): Call delete regcache.
13039 (get_thread_arch_aspace_regcache): Call new regcache.
13040
339053c2
YQ
130412017-04-28 Yao Qi <yao.qi@linaro.org>
13042
13043 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13044 lwp instead of ptid_get_lwp.
13045
7974a605
YQ
130462017-04-28 Yao Qi <yao.qi@linaro.org>
13047
13048 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13049 lwp_info instead of getting from inferior_ptid.
13050
e15c3eb4
KS
130512017-04-27 Keith Seitz <keiths@redhat.com>
13052
13053 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13054 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13055 (CV_CONVERSION_BADNESS): Define.
13056 (rank_one_type): Remove overly restrictive rvalue reference
13057 rank checks.
13058 Add cv-qualifier checks and subranks for type equality.
13059 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13060 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13061 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13062
72bc1d24
SM
130632017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13064
13065 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13066 count when creating the object.
13067
55bcecda
UW
130682017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13069 Ulrich Weigand <uweigand@de.ibm.com>
13070
13071 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13072 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13073 is used in AIX.
13074 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13075 (process_xcoff_symbol): Likewise.
13076 (scan_xcoff_symtab): Likewise.
13077
5c99fcf8
AH
130782017-04-26 Alan Hayward <alan.hayward@arm.com>
13079
13080 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13081 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13082 (ia64_access_reg): Use get_frame_register_unsigned.
13083 (ia64_access_rse_reg): Likewise.
13084 (ia64_libunwind_frame_prev_register): Likewise.
13085
b41c5a85
JW
130862017-04-26 Jiong Wang <jiong.wang@arm.com>
13087
13088 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13089 * gdbarch.c: Regenerated.
13090 * gdbarch.h: Regenerated.
13091 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13092 visibility external.
13093 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13094 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13095 (enum cfa_how_kind): Move to ...
13096 (struct dwarf2_frame_state_reg_info): Likewise.
13097 (struct dwarf2_frame_state): Likewise.
13098 * dwarf2-frame.h: ... here.
13099 (dwarf2_frame_state_alloc_regs): New declaration.
13100 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13101 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13102
c185f580
AH
131032017-04-26 Alan Hayward <alan.hayward@arm.com>
13104
13105 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13106 regcache_raw_read_unsigned.
13107 (xtensa_pseudo_register_write): Likewise.
13108
19c45594
AH
131092017-04-26 Alan Hayward <alan.hayward@arm.com>
13110
13111 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13112 (nds32_pseudo_register_write): Likewise.
13113
4658f12e
YQ
131142017-04-25 Yao Qi <yao.qi@linaro.org>
13115
13116 * regcache.c (struct regcache) <readonly_p>: Change its type
13117 to bool.
13118 (regcache_xmalloc_1): Update parameter type and callers update.
13119
d581dda8
YQ
131202017-04-25 Yao Qi <yao.qi@linaro.org>
13121
13122 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13123 set_gdbarch_wchar_bit.
13124 * arm-tdep.c (arm_gdbarch_init): Likewise.
13125
debed3db
PA
131262017-04-25 Pedro Alves <palves@redhat.com>
13127
13128 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13129 (BothAreRelocatable, memcopy, memmove): Don't define.
13130 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13131 macros.
13132
b0b92aeb
PA
131332017-04-25 Pedro Alves <palves@redhat.com>
13134
13135 * common/common-defs.h: Include "common/poison.h".
13136 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13137 and adjust.
13138 * common/poison.h: New file.
13139 * common/traits.h: Include <type_traits>.
13140 (Not, Or, Requires): New, moved from common/function-view.h.
13141
16c4d54a
PA
131422017-04-25 Pedro Alves <palves@redhat.com>
13143
13144 * breakpoint.h (struct breakpoint): In-class initialize all
13145 fields. Make boolean fields "bool".
13146 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13147 memset call and initializations no longer necessary.
13148
b5c36682
PA
131492017-04-25 Pedro Alves <palves@redhat.com>
13150
13151 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13152 reference.
13153 (pt_btrace_insn): New function.
13154 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13155
5625a286
PA
131562017-04-25 Pedro Alves <palves@redhat.com>
13157
13158 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13159 "base" field and inherit from "bp_location" instead. Add
13160 non-default ctor.
13161 (allocate_location_exception): Use new non-default ctor.
13162 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13163 (init_bp_location): Convert to ...
13164 (bp_location::bp_location): ... this new ctor, and remove memset
13165 call.
13166 (base_breakpoint_allocate_location): Use the new non-default ctor.
13167 * breakpoint.h (bp_location): Now a class. Declare default and
13168 non-default ctors. In-class initialize all members.
13169 (init_bp_location): Remove declaration.
13170
23bcc18f
PA
131712017-04-25 Pedro Alves <palves@redhat.com>
13172
13173 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13174 assignment operator.
13175
e1ba3053
YQ
131762017-04-24 Yao Qi <yao.qi@linaro.org>
13177
13178 * doublest.c (convert_doublest_to_floatformat): Call
13179 floatformat_totalsize_bytes.
13180
10f489e5
TT
131812017-04-22 Tom Tromey <tom@tromey.com>
13182
13183 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13184 ui_out_emit_list.
13185 * stack.c (print_frame): Use ui_out_emit_list.
13186 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13187 ui_out_emit_list.
13188 * mi/mi-main.c (print_one_inferior)
13189 (mi_cmd_data_list_register_names)
13190 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13191 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13192 ui_out_emit_list.
13193 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13194 (mi_output_solib_attribs): Use ui_out_emit_list,
13195 ui_out_emit_tuple.
13196 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13197 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13198 (mi_cmd_stack_list_args, list_args_or_locals): Use
13199 ui_out_emit_list.
13200 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13201 * breakpoint.c (print_solib_event, output_thread_groups): Use
13202 ui_out_emit_list.
13203
0092b74d
TT
132042017-04-22 Tom Tromey <tom@tromey.com>
13205
13206 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13207 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13208 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13209
a14a62dd
TT
132102017-04-22 Tom Tromey <tom@tromey.com>
13211
13212 * tracepoint.c (tvariables_info_1)
13213 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13214
46b9c129
TT
132152017-04-22 Tom Tromey <tom@tromey.com>
13216
13217 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13218 annotate_arg_emitter.
13219 * breakpoint.c (print_mention_watchpoint)
13220 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13221 * annotate.h (struct annotate_arg_emitter): New.
13222
2e783024
TT
132232017-04-22 Tom Tromey <tom@tromey.com>
13224
13225 * record-btrace.c (record_btrace_insn_history)
13226 (record_btrace_insn_history_range, record_btrace_call_history)
13227 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13228 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13229 ui_out_emit_tuple.
13230 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13231 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13232 * skip.c (skip_info): Use ui_out_emit_tuple.
13233 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13234 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13235 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13236 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13237 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13238 ui_out_emit_tuple.
13239 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13240 (output_register, mi_cmd_data_read_memory)
13241 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13242 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13243 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13244 Use ui_out_emit_tuple.
13245 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13246 ui_out_emit_tuple.
13247 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13248 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13249 * linux-thread-db.c (info_auto_load_libthread_db): Use
13250 ui_out_emit_tuple.
13251 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13252 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13253 * disasm.c (do_mixed_source_and_assembly_deprecated)
13254 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13255 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13256 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13257 * breakpoint.c (print_one_breakpoint_location)
13258 (print_one_breakpoint): Use ui_out_emit_tuple.
13259 * auto-load.c (print_script, info_auto_load_cmd): Use
13260 ui_out_emit_tuple.
13261 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13262
9be21bb4
SM
132632017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13264
13265 * thread.c (print_thread_info_1): Remove dead code.
13266
0d4c07af
JK
132672017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13268
13269 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13270 GDB_SELF_TEST.
13271 * arm-tdep.c (selftests::arm_record_test): Likewise.
13272
4daf993d
YQ
132732017-04-21 Yao Qi <yao.qi@linaro.org>
13274
13275 * regcache.c (regcache_restore): Remove argument 2. Replace
13276 argument 3 with regcache. Get register status from
13277 src->register_status and get register contents from
13278 register_buffer (src, regnum).
13279 (regcache_cpy): Update.
13280
a6c21d4a
PA
132812017-04-19 Pedro Alves <palves@redhat.com>
13282
13283 * gdbthread.h (thread): Add missing closing parenthesis in
13284 comment.
13285
3a3fd0fd
PA
132862017-04-19 Pedro Alves <palves@redhat.com>
13287
13288 * common/refcounted-object.h: New file.
13289 * gdbthread.h: Include "common/refcounted-object.h".
13290 (thread_info): Inherit from refcounted_object and add comments.
13291 (thread_info::incref, thread_info::decref)
13292 (thread_info::m_refcount): Delete.
13293 (thread_info::deletable): Use the refcounted_object::refcount()
13294 method.
13295 * inferior.c (current_inferior_): Add comment.
13296 (set_current_inferior): Increment/decrement refcounts.
13297 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13298 not-deletable instead of comparing with the current inferior.
13299 (initialize_inferiors): Increment the initial inferior's refcount.
13300 * inferior.h (struct inferior): Forward declare.
13301 Include "common/refcounted-object.h".
13302 (current_inferior, set_current_inferior): Move declaration to
13303 before struct inferior's definition, and fix comment.
13304 (inferior): Inherit from refcounted_object. Add comments.
13305 * thread.c (switch_to_thread_no_regs): Reference the thread's
13306 inferior pointer directly instead of doing a ptid lookup.
13307 (switch_to_no_thread): New function.
13308 (switch_to_thread(thread_info *)): New function, factored out
13309 from ...
13310 (switch_to_thread(ptid_t)): ... this.
13311 (restore_current_thread): Delete.
13312 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13313 fields, and add 'inf' field.
13314 (do_restore_current_thread_cleanup): Check whether old->inf is
13315 alive instead of looking up an inferior by ptid. Use
13316 switch_to_thread and switch_to_no_thread.
13317 (restore_current_thread_cleanup_dtor): Use old->inf directly
13318 instead of lookup up an inferior by id. Decref the inferior.
13319 Don't restore 'removable'.
13320 (make_cleanup_restore_current_thread): Same the inferior pointer
13321 in old, instead of the inferior number. Incref the inferior.
13322 Don't save/clear 'removable'.
13323
9bcb1f16
PA
133242017-04-19 Pedro Alves <palves@redhat.com>
13325
13326 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13327 unittests/scoped_restore-selftests.c.
13328 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13329 * common/scoped_restore.h (scoped_restore_base): Make "class".
13330 (scoped_restore_base::release): New public method.
13331 (scoped_restore_base::scoped_restore_base): New protected ctor.
13332 (scoped_restore_base::m_saved_var): New protected field.
13333 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13334 scoped_restore_base base class instead of m_saved_var directly.
13335 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13336 (scoped_restore_tmpl::scoped_restore_tmpl(const
13337 scoped_restore_tmpl<T>&)): Likewise.
13338 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13339 method.
13340 (scoped_restore_tmpl::saved_var): New method.
13341 (scoped_restore_tmpl::m_saved_var): Delete.
13342 * inferior.h (inferior::detaching): Now a bool.
13343 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13344 cleanup.
13345 * unittests/scoped_restore-selftests.c: New file.
13346
26fcd539
PA
133472017-04-19 Pedro Alves <palves@redhat.com>
13348
13349 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13350 Re-sort in alphabetic order.
13351
fdd243b0
PA
133522017-04-18 Pedro Alves <palves@redhat.com>
13353
13354 * xml-support.c (obstack_xml_printf): Delete.
13355 * xml-support.h (obstack_xml_printf): Delete.
13356
4895cde2
PA
133572017-04-18 Pedro Alves <palves@redhat.com>
13358
13359 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13360 vdebug, verror, body_text, start_element, end_element, name,
13361 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13362 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13363 is_xinclude>: Make private and add m_ prefix.
13364 (gdb_xml_parser::body_text): New method, based on ...
13365 (gdb_xml_body_text): ... this. Adjust.
13366 (gdb_xml_parser::vdebug): New method, based on ...
13367 (gdb_xml_debug): ... this. Adjust.
13368 (gdb_xml_parser::verror): New method, based on ...
13369 (gdb_xml_error): ... this. Adjust.
13370 (gdb_xml_parser::start_element): New method, based on ...
13371 (gdb_xml_start_element): ... this. Adjust.
13372 (gdb_xml_start_element_wrapper): Defer to
13373 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13374 (gdb_xml_parser::end_element): New method, based on ...
13375 (gdb_xml_end_element_wrapper): ... this. Adjust.
13376 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13377 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13378 (gdb_xml_parser::use_dtd): New method, based on ...
13379 (gdb_xml_use_dtd): ... this. Adjust.
13380 (gdb_xml_parser::parse): New method, based on ...
13381 (gdb_xml_parse): ... this. Adjust.
13382 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13383 (xinclude_start_include): Adjust to call the parser's name method.
13384 (xml_xinclude_default, xml_xinclude_start_doctype)
13385 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13386 method.
13387 (xml_process_xincludes): Adjust to call parser methods.
13388 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13389 declarations.
13390
bd8a901f
PA
133912017-04-18 Pedro Alves <palves@redhat.com>
13392
13393 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13394 gdb::optional<std::string>.
13395 * xml-support.c: Include <string>.
13396 (scope_level::scope_level(scope_level &&))
13397 (scope_level::~scope_level): Delete.
13398 (scope_level::body): Now a std::string.
13399 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13400 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13401 parameter.
13402 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13403 (xinclude_parsing_data::output): Now a std::string reference.
13404 (xinclude_start_include): Adjust.
13405 (xml_xinclude_default): Adjust.
13406 (xml_process_xincludes): Add 'output' parameter, and return bool.
13407 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13408 and return bool.
13409 * xml-tdesc.c: Include <unordered_map> and <string>.
13410 (tdesc_xml_cache): Delete.
13411 (tdesc_xml_cache_s): Delete.
13412 (xml_cache): Now an std::unordered_map.
13413 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13414 (target_fetch_description_xml): Change return type to
13415 gdb::optional<std::string>, and adjust.
13416 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13417 (target_fetch_description_xml): Change return type to
13418 gdb::optional<std::string>.
13419
d35d1958
PA
134202017-04-18 Pedro Alves <palves@redhat.com>
13421
13422 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13423 unittests/optional-selftests.c.
13424 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13425 * unittests/optional-selftests.c: New file.
13426 * unittests/optional/assignment/1.cc: New file.
13427 * unittests/optional/assignment/2.cc: New file.
13428 * unittests/optional/assignment/3.cc: New file.
13429 * unittests/optional/assignment/4.cc: New file.
13430 * unittests/optional/assignment/5.cc: New file.
13431 * unittests/optional/assignment/6.cc: New file.
13432 * unittests/optional/assignment/7.cc: New file.
13433 * unittests/optional/cons/copy.cc: New file.
13434 * unittests/optional/cons/default.cc: New file.
13435 * unittests/optional/cons/move.cc: New file.
13436 * unittests/optional/cons/value.cc: New file.
13437 * unittests/optional/in_place.cc: New file.
13438 * unittests/optional/observers/1.cc: New file.
13439 * unittests/optional/observers/2.cc: New file.
13440
22796e97
PA
134412017-04-18 Pedro Alves <palves@redhat.com>
13442
13443 * common/gdb_optional.h: Include common/traits.h.
13444 (in_place_t): New type.
13445 (in_place): New constexpr variable.
13446 (optional::optional): Remove member initialization of
13447 m_instantiated.
13448 (optional::optional(in_place_t...)): New constructor.
13449 (optional::~optional): Use reset.
13450 (optional::optional(const optional&)): New.
13451 (optional::optional(const optional&&)): New.
13452 (optional::optional(T &)): New.
13453 (optional::optional(T &&)): New.
13454 (operator::operator=(const optional &)): New.
13455 (operator::operator=(optional &&)): New.
13456 (operator::operator= (const T &))
13457 (operator::operator= (T &&))
13458 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13459 (operator::reset): New.
13460 (operator::m_instantiated):: Add in-class initializer.
13461 * common/traits.h: Include <type_traits>.
13462 (struct And): New types.
13463
a7fc9b61
PA
134642017-04-18 Pedro Alves <palves@redhat.com>
13465
13466 * xml-support.c: Include <vector>.
13467 (scope_level::scope_level(const gdb_xml_element *))
13468 (scope_level::scope_level(scope_level&&)): New.
13469 (scope_level::~scope_level): New.
13470 (scope_level_s): Delete.
13471 (gdb_xml_parser::scopes): Now a std::vector.
13472 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13473 Use std::vector.
13474 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13475 scope cleanup code.
13476 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13477 of the scopes member. Use std::vector::emplace_back.
13478
010151c9
PA
134792017-04-18 Pedro Alves <palves@redhat.com>
13480
13481 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13482 a bool.
13483 (gdb_xml_end_element): Change type of first parameter.
13484 (gdb_xml_cleanup): Rename to ...
13485 (gdb_xml_parser::~gdb_xml_parser): ... this.
13486 (gdb_xml_create_parser_and_cleanup): Delete with ...
13487 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13488 to this new ctor.
13489 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13490 using gdb_xml_create_parser_and_cleanup.
13491 (xinclude_parsing_data): Add ctor/dtor.
13492 (xml_xinclude_cleanup): Delete.
13493 (xml_process_xincludes): Create a local xinclude_parsing_data
13494 instead of heap-allocating one. Create a local gdb_xml_parser
13495 instead of heap-allocating one with
13496 gdb_xml_create_parser_and_cleanup.
13497
d56060f0
JB
134982017-04-18 John Baldwin <jhb@FreeBSD.org>
13499
13500 PR threads/20743
13501 * fbsd-nat.c (resume_one_thread_cb): Remove.
13502 (resume_all_threads_cb): Remove.
13503 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13504 iterate_over_threads.
13505
305d16a9
JB
135062017-04-17 Joel Brobecker <brobecker@adacore.com>
13507
13508 * NEWS: Create a new section for the next release branch.
13509 Rename the section of the current branch, now that it has
13510 been cut.
13511
8bb57231
JB
135122017-04-17 Joel Brobecker <brobecker@adacore.com>
13513
13514 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13515 * version.in: Bump version to 8.0.50.DATE-git.
13516
096c92dd
SDJ
135172017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13518
13519 PR gdb/21385
13520 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13521 independently of the host, and fix build breakage on Cygwin.
13522
0550c955
PA
135232017-04-13 Pedro Alves <palves@redhat.com>
13524
13525 * inferior.c (free_inferior): Convert to ...
13526 (inferior::~inferior): ... this dtor.
13527 (inferior::inferior): New ctor, factored out from ...
13528 (add_inferior_silent): ... here. Allocate the inferior with a new
13529 expression.
13530 (delete_inferior): Call delete instead of free_inferior.
13531 * inferior.h (gdb_environ, continuation): Forward declare.
13532 (inferior): Now a class. Add in-class initialization to all
13533 members. Make boolean fields bool, except 'detaching'.
13534 (inferior::inferior): New explicit ctor.
13535 (inferior::~inferior): New.
13536
e3d60dfc
PA
135372017-04-13 Pedro Alves <palves@redhat.com>
13538
13539 * inferior.c (init_inferior_list): Delete.
13540 * inferior.h (init_inferior_list): Delete.
13541
5fd69d0a
PA
135422017-04-13 Pedro Alves <palves@redhat.com>
13543
13544 PR threads/13217
13545 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13546 (top level): Call it twice, with different thread sets.
13547
c6609450
PA
135482017-04-13 Pedro Alves <palves@redhat.com>
13549
13550 * thread.c: Include <algorithm>.
13551 (thread_array_cleanup): Delete.
13552 (scoped_inc_dec_ref): New class.
13553 (live_threads_count): New function.
13554 (set_thread_refcount): Delete.
13555 (tp_array_compar_ascending): Now a bool.
13556 (tp_array_compar): Convert to a std::sort comparison function.
13557 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13558 and live_threads_count.
13559
2a00d7ce
PA
135602017-04-13 Pedro Alves <palves@redhat.com>
13561
13562 * infrun.c (follow_fork_inferior): Also switch the current
13563 inferior.
13564
441d7c93
PA
135652017-04-13 Pedro Alves <palves@redhat.com>
13566
13567 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13568 before calling create_internal_breakpoint.
13569
808480f6
PA
135702017-04-13 Pedro Alves <palves@redhat.com>
13571
13572 * fork-child.c (execv_argv): New class.
13573 (breakup_args): Refactored as ...
13574 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13575 Copy arguments to storage and replace separators with NULL
13576 terminators in place.
13577 (escape_bang_in_quoted_argument): Adjust to return bool.
13578 (execv_argv::execv_argv): New ctor.
13579 (execv_argv::init_for_shell): New method, factored out from
13580 fork_inferior. Don't strdup strings into the vector.
13581 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13582 Remove free_vector_argv call.
13583
ad3d022a
YQ
135842017-04-13 Yao Qi <yao.qi@linaro.org>
13585
13586 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13587 tdep->rx_psw_type.
13588
e6ddc3bf
YQ
135892017-04-13 Yao Qi <yao.qi@linaro.org>
13590
13591 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13592 * rx-tdep.c (rx_gdbarch_init): Likewise.
13593
bfb8cf90
PA
135942017-04-13 Pedro Alves <palves@redhat.com>
13595
13596 * breakpoint.h (struct breakpoint): Reindent.
13597
f5336ca5
PA
135982017-04-13 Pedro Alves <palves@redhat.com>
13599
13600 * breakpoint.c (bp_location): Rename to ...
13601 (bp_locations): ... this. All references updated.
13602 (bp_location_count): Rename to ...
13603 (bp_locations_count): ... this. All references updated.
13604 (bp_location_placed_address_before_address_max): Rename to ...
13605 (bp_locations_placed_address_before_address_max): ... this. All
13606 references updated.
13607 (bp_location_shadow_len_after_address_max): Rename to ...
13608 (bp_locations_shadow_len_after_address_max): ... this. All
13609 references updated.
13610 (bp_location_compare_addrs): Rename to ...
13611 (bp_locations_compare_addrs): ... this. All references updated.
13612 (bp_location_compare):Rename to ...
13613 (bp_locations_compare): ... this. All references updated.
13614 (bp_location_target_extensions_update): Rename to ...
13615 (bp_locations_target_extensions_update): ... this. All references
13616 updated.
13617
be628ab8
SDJ
136182017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13619
13620 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13621 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13622 'sgtty.h'.
13623 * common/gdb_termios.h: New file, with parts of "terminal.h".
13624 * inflow.c: Include "gdb_termios.h".
13625 * ser-unix.c: Include "gdb_termios.h".
13626 * terminal.h: Move terminal-related defines to
13627 "common/gdb_termios.h".
13628
8e9e35b1
TT
136292017-04-12 Tom Tromey <tom@tromey.com>
13630
13631 * probe.c (parse_probes): Update.
13632 * location.h (delete_event_location): Don't declare.
13633 (event_location_deleter::operator()): Update.
13634 * location.c (event_location_deleter::operator()): Rename from
13635 delete_event_location.
13636 * linespec.h (linespec_result) <location>: Change type to
13637 event_location_up.
13638 * linespec.c (canonicalize_linespec, event_location_to_sals)
13639 (decode_objc): Update.
13640 (linespec_result): Don't call delete_event_location.
13641 * breakpoint.c (create_breakpoints_sal)
13642 (bkpt_probe_create_sals_from_location)
13643 (strace_marker_create_sals_from_location): Update.
13644
16e802b9
TT
136452017-04-12 Tom Tromey <tom@tromey.com>
13646
13647 * linespec.h (struct linespec_result): Add constructor and
13648 destructor.
13649 (init_linespec_result, destroy_linespec_result)
13650 (make_cleanup_destroy_linespec_result): Don't declare.
13651 * linespec.c (init_linespec_result): Remove.
13652 (linespec_result::~linespec_result): Rename from
13653 destroy_linespec_result. Update.
13654 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13655 Remove.
13656 * breakpoint.c (create_breakpoint, break_range_command)
13657 (decode_location_default): Update.
13658 * ax-gdb.c (agent_command_1): Update.
13659
d28cd78a
TT
136602017-04-12 Tom Tromey <tom@tromey.com>
13661
13662 * remote.c (remote_download_tracepoint): Update.
13663 * python/py-breakpoint.c (bppy_get_location): Update.
13664 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13665 (gdbscm_breakpoint_location): Update.
13666 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13667 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13668 Change type to event_location_up.
13669 * breakpoint.c (create_overlay_event_breakpoint)
13670 (create_longjmp_master_breakpoint)
13671 (create_std_terminate_master_breakpoint)
13672 (create_exception_master_breakpoint)
13673 (breakpoint_event_location_empty_p, print_breakpoint_location)
13674 (print_one_breakpoint_location, create_thread_event_breakpoint)
13675 (init_breakpoint_sal, create_breakpoint)
13676 (print_recreate_ranged_breakpoint, break_range_command)
13677 (init_ada_exception_breakpoint, say_where): Update.
13678 (base_breakpoint_dtor): Don't call delete_event_location.
13679 (bkpt_print_recreate, tracepoint_print_recreate)
13680 (dprintf_print_recreate, update_static_tracepoint)
13681 (breakpoint_re_set_default): Update.
13682
711799d5
TT
136832017-04-12 Tom Tromey <tom@tromey.com>
13684
13685 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13686 type of "to_do". Update.
13687 (compute_stack_depth): Use std::vector.
13688
52d214d3
TT
136892017-04-12 Tom Tromey <tom@tromey.com>
13690
13691 * printcmd.c (find_instruction_backward): Use std::vector.
13692
4c404b8b
TT
136932017-04-12 Tom Tromey <tom@tromey.com>
13694
13695 * symfile.c (objfilep): Remove typedef.
13696 (reread_symbols): Use a std::vector.
13697
156d9eab
TT
136982017-04-12 Tom Tromey <tom@tromey.com>
13699
13700 * mi/mi-main.c (exec_direction_forward): Remove.
13701 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13702 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13703 scoped_restore.
13704 * guile/guile.c (guile_repl_command, guile_command)
13705 (gdbscm_execute_gdb_command): Use scoped_restore.
13706 * go-exp.y (go_parse): Use scoped_restore.
13707 * d-exp.y (d_parse): Use scoped_restore.
13708 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13709 * c-exp.y (c_parse): Use scoped_restore.
13710
4d89769a
TT
137112017-04-12 Tom Tromey <tom@tromey.com>
13712
13713 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13714 (mi_parse): Update return type.
13715 (mi_parse_free): Remove.
13716 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13717 (mi_parse::~mi_parse): Rename from mi_parse_free.
13718 (mi_parse_cleanup): Remove.
13719 (mi_parse): Return a unique_ptr. Use new.
13720 * mi/mi-main.c (mi_execute_command): Update.
13721
4b217cc7
TT
137222017-04-12 Tom Tromey <tom@tromey.com>
13723
13724 * location.c (explicit_location_lex_one): Return a
13725 unique_xmalloc_ptr.
13726 (string_to_explicit_location): Update. Remove cleanups.
13727
59d3651b
TT
137282017-04-12 Tom Tromey <tom@tromey.com>
13729
13730 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13731 (compare_value_and_voffset): Change type. Update.
13732 (compute_vtable_size): Change type of "offset_vec".
13733 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13734 (gnuv3_get_typeid): Remove extraneous declaration.
13735
b24b0d6c
TT
137362017-04-12 Tom Tromey <tom@tromey.com>
13737
13738 * charset.h (wchar_iterator): Fix comment.
13739
80a3b8c5
TT
137402017-04-12 Tom Tromey <tom@tromey.com>
13741
13742 * charset.c (iconv_wrapper): New class.
13743 (cleanup_iconv): Remove.
13744 (convert_between_encodings): Use it.
13745
c83dd867
TT
137462017-04-12 Tom Tromey <tom@tromey.com>
13747
13748 * symfile.h (increment_reading_symtab): Update type.
13749 * symfile.c (decrement_reading_symtab): Remove.
13750 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13751 * psymtab.c (psymtab_to_symtab): Update.
13752 * dwarf2read.c (dw2_instantiate_symtab): Update.
13753
0e8621a0
TT
137542017-04-12 Tom Tromey <tom@tromey.com>
13755
13756 * jit.c (struct jit_reader): Declare separately. Add constructor
13757 and destructor. Change type of "handle".
13758 (loaded_jit_reader): Define separately.
13759 (jit_reader_load): Update. New "new".
13760 (jit_reader_unload_command): Use "delete".
13761 * gdb-dlfcn.h (struct dlclose_deleter): New.
13762 (gdb_dlhandle_up): New typedef.
13763 (gdb_dlopen, gdb_dlsym): Update types.
13764 (gdb_dlclose): Remove.
13765 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13766 (gdb_dlsym): Change type of "handle".
13767 (make_cleanup_dlclose): Remove.
13768 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13769 * compile/compile-c-support.c (load_libcc): Update.
13770
67d89901
TT
137712017-04-12 Tom Tromey <tom@tromey.com>
13772
13773 * symtab.h (find_pcs_for_symtab_line): Change return type.
13774 * symtab.c (find_pcs_for_symtab_line): Change return type.
13775 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13776 type of "vec". Update.
13777 (ltpy_get_pcs_for_line): Update.
13778 * linespec.c (decode_digits_ordinary): Update.
13779
93921405
TT
137802017-04-12 Tom Tromey <tom@tromey.com>
13781
13782 * tracepoint.c (actions_command): Update.
13783 * python/python.c (python_command, python_interactive_command):
13784 Update.
13785 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13786 * guile/guile.c (guile_command): Update.
13787 * defs.h (read_command_lines, read_command_lines_1): Return
13788 command_line_up.
13789 (command_lines_deleter): New struct.
13790 (command_line_up): New typedef.
13791 * compile/compile.c (compile_code_command)
13792 (compile_print_command): Update.
13793 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13794 command_line_up.
13795 (make_cleanup_free_command_lines): Remove.
13796 * cli/cli-script.c (get_command_line, read_command_lines_1)
13797 (copy_command_lines): Return command_line_up.
13798 (while_command, if_command, read_command_lines, define_command)
13799 (document_command): Update.
13800 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13801 Remove.
13802 * breakpoint.h (breakpoint_set_commands): Change type of
13803 "commands".
13804 * breakpoint.c (breakpoint_set_commands): Change type of
13805 "commands". Update.
13806 (do_map_commands_command, update_dprintf_command_list)
13807 (create_tracepoint_from_upload): Update.
13808
ffc2605c
TT
138092017-04-12 Tom Tromey <tom@tromey.com>
13810
13811 * tracepoint.c (scope_info): Update.
13812 * spu-tdep.c (spu_catch_start): Update.
13813 * python/python.c (gdbpy_decode_line): Update.
13814 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13815 * python/py-breakpoint.c (bppy_init): Update.
13816 * probe.c (parse_probes): Update.
13817 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13818 * location.h (event_location_deleter): New struct.
13819 (event_location_up): New typedef.
13820 (new_linespec_location, new_address_location, new_probe_location)
13821 (new_explicit_location, copy_event_location)
13822 (string_to_event_location, string_to_event_location_basic)
13823 (string_to_explicit_location): Update return type.
13824 (make_cleanup_delete_event_location): Remove.
13825 * location.c (new_linespec_location, new_address_location)
13826 (new_probe_location, new_explicit_location, copy_event_location):
13827 Return event_location_up.
13828 (delete_event_location_cleanup)
13829 (make_cleanup_delete_event_location): Remove.
13830 (string_to_explicit_location, string_to_event_location_basic)
13831 (string_to_event_location): Return event_location_up.
13832 * linespec.c (canonicalize_linespec, event_location_to_sals)
13833 (decode_line_with_current_source)
13834 (decode_line_with_last_displayed, decode_objc): Update.
13835 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13836 * completer.c (location_completer): Update.
13837 * cli/cli-cmds.c (edit_command, list_command): Update.
13838 * breakpoint.c (create_overlay_event_breakpoint)
13839 (create_longjmp_master_breakpoint)
13840 (create_std_terminate_master_breakpoint)
13841 (create_exception_master_breakpoint)
13842 (create_thread_event_breakpoint): Update.
13843 (init_breakpoint_sal): Update. Remove some dead code.
13844 (create_breakpoint_sal): Change type of "location". Update.
13845 (create_breakpoints_sal, create_breakpoint, break_command_1)
13846 (dprintf_command, break_range_command, until_break_command)
13847 (init_ada_exception_breakpoint)
13848 (strace_marker_create_sals_from_location)
13849 (update_static_tracepoint, trace_command, ftrace_command)
13850 (strace_command, create_tracepoint_from_upload): Update.
13851 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13852 * ax-gdb.c (agent_command_1): Update.
13853
8f10c932
PA
138542017-04-12 Pedro Alves <palves@redhat.com>
13855
13856 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13857 * configure.tgt: Handle i[34567]86-*-go32* and
13858 i[34567]86-*-msdosdjgpp*.
13859 * i386-tdep.c (i386_svr4_reg_to_regnum):
13860 Make extern.
13861 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13862 i386-go32-tdep.c.
13863 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13864 * i386-go32-tdep.c: New file.
13865 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13866 declarations.
13867
0a31ccfb
SM
138682017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13869
13870 * aix-thread.c (pd_status2str): Change return type to const char *.
13871
e9bb3fbb
PA
138722017-04-12 Pedro Alves <palves@redhat.com>
13873
13874 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13875 calls to set_gdbarch_gnu_triplet_regexp.
13876
53375380
PA
138772017-04-12 Pedro Alves <palves@redhat.com>
13878
13879 PR gdb/21323
13880 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13881 New enum value.
13882 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13883 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13884 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13885 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13886 * gdbarch.h, gdbarch.c: Regenerate.
13887 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13888 gdbarch_wchar_bit and gdbarch_wchar_signed.
13889 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13890 * arm-tdep.c (arm_gdbarch_init): Likewise.
13891 * avr-tdep.c (avr_gdbarch_init): Likewise.
13892 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13893 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13894 * i386-tdep.c (i386_go32_init_abi): Likewise.
13895 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13896 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13897 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13898 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13899 * sh-tdep.c (sh_gdbarch_init): Likewise.
13900 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13901 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13902 * windows-tdep.c (windows_init_abi): Likewise.
13903 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13904
53e710ac
PA
139052017-04-12 Pedro Alves <palves@redhat.com>
13906
13907 PR c++/21323
13908 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13909 cplus_primitive_type_char32_t>: New enum values.
13910 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13911 and cplus_primitive_type_char32_t.
13912 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13913 32, use the archtecture's built-in type for char16_t and char32_t,
13914 respectively. Otherwise, fallback to init_integer_type as before,
13915 but make the type unsigned, and issue a complaint.
13916 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13917
ab0538b8
AH
139182017-04-12 Alan Hayward <alan.hayward@arm.com>
13919
5e0e0422 13920 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
13921 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13922
5430098f
SDJ
139232017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13924
13925 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13926 'const char *'.
13927
7c5ded6a
SDJ
139282017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13929
13930 * common/common-utils.c (free_vector_argv): New function.
13931 * common/common-utils.h: Include <vector>.
13932 (free_vector_argv): New prototype.
13933 * darwin-nat.c (darwin_create_inferior): Rewrite function
13934 prototype in order to constify "exec_file" and accept a
13935 "std::string" for "allargs".
13936 * fork-child.c: Include <vector>.
13937 (breakup_args): Rewrite function, using C++.
13938 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13939 and accept "std::string" for "allargs". Update the code to
13940 calculate "argv" based on "allargs". Update calls to "exec_fun"
13941 and "execvp".
13942 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13943 order to constify "exec_file" and accept a "std::string" for
13944 "allargs".
13945 * go32-nat.c (go32_create_inferior): Likewise.
13946 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13947 * infcmd.c (run_command_1): Constify "exec_file". Use
13948 "std::string" for inferior arguments.
13949 * inferior.h (fork_inferior): Update prototype.
13950 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13951 prototype in order to constify "exec_file" and accept a
13952 "std::string" for "allargs".
13953 * nto-procfs.c (procfs_create_inferior): Likewise.
13954 * procfs.c (procfs_create_inferior): Likewise.
13955 * remote-sim.c (gdbsim_create_inferior): Likewise.
13956 * remote.c (extended_remote_run): Update code to accept
13957 "std::string" as argument.
13958 (extended_remote_create_inferior): Rewrite function prototype in
13959 order to constify "exec_file" and accept a "std::string" for
13960 "allargs".
13961 * rs6000-nat.c (super_create_inferior): Likewise.
13962 (rs6000_create_inferior): Likewise.
13963 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13964 * windows-nat.c (windows_create_inferior): Likewise.
13965
ae0eee42
PA
139662017-04-11 Pedro Alves <palves@redhat.com>
13967
13968 * thread.c: Fix whitespace throughout.
13969
a6acac06
PR
139702017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13971
13972 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13973
64403bd1
AH
139742017-04-11 Alan Hayward <alan.hayward@arm.com>
13975
13976 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13977
a5bef50f
SDJ
139782017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13979
13980 PR gdb/21364
13981 * osdata.c (info_osdata): Check if 'type' is an empty string
13982 instead of NULL.
13983
9295a5a9
PA
139842017-04-10 Pedro Alves <palves@redhat.com>
13985
13986 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13987 (ptid_to_global_thread_id, in_thread_list)
13988 (do_captured_list_thread_ids, set_resumed, set_running)
13989 (set_executing, set_stop_requested, finish_thread_state)
13990 (validate_registers_access, can_access_registers_ptid)
13991 (print_thread_info_1, switch_to_thread)
13992 (do_restore_current_thread_cleanup)
13993 (make_cleanup_restore_current_thread, thread_command)
13994 (thread_name_command): Use operator== instead of ptid_equal.
13995
996812e3
PA
139962017-04-10 Pedro Alves <palves@redhat.com>
13997
13998 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13999 (current_thread_cleanup_chain): Delete.
14000 (restore_current_thread_cleanup_dtor)
14001 (make_cleanup_restore_current_thread): Remove references to
14002 current_thread_cleanup_chain.
14003
845b344f
AH
140042017-04-10 Alan Hayward <alan.hayward@arm.com>
14005
14006 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14007 REG_UNKNOWN.
14008
803bdfe4
YQ
140092017-04-10 Yao Qi <yao.qi@linaro.org>
14010
14011 PR gdb/19942
14012 * gdbthread.h (thread_info::deletable): New method.
14013 (thread_info::incref): New method.
14014 (thread_info::decref): New method.
14015 (thread_info::refcount): Move it to private.
14016 * infrun.c (save_stop_context): Call inc_refcount.
14017 (release_stop_context_cleanup): Likewise.
14018 * thread.c (set_thread_exited): New function.
14019 (init_thread_list): Delete "tp" only it is deletable, otherwise
14020 call set_thread_exited.
14021 (delete_thread_1): Call set_thread_exited.
14022 (current_thread_cleanup) <inferior_pid>: Remove.
14023 <thread>: New field.
14024 (restore_current_thread_ptid_changed): Removed.
14025 (do_restore_current_thread_cleanup): Adjust.
14026 (restore_current_thread_cleanup_dtor): Don't call
14027 find_thread_ptid.
14028 (set_thread_refcount): Use dec_refcount.
14029 (make_cleanup_restore_current_thread): Adjust.
14030 (thread_apply_all_command): Call inc_refcount.
14031 (_initialize_thread): Don't call
14032 observer_attach_thread_ptid_changed.
14033
8c25b497
YQ
140342017-04-10 Yao Qi <yao.qi@linaro.org>
14035
14036 * thread.c (delete_thread_1): Hoist code on marking thread as
14037 exited.
14038
8473b447
SM
140392017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14040
14041 * windows-nat.c (windows_detach): Initialize ptid with
14042 minus_one_ptid.
14043
6670ec13
SM
140442017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14045
14046 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14047
ba2f91bb
AH
140482017-04-07 Alan Hayward <alan.hayward@arm.com>
14049
14050 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14051 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14052 (bfin_pseudo_register_write): Likewise
14053
436252de
SM
140542017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14055
14056 * common/ptid.h (struct ptid): Change to...
14057 (class ptid_t): ... this.
14058 <ptid_t>: New constructors.
14059 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14060 matches>: New methods.
14061 <make_null, make_minus_one>: New static methods.
14062 <pid>: Rename to...
14063 <m_pid>: ...this.
14064 <lwp>: Rename to...
14065 <m_lwp>: ...this.
14066 <tid>: Rename to...
14067 <m_tid>: ...this.
14068 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14069 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14070 as references, move comment to class ptid_t.
14071 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14072 ptid_t static methods.
14073 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14074 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14075 Take ptid arguments as references, implement using ptid_t methods.
14076 * unittests/ptid-selftests.c: New file.
14077 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14078 unittests/ptid-selftests.c.
14079 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14080
0dedf377
TP
140812017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14082
14083 * python/python.c (python_run_simple_file): Cast mode literal to
14084 non-const char pointer as expected by PyFile_FromString.
14085
4e9868d4
SM
140862017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14087
14088 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14089 minus_one_ptid and null_ptid.
14090
9bf2a700
PA
140912017-04-05 Pedro Alves <palves@redhat.com>
14092
14093 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14094 * configure: Regenerate.
14095
a121b7c1
PA
140962017-04-05 Pedro Alves <palves@redhat.com>
14097
14098 * ada-exp.y (yyerror): Constify.
14099 * ada-lang.c (bound_name, get_selections)
14100 (ada_variant_discrim_type)
14101 (ada_variant_discrim_name, ada_value_struct_elt)
14102 (ada_lookup_struct_elt_type, is_unchecked_variant)
14103 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14104 (catch_ada_exception_command_split)
14105 (catch_ada_assert_command_split, catch_assert_command)
14106 (ada_op_name): Constify.
14107 * ada-lang.h (ada_yyerror, get_selections)
14108 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14109 * arc-tdep.c (arc_print_frame_cache): Constify.
14110 * arm-tdep.c (arm_skip_stub): Constify.
14111 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14112 (gen_aggregate_elt_ref): Constify.
14113 * bcache.c (print_bcache_statistics): Constify.
14114 * bcache.h (print_bcache_statistics): Constify.
14115 * break-catch-throw.c (catch_exception_command_1):
14116 * breakpoint.c (struct ep_type_description::description):
14117 Constify.
14118 (add_solib_catchpoint): Constify.
14119 (catch_fork_command_1): Add cast.
14120 (add_catch_command): Constify.
14121 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14122 Constify.
14123 * bsd-uthread.c (bsd_uthread_state): Constify.
14124 * buildsym.c (patch_subfile_names): Constify.
14125 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14126 Constify.
14127 * c-exp.y (yyerror): Constify.
14128 (token::oper): Constify.
14129 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14130 * c-varobj.c (cplus_describe_child): Constify.
14131 * charset.c (find_charset_names): Add cast.
14132 (find_charset_names): Constify array and add const_cast.
14133 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14134 (edit_command): Constify.
14135 * cli/cli-decode.c (lookup_cmd): Constify.
14136 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14137 Constify.
14138 (struct dump_context): Constify.
14139 (add_dump_command, restore_command): Constify.
14140 * cli/cli-script.c (get_command_line): Constify.
14141 * cli/cli-script.h (get_command_line): Constify.
14142 * cli/cli-utils.c (check_for_argument): Constify.
14143 * cli/cli-utils.h (check_for_argument): Constify.
14144 * coff-pe-read.c (struct read_pe_section_data): Constify.
14145 * command.h (lookup_cmd): Constify.
14146 * common/print-utils.c (decimal2str): Constify.
14147 * completer.c (gdb_print_filename): Constify.
14148 * corefile.c (set_gnutarget): Constify.
14149 * cp-name-parser.y (yyerror): Constify.
14150 * cp-valprint.c (cp_print_class_member): Constify.
14151 * cris-tdep.c (cris_register_name, crisv32_register_name):
14152 Constify.
14153 * d-exp.y (yyerror): Constify.
14154 (struct token::oper): Constify.
14155 * d-lang.h (d_yyerror): Constify.
14156 * dbxread.c (struct header_file_location::name): Constify.
14157 (add_old_header_file, add_new_header_file, last_function_name)
14158 (dbx_next_symbol_text, add_bincl_to_list)
14159 (find_corresponding_bincl_psymtab, set_namestring)
14160 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14161 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14162 * defs.h (command_line_input, print_address_symbolic)
14163 (deprecated_readline_begin_hook): Constify.
14164 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14165 Constify.
14166 * event-top.c (handle_line_of_input): Constify and add cast.
14167 * exceptions.c (catch_errors): Constify.
14168 * exceptions.h (catch_errors): Constify.
14169 * expprint.c (print_subexp_standard, op_string, op_name)
14170 (op_name_standard, dump_raw_expression, dump_raw_expression):
14171 * expression.h (op_name, op_string, dump_raw_expression):
14172 Constify.
14173 * f-exp.y (yyerror): Constify.
14174 (struct token::oper): Constify.
14175 (struct f77_boolean_val::name): Constify.
14176 * f-lang.c (f_word_break_characters): Constify.
14177 * f-lang.h (f_yyerror): Constify.
14178 * fork-child.c (fork_inferior): Add cast.
14179 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14180 (new_variant): Constify.
14181 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14182 * gdbarch.c: Regenerate.
14183 * gdbcore.h (set_gnutarget): Constify.
14184 * go-exp.y (yyerror): Constify.
14185 (token::oper): Constify.
14186 * go-lang.h (go_yyerror): Constify.
14187 * go32-nat.c (go32_sysinfo): Constify.
14188 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14189 * guile/scm-cmd.c (cmdscm_function): Constify.
14190 * guile/scm-param.c (pascm_param_value): Constify.
14191 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14192 (h8300sx_register_name): Constify.
14193 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14194 Constify.
14195 * ia64-tdep.c (ia64_register_names): Constify.
14196 * infcmd.c (construct_inferior_arguments): Constify.
14197 (path_command, attach_post_wait): Constify.
14198 * language.c (show_range_command, show_case_command)
14199 (unk_lang_error): Constify.
14200 * language.h (language_defn::la_error)
14201 (language_defn::la_name_of_this): Constify.
14202 * linespec.c (decode_line_2): Constify.
14203 * linux-thread-db.c (thread_db_err_str): Constify.
14204 * lm32-tdep.c (lm32_register_name): Constify.
14205 * m2-exp.y (yyerror): Constify.
14206 * m2-lang.h (m2_yyerror): Constify.
14207 * m32r-tdep.c (m32r_register_names): Constify and make static.
14208 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14209 * m88k-tdep.c (m88k_register_name): Constify.
14210 * macroexp.c (appendmem): Constify.
14211 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14212 (upgrade_type, parse_external, parse_partial_symbols)
14213 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14214 (new_symbol): Constify.
14215 * memattr.c (mem_info_command): Constify.
14216 * mep-tdep.c (register_name_from_keyword): Constify.
14217 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14218 Constify.
14219 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14220 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14221 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14222 cast.
14223 (mi_execute_async_cli_command): Constify.
14224 * mips-tdep.c (mips_register_name): Constify.
14225 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14226 (am33_register_name, am33_2_register_name)
14227 * moxie-tdep.c (moxie_register_names): Constify.
14228 * nat/linux-osdata.c (osdata_type): Constify fields.
14229 * nto-tdep.c (nto_parse_redirection): Constify.
14230 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14231 (lookup_child_selector): Constify.
14232 (objc_methcall::name): Constify.
14233 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14234 (lookup_struct_typedef): Constify.
14235 * objfiles.c (pc_in_section): Constify.
14236 * objfiles.h (pc_in_section): Constify.
14237 * p-exp.y (struct token::oper): Constify.
14238 (yyerror): Constify.
14239 * p-lang.h (pascal_yyerror): Constify.
14240 * parser-defs.h (op_name_standard): Constify.
14241 (op_print::string): Constify.
14242 (exp_descriptor::op_name): Constify.
14243 * printcmd.c (print_address_symbolic): Constify.
14244 * psymtab.c (print_partial_symbols): Constify.
14245 * python/py-breakpoint.c (stop_func): Constify.
14246 (bppy_get_expression): Constify.
14247 * python/py-cmd.c (cmdpy_completer::name): Constify.
14248 (cmdpy_function): Constify.
14249 * python/py-event.c (evpy_add_attribute)
14250 (gdbpy_initialize_event_generic): Constify.
14251 * python/py-event.h (evpy_add_attribute)
14252 (gdbpy_initialize_event_generic): Constify.
14253 * python/py-evts.c (add_new_registry): Constify.
14254 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14255 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14256 * python/py-inferior.c (get_buffer): Add cast.
14257 * python/py-param.c (parm_constant::name): Constify.
14258 * python/py-unwind.c (fprint_frame_id): Constify.
14259 * python/python.c (gdbpy_parameter_value): Constify.
14260 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14261 * remote.c (memory_packet_config::name): Constify.
14262 (show_packet_config_cmd, remote_write_bytes)
14263 (remote_buffer_add_string):
14264 * reverse.c (exec_reverse_once): Constify.
14265 * rs6000-tdep.c (variant::name, variant::description): Constify.
14266 * rust-exp.y (rustyyerror): Constify.
14267 * rust-lang.c (rust_op_name): Constify.
14268 * rust-lang.h (rustyyerror): Constify.
14269 * serial.h (serial_ops::name): Constify.
14270 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14271 (sh_sh3e_register_name, sh_sh2e_register_name)
14272 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14273 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14274 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14275 (sh_sh4al_dsp_register_name): Constify.
14276 * sh64-tdep.c (sh64_register_name): Constify.
14277 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14278 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14279 * stabsread.c (patch_block_stabs, read_type_number)
14280 (ref_map::stabs, ref_add, process_reference)
14281 (symbol_reference_defined, define_symbol, define_symbol)
14282 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14283 (read_one_struct_field, read_struct_fields, read_baseclasses)
14284 (read_tilde_fields, read_struct_type, read_array_type)
14285 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14286 (read_huge_number, read_range_type, read_args, common_block_start)
14287 (find_name_end): Constify.
14288 * stabsread.h (common_block_start, define_symbol)
14289 (process_one_symbol, symbol_reference_defined, ref_add):
14290 * symfile.c (get_section_index, add_symbol_file_command):
14291 * symfile.h (get_section_index): Constify.
14292 * target-descriptions.c (tdesc_type::name): Constify.
14293 (tdesc_free_type): Add cast.
14294 * target.c (find_default_run_target):
14295 (add_deprecated_target_alias, find_default_run_target)
14296 (target_announce_detach): Constify.
14297 (do_option): Constify.
14298 * target.h (add_deprecated_target_alias): Constify.
14299 * thread.c (print_thread_info_1): Constify.
14300 * top.c (deprecated_readline_begin_hook, command_line_input):
14301 Constify.
14302 (init_main): Add casts.
14303 * top.h (handle_line_of_input): Constify.
14304 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14305 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14306 (tfind_command): Rename to ...
14307 (tfind_command_1): ... this and constify.
14308 (tfind_command): New function.
14309 (tfind_end_command, tfind_start_command): Adjust.
14310 (encode_source_string): Constify.
14311 * tracepoint.h (encode_source_string): Constify.
14312 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14313 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14314 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14315 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14316 * tui/tui-win.c (parse_scrolling_args): Constify.
14317 * tui/tui-windata.c (tui_erase_data_content): Constify.
14318 * tui/tui-windata.h (tui_erase_data_content): Constify.
14319 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14320 * tui/tui.c (tui_enable): Add cast.
14321 * utils.c (defaulted_query): Constify.
14322 (init_page_info): Add cast.
14323 (puts_debug, subset_compare): Constify.
14324 * utils.h (subset_compare): Constify.
14325 * varobj.c (varobj_format_string): Constify.
14326 * varobj.h (varobj_format_string): Constify.
14327 * vax-tdep.c (vax_register_name): Constify.
14328 * windows-nat.c (windows_detach): Constify.
14329 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14330 * xml-support.c (gdb_xml_end_element): Constify.
14331 * xml-tdesc.c (tdesc_start_reg): Constify.
14332 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14333 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14334 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14335
995816ba
PA
143362017-04-05 Pedro Alves <palves@redhat.com>
14337
14338 * proc-api.c (struct trans): Constify.
14339 (procfs_note): Constify.
14340 * proc-events.c (struct trans, syscall_table):
14341 * proc-flags.c (struct trans): Constify.
14342 * proc-utils.h (procfs_note): Constify.
14343 * proc-why.c (struct trans): Constify.
14344 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14345 (procfs_detach): Constify.
14346 * sol-thread.c (struct string_map): Constify.
14347 (td_err_string, td_state_string): Constify.
14348
3e83a920
PA
143492017-04-05 Pedro Alves <palves@redhat.com>
14350
14351 * proc-api.c (procfs_filename): Don't initialize
14352 procfs_filename.
14353 (prepare_to_trace): Assume procfs_filename is non-NULL.
14354 (_initialize_proc_api): Give procfs_filename a default value here.
14355
63160a43
PA
143562017-04-05 Pedro Alves <palves@redhat.com>
14357
14358 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14359 'cond_string' parameter.
14360 (extract_exception_regexp): Constify 'string' parameter.
14361 (catch_exception_command_1): Constify.
14362 * breakpoint.c (init_catchpoint)
14363 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14364 parameter.
14365 (ep_parse_optional_if_clause, catch_fork_command_1)
14366 (catch_exec_command_1): Constify.
14367 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14368 parameter.
14369 (ep_parse_optional_if_clause): Constify.
14370 * cli/cli-utils.c (remove_trailing_whitespace)
14371 (check_for_argument): Constify.
14372 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14373 non-const overload.
14374 (check_for_argument): Likewise.
14375
9b2eba3d
PA
143762017-04-05 Pedro Alves <palves@redhat.com>
14377
14378 * event-top.c (command_line_handler): Add cast to execute_command
14379 call.
14380 * record-btrace.c (cmd_record_btrace_bts_start)
14381 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14382 (cmd_record_btrace_start): Add cast to execute_command call.
14383 * record-full.c (record_full_goto_insn):
14384 * record.c (record_start, record_stop): Add cast to
14385 execute_command_to_string calls.
14386 (cmd_record_start): Add cast to execute_command calls.
14387
2adadf51
PA
143882017-04-05 Pedro Alves <palves@redhat.com>
14389
14390 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14391 static inline function.
14392 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14393 array and use gdb_PyArg_ParseTupleAndKeywords.
14394 * python/py-cmd.c (cmdpy_init): Likewise.
14395 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14396 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14397 (infpy_search_memory): Likewise.
14398 * python/py-objfile.c (objfpy_add_separate_debug_file)
14399 (gdbpy_lookup_objfile): Likewise.
14400 * python/py-symbol.c (gdbpy_lookup_symbol)
14401 (gdbpy_lookup_global_symbol): Likewise.
14402 * python/py-type.c (gdbpy_lookup_type): Likewise.
14403 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14404 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14405 Likewise.
14406
0d1f4ceb
PA
144072017-04-05 Pedro Alves <palves@redhat.com>
14408
14409 * python/python-internal.h (gdb_PyGetSetDef): New type.
14410 * python/py-block.c (block_object_getset)
14411 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14412 * python/py-event.c (event_object_getset)
14413 (finish_breakpoint_object_getset): Likewise.
14414 * python/py-inferior.c (inferior_object_getset): Likewise.
14415 * python/py-infthread.c (thread_object_getset): Likewise.
14416 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14417 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14418 * python/py-objfile.c (objfile_getset): Likewise.
14419 * python/py-progspace.c (pspace_getset): Likewise.
14420 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14421 Likewise.
14422 * python/py-record.c (recpy_record_getset): Likewise.
14423 * python/py-symbol.c (symbol_object_getset): Likewise.
14424 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14425 Likewise.
14426 * python/py-type.c (type_object_getset, field_object_getset):
14427 Likewise.
14428 * python/py-value.c (value_object_getset): Likewise.
14429
4d759979
PA
144302017-04-05 Pedro Alves <palves@redhat.com>
14431
14432 * python/python-internal.h (gdb_PyObject_CallMethod)
14433 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14434 New functions.
14435 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14436 (PySys_GetObject, PySys_SetPath): New macros.
14437
fdf9e36f
PA
144382017-04-05 Pedro Alves <palves@redhat.com>
14439
14440 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14441 info_osdata_command.
14442 * osdata.c (info_osdata_command): Rename to ...
14443 (info_osdata): ... this. Constify 'type' parameter, and remove
14444 the 'from_tty' parameter. Accept NULL TYPE.
14445 (info_osdata_command): New function.
14446 * osdata.h (info_osdata_command): Remove declaration.
14447 (info_osdata): New declaration.
14448
9f33b8b7
PA
144492017-04-05 Pedro Alves <palves@redhat.com>
14450
14451 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14452 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14453 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14454 parameter.
14455 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14456 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14457 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14458 parameter.
14459 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14460 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14461 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14462 (mi_cmd_file_list_exec_source_files)
14463 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14464 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14465 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14466 parameter.
14467 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14468 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14469 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14470 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14471 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14472 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14473 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14474 'command' parameter.
14475 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14476 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14477 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14478 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14479 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14480 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14481 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14482 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14483 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14484 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14485 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14486 parameter.
14487 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14488 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14489 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14490 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14491 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14492 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14493 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14494 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14495 (mi_cmd_data_list_changed_registers)
14496 (mi_cmd_data_write_register_values)
14497 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14498 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14499 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14500 (mi_cmd_list_features, mi_cmd_list_target_features)
14501 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14502 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14503 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14504 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14505 (mi_cmd_trace_frame_collected): Constify 'command'
14506 parameter.
14507 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14508 'command' parameter.
14509
67cb5b2d
PA
145102017-04-05 Pedro Alves <palves@redhat.com>
14511
14512 * ada-lang.c (ada_completer_word_break_characters): Now a const
14513 array.
14514 (ada_get_gdb_completer_word_break_characters): Constify.
14515 * completer.c (gdb_completer_command_word_break_characters)
14516 (gdb_completer_file_name_break_characters)
14517 (gdb_completer_quote_characters): Now const arrays.
14518 (get_gdb_completer_quote_characters): Constify.
14519 (set_rl_completer_word_break_characters): New function.
14520 (set_gdb_completion_word_break_characters)
14521 (complete_line_internal): Use it.
14522 * completer.h (get_gdb_completer_quote_characters): Constify.
14523 (set_rl_completer_word_break_characters): Declare.
14524 * f-lang.c (f_word_break_characters): Constify.
14525 * language.c (default_word_break_characters): Constify.
14526 * language.h (language_defn::la_word_break_characters): Constify.
14527 (default_word_break_characters): Constify.
14528 * top.c (init_main): Use set_rl_completer_word_break_characters.
14529
7a114964
PA
145302017-04-05 Pedro Alves <palves@redhat.com>
14531
14532 * aix-thread.c (aix_thread_pid_to_str)
14533 (aix_thread_extra_thread_info): Constify.
14534 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14535 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14536 (bsd_uthread_pid_to_str): Constify.
14537 * corelow.c (core_pid_to_str): Constify.
14538 * darwin-nat.c (darwin_pid_to_str): Constify.
14539 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14540 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14541 Constify.
14542 * gnu-nat.c (gnu_pid_to_str): Constify.
14543 * go32-nat.c (go32_pid_to_str): Constify.
14544 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14545 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14546 * inferior.c (inferior_pid_to_str): Constify.
14547 * linux-nat.c (linux_nat_pid_to_str): Constify.
14548 * linux-tdep.c (linux_core_pid_to_str): Constify.
14549 * linux-thread-db.c (thread_db_pid_to_str)
14550 (thread_db_extra_thread_info): Constify.
14551 * nto-tdep.c (nto_extra_thread_info): Constify.
14552 * nto-tdep.h (nto_extra_thread_info): Constify.
14553 * obsd-nat.c (obsd_pid_to_str): Constify.
14554 * procfs.c (procfs_pid_to_str): Constify.
14555 * ravenscar-thread.c (ravenscar_extra_thread_info)
14556 (ravenscar_pid_to_str): Constify.
14557 * remote-sim.c (gdbsim_pid_to_str): Constify.
14558 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14559 Constify.
14560 * sol-thread.c (solaris_pid_to_str): Constify.
14561 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14562 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14563 * target.c (default_pid_to_str, target_pid_to_str)
14564 (normal_pid_to_str, default_pid_to_str): Constify.
14565 * target.h (target_ops::to_pid_to_str)
14566 (target_ops::to_extra_thread_info): Constify.
14567 (target_pid_to_str, normal_pid_to_str): Constify.
14568 * windows-nat.c (windows_pid_to_str): Constify.
14569 * gdbarch.sh (core_pid_to_str): Constify.
14570 * target-delegates.c: Regenerate.
14571 * gdbarch.h, gdbarch.c: Regenerate.
14572
69bbf465
PA
145732017-04-05 Pedro Alves <palves@redhat.com>
14574
14575 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14576 the memory of the temporary warning_pre_print override.
14577 * utils.c (warning_pre_print): Constify.
14578 * utils.h (warning_pre_print): Constify.
14579
be47f9e8
PA
145802017-04-05 Pedro Alves <palves@redhat.com>
14581
14582 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14583 (shell_command): New function.
14584 (make_command): Use std::string.
14585 (init_cli_cmds): Register shell_command instead of shell_escape.
14586
bde6261a
PA
145872017-04-05 Pedro Alves <palves@redhat.com>
14588
14589 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14590 * tracepoint.c (default_collect): Don't initialize.
14591
b38ef47f
PA
145922017-04-05 Pedro Alves <palves@redhat.com>
14593
14594 * macroexp.c (macro_buffer::shared): Now a bool.
14595 (init_buffer): Update.
14596 (init_shared_buffer): Constify 'addr' parameter.
14597 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14598 casts.
14599
f995bbe8
PA
146002017-04-05 Pedro Alves <palves@redhat.com>
14601
14602 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14603 * disasm.c (set_disassembler_options): Constify local.
14604 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14605
4a596fe2
SDJ
146062017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14607
14608 PR gdb/21352
14609 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14610 option.
14611
2cad08ea
YQ
146122017-04-05 Yao Qi <yao.qi@linaro.org>
14613
14614 * frame.c (frame_unwind_register_unsigned): Call
14615 frame_unwind_register_value.
14616
55a98976
YQ
146172017-04-05 Yao Qi <yao.qi@linaro.org>
14618
14619 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14620 Use gdb_test_multiple, and don't match anchor.
14621
4ac40124
PA
146222017-04-05 Pedro Alves <palves@redhat.com>
14623
14624 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14625 (Write After Approval): Remove Simon Marchi.
14626
c053b654
PA
146272017-04-05 Pedro Alves <palves@redhat.com>
14628
14629 * common/gdb_optional.h (optional::optional): Make constexpr and
14630 initialize m_dummy.
14631
4c7bf4f9
JB
146322017-04-04 John Baldwin <jhb@FreeBSD.org>
14633
14634 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14635 (amd64fbsd_jmp_buf_reg_offset): Remove.
14636 (amd64fbsd_supply_uthread): Remove function.
14637 (amd64fbsd_collect_uthread): Remove function.
14638 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14639 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14640 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14641 (fbsd-nat.c): Update comment.
14642 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14643 (i386fbsd_jmp_buf_reg_offset): Remove.
14644 (i386fbsd_supply_uthread): Remove function.
14645 (i386fbsd_collect_uthread): Remove function.
14646 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14647
1e1a8bef
JB
146482017-04-04 John Baldwin <jhb@FreeBSD.org>
14649
14650 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14651 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14652 * NEWS: Mention that support for FreeBSD/alpha was removed.
14653 * alpha-fbsd-tdep.c: Delete file.
14654 * config/alpha/fbsd.mh: Delete file.
14655 * configure.host: Delete alpha*-*-freebsd* and
14656 alpha*-*-kfreebsd*-gnu.
14657 * configure.tgt: Delete alpha*-*-freebsd* and
14658 alpha*-*-kfreebsd*-gnu.
14659
49907934
JB
146602017-04-04 John Baldwin <jhb@FreeBSD.org>
14661
14662 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14663 amd64bsd_store_inferior_registers): Use ptid from regcache.
14664
6f77053d
PA
146652017-04-04 Pedro Alves <palves@redhat.com>
14666
14667 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14668 data fields, make them private and add "m_" prefixes.
14669 (lnp_state_machine::lnp_state_machine): New ctor.
14670 (record_line, check_line_address, handle_set_discriminator)
14671 (handle_set_address, handle_advance_pc, handle_special_opcode)
14672 (handle_advance_line, handle_set_file, handle_negate_stmt)
14673 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14674 (end_sequence, advance_line): New methods.
14675 (m_gdbarch, m_record_lines_p): New fields.
14676 (lnp_reader_state): Delete.
14677 (dwarf_record_line): Rename to ...
14678 (lnp_state_machine::record_line): ... adjust.
14679 (init_lnp_state_machine): Delete.
14680 (lnp_state_machine::lnp_state_machine): New.
14681 (check_line_address): Rename to ...
14682 (lnp_state_machine::check_line_address): This.
14683 (dwarf_decode_lines_1): Remove reference to "reader_state".
14684 Adjust lnp_state_machine having a non-default ctor. Use bool.
14685 State machine internal state manipulation moved to
14686 lnp_state_machine methods.
14687
9c541725
PA
146882017-04-04 Pedro Alves <palves@redhat.com>
14689
14690 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14691 unittests/offset-type-selftests.c.
14692 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14693 * common/offset-type.h: New file.
14694 * common/preprocessor.h: New file.
14695 * common/traits.h: New file.
14696 * common/valid-expr.h: New file.
14697 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14698 sect_offset and cu_offset strong typedefs throughout.
14699 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14700 typedefs throughout.
14701 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14702 sect_offset and cu_offset strong typedefs throughout.
14703 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14704 typedefs throughout.
14705 * gdbtypes.h: Include "common/offset-type.h".
14706 (cu_offset): Now an offset type (strong typedef) instead of a
14707 struct.
14708 (sect_offset): Likewise.
14709 (union call_site_parameter_u): Rename "param_offset" field to
14710 "param_cu_off".
14711 * unittests/offset-type-selftests.c: New file.
14712
ecfb656c
PA
147132017-04-04 Pedro Alves <palves@redhat.com>
14714
14715 * common/underlying.h: New file.
14716 * dwarf2read.c: Include "common/gdb_optional.h" and
14717 "common/underlying.h".
14718 (dir_index, file_name_index): New types.
14719 (file_entry): Use them.
14720 (file_entry::include): Use to_underlying.
14721 (line_header::add_file_name): Use dir_index.
14722 (read_formatted_entries): Use gdb::optional. Read form before
14723 writting to file_entry.
14724 (dwarf_decode_line_header): Use dir_index.
14725 (lnp_state_machine::current_file): Use to_underlying.
14726 (lnp_state_machine::file): Change type to file_name_index.
14727 (dwarf_record_line): Use to_underlying.
14728 (init_lnp_state_machine): Use file_name_index.
14729 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14730
d194f1fe
PA
147312017-04-04 Pedro Alves <palves@redhat.com>
14732
14733 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14734 operator bool, has_value and get methods.
14735
fff8551c
PA
147362017-04-04 Pedro Alves <palves@redhat.com>
14737
14738 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14739 fields.
14740 (line_header): Initialize all data fields. Change type of
14741 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14742 Change type of include_dirs to std::vector<const char *>. Remove
14743 num_include_dirs, include_dirs_size. Change type of file_names to
14744 std::vector<file_entry>. Remove num_file_names, file_names_size.
14745 (line_header::line_header): New.
14746 (line_header::add_include_dir, line_header::add_file_name): New
14747 methods.
14748 (line_header::include_dir_at): Remove NULL check.
14749 (line_header::file_name_at): Add const overload.
14750 (line_header_up): New unique_ptr typedef.
14751 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14752 std::vector. Remove free_line_header call.
14753 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14754 free_line_header call.
14755 (free_cu_line_header): Delete.
14756 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14757 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14758 Adjust to use std::vector.
14759 (free_line_header): Delete.
14760 (free_line_header_voidp): Use delete.
14761 (add_include_dir): Replace with ...
14762 (line_header::add_include_dir): ... this method. Use std::vector.
14763 (add_file_name): Replace with ...
14764 (line_header::add_file_name): ... this method. Use std::vector.
14765 (add_include_dir_stub): Delete.
14766 (read_formatted_entries): Remove memset.
14767 (dwarf_decode_line_header): Return a line_header_up instead of a
14768 raw pointer. Remove cleanup handling. Pass lambdas to
14769 read_formatted_entries. Adjust to use line_header methods.
14770 (dwarf_decode_lines_1): Adjust to use line_header methods.
14771 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14772 use std::vector.
14773
d62a8ae2
SM
147742017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14775
14776 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14777 instead of struct ptid.
14778
db3a1dc7
AH
147792017-05-04 Alan Hayward <alan.hayward@arm.com>
14780
14781 * frame.c (get_frame_register_bytes): Unwind using value.
14782 (put_frame_register_bytes): Likewise.
14783
b1b45502
IB
147842017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14785
14786 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14787 aggregate-like.
14788
ec13808e
JK
147892017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14790
14791 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14792
12316564
YQ
147932017-03-29 Yao Qi <yao.qi@linaro.org>
14794
14795 * gdbthread.h (struct thread_info): Declare constructor and
14796 destructor. Add some in-class member initializers.
14797 * thread.c (free_thread): Remove.
14798 (init_thread_list): Call delete instead of free_thread.
14799 (new_thread): Call thread_info constructor.
14800 (thread_info::thread_info): New function.
14801 (thread_info::~thread_info): New function.
14802 (delete_thread_1): Call delete instead of free_thread.
14803 (make_cleanup_restore_current_thread): Move tp and frame to
14804 inner block.
14805
fe5f7374
AK
148062017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14807
14808 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14809 (arc_skip_prologue): Likewise.
14810 (arc_make_frame_cache): Likewise.
14811 (arc_pv_get_operand): New function.
14812 (arc_is_in_prologue): Likewise.
14813 (arc_analyze_prologue): Likewise.
14814 (arc_print_frame_cache): Likewise.
14815 (MAX_PROLOGUE_LENGTH): New constant.
14816
eea78757
AK
148172017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14818
14819 * configure.tgt: Add arc-insn.o.
14820 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14821 (dump_arc_instruction_command): New function.
14822 (arc_fprintf_disasm): Likewise.
14823 (arc_disassemble_info): Likewise.
14824 (arc_insn_get_operand_value): Likewise.
14825 (arc_insn_get_operand_value_signed): Likewise.
14826 (arc_insn_get_memory_base_reg): Likewise.
14827 (arc_insn_get_memory_offset): Likewise.
14828 (arc_insn_get_branch_target): Likewise.
14829 (arc_insn_dump): Likewise.
14830 (arc_insn_get_linear_next_pc): Likewise.
14831 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14832 (arc_disassemble_info): Likewise.
14833 (arc_insn_get_branch_target): Likewise.
14834 (arc_insn_get_linear_next_pc): Likewise.
14835 * NEWS: Mention new "maint print arc arc-instruction".
14836
3be78afd
AK
148372017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14838
14839 * arc-tdep (maintenance_print_arc_list): New variable.
14840 (maintenance_print_arc_command): New function.
14841
296ec4fa
AK
148422017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14843
14844 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14845 Add "limm" and "reserved".
14846 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14847 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14848 * arc-tdep.h (arc_regnum): Likewise.
14849
f74f865e
MF
148502017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14851
14852 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14853 for THREADPTR register.
14854 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14855 register.
14856 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14857 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14858 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14859
0d0bf81a
MF
148602017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14861
14862 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14863 registers above gdbarch_num_regs (gdbarch) as privileged in
14864 call0 ABI.
14865
0ce4291e
MF
148662017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14867
14868 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14869 for a single specified register or for all registers in
14870 a0_base..a0_base + C0_NREGS range.
14871 (supply_gregset_reg): Call regcache_raw_supply for a single
14872 specified register or for all registers in a0_base..a0_base +
14873 C0_NREGS range.
14874
c56054f9
MF
148752017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14876
14877 * arch/xtensa.h (C0_NREGS): Add definition.
14878 * xtensa-tdep.c (C0_NREGS): Remove definition.
14879
a4398628
MF
148802017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14881
14882 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14883 Drop xtensa_default_isa initialization.
14884 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14885
8c43009f
PA
148862017-03-27 Pedro Alves <palves@redhat.com>
14887
14888 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14889 (file_entry::include_dir): New method.
14890 (line_header::include_dir_at, line_header::file_name_at): New
14891 methods.
14892 (setup_type_unit_groups, setup_type_unit_groups)
14893 (psymtab_include_file_name): Simplify using the new methods.
14894 (lnp_state_machine) <the_line_header>: New field.
14895 <file>: Add comment.
14896 (lnp_state_machine::current_file): New method.
14897 (dwarf_record_line): Simplify using the new methods.
14898 (init_lnp_state_machine): Initialize the "the_line_header" field.
14899 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14900 Simplify using the new methods.
14901
a7e80b9e
PA
149022017-03-27 Pedro Alves <palves@redhat.com>
14903
14904 * cp-name-parser.y (make_empty): Delete.
14905 (demangler_special, nested_name, ptr_operator, array_indicator)
14906 (direct_declarator, declarator_1): Use fill_comp instead of
14907 make_empty.
14908
21047726
PA
149092017-03-27 Pedro Alves <palves@redhat.com>
14910
14911 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14912 to ATTRIBUTE_PRINTF.
14913 * solib-target.c (library_list_start_list): Print "string" not
14914 "version".
14915 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14916 gdb_xml_error call.
14917
d721ba37
PA
149182017-03-27 Pedro Alves <palves@redhat.com>
14919
14920 * dwarf2read.c (struct file_and_directory): New.
14921 (dwarf2_get_dwz_file): Adjust to use std::string.
14922 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14923 (find_file_and_directory): Adjust to return a file_and_directory
14924 object.
14925 (read_file_scope): Adjust to use file_and_directory. Remove
14926 make_cleanup/do_cleanups calls.
14927 (open_and_init_dwp_file): Adjust to use std::string. Remove
14928 make_cleanup/do_cleanups calls.
14929 * python/python.c (do_start_initialization): Adjust to ldirname
14930 returning a std::string.
14931 * utils.c (ldirname): Now returns a std::string.
14932 * utils.h (ldirname): Change return type to std::string.
14933 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14934 returning a std::string.
14935 * xml-tdesc.c (file_read_description_xml): Likewise.
14936
ed771251
AH
149372017-03-24 Alan Hayward <alan.hayward@arm.com>
14938
14939 * regcache.c (regcache_debug_print_register): New function.
14940 * regcache.h (regcache_debug_print_register): New declaration.
14941 * target.c (debug_print_register): Remove.
14942 (target_fetch_registers): Call regcache_debug_print_register.
14943 (target_store_registers): Likewise.
14944
568c1b9f
PB
149452017-03-24 Pádraig Brady <pbrady@fb.com>
14946
14947 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14948 reference beyond the 'lh->include_dirs' array before accessing to
14949 it.
14950 (psymtab_include_file_name): Likewise.
14951 (dwarf_decode_lines_1): Likewise.
14952 (dwarf_decode_lines): Likewise.
14953 (file_file_name): Likewise.
14954
3e00d44f
SM
149552017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14956
14957 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14958 inferior_ptid.
14959 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14960 ps_lsetfpregs): Likewise.
14961 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14962 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14963 ps_lsetfpregs): Likewise.
14964 * target.c (target_fetch_registers, target_store_registers):
14965 Remove asserts.
14966
077ae656
AH
149672017-03-23 Alan Hayward <alan.hayward@arm.com>
14968
14969 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14970
1e2b521d
YQ
149712017-03-23 Yao Qi <yao.qi@linaro.org>
14972
14973 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14974 (_initialize_aarch64_tdep): Register it.
14975 (aarch64_record_load_store): Handle PRFM instruction.
14976 (aarch64_process_record_test): New function.
14977
33877125
YQ
149782017-03-23 Yao Qi <yao.qi@linaro.org>
14979
14980 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14981 indentation.
14982
a0eef940
YQ
149832017-03-23 Yao Qi <yao.qi@linaro.org>
14984
14985 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14986
3f2a3564
PR
149872017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14988
14989 python/python.c (do_start_initialization): Fix memory leak.
14990
b67aeab0
SM
149912017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14992
14993 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14994 using get_ptrace_pid.
14995 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14996 inferior_ptid.
14997 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14998 inferior_ptid instead of pid.
14999
ffdbe864
YQ
150002017-03-22 Yao Qi <yao.qi@linaro.org>
15001
15002 * aarch64-tdep.c: Wrap locally used classes in anonymous
15003 namespace.
15004 * arm-tdep.c: Likewise.
15005 * linespec.c: Likewise.
15006 * ui-out.c: Likewise.
15007
9d736fbf
JG
150082017-03-22 Jonah Graham <jonah@kichwacoders.com>
15009
15010 PR gdb/19637
15011 * python/lib/gdb/printer/bound_registers.py: Import sys.
15012
3de88e9a
SM
150132017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15014
15015 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15016 windows_thread_info parameter and use it instead of
15017 current_thread.
15018 (windows_fetch_inferior_registers): Don't set current_thread,
15019 pass the thread to do_windows_fetch_inferior_registers. Use
15020 ptid from regcache instead of inferior_ptid.
15021 (do_windows_store_inferior_registers): Add windows_thread_info
15022 parameter and use it instead of current_thread.
15023 (windows_store_inferior_registers): Don't set current_thread,
15024 pass the thread to do_windows_store_inferior_registers. Use
15025 ptid from regcache instead of inferior_ptid.
15026
0e7b8f61
SM
150272017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15028
15029 * ser-mingw.c (ser_windows_raw): Remove reference to
15030 struct serial::current_timeout.
15031
5badf10a
IR
150322017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15033
15034 PR tdep/20928
15035 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15036 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15037 (sparc64_fsr_type): Fix %fsr decoding.
15038
cee59b3f
TW
150392017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15040
15041 * python/py-record-btrace.c (btpy_insn_data): Change return type
15042 for Python 2.
15043
639a9038
SM
150442017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15045
15046 * spu-linux-nat.c (spu_fetch_inferior_registers,
15047 spu_store_inferior_registers): Use ptid from regcache, set and
15048 restore inferior_ptid.
15049 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15050 Likewise.
15051
bcc0c096
SM
150522017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15053
15054 * i386-linux-nat.c (fetch_register, store_register,
15055 i386_linux_fetch_inferior_registers,
15056 i386_linux_store_inferior_registers): Use ptid from regcache.
15057 * ia64-linux-nat.c (ia64_linux_fetch_register,
15058 ia64_linux_store_register): Likewise.
15059 * inf-ptrace.c (inf_ptrace_fetch_register,
15060 inf_ptrace_store_register): Likewise.
15061 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15062 m32r_linux_store_inferior_registers): Likewise.
15063 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15064 m68kbsd_store_inferior_registers): Likewise.
15065 * m68k-linux-nat.c (fetch_register, store_register,
15066 m68k_linux_fetch_inferior_registers,
15067 m68k_linux_store_inferior_registers): Likewise.
15068 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15069 m88kbsd_store_inferior_registers): Likewise.
15070 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15071 mips_fbsd_store_inferior_registers): Likewise.
15072 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15073 mips64_linux_regsets_store_registers): Likewise.
15074 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15075 mipsnbsd_store_inferior_registers): Likewise.
15076 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15077 mips64obsd_store_inferior_registers): Likewise.
15078 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15079 Likewise.
15080 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15081 ppcfbsd_store_inferior_registers): Likewise.
15082 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15083 ppc_linux_store_inferior_registers): Likewise.
15084 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15085 ppcnbsd_store_inferior_registers): Likewise.
15086 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15087 ppcobsd_store_registers): Likewise.
15088 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15089 Likewise.
15090 * ravenscar-thread.c (ravenscar_fetch_registers,
15091 ravenscar_store_registers, ravenscar_prepare_to_store):
15092 Likewise.
15093 * record-btrace.c (record_btrace_fetch_registers,
15094 record_btrace_store_registers, record_btrace_prepare_to_store):
15095 Likewise.
15096 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15097 Lookup inferior using ptid from regcache, instead of
15098 current_inferior.
15099 * remote.c (remote_fetch_registers, remote_store_registers): Use
15100 ptid from regcache.
15101 * rs6000-nat.c (fetch_register, store_register): Likewise.
15102 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15103 s390_linux_store_inferior_registers): Likewise.
15104 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15105 shnbsd_store_inferior_registers): Likewise.
15106 * sol-thread.c (sol_thread_fetch_registers,
15107 sol_thread_store_registers): Likewise.
15108 * sparc-nat.c (sparc_fetch_inferior_registers,
15109 sparc_store_inferior_registers): Likewise.
15110 * tilegx-linux-nat.c (fetch_inferior_registers,
15111 store_inferior_registers): Likewise.
15112 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15113 vaxbsd_store_inferior_registers): Likewise.
15114 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15115 store_xtregs): Likewise.
15116
c0f55cc6
AV
151172017-03-20 Artemiy Volkov <artemiyv@acm.org>
15118
15119 PR gdb/14441
15120 * NEWS: Mention support for rvalue references in GDB and python.
15121 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15122 supports both lvalue and rvalue references.
15123
15c0a2a9
AV
151242017-03-20 Artemiy Volkov <artemiyv@acm.org>
15125
15126 PR gdb/14441
15127 * gdbtypes.c (rank_one_type): Implement overloading
15128 resolution rules regarding rvalue references.
15129
aa006118
AV
151302017-03-20 Artemiy Volkov <artemiyv@acm.org>
15131
15132 PR gdb/14441
15133 * aarch64-tdep.c (aarch64_type_align)
15134 (aarch64_extract_return_value, aarch64_store_return_value): Change
15135 lvalue reference type checks to general reference type checks.
15136 * amd64-tdep.c (amd64_classify): Likewise.
15137 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15138 Likewise.
15139 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15140 (arm_store_return_value): Likewise.
15141 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15142 * c-typeprint.c (c_print_type): Likewise.
15143 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15144 (cplus_number_of_children, cplus_describe_child): Likewise.
15145 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15146 * completer.c (expression_completer): Likewise.
15147 * cp-support.c (make_symbol_overload_list_adl_namespace):
15148 Likewise.
15149 * darwin-nat-info.c (info_mach_region_command): Likewise.
15150 * dwarf2loc.c (entry_data_value_coerce_ref)
15151 (value_of_dwarf_reg_entry): Likewise.
15152 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15153 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15154 Likewise.
15155 * findvar.c (extract_typed_address, store_typed_address):
15156 Likewise.
15157 * gdbtypes.c (rank_one_type): Likewise.
15158 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15159 * infcall.c (value_arg_coerce): Likewise.
15160 * language.c (pointer_type): Likewise.
15161 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15162 Likewise.
15163 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15164 * mn10300-tdep.c (mn10300_type_align): Likewise.
15165 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15166 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15167 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15168 Likewise.
15169 * printcmd.c (print_formatted, x_command): Likewise.
15170 * python/py-type.c (typy_get_composite, typy_template_argument):
15171 Likewise.
15172 * python/py-value.c (valpy_referenced_value)
15173 (valpy_get_dynamic_type, value_has_field): Likewise.
15174 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15175 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15176 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15177 * spu-tdep.c (spu_scalar_value_p): Likewise.
15178 * symtab.c (lookup_symbol_aux): Likewise.
15179 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15180 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15181 Likewise.
15182 * valops.c (value_cast_pointers, value_cast)
15183 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15184 (value_struct_elt, value_struct_elt_bitpos)
15185 (value_find_oload_method_list, find_overload_match)
15186 (value_rtti_indirect_type): Likewise.
15187 * valprint.c (val_print_scalar_type_p, generic_val_print):
15188 Likewise.
15189 * value.c (value_actual_type, value_as_address, unpack_long)
15190 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15191 (coerce_ref): Likewise.
15192 * varobj.c (varobj_get_value_type): Likewise.
15193
3fcf899d
AV
151942017-03-20 Artemiy Volkov <artemiyv@acm.org>
15195
15196 PR gdb/14441
15197 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15198 table of constants.
15199 * python/lib/gdb/command/explore.py: Support exploring values
15200 of rvalue reference types.
15201 * python/lib/gdb/types.py: Implement get_basic_type() for
15202 rvalue reference types.
15203 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15204 constant.
15205 * python/py-value.c (valpy_getitem): Add an rvalue reference
15206 check.
15207 (valpy_reference_value): Add new parameter "refcode".
15208 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15209 New wrappers for valpy_reference_value().
15210 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15211 (gdbpy_invoke_xmethod): Likewise.
15212
4297a3f0
AV
152132017-03-20 Artemiy Volkov <artemiyv@acm.org>
15214
15215 PR gdb/14441
15216 * dwarf2read.c (process_die, read_type_die_1): Handle the
15217 DW_TAG_rvalue_reference_type DIE.
15218 (read_tag_reference_type): Add new parameter "refcode".
15219
e1cb3213
AV
152202017-03-20 Artemiy Volkov <artemiyv@acm.org>
15221
15222 PR gdb/14441
15223 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15224 (c_type_print_modifier, c_type_print_varspec_suffix)
15225 (c_type_print_base): Support printing rvalue reference types.
15226 * c-valprint.c (c_val_print, c_value_print): Support printing
15227 rvalue reference values.
15228
e4347c89
AV
152292017-03-20 Artemiy Volkov <artemiyv@acm.org>
15230
15231 PR gdb/14441
15232 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15233 typename.
15234 * cp-support.c (replace_typedefs): Handle
15235 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15236 * python/py-type.c (typy_lookup_type): Likewise.
15237
53cc15f5
AV
152382017-03-20 Artemiy Volkov <artemiyv@acm.org>
15239
15240 PR gdb/14441
15241 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15242 * parse.c (insert_type): Change assert statement.
15243 (follow_types): Handle rvalue reference types.
15244 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15245 constant.
15246
a65cfae5
AV
152472017-03-20 Artemiy Volkov <artemiyv@acm.org>
15248
15249 PR gdb/14441
15250 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15251 value_ref() interface.
15252 * c-valprint.c (c_value_print): Likewise.
15253 * infcall.c (value_arg_coerce): Likewise.
15254 * python/py-value.c (valpy_reference_value): Likewise.
15255 * valops.c (value_cast, value_reinterpret_cast)
15256 (value_dynamic_cast, typecmp): Likewise.
15257 (value_ref): Parameterize by kind of return value reference type.
15258 * value.h (value_ref): Add new parameter "refcode".
15259
3b224330
AV
152602017-03-20 Artemiy Volkov <artemiyv@acm.org>
15261
15262 PR gdb/14441
15263 * dwarf2read.c (read_tag_reference_type): Use
15264 lookup_lvalue_reference_type() instead of lookup_reference_type().
15265 * eval.c (evaluate_subexp_standard): Likewise.
15266 * f-exp.y: Likewise.
15267 * gdbtypes.c (make_reference_type, lookup_reference_type):
15268 Generalize with rvalue reference types.
15269 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15270 convenience wrappers for lookup_reference_type().
15271 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15272 reference kind parameter.
15273 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15274 wrappers for lookup_reference_type().
15275 * guile/scm-type.c (gdbscm_type_reference): Use
15276 lookup_lvalue_reference_type() instead of lookup_reference_type().
15277 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15278 * parse.c (follow_types): Likewise.
15279 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15280 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15281 Likewise.
15282 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15283 (gdbpy_invoke_xmethod): Likewise.
15284 * stabsread.c: Provide extra argument to make_reference_type()
15285 call.
15286 * valops.c (value_ref, value_rtti_indirect_type): Use
15287 lookup_lvalue_reference_type() instead of lookup_reference_type().
15288
f9aeb8d4
AV
152892017-03-20 Artemiy Volkov <artemiyv@acm.org>
15290
15291 PR gdb/14441
15292 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15293 (TYPE_IS_REFERENCE): New macro.
15294 (struct type): Add rvalue_reference_type field.
15295 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15296
51457a05
MAL
152972017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15298
15299 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15300 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15301 New function definition.
15302 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15303 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15304 New function declaration.
15305 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15306 * mi/mi-interp.h: New file.
15307 * solib.c (info_sharedlibrary_command): Replace for loop with
15308 ALL_SO_LIBS macro
15309 * solib.h (update_solib_list): New function declaration.
15310 (so_list_head): Move macro.
15311 * solist.h (ALL_SO_LIBS): New macro.
15312
e696b3ad
MAL
153132017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15314
15315 * infcmd.c (post_create_inferior): Remove unused argument in
15316 call to solib_add.
15317 * remote.c (remote_start_remote): Likewise.
15318 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15319 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15320 (enable_break): Likewise.
15321 * solib.c (update_solib_list): Remove unused target argument
15322 and its documentation.
15323 (solib_add): Remove unused target argument. Remove unused
15324 argument in call to update_solib_list.
15325 (info_sharedlibrary_command): Remove unused argument in call
15326 to update_solib_list.
15327 (sharedlibrary_command): Remove unused argument in call to
15328 solib_add.
15329 (handle_solib_event): Likewise.
15330 (reload_shared_libraries): Likewise.
15331 * solib.h (solib_add): Remove unused target argument.
15332
dcb84eda
AA
153332017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15334
15335 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15336 (s390_displaced_step_fixup): Cover relative branches with the
15337 default fixup handling. This fixes lack of support for some
15338 relative branch instructions.
15339
d9cb6cdc
SM
153402017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15341
15342 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15343 ptid from regcache.
15344
1afaf9f4
SM
153452017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15346
15347 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15348 i386_darwin_store_inferior_registers): Use ptid from regcache.
15349
aac12e24
SM
153502017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15351
15352 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15353 i386bsd_store_inferior_registers): Use ptid from regcache.
15354
bbe1eef1
SM
153552017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15356
15357 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15358 hppaobsd_store_registers): Use ptid from regcache.
15359
10799020
SM
153602017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15361
15362 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15363 hppanbsd_store_registers): Use ptid from regcache.
15364
00204cf7
SM
153652017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15366
15367 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15368 from regcache. Use get_ptrace_pid.
15369
11a33714
SM
153702017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15371
15372 * corelow.c (get_core_register_section): Use ptid from regcache,
15373 update doc.
15374
317cd492
SM
153752017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15376
15377 * bsd-uthread.c (bsd_uthread_fetch_registers,
15378 bsd_uthread_store_registers): Use ptid from regcache, set and
15379 restore inferior_ptid.
15380
9ac8a7c2
SM
153812017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15382
15383 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15384 fetch_fp_regs, store_register, store_regs, store_fp_register,
15385 store_fp_regs): Use ptid from regcache.
15386
4ac4bb6a
SM
153872017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15388
15389 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15390 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15391 store_vfp_regs): Use ptid from regcache.
15392
9bcbdca8
PA
153932017-03-17 Pedro Alves <palves@redhat.com>
15394
15395 PR remote/21188
15396 * ser-base.c (ser_base_wait_for): Add comment.
15397 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15398 version.
15399 * ser-unix.c (hardwire_raw): Remove reference to
15400 scb->current_timeout.
15401 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15402 (hardwire_ops): Install ser_base_readchar instead of
15403 hardwire_readchar.
15404 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15405 Remove fields.
15406
7503099f
JG
154072017-03-17 Jonah Graham <jonah@kichwacoders.com>
15408
15409 PR gdb/19637
15410 * python/lib/gdb/printer/bound_registers.py: Add support for
15411 Python 3.
15412
7942e96e
AA
154132017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15414
15415 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15416 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15417 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15418 byte_offset to subobj_byte_offset. Fix the handling of
15419 DWARF_VALUE_STACK on big-endian targets when coming via an
15420 implicit pointer.
15421 (dwarf2_evaluate_loc_desc): Adjust call to
15422 dwarf2_evaluate_loc_desc_full.
15423 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15424 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15425
ba14f379
YQ
154262017-03-16 Yao Qi <yao.qi@linaro.org>
15427
15428 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15429 and REVSH instructions.
15430
b121eeb9
YQ
154312017-03-16 Yao Qi <yao.qi@linaro.org>
15432
15433 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15434 (arm_record_test): Declare.
15435 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15436 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15437 align with the manual.
15438 (thumb_record_misc): Adjust the code order to align with the
15439 manual.
15440 (thumb2_record_decode_insn_handler): Fix instruction matching.
15441 (instruction_reader_thumb): New class.
15442 (arm_record_test): New function.
15443
728a7913
YQ
154442017-03-16 Yao Qi <yao.qi@linaro.org>
15445
15446 * arm-tdep.c (abstract_memory_reader): New class.
15447 (instruction_reader): New class.
15448 (extract_arm_insn): Add argument 'reader'. Callers updated.
15449 (decode_insn): Likewise.
15450
34b43320
DE
154512017-03-16 Doug Evans <dje@google.com>
15452
a7c0469f
DE
15453 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15454 member. Change type of TYPE member to SCM. All uses updated.
15455 (lsscm_make_lazy_string_smob): Add assert.
15456 (lsscm_make_lazy_string): Flag bad length values.
15457 (lsscm_elt_type): New function.
15458 (gdbscm_lazy_string_to_value): Rewrite to use
15459 lsscm_safe_lazy_string_to_value.
15460 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15461 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15462 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15463 in incoming type.
15464 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15465 * guile/scm-type.c (tyscm_scm_to_type): New function.
15466
154672017-03-15 Doug Evans <dje@google.com>
15468
34b43320
DE
15469 PR python/17728, python/18439, python/18779
15470 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15471 member. Change type of TYPE member to PyObject *. All uses updated.
15472 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15473 (gdbpy_create_lazy_string_object): Flag bad length values.
15474 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15475 Handle typedefs in incoming type.
15476 (stpy_lazy_string_elt_type): New function.
15477 (gdbpy_extract_lazy_string): Call it.
15478 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15479 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15480 typedefs in incoming type.
15481
a3a5fecc
DE
154822017-03-16 Doug Evans <dje@google.com>
15483
15484 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15485 * guile/scm-type.c (tyscm_scm_to_type): New function.
15486
28f1c605
JW
154872017-03-16 Jiong Wang <jiong.wang@arm.com>
15488
15489 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15490 "ULONGEST" for "skip".
15491
87c336f6
AA
154922017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15493
15494 PR gdb/21220
15495 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15496 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15497 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15498 over ptrace peek/poke until end of buffer or error.
15499
cf81cf60
SM
155002017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15501
15502 * parse.c (length_of_subexp): Make static.
15503 * parser-defs.h (length_of_subexp): Remove.
15504
a379284a
AA
155052017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15506
15507 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15508 as well.
15509
8a6200ba
PA
155102017-03-14 Pedro Alves <palves@redhat.com>
15511
15512 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15513 (main): Use std::unique_ptr. Remove calls to
15514 cp_demangled_name_parse_free.
15515
f79ec206
SM
155162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15517
15518 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15519 alphabsd_store_inferior_registers): Use regcache->ptid instead
15520 of inferior_ptid.
15521
edb5fb00
SM
155222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15523
15524 * aix-thread.c (aix_thread_fetch_registers,
15525 aix_thread_store_registers): Use regcache->ptid instead of
15526 inferior_ptid.
15527
55119686
SM
155282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15529
15530 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15531 store_gregs_to_thread, fetch_fpregs_from_thread,
15532 store_fpregs_to_thread): Use regcache->ptid instead of
15533 inferior_ptid.
15534
6a06fbb7
SM
155352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15536
15537 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15538 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15539 instead of inferior_ptid.
15540
c6386875
SM
155412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15542
15543 * target.c (target_fetch_registers, target_store_registers): Add
15544 assert.
15545
ddaaf0fb
SM
155462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15547
15548 * regcache.h (regcache_get_ptid): New function.
15549 * regcache.c (regcache_get_ptid): New function.
15550
b9da89d1 155512017-03-13 Mark Wielaard <mark@klomp.org>
15552
15553 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15554
5f4d1085
KS
155552017-03-10 Keith Seitz <keiths@redhat.com>
15556
15557 PR c++/8218
15558 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15559
c65d6b55
PA
155602017-03-08 Pedro Alves <palves@redhat.com>
15561
15562 PR gdb/18360
15563 * infrun.c (start_step_over, do_target_resume, resume)
15564 (restart_threads): Assert we're not resuming a thread that is
15565 meant to be stopped.
15566 (infrun_thread_stop_requested_callback): Delete.
15567 (infrun_thread_stop_requested): If the thread is internally
15568 stopped, queue a pending stop event and clear the thread's
15569 inline-frame state.
15570 (handle_stop_requested): New function.
15571 (handle_syscall_event, handle_inferior_event_1): Use
15572 handle_stop_requested.
15573 (handle_stop_requested): New function.
15574 (handle_signal_stop): Set the thread's stop_signal here instead of
15575 at caller.
15576 (finish_step_over): Clear step over info unconditionally.
15577 (handle_signal_stop): If the user had interrupted the event
15578 thread, consider the stop a random signal.
15579 (handle_signal_stop) <signal arrived while stepping over
15580 breakpoint>: Don't restart threads here.
15581 (stop_waiting): Don't clear step-over info here.
15582
15c22686
PA
155832017-03-08 Pedro Alves <palves@redhat.com>
15584
15585 PR 21206
15586 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15587 goes to argument 2, not 1.
15588
6e5d74e7
PA
155892017-03-08 Pedro Alves <palves@redhat.com>
15590
15591 PR cli/21218
15592 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15593 display_gdb_prompt.
15594 (command_line_input): Add comment.
15595
9753a2f6
PA
155962017-03-08 Pedro Alves <palves@redhat.com>
15597
15598 PR tui/21216
15599 * tui/tui-file.c (tui_file::write): New.
15600 * tui/tui-file.h (tui_file): Override "write".
15601 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15602 factored out from ...
15603 (tui_puts): ... here.
15604 (tui_putc): Use them.
15605 (tui_write): New function.
15606 * tui/tui-io.h (tui_write): Declare.
15607
1672e0d9
SDJ
156082017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15609
15610 * Makefile.in (SFILES): Replace "environ.c" with
15611 "common/environ.c".
15612 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15613 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15614 to...
15615 * common/environ.c: ... here.
15616 * environ.h: Moved to...
15617 * common/environ.h: ... here.
15618
f7bb4e3a
PB
156192017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15620
15621 * gdbarch.sh (pstring_ptr): New static function.
15622 (gdbarch_disassembler_options): Use it.
15623 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15624 not valid_disassembler_option->name.
15625 * gdbarch.c: Regenerate.
15626
e45ced6c
PB
156272017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15628
15629 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15630
5f6fd321
PA
156312017-03-07 Pedro Alves <palves@redhat.com>
15632
15633 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15634
6dbb839a 156352017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
15636
15637 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15638 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15639 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 15640 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 15641
d274ecf4
SM
156422017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15643
15644 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15645
df97be55
SM
156462017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15647
15648 * remote.c (remote_add_target_side_commands): Use range-based
15649 for loop.
15650
7d45f3df
YQ
156512017-03-03 Yao Qi <yao.qi@linaro.org>
15652
15653 PR gdb/21165
15654 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15655 value is lazy.
15656 * valprint.c (common_val_print): Likewise.
15657
65b48a81
PB
156582017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15659
15660 * NEWS: Mention new set/show disassembler-options commands.
15661 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15662 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15663 (prospective_options): New static variable.
15664 (gdb_disassembler::gdb_disassembler): Initialize
15665 m_di.disassembler_options.
15666 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15667 (get_disassembler_options): New function.
15668 (set_disassembler_options): Likewise.
15669 (set_disassembler_options_sfunc): Likewise.
15670 (show_disassembler_options_sfunc): Likewise.
15671 (disassembler_options_completer): Likewise.
15672 (_initialize_disasm): Likewise.
15673 * disasm.h (get_disassembler_options): New prototype.
15674 (set_disassembler_options): Likewise.
15675 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15676 (gdbarch_verify_disassembler_options): Likewise.
15677 * gdbarch.c: Regenerate.
15678 * gdbarch.h: Likewise.
15679 * arm-tdep.c (num_disassembly_options): Delete.
15680 (set_disassembly_style): Likewise.
15681 (arm_disassembler_options): New static variable.
15682 (set_disassembly_style_sfunc): Convert short style name into long
15683 option name. Call set_disassembler_options.
15684 (show_disassembly_style_sfunc): New function.
15685 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15686 set_gdbarch_verify_disassembler_options.
15687 (_initialize_arm_tdep): Delete regnames variable and update callers.
15688 (arm_disassembler_options): Initialize.
15689 (disasm_options): New variable.
15690 (num_disassembly_options): Rename from this...
15691 (num_disassembly_styles): ...to this. Compute by scanning through
15692 disasm_options.
15693 (valid_disassembly_styles): Initialize using disasm_options.
15694 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15695 set_arm_regname_option.
15696 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15697 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15698 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15699 set_gdbarch_verify_disassembler_options.
15700 * s390-tdep.c (s390_disassembler_options): New static variable.
15701 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15702 set_gdbarch_verify_disassembler_options.
15703
d538e36d
SM
157042017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15705
15706 * remote.c (remote_add_target_side_condition): Remove "struct"
15707 keyword from range-based for loop.
15708
83621223
SM
157092017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15710
15711 * remote.c (remote_add_target_side_condition): Use range-based
15712 for loop. Update comment.
15713
2123df0e
YQ
157142017-02-27 Yao Qi <yao.qi@linaro.org>
15715
15716 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15717
8e368124
AH
157182017-02-26 Alan Hayward <alan.hayward@arm.com>
15719
15720 * regcache.c (regcache_raw_update): New function.
15721 (regcache_raw_read): Move code to regcache_raw_update.
15722 * regcache.h (regcache_raw_update): New declaration.
15723 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15724
a49dd8dd
JK
157252017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15726
15727 * dwarf2read.c (create_debug_type_hash_table): Initialize
15728 header.signature and header.type_offset_in_tu.
15729
34e4bae9
PA
157302017-02-24 Pedro Alves <palves@redhat.com>
15731
15732 * symtab.c (make_file_symbol_completion_list_1): Use
15733 add_symtab_completions.
15734
b0e4b369
AH
157352017-02-24 Alan Hayward <alan.hayward@arm.com>
15736
15737 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15738
975c21ab
AH
157392017-02-24 Alan Hayward <alan.hayward@arm.com>
15740
15741 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15742 I386_MAX_REGISTER_SIZE.
15743 (i386_pseudo_register_write): Likewise.
15744 (i386_process_record): Likewise.
15745 * i387-tdep.c (i387_supply_xsave): Likewise.
15746 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15747 (store_register): Likewise.
15748
14bc53a8
PA
157492017-02-23 Pedro Alves <palves@redhat.com>
15750
15751 * ada-lang.c: Include "common/function-view.h".
15752 (ada_iterate_over_symbols): Adjust to use function_view as
15753 callback type.
15754 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15755 (ada_make_symbol_completion_list): Use a lambda.
15756 (ada_exc_search_name_matches): Delete.
15757 (name_matches_regex): New.
15758 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15759 * compile/compile-c-support.c: Include "common/function-view.h".
15760 (print_one_macro): Change prototype to accept a ui_file pointer.
15761 (write_macro_definitions): Use a lambda.
15762 * dwarf2read.c: Include "common/function-view.h".
15763 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15764 (dw2_expand_symtabs_matching): Adjust to use function_view as
15765 callback type.
15766 * language.h: Include "common/function-view.h".
15767 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15768 function_view as callback type.
15769 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15770 * linespec.c: Include "common/function-view.h".
15771 (collect_info::add_symbol): New method.
15772 (struct symbol_and_data_callback, iterate_inline_only, struct
15773 symbol_matcher_data, iterate_name_matcher): Delete.
15774 (iterate_over_all_matching_symtabs): Adjust to use function_view
15775 as callback type and lambdas.
15776 (iterate_over_file_blocks): Adjust to use function_view as
15777 callback type.
15778 (decode_compound_collector): Now a class with private fields.
15779 (decode_compound_collector::release_symbols): New method.
15780 (collect_one_symbol): Rename to...
15781 (decode_compound_collector::operator()): ... this and adjust.
15782 (lookup_prefix_sym): decode_compound_collector construction bits
15783 move to decode_compound_collector ctor. Pass the
15784 decode_compound_collector object directly as callback. Remove
15785 cleanups and use decode_compound_collector::release_symbols
15786 instead.
15787 (symtab_collector): Now a class with private fields.
15788 (symtab_collector::release_symtabs): New method.
15789 (add_symtabs_to_list): Rename to...
15790 (symtab_collector::operator()): ... this and adjust.
15791 (collect_symtabs_from_filename): symtab_collector construction
15792 bits move to symtab_collector ctor. Pass the symtab_collector
15793 object directly as callback. Remove cleanups and use
15794 symtab_collector::release_symtabs instead.
15795 (collect_symbols): Delete.
15796 (add_matching_symbols_to_info): Use lambdas.
15797 * macrocmd.c (print_macro_callback): Delete.
15798 (info_macro_command): Use a lambda.
15799 (info_macros_command): Pass print_macro_definition as callable
15800 directly.
15801 (print_one_macro): Remove 'ignore' parameter.
15802 (macro_list_command): Adjust.
15803 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15804 (macro_for_each_data::user_data): Delete field.
15805 (foreach_macro): Adjust to call the function_view.
15806 (macro_for_each): Adjust to use function_view as callback type.
15807 (foreach_macro_in_scope): Adjust to call the function_view.
15808 (macro_for_each_in_scope): Adjust to use function_view as callback
15809 type.
15810 * macrotab.h: Include "common/function-view.h".
15811 (macro_callback_fn): Declare a prototype instead of a pointer.
15812 Remove "user_data" parameter.
15813 (macro_for_each, macro_for_each_in_scope): Adjust to use
15814 function_view as callback type.
15815 * psymtab.c (partial_map_expand_apply)
15816 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15817 Adjust to use function_view as callback type and to return bool.
15818 (psym_expand_symtabs_matching): Adjust to use function_view as
15819 callback types.
15820 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15821 to use function_view as callback type and to return bool.
15822 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15823 callback types.
15824 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15825 as callback types.
15826 * symfile.h: Include "common/function-view.h".
15827 (expand_symtabs_file_matcher_ftype)
15828 (expand_symtabs_symbol_matcher_ftype)
15829 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15830 return bool.
15831 (quick_symbol_functions::map_symtabs_matching_filename)
15832 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15833 function_view as callback type and return bool.
15834 (expand_symtabs_matching): Adjust to use function_view as callback
15835 type.
15836 (maintenance_expand_name_matcher)
15837 (maintenance_expand_file_matcher): Delete.
15838 (maintenance_expand_symtabs): Use lambdas.
15839 * symtab.c (iterate_over_some_symtabs): Adjust to use
15840 function_view as callback types and return bool.
15841 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15842 of a cleanup.
15843 (lookup_symtab_callback): Delete.
15844 (lookup_symtab): Use a lambda.
15845 (iterate_over_symbols): Adjust to use function_view as callback
15846 type.
15847 (struct search_symbols_data, search_symbols_file_matches)
15848 (search_symbols_name_matches): Delete.
15849 (search_symbols): Use a pair of lambdas.
15850 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15851 (symtab_expansion_callback): Delete.
15852 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15853 * symtab.h: Include "common/function-view.h".
15854 (iterate_over_some_symtabs): Adjust to use function_view as
15855 callback type and return bool.
15856 (iterate_over_symtabs): Adjust to use function_view as callback
15857 type.
15858 (symbol_found_callback_ftype): Remove 'data' parameter and return
15859 bool.
15860 (iterate_over_symbols): Adjust to use function_view as callback
15861 type.
15862
07e253aa
PA
158632017-02-23 Pedro Alves <palves@redhat.com>
15864
15865 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15866 (%.o) <unittests/%.c>: New pattern.
15867 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15868 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15869 * common/function-view.h: New file.
15870 * unittests/function-view-selftests.c: New file.
15871 * configure: Regenerate.
15872
8eaf5320
SM
158732017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15874
15875 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15876 inferior_ptid.
15877 * go32-nat.c (go32_thread_alive): Likewise.
15878
38768751
YQ
158792017-02-23 Yao Qi <yao.qi@linaro.org>
15880
15881 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15882 delete.
15883
0a8beaba
YQ
158842017-02-23 Yao Qi <yao.qi@linaro.org>
15885
15886 * varobj.c (varobj_clear_saved_item): Use delete instead of
15887 xfree.
15888 (update_dynamic_varobj_children): Likewise.
15889
58fdfd2c
JK
158902017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15891
15892 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15893
1b90b139
SM
158942017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15895
15896 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15897 m_enum_value to 0 in default constructor.
15898
2039d74e
EBM
158992017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15900
15901 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15902 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15903 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15904 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15905 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15906 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15907 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15908 IS_STORE_CONDITIONAL_INSN.
15909
7814882a
JK
159102017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15911
15912 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15913
0ae60b63
JK
159142017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15915
15916 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15917
0224619f
JK
159182017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15919
15920 * dwarf2read.c (skip_one_die, read_attribute_value)
15921 (dwarf2_const_value_attr, dump_die_shallow)
15922 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15923 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15924
0af92d60
JK
159252017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15926
15927 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15928 (dwarf_parse_macro_header): Accept DWARF version 5.
15929 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15930
216f72a1
JK
159312017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15932
15933 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15934 DW_AT_GNU_*.
15935 * common/common-exceptions.h (enum errors): Likewise.
15936 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15937 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15938 (dwarf_expr_context::execute_stack_op): Likewise.
15939 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15940 Likewise.
15941 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15942 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15943 (show_entry_values_debug, call_site_to_target_addr)
15944 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15945 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15946 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15947 (value_of_dwarf_block_entry, indirect_pieced_value)
15948 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15949 (disassemble_dwarf_expression): Likewise.
15950 * dwarf2read.c (process_die, inherit_abstract_dies)
15951 (read_call_site_scope): Likewise.
15952 * gdbtypes.h (struct func_type, struct call_site_parameter)
15953 (struct call_site): Likewise.
15954 * stack.c (read_frame_arg): Likewise.
15955 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15956
43988095
JK
159572017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15958
15959 * defs.h (read_unsigned_leb128): New declaration.
15960 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15961 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15962 (dwarf2_find_location_expression): Call also
15963 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15964 * dwarf2loc.h (dwarf2_version): New declaration.
15965 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15966 rnglists.
15967 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15968 .debug_rnglists.
15969 (struct dwop_section_names): Add loclists_dwo.
15970 (dwop_section_names): Add .debug_loclists.dwo.
15971 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15972 (struct dwarf2_per_cu_data): Add dwarf_version.
15973 (struct dwo_sections): Add loclists.
15974 (struct attr_abbrev): Add implicit_const.
15975 (read_indirect_line_string): New declaration.
15976 (read_unsigned_leb128): Delete declaration.
15977 (rcuh_kind): New definition.
15978 (read_and_check_comp_unit_head): Change parameter
15979 is_debug_types_section to section_kind.
15980 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15981 (read_comp_unit_head): Change parameter abfd to section, add parameter
15982 section_kind. Handle DWARF-5.
15983 (error_check_comp_unit_head): Accept also DWARF version 5.
15984 (read_and_check_comp_unit_head): Change parameter
15985 is_debug_types_section to section_kind.
15986 (read_and_check_type_unit_head): Delete function.
15987 (read_abbrev_offset): Handle DWARF-5.
15988 (create_debug_type_hash_table): Add parameter section_kind. Process
15989 only DW_UT_type. Use signature and type_offset_in_tu from struct
15990 comp_unit_head.
15991 (create_debug_types_hash_table): Update create_debug_type_hash_table
15992 caller.
15993 (create_all_type_units): Call create_debug_type_hash_table.
15994 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15995 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15996 caller.
15997 (skip_one_die): Handle DW_FORM_implicit_const.
15998 (dwarf2_rnglists_process): New function.
15999 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16000 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16001 (read_attribute_value): Handle DW_FORM_implicit_const,
16002 DW_FORM_line_strp.
16003 (read_attribute): Handle DW_FORM_implicit_const.
16004 (read_indirect_string_at_offset_from): New function from
16005 read_indirect_string_at_offset.
16006 (read_indirect_string_at_offset): Call
16007 read_indirect_string_at_offset_from.
16008 (read_indirect_line_string_at_offset): New function.
16009 (read_indirect_string): New function comment.
16010 (read_indirect_line_string): New function.
16011 (read_unsigned_leb128): Make it global.
16012 (dwarf2_string_attr): Handle DWARF-5.
16013 (add_include_dir_stub, read_formatted_entries): New functions.
16014 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16015 Handle DWARF-5.
16016 (per_cu_header_read_in): Update read_comp_unit_head caller.
16017 (dwarf2_version): New function.
16018 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16019 rnglists.
16020 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16021 fields.
16022
22d2f3ab
JK
160232017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16024
16025 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16026
5f46c5a5
JK
160272017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16028
16029 * dwarf2read.c (dwarf2_ranges_process): New function from
16030 dwarf2_ranges_read.
16031 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16032 dwarf2_ranges_process.
16033
78d4d2c5
JK
160342017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16035
16036 * dwarf2read.c (create_debug_type_hash_table): New function from
16037 create_debug_types_hash_table.
16038 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16039 (create_all_type_units, open_and_init_dwo_file): Update
16040 create_debug_types_hash_table callers.
16041
1b076f25
SDJ
160422017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16043
16044 PR gdb/16188
16045 * fork-child.c (trace_start_error): Fix thinko. va_end should
16046 refer to 'ap', not 'args'.
16047
0db8980c
SDJ
160482017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16049 Pedro Alves <palves@redhat.com>
16050
16051 PR gdb/16188
16052 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16053 calls succeeded.
16054 * fork-child.c (trace_start_error): New function.
16055 (trace_start_error_with_name): Likewise.
16056 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16057 * inf-ptrace.c (inf_ptrace_me): Likewise.
16058 * inferior.h (trace_start_error): New prototype.
16059 (trace_start_error_with_name): Likewise.
16060
99e8a4f9
SDJ
160612017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16062
16063 PR gdb/21164
16064 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16065 NULL before using it.
16066 * symmisc.c (maintenance_print_symbols): Likewise.
16067 (maintenance_print_msymbols): Likewise.
16068
4e746bb6
TW
160692017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16070
16071 * NEWS: Add record Python bindings entry.
16072
160732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16074
16075 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16076 py-record-full.o.
16077 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16078 * python/py-record-btrace.c, python/py-record-btrace.h,
16079 python/py-record-full.c, python/py-record-full.h: New file.
16080 * python/py-record.c: Add include for py-record-btrace.h and
16081 py-record-full.h.
16082 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16083 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16084 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16085 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16086 New definition.
16087 (gdbpy_initialize_btrace): New export.
16088 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16089
160902017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16091
16092 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16093 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16094 * python/py-record.c: New file.
16095 * python/python-internal.h (gdbpy_start_recording,
16096 gdbpy_current_recording, gdpy_stop_recording,
16097 gdbpy_initialize_record): New export.
16098 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16099 (python_GdbMethods): Add gdbpy_start_recording,
16100 gdbpy_current_recording and gdbpy_stop_recording.
16101
161022017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16103
16104 * record-btrace.c (record_btrace_record_method): New function.
16105 (init_record_btrace_ops): Initialize to_record_method.
16106 * record-full.c (record_full_record_method): New function.
16107 (init_record_full_ops, init_record_full_core_ops): Add
16108 record_full_record_method.
16109 * record.h (enum record_method): New enum.
16110 * target-debug.h (target_debug_print_enum_record_method: New define.
16111 * target-delegates.c: Regenerate.
16112 * target.c (target_record_method): New function.
16113 * target.h: Include record.h.
16114 (struct target_ops) <to_record_method>: New field.
16115 (target_record_method): New export.
16116
161172017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16118
16119 * record.h (record_start, record_stop): New export.
16120 * record.c (record_start, record_stop): New function.
16121
161222017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16123
16124 * btrace.c (btrace_fetch): Copy function call segments pointer
16125 into a vector.
16126 (btrace_clear): Clear the vector.
16127 (btrace_find_insn_by_number): Use binary search to find the correct
16128 function call segment.
16129 * btrace.h (brace_fun_p): New typedef.
16130 (struct btrace_thread_info) <functions>: New field.
16131
161322017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16133
16134 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16135 * btrace.c (btrace_decode_error): ... here. New function.
16136 * btrace.h (btrace_decode_error): New export.
16137
161382017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16139
16140 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16141 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16142 btrace_find_insn_by_number): Remove special case for gaps.
16143 * btrace.h (btrace_insn_get_error): New export.
16144 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16145 * record-btrace.c (btrace_insn_history): Print number for gaps.
16146 (record_btrace_info, record_btrace_goto): Handle gaps.
16147
3f77c769
TT
161482017-02-14 Tom Tromey <tom@tromey.com>
16149
16150 PR python/13598:
16151 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16152 event.
16153 * python/py-evts.c (gdbpy_initialize_py_events): Add
16154 before_prompt registry.
16155 * python/py-events.h (events_object) <before_prompt>: New field.
16156
4c2c7ac6
MM
161572017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16158
16159 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16160
5cf30ebf
LM
161612017-02-13 Luis Machado <lgustavo@codesourcery.com>
16162
16163 * symfile (_initialize_symfile): Add usage text to the load command's
16164 help text.
16165
26a06916
SM
161662017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16167
16168 * utils.c (defaulted_query): Don't query on secondary UIs.
16169
0b145e37
TT
161702017-02-10 Tom Tromey <tom@tromey.com>
16171
16172 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16173
2d8365c4
TT
161742017-02-10 Tom Tromey <tom@tromey.com>
16175
16176 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16177 "cleanup" local.
16178 * python/py-type.c (typy_legacy_template_argument): Remove
16179 unnecessary "cleanup" local.
16180
2bb8f231
TT
161812017-02-10 Tom Tromey <tom@tromey.com>
16182
16183 * python/python.c (do_start_initialization): New function, from
16184 _initialize_python.
16185 (_initialize_python): Call do_start_initialization.
16186 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16187 goto.
16188
1bdfaf42
TT
161892017-02-10 Tom Tromey <tom@tromey.com>
16190
16191 * python/py-prettyprint.c (pretty_print_one_value): Use
16192 gdbpy_ref.
16193
88b6faea
TT
161942017-02-10 Tom Tromey <tom@tromey.com>
16195
16196 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16197 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16198 gdbpy_ref.
16199 * python/py-type.c (field_new): Use gdbpy_ref.
16200 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16201 gdbpy_ref.
16202 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16203 (py_free_pspace): Likewise.
16204 (pspace_to_pspace_object): Likewise.
16205 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16206 (py_free_objfile): Likewise.
16207 (objfile_to_objfile_object): Likewise.
16208 * python/py-inferior.c (delete_thread_object): Use
16209 gdbpy_ref.
16210 (infpy_read_memory): Likewise.
16211 (py_free_inferior): Likewise.
16212 * python/py-evtregistry.c (create_eventregistry_object): Use
16213 gdbpy_ref.
16214 * python/py-event.c (create_event_object): Use gdbpy_ref.
16215
7780f186
TT
162162017-02-10 Tom Tromey <tom@tromey.com>
16217
16218 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16219 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16220 used.
16221 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16222 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16223 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16224 python/py-framefilter.c, python/py-function.c,
16225 python/py-inferior.c, python/py-infevents.c,
16226 python/py-linetable.c, python/py-newobjfileevent.c,
16227 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16228 python/py-signalevent.c, python/py-stopevent.c,
16229 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16230 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16231 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16232 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16233
d4b0bb18
TT
162342017-02-10 Tom Tromey <tom@tromey.com>
16235
16236 * ui-out.h (ui_out_emit_type): New class.
16237 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16238 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16239 and ui_out_emit_tuple.
16240 (enumerate_locals): Likewise.
16241 (py_mi_print_variables, py_print_locals, py_print_args): Use
16242 ui_out_emit_list.
16243 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16244 ui_out_emit_list.
16245 * common/gdb_optional.h: New file.
16246
f67f945c
MG
162472017-02-10 Martin Galvan <martingalvan@sourceware.org>
16248
16249 * MAINTAINERS (Write After Approval): Update my e-mail address.
16250
18da0c51
MG
162512017-02-10 Martin Galvan <martingalvan@sourceware.org>
16252
16253 PR gdb/21122
16254 * breakpoint.c (_initialize_breakpoint): Update the help description
16255 of the 'commands' command to indicate that it takes a list argument.
16256
62c14536
SM
162572017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16258
16259 * interps.c (current_interp_set_logging): Remove "return".
16260
ff6fa247
GB
162612017-02-09 Gary Benson <gbenson@redhat.com>
16262
16263 * symtab.c (add_symtab_completions): Prevent NULL pointer
16264 dereference.
16265
a474bd8e
PA
162662017-02-08 Pedro Alves <palves@redhat.com>
16267
16268 * interps.c (interp::interp): Remove reference to quiet_p.
16269 (interp_set): Make static. Remove dead "Switching to" output
16270 code.
16271 (interp_quiet_p, interp_set_quiet): Delete.
16272 (interpreter_exec_cmd): Don't set the interpreter quiet.
16273 * interps.h (interp_quiet_p): Make static.
16274 (class interp) <quiet_p>: Remove field
16275
3d7b173c
JG
162762017-02-08 Jerome Guitton <guitton@adacore.com>
16277
604c4576
JG
16278 * cli/cli-decode.c (find_command_name_length): Make it extern.
16279 * cli/cli-decode.h (find_command_name_length): Declare.
16280 * cli/cli-script.c (command_name_equals, line_first_arg):
16281 New functions.
16282 (process_next_line): Use cli-decode to parse command names.
16283 (build_command_line): Make args a constant pointer.
16284
162852017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 16286
3d7b173c
JG
16287 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16288 Remove case-insensitive search.
16289
1291063d
JM
162902017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16291
16292 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16293 at the end of the line. Avoids an ARI warning.
16294
20b477a7
LM
162952017-02-06 Luis Machado <lgustavo@codesourcery.com>
16296
16297 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16298 rdseed instructions.
16299 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16300
3f7b46f2
IR
163012017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16302
16303 PR tdep/20936
16304 Provide and use sparc32 and sparc64 target description XML files.
16305 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16306 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16307 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16308 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16309 * features/sparc/sparc32-solaris.xml: New file.
16310 * features/sparc/sparc64-solaris.xml: New file.
16311 * features/sparc/sparc32-solaris.c: Generated.
16312 * features/sparc/sparc64-solaris.c: Generated.
16313 * sparc-tdep.h: Account for differences in target descriptions.
16314 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16315 (sparc32_register_type): Use target provided registers.
16316 (validate_tdesc_registers): New function.
16317 (sparc32_gdbarch_init): Use tdesc_has_registers.
16318 Set pseudoregister functions.
16319 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16320 (sparc64_register_type): Use target provided registers.
16321 (sparc64_init_abi): Set pseudoregister functions.
16322
f0fd41c1
TT
163232017-02-03 Tom Tromey <tom@tromey.com>
16324
16325 PR rust/21097:
16326 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16327 with a single member.
16328
d6f9b0fb
PA
163292017-02-03 Pedro Alves <palves@redhat.com>
16330
16331 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16332 (cli_interp_base::~cli_interp_base): New.
16333 (cli_interp): New struct.
16334 (as_cli_interp): Cast the interp itself to cli_interp.
16335 (cli_interpreter_pre_command_loop): Rename to ...
16336 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16337 parameter.
16338 (cli_interpreter_init): Rename to ...
16339 (cli_interp::init): ... this. Remove 'self' parameter. Use
16340 boolean. Make extern.
16341 (cli_interpreter_resume): Rename to ...
16342 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16343 extern.
16344 (cli_interpreter_suspend): Rename to ...
16345 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16346 extern.
16347 (cli_interpreter_exec): Rename to ...
16348 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16349 extern.
16350 (cli_interpreter_supports_command_editing): Rename to ...
16351 (cli_interp_base::supports_command_editing): ... this. Remove
16352 'interp' parameter. Make extern.
16353 (cli_ui_out): Rename to ...
16354 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16355 Make extern.
16356 (cli_set_logging): Rename to ...
16357 (cli_interp_base::set_logging): ... this. Remove 'interp'
16358 parameter. Make extern.
16359 (cli_interp_procs): Delete.
16360 (cli_interp_factory): Adjust to use "new".
16361 * cli/cli-interp.h: Include "interps.h".
16362 (struct cli_interp_base): New struct.
16363 * interps.c (struct interp): Delete. Fields moved to interps.h.
16364 (interp_new): Delete.
16365 (interp::interp, interp::~interp): New.
16366 (interp_set): Use bool, and return void. Assume the interpreter
16367 has suspend, init and resume methods, and that the all return
16368 void.
16369 (set_top_level_interpreter): interp_set returns void.
16370 (interp_ui_out): Adapt.
16371 (current_interp_set_logging): Adapt.
16372 (interp_data): Delete.
16373 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16374 (interp_exec): Adapt.
16375 (top_level_interpreter_data): Delete.
16376 * interps.h (interp_init_ftype, interp_resume_ftype)
16377 (interp_suspend_ftype, interp_exec_ftype)
16378 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16379 (class interp): New.
16380 (interp_new): Delete.
16381 (interp_set): Now returns void. Use bool.
16382 (interp_data, top_level_interpreter_data): Delete.
16383 * mi/mi-common.h: Include interps.h.
16384 (class mi_interp): Inherit from interp. Define a ctor. Declare
16385 init, resume, suspect, exec, interp_ui_out, set_logging and
16386 pre_command_loop methods.
16387 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16388 (mi_interpreter_init): Rename to ...
16389 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16390 bool, return void and make extern. Adjust.
16391 (mi_interpreter_resume): ... Rename to ...
16392 (mi_interp::resume): ... this. Remove the 'data' parameter,
16393 return void and make extern. Adjust.
16394 (mi_interpreter_suspend): ... Rename to ...
16395 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16396 return void and make extern. Adjust.
16397 (mi_interpreter_exec): ... Rename to ...
16398 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16399 extern. Adjust.
16400 (mi_interpreter_pre_command_loop): ... Rename to ...
16401 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16402 parameter and make extern.
16403 (mi_on_normal_stop_1): Adjust.
16404 (mi_ui_out): Rename to ...
16405 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16406 parameter and make extern. Adjust.
16407 (mi_set_logging): Rename to ...
16408 (mi_interp::set_logging): ... this. Remove the 'interp'
16409 parameter and make extern. Adjust.
16410 (mi_interp_procs): Delete.
16411 (mi_interp_factory): Adjust to use 'new'.
16412 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16413 (mi_print_exception, mi_execute_command, mi_load_progress):
16414 Adjust.
16415 * tui/tui-interp.c (tui_interp): New class.
16416 (as_tui_interp): Return a tui_interp pointer.
16417 (tui_on_normal_stop, tui_on_signal_received)
16418 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16419 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16420 to use interp::interp_ui_out.
16421 (tui_init): Rename to ...
16422 (tui_interp::init): ... this. Remove the 'self' parameter, use
16423 bool, return void and make extern. Adjust.
16424 (tui_resume): Rename to ...
16425 (tui_interp::resume): ... this. Remove the 'data' parameter,
16426 return void and make extern. Adjust.
16427 (tui_suspend): Rename to ...
16428 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16429 return void and make extern. Adjust.
16430 (tui_ui_out): Rename to ...
16431 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16432 parameter, and make extern. Adjust.
16433 (tui_exec): Rename to ...
16434 (tui_interp::exec): ... this. Remove the 'data' parameter and
16435 make extern.
16436 (tui_interp_procs): Delete.
16437 (tui_interp_factory): Use "new".
16438
65c40c95
TT
164392017-02-02 Tom Tromey <tom@tromey.com>
16440
16441 * rust-exp.y (ends_raw_string, space_then_number)
16442 (rust_identifier_start_p): Return bool.
16443 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16444 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16445 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16446 (rust_chartype_p): Return bool.
16447 (val_print_struct, rust_print_struct_def, rust_print_type):
16448 Update.
16449 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16450 Return bool.
16451
b50f188d
TT
164522017-02-02 Tom Tromey <tom@tromey.com>
16453
16454 * rust-lang.c: Reindent.
16455
03c85b11
TT
164562017-02-02 Tom Tromey <tom@tromey.com>
16457
16458 * rust-lang.h (rust_crate_for_block): Update.
16459 * rust-lang.c (rust_crate_for_block): Return std::string.
16460 (rust_get_disr_info): Use std:;string, not
16461 gdb::unique_xmalloc_ptr.
16462 * rust-exp.y (crate_name): Update.
16463
9b6da501
PA
164642017-02-02 Pedro Alves <palves@redhat.com>
16465
16466 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16467 field out of gdb_disassembler_test and make it static.
16468
ec4cb20b
PA
164692017-02-02 Pedro Alves <palves@redhat.com>
16470
16471 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16472 mi1_interp and mi_interp fields.
16473
5be5dbf0
PA
164742017-02-02 Pedro Alves <palves@redhat.com>
16475
616268b6
PA
16476 * cli/cli-interp.c (struct saved_output_files, saved_output):
16477 Moved from cli/cli-logging.c.
16478 (cli_set_logging): New function.
16479 (cli_interp_procs): Install cli_set_logging.
16480 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16481 Declare.
16482 * cli/cli-logging.c (struct saved_output_files, saved_output):
16483 Moved to cli/cli-interp.c.
16484 (pop_output_files): Don't save outputs here.
16485 (make_logging_output): New function.
16486 (handle_redirections): Don't build tee nor save previous outputs
16487 here.
16488 * interps.c (current_interp_set_logging): Change prototype.
16489 Assume there's always a set_logging_proc method installed.
16490 * interps.h (interp_set_logging_ftype): Change prototype.
16491 (current_interp_set_logging): Change prototype and adjust comment.
16492 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16493 use make_logging_output.
16494 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
164952017-02-02 Pedro Alves <palves@redhat.com>
16496
5be5dbf0
PA
16497 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16498 from ...
16499 (set_logging_overwrite): ... here.
16500 (logging_no_redirect_file): Delete.
16501 (set_logging_redirect): Don't handle redirection on the fly.
16502 Instead warn that "logging off" / "logging on" is necessary.
16503 (pop_output_files): Delete references to logging_no_redirect_file.
16504 (show_logging_command): Always speak in terms of what will happen
16505 once logging is reenabled.
16506
c99cc448
PA
165072017-02-02 Pedro Alves <palves@redhat.com>
16508
16509 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16510
8b172ce7
PA
165112017-02-02 Pedro Alves <palves@redhat.com>
16512
16513 * disasm.c (gdb_pretty_print_insn): Rename to ...
16514 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16515 Remove gdbarch parameter. Adapt to clear the object's buffers
16516 instead of allocating new buffers, and to print using the object's
16517 gdb_disassembler instead of calling gdb_print_insn.
16518 (dump_insns): Use gdb_pretty_print_disassembler.
16519 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16520 (gdb_pretty_print_disassembler): New class.
16521 * record-btrace.c (btrace_insn_history): Use
16522 gdb_pretty_print_disassembler.
16523
d7e74731
PA
165242017-02-02 Pedro Alves <palves@redhat.com>
16525
16526 * ada-lang.c (type_as_string): Use string_file.
16527 * ada-valprint.c (ada_print_floating): Use string_file.
16528 * ada-varobj.c (ada_varobj_scalar_image)
16529 (ada_varobj_get_value_image): Use string_file.
16530 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16531 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16532 * breakpoint.c (update_inserted_breakpoint_locations)
16533 (insert_breakpoint_locations, reattach_breakpoints)
16534 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16535 (print_it_watchpoint): Use string_file.
16536 (save_breakpoints): Use stdio_file.
16537 * c-exp.y (oper): Use string_file.
16538 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16539 tee_file.
16540 (pop_output_files): Use delete.
16541 (handle_redirections): Use stdio_file and tee_file.
16542 * cli/cli-setshow.c (do_show_command): Use string_file.
16543 * compile/compile-c-support.c (c_compute_program): Use
16544 string_file.
16545 * compile/compile-c-symbols.c (generate_vla_size): Take a
16546 'string_file &' instead of a 'ui_file *'.
16547 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16548 of a 'ui_file *'. Use string_file.
16549 (generate_c_for_variable_locations): Take a 'string_file &'
16550 instead of a 'ui_file *'.
16551 * compile/compile-internal.h (generate_c_for_for_one_variable):
16552 Take a 'string_file &' instead of a 'ui_file *'.
16553 * compile/compile-loc2c.c (push, pushf, unary, binary)
16554 (print_label, pushf_register_address, pushf_register)
16555 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16556 'ui_file *'. Adjust.
16557 * compile/compile.c (compile_to_object): Use string_file.
16558 * compile/compile.h (compile_dwarf_expr_to_c)
16559 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16560 'ui_file *'.
16561 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16562 (replace_typedefs_qualified_name): Use string_file and
16563 obstack_copy0.
16564 * disasm.c (gdb_pretty_print_insn): Use string_file.
16565 (gdb_disassembly): Adjust reference the null_stream global.
16566 (do_ui_file_delete): Delete.
16567 (gdb_insn_length): Use null_stream.
16568 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16569 * dwarf2loc.c (dwarf2_compile_property_to_c)
16570 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16571 'string_file &' instead of a 'ui_file *'.
16572 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16573 * dwarf2read.c (do_ui_file_peek_last): Delete.
16574 (dwarf2_compute_name): Use string_file.
16575 * event-top.c (gdb_setup_readline): Use stdio_file.
16576 * gdbarch.sh (verify_gdbarch): Use string_file.
16577 * gdbtypes.c (safe_parse_type): Use null_stream.
16578 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16579 string_file.
16580 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16581 'string_file *' instead of a 'ui_file *'.
16582 (gdbscm_arch_disassemble): Use string_file.
16583 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16584 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16585 inherits from ui_file.
16586 (ioscm_file_port_delete, ioscm_file_port_rewind)
16587 (ioscm_file_port_put): Delete.
16588 (ioscm_file_port_write): Rename to ...
16589 (ioscm_file_port::write): ... this. Remove file_port_magic
16590 checks.
16591 (ioscm_file_port_new): Delete.
16592 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16593 ui_file_up.
16594 * guile/scm-type.c (tyscm_type_name): Use string_file.
16595 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16596 Use string_file.
16597 * infcmd.c (print_return_value_1): Use string_file.
16598 * infrun.c (print_target_wait_results): Use string_file.
16599 * language.c (add_language): Use string_file.
16600 * location.c (explicit_to_string_internal): Use string_file.
16601 * main.c (captured_main_1): Use null_file.
16602 * maint.c (maintenance_print_architecture): Use stdio_file.
16603 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16604 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16605 event_channel>: Change type to mi_console_file pointer.
16606 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16607 (mi_console_file_delete): Delete.
16608 (struct mi_console_file): Delete.
16609 (mi_console_file_magic): Delete.
16610 (mi_console_file_new): Delete.
16611 (mi_console_file::mi_console_file): New.
16612 (mi_console_file_delete): Delete.
16613 (mi_console_file_fputs): Delete.
16614 (mi_console_file::write): New.
16615 (mi_console_raw_packet): Delete.
16616 (mi_console_file::flush): New.
16617 (mi_console_file_flush): Delete.
16618 (mi_console_set_raw): Rename to ...
16619 (mi_console_file::set_raw): ... this.
16620 * mi/mi-console.h (class mi_console_file): New class.
16621 (mi_console_file_new, mi_console_set_raw): Delete.
16622 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16623 (mi_set_logging): Use delete and tee_file. Adjust.
16624 * mi/mi-main.c (output_register): Use string_file.
16625 (mi_cmd_data_evaluate_expression): Use string_file.
16626 (mi_cmd_data_read_memory): Use string_file.
16627 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16628 * mi/mi-out.c (mi_ui_out::main_stream): New.
16629 (mi_ui_out::rewind): Use main_stream and
16630 string_file.
16631 (mi_ui_out::put): Use main_stream and string_file.
16632 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16633 Allocate a 'string_file' instead.
16634 (mi_out_new): Don't allocate a mem_fileopen stream here.
16635 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16636 (mi_ui_out::main_stream): Declare method.
16637 * printcmd.c (eval_command): Use string_file.
16638 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16639 * python/py-arch.c (archpy_disassemble): Use string_file.
16640 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16641 * python/py-frame.c (frapy_str): Use string_file.
16642 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16643 Use string_file.
16644 * python/py-type.c (typy_str): Use string_file.
16645 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16646 * python/py-value.c (valpy_str): Use string_file.
16647 * record-btrace.c (btrace_insn_history): Use string_file.
16648 * regcache.c (regcache_print): Use stdio_file.
16649 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16650 * remote.c (escape_buffer): Use string_file.
16651 * rust-lang.c (rust_get_disr_info): Use string_file.
16652 * serial.c (serial_open_ops_1): Use stdio_file.
16653 (do_serial_close): Use delete.
16654 * stack.c (print_frame_arg): Use string_file.
16655 (print_frame_args): Remove local mem_fileopen stream, not used.
16656 (print_frame): Use string_file.
16657 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16658 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16659 Take a 'string_file *' instead of a 'ui_file *'.
16660 * top.c (new_ui): Use stdio_file and stderr_file.
16661 (free_ui): Use delete.
16662 (execute_command_to_string): Use string_file.
16663 (quit_confirm): Use string_file.
16664 * tracepoint.c (collection_list::append_exp): Use string_file.
16665 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16666 * tui/tui-file.c: Don't include "ui-file.h".
16667 (enum streamtype, struct tui_stream): Delete.
16668 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16669 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16670 (tui_file::tui_file): New method.
16671 (tui_file_fputs): Delete.
16672 (tui_file_get_strbuf): Delete.
16673 (tui_file::puts): New method.
16674 (tui_file_adjust_strbuf): Delete.
16675 (tui_file_flush): Delete.
16676 (tui_file::flush): New method.
16677 * tui/tui-file.h: Tweak intro comment.
16678 Include ui-file.h.
16679 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16680 (tui_file_adjust_strbuf): Delete declarations.
16681 (class tui_file): New class.
16682 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16683 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16684 (tui_register_format): Use string_stream.
16685 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16686 (tui_get_function_from_frame): Use string_file.
16687 * typeprint.c (type_to_string): Use string_file.
16688 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16689 (null_stream): New global.
16690 (ui_file_delete): Delete.
16691 (ui_file::ui_file): New.
16692 (null_file_isatty): Delete.
16693 (ui_file::~ui_file): New.
16694 (null_file_rewind): Delete.
16695 (ui_file::printf): New.
16696 (null_file_put): Delete.
16697 (null_file_flush): Delete.
16698 (ui_file::putstr): New.
16699 (null_file_write): Delete.
16700 (ui_file::putstrn): New.
16701 (null_file_read): Delete.
16702 (ui_file::putc): New.
16703 (null_file_fputs): Delete.
16704 (null_file_write_async_safe): Delete.
16705 (ui_file::vprintf): New.
16706 (null_file_delete): Delete.
16707 (null_file::write): New.
16708 (null_file_fseek): Delete.
16709 (null_file::puts): New.
16710 (ui_file_data): Delete.
16711 (null_file::write_async_safe): New.
16712 (gdb_flush, ui_file_isatty): Adjust.
16713 (ui_file_put, ui_file_rewind): Delete.
16714 (ui_file_write): Adjust.
16715 (ui_file_write_for_put): Delete.
16716 (ui_file_write_async_safe, ui_file_read): Adjust.
16717 (ui_file_fseek): Delete.
16718 (fputs_unfiltered): Adjust.
16719 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16720 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16721 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16722 (set_ui_file_data): Delete.
16723 (string_file::~string_file, string_file::write)
16724 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16725 (do_ui_file_as_string, ui_file_as_string): Delete.
16726 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16727 (struct mem_file): Delete.
16728 (mem_file_new): Delete.
16729 (stdio_file::stdio_file): New.
16730 (mem_file_delete): Delete.
16731 (stdio_file::stdio_file): New.
16732 (mem_fileopen): Delete.
16733 (stdio_file::~stdio_file): New.
16734 (mem_file_rewind): Delete.
16735 (stdio_file::set_stream): New.
16736 (mem_file_put): Delete.
16737 (stdio_file::open): New.
16738 (mem_file_write): Delete.
16739 (stdio_file_magic, struct stdio_file): Delete.
16740 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16741 (stdio_file::flush): New.
16742 (stdio_file_read): Rename to ...
16743 (stdio_file::read): ... this. Adjust.
16744 (stdio_file_write): Rename to ...
16745 (stdio_file::write): ... this. Adjust.
16746 (stdio_file_write_async_safe): Rename to ...
16747 (stdio_file::write_async_safe) ... this. Adjust.
16748 (stdio_file_fputs): Rename to ...
16749 (stdio_file::puts) ... this. Adjust.
16750 (stdio_file_isatty): Delete.
16751 (stdio_file_fseek): Delete.
16752 (stdio_file::isatty): New.
16753 (stderr_file_write): Rename to ...
16754 (stderr_file::write) ... this. Adjust.
16755 (stderr_file_fputs): Rename to ...
16756 (stderr_file::puts) ... this. Adjust.
16757 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16758 (stderr_file::stderr_file): New.
16759 (tee_file_magic): Delete.
16760 (struct tee_file): Delete.
16761 (tee_file::tee_file): New.
16762 (tee_file_new): Delete.
16763 (tee_file::~tee_file): New.
16764 (tee_file_delete): Delete.
16765 (tee_file_flush): Rename to ...
16766 (tee_file::flush): ... this. Adjust.
16767 (tee_file_write): Rename to ...
16768 (tee_file::write): ... this. Adjust.
16769 (tee_file::write_async_safe): New.
16770 (tee_file_fputs): Rename to ...
16771 (tee_file::puts): ... this. Adjust.
16772 (tee_file_isatty): Rename to ...
16773 (tee_file::isatty): ... this. Adjust.
16774 * ui-file.h (struct obstack, struct ui_file): Don't
16775 forward-declare.
16776 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16777 (ui_file_write_ftype)
16778 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16779 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16780 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16781 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16782 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16783 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16784 (set_ui_file_fseek): Delete.
16785 (ui_file_data, ui_file_delete, ui_file_rewind)
16786 (struct ui_file): New.
16787 (ui_file_up): New.
16788 (class null_file): New.
16789 (null_stream): Declare.
16790 (ui_file_write_for_put, ui_file_put): Delete.
16791 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16792 Delete.
16793 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16794 (gdb_fopen, tee_file_new): Delete.
16795 (struct string_file): New.
16796 (struct stdio_file): New.
16797 (stdio_file_up): New.
16798 (struct stderr_file): New.
16799 (class tee_file): New.
16800 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16801 of a 'ui_file *'. Adjust.
16802 * ui-out.h (class ui_out) <field_stream>: Likewise.
16803 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16804 (null_stream): Delete.
16805 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16806 Adjust.
16807 * utils.h (struct ui_file): Delete forward declaration..
16808 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16809 (error_stream): Take a 'string_file &' instead of a
16810 'ui_file *'.
16811 * varobj.c (varobj_value_get_print_value): Use string_file.
16812 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16813 * gdbarch.c: Regenerate.
16814
187808b0
PA
168152017-02-02 Pedro Alves <palves@redhat.com>
16816
16817 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16818 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16819 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16820 Adjust to call gdb_print_insn instead of
16821 gdb_disassembler::print_insn.
16822 (dump_insns, do_mixed_source_and_assembly_deprecated)
16823 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16824 'gdbarch' parameter. Remove gdb_disassembler parameter.
16825 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16826 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16827 declaration.
16828 (gdb_pretty_print_insn): Re-add declaration.
16829 * record-btrace.c (btrace_insn_history): Don't allocate a
16830 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16831
7a8eb317
SM
168322017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16833
16834 * disasm.h (gdb_disassembly): Remove file_string parameter.
16835 * disasm.c (gdb_disassembly): Likewise.
16836 * cli/cli-cmds.c (print_disassembly): Adapt.
16837 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16838 * stack.c (do_gdb_disassembly): Likewise.
16839
7346ef59
AA
168402017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16841
16842 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16843 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16844 targets. And if the implicit value is longer than needed, extract
16845 the first bytes instead of the "least significant" ones.
16846
cd4007e4
MM
168472017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16848
16849 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16850 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16851 (btrace_fetch): Assert can_access_registers_ptid.
16852 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16853 validate_registers_access.
16854
cf77c34e
MM
168552017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16856
16857 * gdbthread.h (can_access_registers_ptid): New.
16858 * thread.c (can_access_registers_ptid): New.
16859
be85ce7d
PA
168602017-02-01 Pedro Alves <palves@redhat.com>
16861
16862 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16863
29b0b251
PA
168642017-01-31 Pedro Alves <palves@redhat.com>
16865
16866 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16867 Fix typos.
16868
289b5b24
PA
168692017-01-31 Pedro Alves <palves@redhat.com>
16870
16871 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16872 not used.
16873
b47413b4
PA
168742017-01-31 Pedro Alves <palves@redhat.com>
16875
16876 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16877
60adb36c
PA
168782017-01-31 Pedro Alves <palves@redhat.com>
16879
16880 * common/scoped_restore.h
16881 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16882 change the value's parameter type to T2.
16883 (make_scoped_restore): Likewise.
16884
2735833d
WT
168852017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16886 Richard Henderson <rth@redhat.com>
16887
16888 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16889 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16890 GS_BASE for older kernels.
16891 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16892 GS_BASE for older kernels.
16893 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16894 and GS_BASE to the offset table.
16895 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16896 system register group.
16897 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16898 for older kernels.
16899 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16900 amd64 ABI.
16901 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16902 AMD64_GSBASE_REGNUM.
16903 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16904 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16905 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16906 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16907 i386/64bit-segments.xml in those rules.
16908 * features/i386/64bit-segments.xml: New file.
16909 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16910 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16911 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16912 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16913 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16914 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16915 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16916 * features/i386/amd64-avx-linux.c: Regenerated.
16917 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16918 * features/i386/amd64-avx-mpx.c: Regenerated.
16919 * features/i386/amd64-avx512-linux.c: Regenerated.
16920 * features/i386/amd64-linux.c: Regenerated.
16921 * features/i386/amd64-mpx-linux.c: Regenerated.
16922 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16923 * features/i386/i386-avx-mpx.c: Regenerated.
16924 * features/i386/x32-avx-linux.c: Regenerated.
16925 * features/i386/x32-avx512-linux.c: Regenerated.
16926 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16927 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16928 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16929 * regformats/i386/amd64-linux.dat: Regenerated.
16930 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16931 * regformats/i386/x32-avx-linux.dat: Regenerated.
16932 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16933 * regformats/i386/x32-linux.dat: Regenerated.
16934
8884e97e
WT
169352017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16936
16937 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16938 Set to AMD64_NUM_REGS.
16939
7005d26a
WT
169402017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16941
16942 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16943 that checks validity of a register number.
16944
4bd2e1b2
KC
169452017-01-27 Kees Cook <keescook@google.com>
16946
16947 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16948 fetch_fpregs if target has fpa registers.
16949 (arm_linux_store_inferior_registers): Call store_fpregs if target
16950 has fpa registers.
16951
7cf1de6c
AA
169522017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16953
16954 * cris-tdep.c (cris_gdbarch_init): Remove check for
16955 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16956
874a1c8c
AT
169572017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16958
16959 * corelow.c (get_core_register_section): Check for regset
16960 existence before checking for REGSET_VARIABLE_SIZE.
16961
d8b49cf0
YQ
169622017-01-26 Yao Qi <yao.qi@linaro.org>
16963 Pedro Alves <palves@redhat.com>
16964
16965 PR gdb/20939
16966 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16967 call memory_error, save memaddr instead.
16968 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16969 negative, cal memory_error.
16970 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16971
658ca58c
YQ
169722017-01-26 Yao Qi <yao.qi@linaro.org>
16973
16974 * disasm-selftests.c (memory_error_test): New function.
16975 (_initialize_disasm_selftests): Register memory_error_test.
16976
79843d45
YQ
169772017-01-26 Yao Qi <yao.qi@linaro.org>
16978
16979 * Makefile.in (SFILES): Add disasm-selftests.c and
16980 selftest-arch.c.
16981 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16982 * disasm-selftests.c: New file.
16983 * selftest-arch.c: New file.
16984 * selftest-arch.h: New file.
16985
8cafda32
YQ
169862017-01-26 Yao Qi <yao.qi@linaro.org>
16987
16988 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16989 to bfd_arch_mep. Don't return 0 if section is not
16990 found. Call print_insn_mep.
16991
e47ad6c0
YQ
169922017-01-26 Pedro Alves <palves@redhat.com>
16993 Yao Qi <yao.qi@linaro.org>
16994
16995 * arm-tdep.c: Include "disasm.h".
16996 (gdb_print_insn_arm): Update code to get gdbarch.
16997 * disasm.c (dis_asm_read_memory): Change it to
16998 gdb_disassembler::dis_asm_read_memory.
16999 (dis_asm_memory_error): Likewise.
17000 (dis_asm_print_address): Likewise.
17001 (gdb_pretty_print_insn): Change it to
17002 gdb_disassembler::pretty_print_insn.
17003 (dump_insns): Add one argument gdb_disassemlber. All
17004 callers updated.
17005 (do_mixed_source_and_assembly_deprecated): Likewise.
17006 (do_mixed_source_and_assembly): Likewise.
17007 (do_assembly_only): Likewise.
17008 (gdb_disassembler::gdb_disassembler): New.
17009 (gdb_disassembler::print_insn): New.
17010 * disasm.h (class gdb_disassembler): New.
17011 (gdb_pretty_print_insn): Remove declaration.
17012 (gdb_disassemble_info): Likewise.
17013 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17014 (gdbscm_disasm_read_memory_worker): Update.
17015 (gdbscm_disasm_read_memory): Update.
17016 (gdbscm_disasm_memory_error): Remove.
17017 (gdbscm_disasm_print_address): Remove.
17018 (gdbscm_disassembler::gdbscm_disassembler): New.
17019 (gdbscm_print_insn_from_port): Update.
17020 * mips-tdep.c: Include disasm.h.
17021 (gdb_print_insn_mips): Update code to get gdbarch.
17022 * record-btrace.c (btrace_insn_history): Update.
17023 * spu-tdep.c: Include disasm.h.
17024 (struct spu_dis_asm_data): Remove.
17025 (struct spu_dis_asm_info): New.
17026 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17027 SPU id.
17028 (gdb_print_insn_spu): Cast disassemble_info to
17029 spu_dis_asm_info.
17030
80d75874
YQ
170312017-01-26 Yao Qi <yao.qi@linaro.org>
17032
17033 * disasm.c (do_ui_file_delete): Delete.
17034 (gdb_insn_length): Move code creating stream to ...
17035 * utils.c (null_stream): ... here. New function.
17036 * utils.h (null_stream): Declare.
17037
60685cd0
SM
170382017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17039
17040 * python/py-inferior.c (find_thread_object): Return directly
17041 from the loop. Remove "found" variable.
17042
eb1cdb62
JB
170432017-01-21 Joel Brobecker <brobecker@adacore.com>
17044
17045 GDB 7.12.1 released.
17046
b1ce6568
SM
170472017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17048
17049 * python/py-function.c (fnpy_call): Reorder declarations to have
17050 the gdbpy_enter object declared first.
17051 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17052
6f8b0407
SM
170532017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17054
fec93fb1 17055 PR python/21068
6f8b0407
SM
17056 * python/python-internal.h (PyMem_RawMalloc): Define for
17057 Python < 3.4.
17058 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17059 PyMem_RawMalloc instead of PyMem_Malloc.
17060
78cbbba8
LM
170612017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17062 Luis Machado <lgustavo@codesourcery.com>
17063
17064 * NEWS (New commands): Mention flash-erase.
17065 (New MI commands): Mention target-flash-erase.
17066 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17067 command.
17068 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17069 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17070 * target.c (flash_erase_command): New function.
17071 (initialize_targets): Add new flash-erase command.
17072 * target.h (flash_erase_command): New declaration.
17073
2132fe85
JB
170742017-01-20 Joel Brobecker <brobecker@adacore.com>
17075
17076 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17077 HAVE_SYS_PROCFS_H is defined.
17078
d1dff226
AH
170792017-01-18 Alan Hayward <alan.hayward@arm.com>
17080
17081 * remote.c (struct cached_reg): Change data into a pointer.
17082 * (stop_reply_dtr): Free data pointers before deleting vector.
17083 (process_stop_reply): Likewise.
17084 (remote_parse_stop_reply): Allocate space for data
17085
9890e433
AH
170862017-01-18 Alan Hayward <alan.hayward@arm.com>
17087
17088 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17089 MAX_REGISTER_SIZE.
17090 (amd64_pseudo_register_read_value): Likewise.
17091 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17092 (store_register_using_P): Likewise.
17093 * regcache.c (regcache_xfer_part): Likewise.
17094
7a36499a
IR
170952017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17096
17097 Split real and pseudo registers.
17098 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17099 (sparc32_pseudo_regnum): New enum.
17100 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17101 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17102 (SPARC32_CP0_REGISTERS): New macro.
17103 (sparc32_pseudo_register_name): New function.
17104 (sparc32_register_name): Use sparc32_pseudo_register_name.
17105 (sparc32_pseudo_register_type): New function.
17106 (sparc32_register_type): Use sparc32_pseudo_register_type.
17107 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17108 pseudo register numbers.
17109 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17110 (SPARC64_CP0_REGISTERS): New macro.
17111 (sparc64_pseudo_register_name): New function.
17112 (sparc64_register_name): Use sparc64_pseudo_register_name.
17113 (sparc64_pseudo_register_type): New function.
17114 (sparc64_register_type): Use sparc64_pseudo_register_type.
17115 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17116 pseudo register numbers.
17117 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17118 sparc64_store_arguments): Handle pseudo register numbers.
17119
6f8976bf
YQ
171202017-01-13 Yao Qi <yao.qi@linaro.org>
17121
17122 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17123 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17124 output.
17125 (getpkt_or_notif_sane_1): Likewise.
17126
e4241ace
YQ
171272017-01-13 Yao Qi <yao.qi@linaro.org>
17128
17129 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17130 of CC. Pass "-x c++-header" instead of "-x c".
17131
3015c064
SM
171322017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17133
17134 * remote.c (remote_can_async_p): Update comment.
17135
fde1b17d
SM
171362017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17137
17138 * linux-nat.c (linux_nat_can_async_p): Update comment.
17139
ca1ca08b
SM
171402017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17141
17142 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17143
4ad2da73
SM
171442017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17145
17146 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17147
c8b23b3f
TT
171482017-01-10 Tom Tromey <tom@tromey.com>
17149
17150 * python/py-type.c (typy_legacy_template_argument): Update.
17151 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17152 ~demangle_parse_info): Declare new members.
17153 (cp_demangled_name_to_comp): Return unique_ptr.
17154 (cp_demangled_name_parse_free)
17155 (make_cleanup_cp_demangled_name_parse_free)
17156 (cp_new_demangle_parse_info): Remove.
17157 * cp-support.c (do_demangled_name_parse_free_cleanup)
17158 (make_cleanup_cp_demangled_name_parse_free): Remove.
17159 (inspect_type, cp_canonicalize_string_full)
17160 (cp_canonicalize_string): Update.
17161 (mangled_name_to_comp): Change return type.
17162 (cp_class_name_from_physname, method_name_from_physname)
17163 (cp_func_name, cp_remove_params): Update.
17164 * cp-name-parser.y (demangle_parse_info): New constructor, from
17165 cp_new_demangle_parse_info.
17166 (~demangle_parse_info): New destructor, from
17167 cp_demangled_name_parse_free.
17168 (cp_merge_demangle_parse_infos): Update.
17169 (cp_demangled_name_to_comp): Change return type.
17170
1ac32117
TT
171712017-01-10 Tom Tromey <tom@tromey.com>
17172
17173 * top.c (prevent_dont_repeat): Change return type.
17174 * python/python.c (execute_gdb_command): Use std::string.
17175 Update.
17176 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17177 * command.h (prevent_dont_repeat): Change return type.
17178 * breakpoint.c (bpstat_do_actions_1): Update.
17179
0cf08227
TT
171802017-01-10 Tom Tromey <tom@tromey.com>
17181
17182 * value.h (scoped_value_mark::~scoped_value_mark): Call
17183 free_to_mark.
17184 (scoped_value_mark::free_to_mark): New method.
17185 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17186 scoped_value_mark.
17187
eb115069
TT
171882017-01-10 Tom Tromey <tom@tromey.com>
17189
17190 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17191 (valpy_reference_value, valpy_const_value, valpy_get_address)
17192 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17193 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17194 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17195 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17196 scoped_value_mark.
17197 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17198 * value.h (scoped_value_mark): New class.
17199
906768f9
TT
172002017-01-10 Tom Tromey <tom@tromey.com>
17201
17202 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17203 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17204 * psymtab.c (discard_psymtabs_upto): Remove.
17205 (make_cleanup_discard_psymtabs): Remove.
17206 (struct psymtab_state): Remove.
17207
bef155c3
TT
172082017-01-10 Tom Tromey <tom@tromey.com>
17209
17210 * record-full.c (record_full_save_cleanups): Remove.
17211 (record_full_save): Use gdb::unlinker.
17212 * gcore.c (do_bfd_delete_cleanup): Remove.
17213 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17214 cleanups.
17215 * dwarf2read.c (unlink_if_set): Remove.
17216 (write_psymtabs_to_index): Use gdb::unlinker.
17217 * common/gdb_unlinker.h: New file.
17218
192b62ce
TT
172192017-01-10 Tom Tromey <tom@tromey.com>
17220
17221 * windows-tdep.c (windows_xfer_shared_library): Update.
17222 * windows-nat.c (windows_make_so): Update.
17223 * utils.h (make_cleanup_bfd_unref): Remove.
17224 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17225 * symfile.h (symfile_bfd_open)
17226 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17227 * symfile.c (read_symbols, symbol_file_add)
17228 (separate_debug_file_exists): Update.
17229 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17230 (generic_load, reread_symbols): Update.
17231 * symfile-mem.c (symbol_file_add_from_memory): Update.
17232 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17233 (spu_symbol_file_add_from_memory): Update.
17234 * solist.h (struct target_so_ops) <bfd_open>: Return
17235 gdb_bfd_ref_ptr.
17236 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17237 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17238 gdb_bfd_ref_ptr.
17239 (solib_map_sections, reload_shared_libraries_1): Update.
17240 * solib-svr4.c (enable_break): Update.
17241 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17242 * solib-frv.c (enable_break2): Update.
17243 * solib-dsbt.c (enable_break): Update.
17244 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17245 gdb_bfd_ref_ptr.
17246 (darwin_solib_get_all_image_info_addr_at_init): Update.
17247 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17248 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17249 * record-full.c (record_full_save): Update.
17250 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17251 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17252 * minidebug.c (find_separate_debug_file_in_section): Return
17253 gdb_bfd_ref_ptr.
17254 * machoread.c (macho_add_oso_symfile): Change abfd to
17255 gdb_bfd_ref_ptr.
17256 (macho_symfile_read_all_oso): Update.
17257 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17258 (macho_symfile_read): Update.
17259 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17260 (jit_bfd_try_read_symtab): Update.
17261 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17262 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17263 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17264 gdb_bfd_ref_ptr.
17265 (gdb_bfd_ref_policy): New struct.
17266 (gdb_bfd_ref_ptr): New typedef.
17267 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17268 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17269 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17270 gdb_bfd_ref_ptr.
17271 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17272 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17273 (gcore_command): Update.
17274 * exec.c (exec_file_attach): Update.
17275 * elfread.c (elf_symfile_read): Update.
17276 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17277 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17278 (open_and_init_dwo_file): Update.
17279 (open_dwp_file): Return gdb_bfd_ref_ptr.
17280 (open_and_init_dwp_file): Update.
17281 * corelow.c (core_open): Update.
17282 * compile/compile-object-load.c (compile_object_load): Update.
17283 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17284 * coffread.c (coff_symfile_read): Update.
17285 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17286 gdb_bfd_ref_ptr. Rename.
17287 (dump_bfd_file, restore_command): Update.
17288 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17289 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17290 (find_separate_debug_file_by_buildid): Update.
17291
50315b21
TT
172922017-01-10 Tom Tromey <tom@tromey.com>
17293
17294 * common/gdb_ref_ptr.h: New file.
17295 * python/py-ref.h (struct gdbpy_ref_policy): New.
17296 (gdbpy_ref): Now a typedef.
17297
fc4007c9
TT
172982017-01-10 Tom Tromey <tom@tromey.com>
17299
17300 * utils.h (make_cleanup_htab_delete): Don't declare.
17301 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17302 Remove.
17303 * linespec.c (decode_compound_collector): Add constructor,
17304 destructor.
17305 (lookup_prefix_sym): Remove cleanup.
17306 (symtab_collector): Add constructor, destructor.
17307 (collect_symtabs_from_filename): Remove cleanup.
17308 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17309 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17310 Use htab_up.
17311 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17312 * dwarf2read.c (dw2_expand_symtabs_matching)
17313 (dw2_map_symbol_filenames, dwarf_decode_macros)
17314 (write_psymtabs_to_index): Use htab_up.
17315 * dwarf2loc.c (func_verify_no_selftailcall)
17316 (call_site_find_chain_1, func_verify_no_selftailcall)
17317 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17318 std::vector, gdb::unique_xmalloc_ptr.
17319 (call_sitep): Remove typedef.
17320 (dwarf2_locexpr_baton_eval): Remove unused variable.
17321
8dbcee67
TT
173222017-01-10 Tom Tromey <tom@tromey.com>
17323
17324 * python/python-internal.h (make_cleanup_py_decref)
17325 (make_cleanup_py_xdecref): Don't declare.
17326 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17327 (py_xdecref, make_cleanup_py_xdecref): Remove.
17328
13df46cc
TT
173292017-01-10 Tom Tromey <tom@tromey.com>
17330
17331 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17332 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17333
06fc9bf7
TT
173342017-01-10 Tom Tromey <tom@tromey.com>
17335
17336 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17337
830a4934
TT
173382017-01-10 Tom Tromey <tom@tromey.com>
17339
17340 * python/py-utils.c (unicode_to_encoded_string)
17341 (python_string_to_target_string)
17342 (python_string_to_target_python_string)
17343 (python_string_to_host_string, gdbpy_obj_to_string)
17344 (get_addr_from_python): Use gdbpy_ref.
17345
4586d543
TT
173462017-01-10 Tom Tromey <tom@tromey.com>
17347
17348 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17349 gdbpy_ref.
17350
59876f8f
TT
173512017-01-10 Tom Tromey <tom@tromey.com>
17352
17353 * python/python.c (eval_python_command, gdbpy_decode_line)
17354 (gdbpy_run_events, gdbpy_start_type_printers)
17355 (gdbpy_apply_type_printers): Use gdbpy_ref.
17356
97d83487
TT
173572017-01-10 Tom Tromey <tom@tromey.com>
17358
17359 * python/py-param.c (get_doc_string, compute_enum_values): Use
17360 gdbpy_ref.
17361
9205649a
TT
173622017-01-10 Tom Tromey <tom@tromey.com>
17363
17364 * python/py-inferior.c (find_thread_object, build_inferior_list):
17365 Use gdbpy_ref.
17366
74c49d45
TT
173672017-01-10 Tom Tromey <tom@tromey.com>
17368
17369 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17370
16361ffb
TT
173712017-01-10 Tom Tromey <tom@tromey.com>
17372
17373 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17374 gdbpy_ref.
17375
905f2cca
TT
173762017-01-10 Tom Tromey <tom@tromey.com>
17377
17378 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17379 extra incref.
17380 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17381 Use gdbpy_ref.
17382
64081434
TT
173832017-01-10 Tom Tromey <tom@tromey.com>
17384
17385 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17386 gdbpy_ref.
17387
59e9e831
TT
173882017-01-10 Tom Tromey <tom@tromey.com>
17389
17390 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17391 decref results of PyArg_ParseTupleAndKeywords.
17392
9de10f6d
TT
173932017-01-10 Tom Tromey <tom@tromey.com>
17394
17395 * python/python.c (python_run_simple_file): Use
17396 unique_xmalloc_ptr, gdbpy_ref.
17397
2bd5759d
TT
173982017-01-10 Tom Tromey <tom@tromey.com>
17399
17400 * python/py-prettyprint.c (print_stack_unless_memory_error)
17401 (print_string_repr, print_children): Use gdbpy_ref.
17402 (dummy_python_frame): New class.
17403 (dummy_python_frame::dummy_python_frame): Rename from
17404 push_dummy_python_frame.
17405 (py_restore_tstate): Remove.
17406
3b4e0e01
TT
174072017-01-10 Tom Tromey <tom@tromey.com>
17408
17409 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17410
17a22718
TT
174112017-01-10 Tom Tromey <tom@tromey.com>
17412
17413 * python/python.c (ensure_python_env, restore_python_env):
17414 Remove.
17415 * python/python-internal.h (ensure_python_env): Don't declare.
17416 * varobj.h (varobj_ensure_python_env): Don't declare.
17417 * varobj.c (varobj_ensure_python_env): Remove.
17418
68cdc557
TT
174192017-01-10 Tom Tromey <tom@tromey.com>
17420
17421 * varobj.c (varobj_value_get_print_value): Use
17422 gdbpy_enter_varobj.
17423
1eba6383
TT
174242017-01-10 Tom Tromey <tom@tromey.com>
17425
17426 * python/py-prettyprint.c (print_string_repr, print_children):
17427 Update.
17428 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17429 of "encoding".
17430 * varobj.c (varobj_value_get_print_value): Update.
17431 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17432
bde7b3e3
TT
174332017-01-10 Tom Tromey <tom@tromey.com>
17434
17435 * varobj.c (varobj_get_display_hint)
17436 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17437 (varobj_set_visualizer, free_variable): Use
17438 gdbpy_enter_varobj.
17439
a7785f8c
TT
174402017-01-10 Tom Tromey <tom@tromey.com>
17441
17442 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17443 (do_finish_initialization): New function. Use gdbpy_ref.
17444 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17445 do_finish_initialization.
17446
2865bfce
TT
174472017-01-10 Tom Tromey <tom@tromey.com>
17448
17449 * python/py-param.c (get_set_value, get_show_value): Use
17450 gdbpy_enter, gdbpy_ref.
17451
0e9dcc75
TT
174522017-01-10 Tom Tromey <tom@tromey.com>
17453
17454 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17455
12a5cedd
TT
174562017-01-10 Tom Tromey <tom@tromey.com>
17457
17458 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17459
788f2586
TT
174602017-01-10 Tom Tromey <tom@tromey.com>
17461
17462 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17463 Use gdbpy_enter_varobj.
17464
6cd67bea
TT
174652017-01-10 Tom Tromey <tom@tromey.com>
17466
17467 * varobj.c (gdbpy_enter_varobj): New constructor.
17468 * python/python-internal.h (gdbpy_enter_varobj): New class.
17469 * python/py-varobj.c (py_varobj_get_iterator): Use
17470 gdbpy_enter_varobj.
17471
14b122bf
TT
174722017-01-10 Tom Tromey <tom@tromey.com>
17473
17474 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17475 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17476 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17477 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17478 unique_xmalloc_ptr.
17479 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17480
bf1ca3b9
TT
174812017-01-10 Tom Tromey <tom@tromey.com>
17482
17483 * python/py-xmethods.c (invoke_match_method): Use
17484 gdbpy_ref.
17485
572a5524
TT
174862017-01-10 Tom Tromey <tom@tromey.com>
17487
17488 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17489 gdbpy_enter, gdbpy_ref.
17490
396a78b6
TT
174912017-01-10 Tom Tromey <tom@tromey.com>
17492
17493 * python/python.c (python_interactive_command): Use gdbpy_enter.
17494
a88b13c7
TT
174952017-01-10 Tom Tromey <tom@tromey.com>
17496
17497 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17498 gdbpy_ref.
17499
e9f0c363
TT
175002017-01-10 Tom Tromey <tom@tromey.com>
17501
17502 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17503 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17504
6349f452
TT
175052017-01-10 Tom Tromey <tom@tromey.com>
17506
17507 * utils.h (htab_deleter): New struct.
17508 (htab_up): New typedef.
17509 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17510 gdbpy_enter, gdbpy_ref, htab_up.
17511
c0171de6
TT
175122017-01-10 Tom Tromey <tom@tromey.com>
17513
17514 * python/py-unwind.c (pending_frame_invalidate): Remove.
17515 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17516
f18e226f
TT
175172017-01-10 Tom Tromey <tom@tromey.com>
17518
17519 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17520 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17521
c57af3f1
TT
175222017-01-10 Tom Tromey <tom@tromey.com>
17523
17524 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17525
60e600ec
TT
175262017-01-10 Tom Tromey <tom@tromey.com>
17527
17528 * python/python.c (gdbpy_eval_from_control_command)
17529 (gdbpy_source_script, gdbpy_run_events)
17530 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17531 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17532 gdbpy_enter.
17533
bf7da5b0
TT
175342017-01-10 Tom Tromey <tom@tromey.com>
17535
17536 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17537
2d38bced
TT
175382017-01-10 Tom Tromey <tom@tromey.com>
17539
17540 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17541
07bc7329
TT
175422017-01-10 Tom Tromey <tom@tromey.com>
17543
17544 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17545 (python_on_inferior_call_pre, python_on_inferior_call_post)
17546 (python_on_memory_change, python_on_register_change)
17547 (python_inferior_exit, python_new_objfile, add_thread_object)
17548 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17549
6e7c365e
TT
175502017-01-10 Tom Tromey <tom@tromey.com>
17551
17552 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17553 (bpfinishpy_handle_exit): Use gdbpy_enter.
17554
6ba0cd40
TT
175552017-01-10 Tom Tromey <tom@tromey.com>
17556
17557 * python/py-cmd.c (cmdpy_destroyer)
17558 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17559 gdbpy_enter.
17560
de2dc875
TT
175612017-01-10 Tom Tromey <tom@tromey.com>
17562
17563 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17564 gdbpy_enter.
17565 (gdbpy_breakpoint_has_cond): Likewise.
17566
4ecee2c4
TT
175672017-01-10 Tom Tromey <tom@tromey.com>
17568
17569 * python/python.c (gdbpy_enter): New constructor.
17570 (~gdbpy_enter): New destructor.
17571 (restore_python_env, ensure_python_env): Rewrite.
17572 * python/python-internal.h (gdbpy_enter): New class.
17573
37fce74f
TT
175742017-01-10 Tom Tromey <tom@tromey.com>
17575
17576 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17577
53a0cca3
TT
175782017-01-10 Tom Tromey <tom@tromey.com>
17579
17580 * python/py-value.c (value_has_field, get_field_flag)
17581 (get_field_type, valpy_getitem, convert_value_from_python): Use
17582 gdbpy_ref.
17583
ff3724f5
TT
175842017-01-10 Tom Tromey <tom@tromey.com>
17585
17586 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17587 gdbpy_ref.
17588
0700aea5
TT
175892017-01-10 Tom Tromey <tom@tromey.com>
17590
17591 * python/py-prettyprint.c (search_pp_list)
17592 (find_pretty_printer_from_objfiles)
17593 (find_pretty_printer_from_progspace)
17594 (find_pretty_printer_from_gdb, find_pretty_printer)
17595 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17596 gdbpy_ref.
17597
1bb44c9f
TT
175982017-01-10 Tom Tromey <tom@tromey.com>
17599
17600 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17601
87ce03fd
TT
176022017-01-10 Tom Tromey <tom@tromey.com>
17603
17604 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17605 (ltpy_get_all_source_lines): Use gdbpy_ref.
17606
ee0a3fb8
TT
176072017-01-10 Tom Tromey <tom@tromey.com>
17608
17609 * python/py-framefilter.c (extract_sym, extract_value)
17610 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17611 gdbpy_ref.
17612
bf2a52fa
TT
176132017-01-10 Tom Tromey <tom@tromey.com>
17614
17615 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17616
f59fe7f8
TT
176172017-01-10 Tom Tromey <tom@tromey.com>
17618
17619 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17620
80bd970a
TT
176212017-01-10 Tom Tromey <tom@tromey.com>
17622
17623 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17624 gdbpy_ref.
17625
d1b3de2e
TT
176262017-01-10 Tom Tromey <tom@tromey.com>
17627
17628 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17629
3bb43384
TT
176302017-01-10 Tom Tromey <tom@tromey.com>
17631
17632 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17633 (typy_range): Use gdbpy_ref.
17634
abf5651e
TT
176352017-01-10 Tom Tromey <tom@tromey.com>
17636
17637 * python/py-threadevent.c (create_thread_event_object): Use
17638 gdbpy_ref.
17639 * python/py-stopevent.c (create_stop_event_object): Simplify.
17640 (emit_stop_event): Use gdbpy_ref.
17641 * python/py-signalevent.c (create_signal_event_object): Use
17642 gdbpy_ref.
17643 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17644 (emit_new_objfile_event, create_clear_objfiles_event_object)
17645 (emit_clear_objfiles_event): Use gdbpy_ref.
17646 * python/py-infevents.c (create_inferior_call_event_object)
17647 (create_register_changed_event_object)
17648 (create_memory_changed_event_object, emit_inferior_call_event)
17649 (emit_memory_changed_event, emit_register_changed_event): Use
17650 gdbpy_ref.
17651 * python/py-exitedevent.c (create_exited_event_object)
17652 (emit_exited_event): Use gdbpy_ref.
17653 * python/py-event.h (evpy_emit_event): Remove
17654 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17655 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17656 * python/py-continueevent.c (emit_continue_event): Use
17657 gdbpy_ref.
17658 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17659 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17660 gdbpy_ref.
17661 * python/py-bpevent.c (create_breakpoint_event_object): Use
17662 gdbpy_ref.
17663
a68ff33e
TT
176642017-01-10 Tom Tromey <tom@tromey.com>
17665
17666 * python/py-ref.h: New file.
17667
7becfd03
SM
176682017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17669
17670 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17671 void.
17672 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17673 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17674 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17675 * ui-out.c (ui_out::redirect): Likewise.
17676 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17677 * cli/cli-logging.c (set_logging_redirect): Update call site of
17678 ui_out::redirect.
17679 (handle_redirections): Likewise.
17680 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17681 * top.c (execute_command_to_string): Likewise.
17682 * utils.c (do_ui_out_redirect_pop): Likewise.
17683
df294654
SM
176842017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17685
17686 * stack.c (_initialize_stack): Update "frame" command help message.
17687
f5e6296e
IB
176882017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17689
17690 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17691
0e2d6fa6
YQ
176922017-01-06 Yao Qi <yao.qi@linaro.org>
17693
17694 * x86-linux-nat.h: Include gdb_proc_service.h.
17695
44d6d3f9
YQ
176962017-01-06 Yao Qi <yao.qi@linaro.org>
17697
17698 * ser-base.h: Include serial.h.
17699
656731fe
YQ
177002017-01-06 Yao Qi <yao.qi@linaro.org>
17701
17702 * ppc-linux-tdep.h: Include ppc-tdep.h.
17703
1ca8f924
YQ
177042017-01-06 Yao Qi <yao.qi@linaro.org>
17705
17706 * nat/amd64-linux-siginfo.h: Include signal.h.
17707
bc3008c4
YQ
177082017-01-06 Yao Qi <yao.qi@linaro.org>
17709
17710 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17711
66c80d03
YQ
177122017-01-06 Yao Qi <yao.qi@linaro.org>
17713
17714 * mi/mi-parse.h: Include mi-cmds.h.
17715
051d2dda
YQ
177162017-01-06 Yao Qi <yao.qi@linaro.org>
17717
17718 * inf-loop.c: Don't include "target.h".
17719 * inf-loop.h: Include it here.
17720
8018d34f
YQ
177212017-01-06 Yao Qi <yao.qi@linaro.org>
17722
17723 * dfp.h: Include "dboulest.h" and "expression.h".
17724
c0b8369c
YQ
177252017-01-06 Yao Qi <yao.qi@linaro.org>
17726
17727 * ax-gdb.h: Include "ax.h".
17728
ad5cba2a
YQ
177292017-01-06 Yao Qi <yao.qi@linaro.org>
17730
17731 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17732 with nat/gdb_ptrace.h.
17733
1c33cd7f
YQ
177342017-01-05 Yao Qi <yao.qi@linaro.org>
17735
17736 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17737 new line.
17738 (mips64_fbsd_sigframe_init): Likewise.
17739
c988ac1d
JB
177402017-01-04 John Baldwin <jhb@FreeBSD.org>
17741
17742 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17743 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17744
b268007c
JB
177452017-01-04 John Baldwin <jhb@FreeBSD.org>
17746
17747 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17748 * NEWS: Mention new FreeBSD/mips native configuration.
17749 * config/mips/fbsd.mh: New file.
17750 * configure.host: Add mips*-*-freebsd*.
17751 * mips-fbsd-nat.c: New file.
17752
387360da
JB
177532017-01-04 John Baldwin <jhb@FreeBSD.org>
17754
17755 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17756 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17757 * NEWS: Mention new FreeBSD/mips target.
17758 * configure.tgt: Add mips*-*-freebsd*.
17759 * mips-fbsd-tdep.c: New file.
17760 * mips-fbsd-tdep.h: New file.
17761
2aaaf250
YQ
177622017-01-04 Yao Qi <yao.qi@linaro.org>
17763
17764 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17765 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17766
61baf725
JB
177672017-01-01 Joel Brobecker <brobecker@adacore.com>
17768
6dbb839a 17769 Update copyright year range in all GDB files.
61baf725 17770
c113e7ff 177712017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17772
c113e7ff 17773 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17774
c113e7ff 17775For older changes see ChangeLog-2016.
c906108c
SS
17776\f
17777Local Variables:
17778mode: change-log
17779left-margin: 8
17780fill-column: 74
17781version-control: never
57da7796 17782coding: utf-8
c906108c 17783End: