Record nested types
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
883fd55a
KS
12017-12-07 Keith Seitz <keiths@redhat.com>
2
3 * NEWS (New commands): Mention set/show print type nested-type-limit.
4 * c-typeprint.c (c_type_print_base): Print out nested types.
5 * dwarf2read.c (struct typedef_field_list): Rename to ...
6 (struct decl_field_list): ... this. Change all uses.
7 (struct field_info) <nested_types_list, nested_types_list_count>:
8 New fields.
9 (add_partial_symbol): Look for nested type definitions in C++, too.
10 (dwarf2_add_typedef): Rename to ...
11 (dwarf2_add_type_defn): ... this.
12 (type_can_define_types): New function.
13 Update assertion to use type_can_define_types.
14 Permit NULL for a field's name.
15 (process_structure_scope): Handle child DIEs of types that can
16 define types.
17 Copy the list of nested types into the type struct.
18 * gdbtypes.h (struct typedef_field): Rename to ...
19 (struct decl_field): ... this. Change all uses.
20 [is_protected, is_private]: New fields.
21 (struct cplus_struct_type) <nested_types, nested_types_count>: New
22 fields.
23 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
24 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
25 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
26 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
27 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
28 default value for print_nested_type_limit.
29 (print_nested_type_limit): New static variable.
30 (set_print_type_nested_types, show_print_type_nested_types): New
31 functions.
32 (_initialize_typeprint): Register new commands for set/show
33 `print-nested-type-limit'.
34 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
35 New field.
36
99598d71
TT
372017-12-07 Tom Tromey <tom@tromey.com>
38
39 PR breakpoints/22511:
40 * breakpoint.c (commands_command_1): Don't throw an exception when
41 no commands have been read.
42
23a8d186
AS
432017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
44
45 PR c++/21222
46 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
47 range-for variable.
48
30970df7
SM
492017-12-07 Simon Marchi <simon.marchi@ericsson.com>
50
51 * common/selftest.h (struct selftest): Add virtual destructor.
52
824cc835
PM
532017-12-07 Phil Muldoon <pmuldoon@redhat.com>
54
55 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
56 over basic location code. Implement explicit location keywords.
57 (bppy_init_validate_args): New function.
58 * NEWS: Document Python explicit breakpoint locations.
59
9c226a86
JB
602017-12-07 Joel Brobecker <brobecker@adacore.com>
61
62 * MAINTAINERS: Restore target entries for m68hc11-elf,
63 score-elf and xstormy16-elf, incorrectly removed in a previous
64 patch meant to only update the list of active maintainers.
65
649a140c
PA
662017-12-06 Pedro Alves <palves@redhat.com>
67
68 * break-catch-syscall.c (insert_catch_syscall)
69 (remove_catch_syscall): Adjust to pass reference to
70 inf_data->syscalls_counts directly via gdb::array_view.
71 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
72 and gdb::array_view.
73 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
74 * remote.c (remote_set_syscall_catchpoint): Likewise.
75 * target-debug.h (target_debug_print_bool): New.
76 (define target_debug_print_gdb_array_view_const_int): New.
77 * target-delegates.c: Regenerate.
78 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
79 gdb::array_view and bool.
80 (target_set_syscall_catchpoint): Likewise.
81
9a93831c
SM
822017-12-06 Simon Marchi <simon.marchi@ericsson.com>
83
84 * break-catch-syscall.c (catch_syscall_completer): Get pointers
85 to syscall group strings after building the string vector.
86
7cc244de
PA
872017-12-06 Pedro Alves <palves@redhat.com>
88
89 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
90 "qXfer:features:read"" is disabled.
91 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
92 Check packet_config_support instead of packet->support directly.
93
858c9d13
SM
942017-12-05 Simon Marchi <simon.marchi@ericsson.com>
95
96 * target-descriptions.c (struct tdesc_feature) <registers>: Use
97 tdesc_reg_up typedef.
98 (struct target_desc) <features>: Use tdesc_feature_up typedef.
99
d4a0e8b5
SM
1002017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
101
102 * target-descriptions.c (struct tdesc_type): Use default
103 destructor.
104 <u>: Remove.
105 <accept>: Remove.
106 (struct tdesc_type_builtin): New.
107 (struct tdesc_type_vector): New.
108 (struct tdesc_type_with_fields): New.
109 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
110 (tdesc_gdb_type): Remove.
111 (tdesc_register_type): Adjust.
112 (tdesc_create_vector): Create tdesc_type_vector.
113 (tdesc_create_struct): Create tdesc_type_with_fields.
114 (tdesc_set_struct_size): Change parameter type.
115 (tdesc_create_union): Create tdesc_type_with_fields.
116 (tdesc_create_flags): Likewise.
117 (tdesc_create_enum): Likewise.
118 (tdesc_add_field): Change parameter type.
119 (tdesc_add_typed_bitfield): Likewise.
120 (tdesc_add_bitfield): Likewise.
121 (tdesc_add_flag): Likewise.
122 (tdesc_add_enum_value): Likewise.
123 (print_c_tdesc) <visit>: Remove overload with tdesc_type
124 parameter, add overloads for tdesc_type_builtin,
125 tdesc_type_with_fields and tdesc_type_vector.
126 <m_printed_type>: Remove.
127 <m_printed_element_type, m_printed_type_with_fields>: Add.
128 * target-descriptions.h (tdesc_create_enum): Change return type.
129 (tdesc_add_typed_bitfield): Change parameter type.
130 (tdesc_add_enum_value): Change parameter type.
131 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
132 type to tdesc_type_with_fields.
133 (tdesc_start_struct): Adjust.
134 (tdesc_start_flags): Adjust.
135 (tdesc_start_enum): Adjust.
136 (tdesc_start_field): Adjust.
137 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
138 (struct tdesc_type_vector): Forward-declare.
139 (struct tdesc_type_with_fields): Forward-declare.
140 (tdesc_create_struct): Change return type.
141 (tdesc_create_union): Likewise.
142 (tdesc_create_flags): Likewise.
143 (tdesc_add_field): Change parameter type.
144 (tdesc_set_struct_size): Likewise.
145 (tdesc_add_bitfield): Likewise.
146 (tdesc_add_flag): Likewise.
147 * features: Re-generate C files.
148
f0cddbef
SM
1492017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
150
151 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
152 (struct tdesc_arch_reg): Add constructor.
153 (DEF_VEC_O (tdesc_arch_reg)): Remove.
154 (struct tdesc_arch_data): Initialize fields.
155 <arch_regs>: Change type to std::vector.
156 (target_find_description): Adjust.
157 (tdesc_find_type): Adjust.
158 (tdesc_data_init): Call tdesc_arch_data constructor.
159 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
160 (tdesc_data_cleanup): Free data with delete.
161 (tdesc_numbered_register): Adjust.
162 (tdesc_find_arch_register): Adjust.
163 (tdesc_use_registers): Adjust.
164
d05200d1
SM
1652017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
166
167 * target-descriptions.c (tdesc_type_field): Remove typedef.
168 (DEF_VEC_O (tdesc_type_field)): Remove.
169 (struct tdesc_type_field): Add constructor.
170 <name>: Change type to std::string.
171 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
172 kind uses it.
173 <~tdesc_type>: Destroy vector if the type kind uses it.
174 <u::u::fields>: Change type to std::vector.
175 (tdesc_gdb_type): Adjust.
176 (tdesc_add_field): Adjust.
177 (tdesc_add_typed_bitfield): Adjust.
178 (tdesc_add_field): Adjust.
179 (tdesc_add_enum_value): Adjust.
180 (class print_c_tdesc) <visit>: Adjust.
181
082b9140
SM
1822017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
183
184 * target-descriptions.c (struct tdesc_type) <name>: Change type
185 to std::string.
186 <~tdesc_type>: Don't manually free name.
187 <operator==>: Adjust.
188 (tdesc_named_type): Adjust.
189 (tdesc_find_type): Adjust.
190 (tdesc_gdb_type): Adjust.
191 (class print_c_tdesc) <visit>: Adjust.
192
53c934e9
SM
1932017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * target-descriptions.c (tdesc_type_p): Remove typedef.
196 (DEF_VEC_P (tdesc_type_p)): Remove.
197 (struct tdesc_feature) <types>: Change type to std::vector.
198 <~tdesc_feature>: Replace with default implementation.
199 <accept>: Adjust.
200 (tdesc_named_type): Adjust.
201 (tdesc_create_vector): Adjust.
202 (tdesc_create_struct): Adjust.
203 (tdesc_create_union): Adjust.
204 (tdesc_create_flags): Adjust.
205 (tdesc_create_enum): Adjust.
206
a8142ee1
SM
2072017-12-05 Simon Marchi <simon.marchi@ericsson.com>
208
209 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
210 type of name_ parameter, adjust to std::string change.
211 <name, group, type>: Change type to std::string.
212 <~tdesc_reg>: Replace with default implementation.
213 <operator==>: Adjust.
214 (tdesc_find_register_early): Adjust.
215 (tdesc_register_name): Adjust.
216 (tdesc_register_type): Adjust.
217 (tdesc_register_in_reggroup_p): Adjust.
218 (class print_c_tdesc) <visit>: Adjust.
219 (class print_c_feature) <visit>: Adjust.
858c9d13
SM
220 * features/arc-arcompact.c: Re-generate.
221 * features/arc-v2.c: Re-generate.
a8142ee1 222
c9c895b9
SM
2232017-12-05 Simon Marchi <simon.marchi@ericsson.com>
224
225 * target-descriptions.c (tdesc_reg_p): Remove typedef.
226 (DEF_VEC_P (tdesc_reg_p)): Remove.
227 (struct tdesc_feature) <registers>: Change type to std::vector.
228 <~tdesc_feature>: Don't manually free registers.
229 <accept>: Adjust.
230 <operator==>: Adjust.
231 (tdesc_has_registers): Adjust.
232 (tdesc_find_register_early): Adjust.
233 (tdesc_use_registers): Adjust.
234 (tdesc_create_reg): Adjust.
235
f65ff9f9
SM
2362017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
237
238 * target-descriptions.c (tdesc_feature) <name>: Change type to
239 std::string.
240 <~tdesc_feature>: Don't manually free name.
241 <operator==>: Adjust.
242 (tdesc_find_feature): Adjust.
243 (tdesc_feature_name): Adjust.
244 (class print_c_tdesc) <visit_pre>: Adjust.
245 (class print_c_feature) <visit_pre>: Adjust.
246
3eea796c
SM
2472017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
248
249 * target-descriptions.c (tdesc_feature_p): Remove typedef.
250 (DEF_VEC_P (tdesc_feature_p)): Remove.
251 (struct target_desc) <features>: Change type to std::vector.
252 <~target_desc>: Replace with default implementation.
253 <accept>: Adjust.
254 <operator==>: Adjust.
255 (tdesc_has_registers): Adjust.
256 (tdesc_find_feature): Adjust.
257 (tdesc_use_registers): Adjust.
258 (tdesc_create_feature): Adjust.
259
40e2a983
SM
2602017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
261
262 * target-descriptions.c (arch_p): Remove typedef.
263 (DEF_VEC_P (arch_p)): Remove.
264 (struct target_desc) <compatible>: Change type to std::vector.
265 <~target_desc>: Don't manually free compatible.
266 (tdesc_compatible_p): Adjust.
267 (tdesc_add_compatible): Adjust.
268 (class print_c_tdesc) <visit_pre>: Adjust.
269
129c10bc
SM
2702017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
271
272 * target-descriptions.c (property_s): Remove typedef.
273 (DEF_VEC_O (property_s)): Remove.
274 (struct target_desc) <properties>: Make an std::vector.
275 <~target_desc>: Don't manually free properties.
276 (tdesc_property): Adjust.
277 (set_tdesc_property): Adjust.
278 (class print_c_tdesc) <visit_pre>: Adjust.
279
ed9376bd
SM
2802017-12-05 Simon Marchi <simon.marchi@ericsson.com>
281
282 * common/gdb_assert.h (gdb_static_assert): Redefine using
283 static_assert.
284
798a7429
SM
2852017-12-05 Simon Marchi <simon.marchi@ericsson.com>
286
287 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
288 unused variables.
289 (ada_is_redundant_range_encoding): Likewise.
290 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
291 Likewise.
292 * alpha-tdep.c (alpha_software_single_step): Likewise.
293 * arm-tdep.c (_initialize_arm_tdep): Likewise.
294 * auto-load.c (info_auto_load_cmd): Likewise.
295 * break-catch-syscall.c (insert_catch_syscall): Likewise.
296 (remove_catch_syscall): Likewise.
297 * breakpoint.c (condition_completer): Likewise.
298 (clear_command): Likewise.
299 (update_breakpoint_locations): Likewise.
300 * btrace.c (btrace_disable): Likewise.
301 (btrace_teardown): Likewise.
302 (btrace_maint_update_pt_packets): Likewise.
303 (maint_btrace_clear_cmd): Likewise.
304 * cli/cli-decode.c (lookup_cmd_1): Likewise.
305 (lookup_cmd_composition): Likewise.
306 * cli/cli-dump.c (scan_filename): Likewise.
307 (restore_command): Likewise.
308 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
309 * compile/compile-object-load.c (compile_object_load): Likewise.
310 * compile/compile-object-run.c (compile_object_run): Likewise.
311 * compile/compile.c (compile_to_object): Likewise.
312 * completer.c (filename_completer): Likewise.
313 (complete_files_symbols): Likewise.
314 (complete_expression): Likewise.
315 * corelow.c (core_open): Likewise.
316 * ctf.c (ctf_start): Likewise.
317 (ctf_write_status): Likewise.
318 (ctf_write_uploaded_tsv): Likewise.
319 (ctf_write_definition_end): Likewise.
320 (ctf_open_dir): Likewise.
321 (ctf_xfer_partial): Likewise.
322 (ctf_trace_find): Likewise.
323 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
324 Likewise.
325 * dwarf2loc.c (allocate_piece_closure): Likewise.
326 (indirect_pieced_value): Likewise.
327 (dwarf2_evaluate_loc_desc_full): Likewise.
328 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
329 (dw2_expand_symtabs_matching): Likewise.
330 (dw2_map_symbol_filenames): Likewise.
331 (read_and_check_comp_unit_head): Likewise.
332 (read_cutu_die_from_dwo): Likewise.
333 (lookup_dwo_unit): Likewise.
334 (read_comp_units_from_section): Likewise.
335 (dwarf2_compute_name): Likewise.
336 (handle_DW_AT_stmt_list): Likewise.
337 (create_cus_hash_table): Likewise.
338 (create_dwp_v2_section): Likewise.
339 (dwarf2_rnglists_process): Likewise.
340 (dwarf2_ranges_process): Likewise.
341 (dwarf2_record_block_ranges): Likewise.
342 (is_vtable_name): Likewise.
343 (read_formatted_entries): Likewise.
344 (skip_form_bytes): Likewise.
345 * elfread.c (elf_symtab_read): Likewise.
346 * exec.c (exec_file_command): Likewise.
347 * f-valprint.c (f_val_print): Likewise.
348 (info_common_command_for_block): Likewise.
349 * guile/guile.c (initialize_scheme_side): Likewise.
350 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
351 * guile/scm-cmd.c (cmdscm_completer): Likewise.
352 (gdbscm_register_command_x): Likewise.
353 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
354 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
355 * guile/scm-ports.c (file_port_magic): Likewise.
356 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
357 (ppscm_pretty_print_one_value): Likewise.
358 (ppscm_print_children): Likewise.
359 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
360 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
361 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
362 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
363 * i386-tdep.c (i386_register_reggroup_p): Likewise.
364 * infcmd.c (run_command_1): Likewise.
365 (until_next_fsm_clean_up): Likewise.
366 * linespec.c (linespec_complete): Likewise.
367 (find_label_symbols): Likewise.
368 * m2-valprint.c (m2_val_print): Likewise.
369 * memattr.c (require_user_regions): Likewise.
370 (lookup_mem_region): Likewise.
371 (disable_mem_command): Likewise.
372 (mem_delete): Likewise.
373 * mep-tdep.c (mep_register_name): Likewise.
374 (mep_analyze_prologue): Likewise.
375 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
376 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
377 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
378 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
379 * minidebug.c (lzma_open): Likewise.
380 * minsyms.c (lookup_minimal_symbol): Likewise.
381 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
382 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
383 (mips_o64_return_value): Likewise.
384 (mips_single_step_through_delay): Likewise.
385 (_initialize_mips_tdep): Likewise.
386 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
387 (nios2_software_single_step): Likewise.
388 * parse.c (find_minsym_type_and_address): Likewise.
389 * psymtab.c (psym_relocate): Likewise.
390 * python/py-breakpoint.c (bppy_get_commands): Likewise.
391 (gdbpy_breakpoint_modified): Likewise.
392 * python/py-infevents.c (create_inferior_call_event_object):
393 Likewise.
394 * python/py-record-btrace.c (btpy_list_item): Likewise.
395 * python/py-type.c (typy_str): Likewise.
396 * python/py-value.c (valpy_call): Likewise.
397 * python/python.c (do_start_initialization): Likewise.
398 * record-btrace.c (record_btrace_insn_history_range): Likewise.
399 (record_btrace_call_history_range): Likewise.
400 (record_btrace_record_method): Likewise.
401 (record_btrace_xfer_partial): Likewise.
402 (btrace_get_frame_function): Likewise.
403 * record-full.c (record_full_open): Likewise.
404 * record.c (get_context_size): Likewise.
405 * registry.h (DEFINE_REGISTRY): Likewise.
406 * remote-fileio.c (remote_fileio_request): Likewise.
407 * remote.c (remote_update_thread_list): Likewise.
408 (remote_check_symbols): Likewise.
409 (remote_commit_resume): Likewise.
410 (remote_interrupt): Likewise.
411 (remote_insert_breakpoint): Likewise.
412 (compare_sections_command): Likewise.
413 * rust-exp.y (super_name): Likewise.
414 (lex_string): Likewise.
415 (convert_ast_to_type): Likewise.
416 (convert_ast_to_expression): Likewise.
417 * rust-lang.c (rust_print_struct_def): Likewise.
418 (rust_print_type): Likewise.
419 (rust_evaluate_subexp): Likewise.
420 * rx-tdep.c (rx_register_type): Likewise.
421 * ser-event.c (serial_event_clear): Likewise.
422 * serial.c (serial_open): Likewise.
423 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
424 * symfile.c (section_is_overlay): Likewise.
425 (overlay_unmapped_address): Likewise.
426 (overlay_mapped_address): Likewise.
427 (simple_overlay_update_1): Likewise.
428 (simple_overlay_update): Likewise.
429 * symtab.c (symbol_find_demangled_name): Likewise.
430 (search_symbols): Likewise.
431 * target-descriptions.c (tdesc_predefined_type): Likewise.
432 * target.c (target_commit_resume): Likewise.
433 * thread.c (print_selected_thread_frame): Likewise.
434 * top.c (new_ui_command): Likewise.
435 (gdb_readline_no_editing): Likewise.
436 * tracefile-tfile.c (tfile_open): Likewise.
437 * tracepoint.c (create_tsv_from_upload): Likewise.
438 * utils.c (quit): Likewise.
439 (defaulted_query): Likewise.
440 * valarith.c (value_concat): Likewise.
441 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
442 * xml-tdesc.c (target_fetch_description_xml): Likewise.
443 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
444 (xtensa_pseudo_register_write): Likewise.
445
7403715e
TT
4462017-12-04 Tom Tromey <tom@tromey.com>
447
448 * NEWS: Mention Rust trait object inspection.
449
50a1fdd5
PA
4502017-12-04 Pedro Alves <palves@redhat.com>
451
452 PR gdb/22499
453 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
454 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
455 (vex2_prefix_p, vex3_prefix_p): New functions.
456 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
457 VEX3 prefixes.
458 (fixup_riprel): Set VEX3.!B.
459
1e97a227
SM
4602017-12-03 Simon Marchi <simon.marchi@ericsson.com>
461
462 * target.h (mem_region_vector): Remove.
463 (struct target_ops) <to_memory_map>: Change return type to
464 std::vector<mem_region>.
465 * target-debug.h (target_debug_print_mem_region_vector): Rename
466 to ...
467 (target_debug_print_std_vector_mem_region): ... this.
468 * target-delegates.c: Re-generate.
469
10f64178
PA
4702017-12-03 Pedro Alves <palves@redhat.com>
471
472 * make-target-delegates (munge_type): Also munge '<', '>', and
473 ':'. Avoid double underscores in identifiers, and trailing
474 underscores.
475 * target-debug.h
476 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
477 ...
478 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
479 * target-delegates.c: Regenerate.
480
6d83e819
SM
4812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
482
483 * common/poison.h (XDELETE): Fix typo.
484
97cbe998
SDJ
4852017-12-01 Andrew Cagney <cagney@redhat.com>
486 Joel Brobecker <brobecker@adacore.com>
487 Sergio Durigan Junior <sergiodj@redhat.com>
488
489 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
490 feature.
491 * coffread.c (coff_symfile_read): Do not map over sections with
492 'coff_locate_sections' if readnever is on.
493 * dwarf2read.c (dwarf2_has_info): Return 0 if
494 readnever is on.
495 * elfread.c (elf_symfile_read): Do not map over sections with
496 'elf_locate_sections' if readnever is on.
497 * main.c (validate_readnow_readnever): New function.
498 (captured_main_1): Add support for --readnever.
499 (print_gdb_help): Document --readnever.
500 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
501 flag.
502 * symfile.c (readnever_symbol_files): New global.
503 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
504 'READNEVER_SYMBOL_FILES' is set.
505 (validate_readnow_readnever): New function.
506 (symbol_file_command): Handle '-readnever' option.
507 Call 'validate_readnow_readnever'.
508 (add_symbol_file_command): Handle '-readnever' option.
509 Call 'validate_readnow_readnever'.
510 (_initialize_symfile): Document new '-readnever' option for
511 both 'symbol-file' and 'add-symbol-file' commands.
512 * top.h (readnever_symbol_files): New extern global.
513 * xcoffread.c (xcoff_initial_scan): Do not read debug
514 information if readnever is on.
515
40fc416f
SDJ
5162017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
517
518 * symfile.c (symbol_file_command): Call
519 'symbol_file_add_main_1' only after processing all command
520 line options.
521 (add_symbol_file_command): Modify logic to make arguments
522 position-independent.
523
ec6a20c2
JB
5242017-12-01 Joel Brobecker <brobecker@adacore.com>
525
526 * ada-lang.c (symbol_list_obstack): Delete.
527 (resolve_subexp): Make sure "candidates" gets xfree'ed.
528 (ada_lookup_symbol_list_worker): Remove the limitation that
529 the result is only good until the next call, now making it
530 the responsibility of the caller to free the result when no
531 longer needed. Adjust the function's intro comment accordingly.
532 (ada_lookup_symbol_list): Adjust the function's intro comment.
533 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
534 (ada_lookup_encoded_symbol, get_var_value): Likewise.
535 (_initialize_ada_language): Remove symbol_list_obstack
536 initialization.
537 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
538 (write_var_or_type, write_name_assoc): Likewise.
539
d0df06af
TT
5402017-12-01 Tom Tromey <tom@tromey.com>
541
542 * Makefile.in (all_deps_files): New variable.
543 Include .Po files using all_deps_files.
544
2ee0c9b3
JB
5452017-12-01 Joel Brobecker <brobecker@adacore.com>
546
547 * MAINTAINERS: Update list of maintainers, moving those who
548 stepped down or became inactive to the "Past Maintainers"
549 section.
550
44122162
RO
5512017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
552
553 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
554 sys/proc.h.
555 (NEW_PROC_API): Remove.
556 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
557 Likewise.
558 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
559 * configure: Regenerate.
560 * config.in: Regenerate.
561 * gdbserver/configure: Regenerate.
562 * gdbserver/config.in: Regenerate.
563
564 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
565 NEW_PROC_API test.
566 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
567
568 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
569
570 * proc-api.c: Remove !NEW_PROC_API support.
571 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
572 Remove tests for macros always defined on Solaris.
573 * proc-events.c: Remove !NEW_PROC_API support.
574 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
575 HAVE_SYS_USER_H tests.
576 (init_syscall_table): Remove non-Solaris syscalls.
577 Remove tests for syscalls present on all Solaris versions.
578 Add missing Solaris 10+ syscalls.
579 (signal_table): Remove non-Solaris signals.
580 Remove tests for signals present on all Solaris versions.
581 (fault_table): Remove non-Solaris faults.
582 Remove tests for faults present on all Solaris versions.
583 * proc-flags.c: Remove !NEW_PROC_API support.
584 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
585 Remove non-Solaris flags.
586 * proc-why.c: Remove !NEW_PROC_API support.
587 (pr_why_table): Remove meaningless comments.
588 Remove tests for reasons present on all Solaris versions.
589 Remove OSF/1 cases.
590 (proc_prettyfprint_why): Likewise.
591
592 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
593 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
594 Remove WA_READ test, IRIX watchpoint support.
595 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
596 types. Change users.
597 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
598 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
599 Change callers.
600 Remove CTL_PROC_NAME_FMT tests.
601 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
602 users.
603 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
604 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
605 (proc_modify_flag): Replace GDBRESET by PCUNSET.
606 Remove PR_ASYNC, PR_KLC tests.
607 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
608 (proc_parent_pid): Remove PCWATCH etc. tests.
609 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
610 Remove PCAGENT test.
611 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
612 Remove SYS_lwpcreate || SYS_lwp_create test.
613 (proc_get_current_thread): Likewise.
614 [PIOCNTHR && PIOCTLIST]: Remove.
615 [PIOCLSTATUS]: Remove.
616 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
617 [PRFS_STOPEXEC]: Remove.
618 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
619 (syscall_is_exit): Likewise.
620 (syscall_is_exec): Likewise.
621 (syscall_is_lwp_create): Likewise.
622 Remove SYS_syssgi support.
623 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
624 [SYS_syssgi]: Remove.
625 Remove non-Solaris cases, conditionals.
626 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
627 Remove.
628 (procfs_init_inferior) [SYS_syssgi]: Remove.
629 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
630 (procfs_inferior_created) [SYS_syssgi]: Remove.
631 (procfs_set_watchpoint): Remove !AIX5 test.
632 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
633 case.
634 (mappingflags) [MA_PHYS]: Remove.
635 (info_mappings_callback): Remove PCAGENT test.
636 Remove PIOCOPENLWP || PCAGENT test.
637
e8020e54
RO
6382017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
639
640 * sol-thread.c (info_solthreads): Constify args.
641 Cast args to void *.
642
75059544
JB
6432017-11-29 John Baldwin <jhb@FreeBSD.org>
644
645 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
646
f5a91472
JB
6472017-11-29 Joel Brobecker <brobecker@adacore.com>
648
649 * ada-lang.c (to_fixed_range_type): Make sure that the size
650 of the range type being returned is the same as the size
651 of the range type being fixed.
652
bd69330d
PA
6532017-11-29 Pedro Alves <palves@redhat.com>
654
655 PR c++/19436
656 * NEWS: Mention setting breakpoints on functions with C++ ABI
657 tags.
658 * completer.h (completion_match_for_lcd) <match,
659 mark_ignored_range>: New methods.
660 <finish>: Consider ignored ranges.
661 <clear>: Clear ignored ranges.
662 <m_ignored_ranges, m_finished_storage>: New fields.
663 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
664 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
665 completion_match_for_lcd pointer to strncmp_iw_with_mode.
666 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
667 * language.c (default_symbol_name_matcher): Pass the
668 completion_match_for_lcd pointer to strncmp_iw_with_mode.
669 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
670 * utils.c (skip_abi_tag): New function.
671 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
672 Handle ABI tags.
673 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
674 parameter.
675
6762017-11-29 Pedro Alves <palves@redhat.com>
677
678 PR c++/19436
679 * NEWS: Mention setting breakpoints on functions with C++ ABI
680 tags.
681 * completer.h (completion_match_for_lcd) <match,
682 mark_ignored_range>: New methods.
683 <finish>: Consider ignored ranges.
684 <clear>: Clear ignored ranges.
685 <m_ignored_ranges, m_finished_storage>: New fields.
686 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
687 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
688 completion_match_for_lcd pointer to strncmp_iw_with_mode.
689 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
690 * language.c (default_symbol_name_matcher): Pass the
691 completion_match_for_lcd pointer to strncmp_iw_with_mode.
692 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
693 * utils.c (skip_abi_tag): New function.
694 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
695 Handle ABI tags.
696 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
697 parameter.
698
a20714ff
PA
6992017-11-29 Pedro Alves <palves@redhat.com>
700
701 * NEWS: Mention that breakpoints on C++ functions are now set on
702 on all namespaces/classes by default, and mention "break
703 -qualified".
704 * ax-gdb.c (agent_command_1): Adjust to pass a
705 symbol_name_match_type to new_linespec_location.
706 * breakpoint.c (parse_breakpoint_sals): Adjust to
707 get_linespec_location's return type change.
708 (strace_marker_create_sals_from_location): Adjust to pass a
709 symbol_name_match_type to new_linespec_location.
710 (strace_marker_decode_location): Adjust to get_linespec_location's
711 return type change.
712 (strace_command): Adjust to pass a symbol_name_match_type to
713 new_linespec_location.
714 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
715 mention "-qualified".
716 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
717 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
718 enumerator.
719 (complete_address_and_linespec_locations): New parameter
720 'match_type'. Pass it down.
721 (explicit_options): Add "-qualified".
722 (collect_explicit_location_matches): Pass the requested match type
723 to the linespec completers. Handle MATCH_QUALIFIED.
724 (location_completer): Handle "-qualified" combined with linespecs.
725 * cp-support.c (cp_search_name_hash): New.
726 (cp_symbol_name_matches_1): Implement wild matching for C++.
727 (cp_fq_symbol_name_matches): Reimplement.
728 (cp_get_symbol_name_matcher): Return different matchers depending
729 on the lookup name's match type.
730 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
731 * cp-support.h (cp_search_name_hash): New declaration.
732 * dwarf2read.c
733 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
734 symbols.
735 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
736 tests.
737 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
738 pass a symbol_name_match_type to new_linespec_location.
739 * linespec.c (linespec_parse_basic): Lookup function symbols using
740 the parser's symbol name match type.
741 (convert_explicit_location_to_linespec): New
742 symbol_name_match_type parameter. Pass it down to
743 find_linespec_symbols.
744 (convert_explicit_location_to_sals): Pass the location's name
745 match type to convert_explicit_location_to_linespec.
746 (parse_linespec): New match_type parameter. Save it in the
747 parser.
748 (linespec_parser_new): Default to symbol_name_match_type::WILD.
749 (linespec_complete_function): New symbol_name_match_type
750 parameter. Use it.
751 (complete_linespec_component): Pass down the parser's recorded
752 name match type.
753 (linespec_complete_label): New symbol_name_match_type parameter.
754 Use it.
755 (linespec_complete): New symbol_name_match_type parameter. Save
756 it in the parser and pass it down. Adjust to
757 get_linespec_location's prototype change.
758 (find_function_symbols, find_linespec_symbols): New
759 symbol_name_match_type parameter. Pass it down instead of
760 assuming symbol_name_match_type::WILD.
761 * linespec.h (linespec_complete, linespec_complete_function)
762 (linespec_complete_label): New symbol_name_match_type parameter.
763 * location.c (event_location::linespec_location): Now a struct
764 linespec_location.
765 (EL_LINESPEC): Adjust.
766 (initialize_explicit_location): Default to
767 symbol_name_match_type::WILD.
768 (new_linespec_location): New symbol_name_match_type parameter.
769 Record it in the location.
770 (get_linespec_location): Now returns a struct linespec_location.
771 (new_explicit_location): Also copy func_name_match_type.
772 (explicit_to_string_internal)
773 (string_to_explicit_location): Handle "-qualified".
774 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
775 Copy symbol_name_match_type fields.
776 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
777 type change.
778 (event_location_to_string): Adjust to LINESPEC_LOCATION type
779 change. Handle "-qualfied".
780 (string_to_explicit_location): Handle "-qualified".
781 (string_to_event_location_basic): New symbol_name_match_type
782 parameter. Pass it down.
783 (string_to_event_location): Handle "-qualified".
784 * location.h (struct linespec_location): New.
785 (explicit_location::func_name_match_type): New field.
786 (new_linespec_location): Now returns a const linespec_location *.
787 (string_to_event_location_basic): New symbol_name_match_type
788 parameter.
789 (explicit_completion_info::saw_explicit_location_option): New
790 field.
791 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
792 symbol_name_match_type to new_linespec_location.
793 * python/py-breakpoint.c (bppy_init): Likewise.
794 * python/python.c (gdbpy_decode_line): Likewise.
795
a207cff2
PA
7962017-11-29 Pedro Alves <palves@redhat.com>
797
798 * ada-lang.c (ada_lookup_name_info::matches): Change type of
799 parameter from completion_match to completion_match_result.
800 Adjust.
801 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
802 * completer.c (completion_tracker::maybe_add_completion): Add
803 match_for_lcd parameter and use it.
804 (completion_tracker::add_completion): Likewise.
805 * completer.h (class completion_match_for_lcd): New class.
806 (completion_match_result::match_for_lcd): New field.
807 (completion_match_result::set_match): New method.
808 (completion_tracker): Add comments.
809 (completion_tracker::add_completion): Add match_for_lcd parameter.
810 (completion_tracker::reset_completion_match_result): Reset
811 match_for_lcd too.
812 (completion_tracker::maybe_add_completion): Add match_for_lcd
813 parameter.
814 (completion_tracker::m_lowest_common_denominator_unique): Extend
815 comments.
816 * cp-support.c (cp_symbol_name_matches_1)
817 (cp_fq_symbol_name_matches): Change type of parameter from
818 completion_match to completion_match_result. Adjust.
819 * language.c (default_symbol_name_matcher): Change type of
820 parameter from completion_match to completion_match_result.
821 Adjust.
822 * language.h (completion_match_for_lcd): Forward declare.
823 (default_symbol_name_matcher): Change type of parameter from
824 completion_match to completion_match_result.
825 * symtab.c (compare_symbol_name): Adjust.
826 (completion_list_add_name): Pass the match_for_lcd to the tracker.
827 * symtab.h (ada_lookup_name_info::matches): Change type of
828 parameter from completion_match to completion_match_result.
829 (symbol_name_matcher_ftype): Likewise, and update comments.
830
4024cf2b
PA
8312017-11-29 Pedro Alves <palves@redhat.com>
832
833 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
834 * minsyms.c (msymbol_is_text): Delete.
835 (msymbol_is_function): New function.
836 * minsyms.h (msymbol_is_text): Delete.
837 (msymbol_is_function): New declaration.
838 * symtab.c (find_function_alias_target): Use msymbol_is_function.
839
5dcf52c1
TT
8402017-11-29 Tom Tromey <tom@tromey.com>
841
842 * Makefile.in (distclean): Handle the case where rmdir fails.
843
8ca2f0b9
TT
8442017-11-29 Tom Tromey <tom@tromey.com>
845
846 * symfile.c (_initialize_symfile): Update usage text for
847 add-symbol-file, symbol-file, load.
848
02ca603a
TT
8492017-11-29 Tom Tromey <tom@tromey.com>
850
851 * symfile.c (add_symbol_file_command): Error if some arguments to
852 -s are missing. Change unrecognized-argument error message.
853 (_initialize_symfile): Fix usage text for add-symbol-file.
854
18ca7347
TT
8552017-11-27 Tom Tromey <tom@tromey.com>
856
857 * Makefile.in (REMOTE_OBS): Remove.
858 (SFILES): Remove remote sources.
859 (COMMON_SFILES): Add remote sources.
860 (ALLDEPFILES): Remove dcache.c.
861
66599a7d
TT
8622017-11-27 Tom Tromey <tom@tromey.com>
863
864 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
865 variables.
866 (SFILES): Use SUBDIR_TARGET_SRCS.
867 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
868 (CONFIG_SRC_SUBDIR): Add target.
869 (%.o): Remove target rule.
870
4f04fba8
TT
8712017-11-27 Tom Tromey <tom@tromey.com>
872
873 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
874 registry.o, thread-fsm.o, debug.o.
875 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
876 thread-fsm.c, debug.c.
877
b5adff3b
TT
8782017-11-27 Tom Tromey <tom@tromey.com>
879
880 * Makefile.in (COMMON_SFILES): New.
881 (SFILES): Move some entries to COMMON_SFILES.
882 (COMMON_OBS): Use COMMON_SFILES.
883
afa0a411
TT
8842017-11-27 Tom Tromey <tom@tromey.com>
885
886 * Makefile.in (YYFILES): Update comment.
887 (YYOBJ): Redefine.
888
8fd8d003
TT
8892017-11-27 Tom Tromey <tom@tromey.com>
890
891 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
892 (CONFIG_SRC_SUBDIR): Add python.
893 (%.o): Remove python rule.
894 (python/%.o): New rule.
895 * configure: Rebuild.
896 * configure.ac (CONFIG_OBS): Refer to python/python.o
897
bd810fff
TT
8982017-11-27 Tom Tromey <tom@tromey.com>
899
900 * configure: Rebuild.
901 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
902 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
903 (CONFIG_SRC_SUBDIR): Add guile.
904 (%.o): Remove guile rule.
905
75787ac1
TT
9062017-11-27 Tom Tromey <tom@tromey.com>
907
908 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
909 (%.o): Remove unittests rule.
910 (CONFIG_SRC_SUBDIR): Add unittests.
911
5c8a9431
TT
9122017-11-27 Tom Tromey <tom@tromey.com>
913
914 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
915 (CONFIG_SRC_SUBDIR): Add tui.
916 (%.o): Remove tui rule.
917
a26aa30c
TT
9182017-11-27 Tom Tromey <tom@tromey.com>
919
920 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
921 (%.o): Remove compile rule.
922 (CONFIG_SRC_SUBDIR): Add compile.
923
6f3cdf9a
TT
9242017-11-27 Tom Tromey <tom@tromey.com>
925
926 * Makefile.in (SUBDIR_MI_OBS): Redefine.
927 (%.o): Remove mi rule.
928 (CONFIG_SRC_SUBDIR): Add mi.
929 (COMMON_OBS): Use mi/mi-common.o
930
f06afa53
TT
9312017-11-27 Tom Tromey <tom@tromey.com>
932
933 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
934 (%.o): Remove cli rule.
935 (CONFIG_SRC_SUBDIR): Add cli.
936
b22c88c2
TT
9372017-11-27 Tom Tromey <tom@tromey.com>
938
939 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
940 * configure: Rebuild.
941 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
942 (CONFIG_DEP_SUBDIR): New variable.
943 (%.o): Add order-only dependency.
944 ($(CONFIG_DEP_SUBDIR)): New target.
945
ee9a09e9
DC
9462017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
947
948 PR gdb/21945
949 * findcmd.c (_initialize_mem_search): Update find command help
950 text.
951
e8e7d10c
SM
9522017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
953
954 * python/python.c (do_start_initialization): Change progname
955 type to gdb::unique_xmalloc_ptr. Release the pointer when using
956 Python 2.
957
6a997029
TT
9582017-11-26 Tom Tromey <tom@tromey.com>
959
960 * common/format.h: Add include guards.
961
41272101
TT
9622017-11-26 Tom Tromey <tom@tromey.com>
963
964 * nat/linux-personality.h (class
965 maybe_disable_address_space_randomization): New class.
966 (maybe_disable_address_space_randomization): Don't declare
967 function.
968 * nat/linux-personality.c (restore_personality)
969 (make_disable_asr_cleanup): Remove.
970 (maybe_disable_address_space_randomization): Now a constructor.
971 (~maybe_disable_address_space_randomization): New destructor.
972 * linux-nat.c (linux_nat_create_inferior): Update.
973
44287fd8
TT
9742017-11-26 Tom Tromey <tom@tromey.com>
975
976 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
977
5ffd2cb7
UW
9782017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
979
980 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
981 "cooked" register. Access only first four bytes of branch target
982 registers.
983
0e5457dc
SDJ
9842017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
985
986 PR gdb/22491
987 * stap-probe.c (relocate_address): New function.
988 (stap_probe::get_relocated_address): Use 'relocate_address'.
989 (stap_probe::set_semaphore): Use 'relocate_address' and pass
990 'm_sem_addr'.
991 (stap_probe::clear_semaphore): Likewise.
992
deeeba55
PA
9932017-11-25 Pedro Alves <palves@redhat.com>
994
995 * dictionary.c: Include "safe-ctype.h".
996 * minsyms.c: Include "safe-ctype.h".
997 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
998
a81aaca0
PA
9992017-11-25 Pedro Alves <palves@redhat.com>
1000
1001 * completer.c (complete_line_internal_1): Skip spaces until the
1002 start of the command.
1003
0662b6a7
PA
10042017-11-24 Pedro Alves <palves@redhat.com>
1005
1006 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1007 cp_fq_symbol_name_matches. Pass language_cplus to
1008 strncmp_with_mode.
1009 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1010 (selftests::test_cp_symbol_name_cmp): New.
1011 (_initialize_cp_support): Register "cp_symbol_name_matches"
1012 selftests.
1013 * language.c (default_symbol_name_matcher): Pass language_minimal
1014 to strncmp_iw_with_mode.
1015 * utils.c: Include "cp-support.h" and <algorithm>.
1016 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1017 (cp_is_operator): New functions.
1018 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1019 skip whitespace in the symbol name when the lookup name doesn't
1020 have spaces, and vice versa.
1021 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1022 * utils.h (strncmp_iw_with_mode): Add language parameter.
1023
e547c119
JB
10242017-11-24 Joel Brobecker <brobecker@adacore.com>
1025
1026 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1027 New functions.
1028 (print_it_exception): If available, display the exception
1029 message as well.
1030 * NEWS: Document new feature.
1031
d7fcdff9
UW
10322017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1033
1034 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1035
30649c14
PR
10362017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1037
1038 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1039 (dtrace_probe::is_enabled, dtrace_probe::enable)
1040 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1041 variable
1042 * probe.c (gen_ui_out_table_header_info)
1043 (print_ui_out_not_applicables): Remove keyword 'struct' at
1044 for-range variable
1045
7696f5c9
AH
10462017-11-24 Alan Hayward <alan.hayward@arm.com>
1047
1048 * configure.tgt: Add arch/aarch64.o
1049
8172f16b
SM
10502017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1051
1052 * common/common-utils.h: Include poison.h.
1053 (xfree): Remove declaration, add definition with static_assert.
1054 * common/common-utils.c (xfree): Remove.
1055 * common/poison.h (IsMallocatable): Define.
1056 (IsFreeable): Define.
1057 (free): Delete for non-freeable types.
1058 (xnew): New.
1059 (XNEW): Undef and redefine.
1060 (xcnew): New.
1061 (XCNEW): Undef and redefine.
1062 (xdelete): New.
1063 (XDELETE): Undef and redefine.
1064 (xnewvec): New.
1065 (XNEWVEC): Undef and redefine.
1066 (xcnewvec): New.
1067 (XCNEWVEC): Undef and redefine.
1068 (xresizevec): New.
1069 (XRESIZEVEC): Undef and redefine.
1070 (xdeletevec): New.
1071 (XDELETEVEC): Undef and redefine.
1072 (xnewvar): New.
1073 (XNEWVAR): Undef and redefine.
1074 (xcnewvar): New.
1075 (XCNEWVAR): Undef and redefine.
1076 (xresizevar): New.
1077 (XRESIZEVAR): Undef and redefine.
1078
7aabaf9d
SM
10792017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1080
1081 * gdbthread.h (private_thread_info): Define structure type, add
1082 virtual pure destructor.
1083 (thread_info) <priv>: Change type to unique_ptr.
1084 <private_dtor>: Remove.
1085 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1086 (private_thread_info::~private_thread_info): Provide default
1087 implementation.
1088 (thread_info::~thread_info): Don't call private_dtor nor
1089 manually free priv.
1090 * aix-thread.c (private_thread_info): Rename to ...
1091 (aix_thread_info): ... this.
1092 (get_aix_thread_info): New.
1093 (sync_threadlists): Adjust.
1094 (iter_tid): Adjust.
1095 (aix_thread_resume): Adjust.
1096 (aix_thread_fetch_registers): Adjust.
1097 (aix_thread_store_registers): Adjust.
1098 (aix_thread_extra_thread_info): Adjust.
1099 * darwin-nat.h (private_thread_info): Rename to ...
1100 (darwin_thread_info): ... this.
1101 (get_darwin_thread_info): New.
1102 * darwin-nat.c (darwin_init_thread_list): Adjust.
1103 (darwin_check_new_threads): Adjust.
1104 (thread_info_from_private_thread_info): Adjust.
1105 * linux-thread-db.c (private_thread_info): Rename to ...
1106 (thread_db_thread_info): ... this, initialize fields.
1107 (get_thread_db_thread_info): New.
1108 <dying>: Change type to bool.
1109 (update_thread_state): Adjust to type rename.
1110 (record_thread): Adjust to type rename an use of unique_ptr.
1111 (thread_db_pid_to_str): Likewise.
1112 (thread_db_extra_thread_info): Likewise.
1113 (thread_db_thread_handle_to_thread_info): Likewise.
1114 (thread_db_get_thread_local_address): Likewise.
1115 * nto-tdep.h (private_thread_info): Rename to ...
1116 (nto_thread_info): ... this, initialize fields.
1117 (get_nto_thread_info): New.
1118 <name>: Change type to std::string.
1119 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1120 use of unique_ptr.
1121 * nto-procfs.c (update_thread_private_data_name): Adjust to
1122 std::string change, allocate nto_private_thread_info with new.
1123 (update_thread_private_data): Adjust to unique_ptr.
1124 * remote.c (private_thread_info): Rename to ...
1125 (remote_thread_info): ... this, initialize data members with
1126 default values.
1127 <extra, name>: Change type to std::string.
1128 <thread_handle>: Change type to non-pointer.
1129 (free_private_thread_info): Remove.
1130 (get_private_info_thread): Rename to...
1131 (get_remote_thread_info): ... this, change return type, adjust to
1132 use of unique_ptr, use remote_thread_info constructor.
1133 (remote_add_thread): Adjust.
1134 (get_private_info_ptid): Rename to...
1135 (get_remote_thread_info): ...this, change return type.
1136 (remote_thread_name): Use get_remote_thread_info, adjust to
1137 change to std::string.
1138 (struct thread_item) <~thread_item>: Remove.
1139 <thread_handle>: Make non pointer.
1140 (start_thread): Adjust to thread_item::thread_handle type
1141 change.
1142 (remote_update_thread_list): Adjust to type name change, move
1143 strings from temporary to long-lived object instead of
1144 duplicating.
1145 (remote_threads_extra_info): Use get_remote_thread_info.
1146 (process_initial_stop_replies): Likewise.
1147 (resume_clear_thread_private_info): Likewise.
1148 (remote_resume): Adjust to type name change.
1149 (remote_commit_resume): Use get_remote_thread_info.
1150 (process_stop_reply): Adjust to type name change.
1151 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1152 (remote_stopped_by_hw_breakpoint): Likewise.
1153 (remote_stopped_by_watchpoint): Likewise.
1154 (remote_stopped_data_address): Likewise.
1155 (remote_core_of_thread): Likewise.
1156 (remote_thread_handle_to_thread_info): Use
1157 get_private_info_thread, adjust to thread_handle field type
1158 change.
1159
21fe1c75
SM
11602017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1161
1162 * remote.c (struct thread_item): Add constructor, disable copy
1163 construction and copy assignment, define default move
1164 construction and move assignment.
1165 <extra, name>: Change type to std::string.
1166 <core>: Initialize.
1167 <thread_handle>: Make non-pointer.
1168 (thread_item_t): Remove typedef.
1169 (DEF_VEC_O(thread_item_t)): Remove.
1170 (threads_listing_context) <contains_thread>: New method.
1171 <remove_thread>: New method.
1172 <items>: Change type to std::vector.
1173 (clear_threads_listing_context): Remove.
1174 (threads_listing_context_remove): Remove.
1175 (remote_newthread_step): Use thread_item constructor, adjust to
1176 change to std::vector.
1177 (start_thread): Use thread_item constructor, adjust to change to
1178 std::vector.
1179 (end_thread): Adjust to change to std::vector and std::string.
1180 (remote_get_threads_with_qthreadinfo): Use thread_item
1181 constructor, adjust to std::vector.
1182 (remote_update_thread_list): Adjust to change to std::vector and
1183 std::string, use threads_listing_context methods.
1184 (remove_child_of_pending_fork): Adjust.
1185 (remove_new_fork_children): Adjust.
1186 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1187 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1188 * unittests/rsp-low-selftests.c: New file.
1189 * common/rsp-low.h: Include common/byte-vector.h.
1190 (hex2bin): New overload.
1191 * common/rsp-low.c (hex2bin): New overload.
1192
089354bb
SM
11932017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1194
1195 * inferior.h (private_inferior): Define structure type, add
1196 virtual pure destructor.
1197 (inferior) <priv>: Change type to unique_ptr.
1198 * inferior.c (private_inferior::~private_inferior): Provide
1199 default implementation.
1200 (inferior::~inferior): Don't free priv field.
1201 (exit_inferior_1): Likewise.
1202 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1203 (darwin_exception_info): Remove typedef.
1204 (DEF_VEC_O (darwin_thread_t)); Remove.
1205 (private_inferior): Rename to ...
1206 (darwin_private_inferior): ... this, extend private_inferior.
1207 (get_darwin_inferior): New.
1208 <threads>: Change type to std::vector of darwin_thread_t pointers.
1209 * darwin-nat.c (darwin_check_new_threads): Adjust.
1210 (find_inferior_task_it): Adjust.
1211 (darwin_find_thread); Adjust.
1212 (darwin_suspend_inferior): Adjust.
1213 (darwin_resume_inferior): Adjust.
1214 (darwin_find_new_inferior): Adjust.
1215 (darwin_decode_notify_message): Adjust.
1216 (darwin_send_reply): Adjust.
1217 (darwin_resume_inferior_threads): Adjust.
1218 (darwin_suspend_inferior_threads): Adjust.
1219 (darwin_decode_message): Adjust.
1220 (darwin_wait): Adjust.
1221 (darwin_interrupt): Adjust.
1222 (darwin_deallocate_threads): Adjust.
1223 (darwin_mourn_inferior): Adjust, don't free private data.
1224 (darwin_reply_to_all_pending_messages): Adjust.
1225 (darwin_stop_inferior): Adjust.
1226 (darwin_setup_exceptions): Adjust.
1227 (darwin_kill_inferior): Adjust.
1228 (darwin_setup_request_notification): Adjust.
1229 (darwin_attach_pid): Adjust.
1230 (darwin_init_thread_list): Adjust.
1231 (darwin_setup_fake_stop_event): Adjust.
1232 (darwin_attach): Adjust.
1233 (darwin_detach): Adjust.
1234 (darwin_xfer_partial): Adjust.
1235 (set_enable_mach_exceptions): Adjust.
1236 (darwin_pid_to_exec_file): Adjust.
1237 (darwin_get_ada_task_ptid): Adjust.
1238 * darwin-nat-info.c (get_task_from_args): Adjust.
1239 (info_mach_ports_command): Adjust.
1240 (info_mach_region_command): Adjust.
1241 (info_mach_exceptions_command): Adjust.
1242 * remote.c (private_inferior): Rename to ...
1243 (remote_private_inferior): ... this, initialize fields.
1244 (get_remote_inferior); New.
1245 (remote_commit_resume): Use get_remote_inferior.
1246 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1247
d044bac8
PA
12482017-11-24 Pedro Alves <palves@redhat.com>
1249
1250 * NEWS: Mention linespecs and explicit locations, and completion
1251 improvements.
1252
e8d58cba
YQ
12532017-11-24 Yao Qi <yao.qi@linaro.org>
1254
1255 * regcache.c (regcache::dump): Remove footnote_register_size.
1256
a63f2d2f
YQ
12572017-11-24 Yao Qi <yao.qi@linaro.org>
1258
1259 * regcache.c (cooked_read_test): Add more test for readonly
1260 regcache.
1261
1b30aaa5
YQ
12622017-11-24 Yao Qi <yao.qi@linaro.org>
1263
1264 * gdbarch-selftests.c (test_target_has_registers): Move it to
1265 target.c.
1266 (test_target_has_stack): Likewise.
1267 (test_target_has_memory): Likewise.
1268 (test_target_prepare_to_store): Likewise.
1269 (test_target_store_registers): Likewise.
1270 (test_target_ops): Likewise.
1271 * regcache.c: Include selftest-arch.h and gdbthread.h.
1272 (target_ops_no_register): New class.
1273 (test_target_fetch_registers): New.
1274 (test_target_store_registers): New.
1275 (test_target_xfer_partial): New.
1276 (readwrite_regcache): New.
1277 (cooked_read_test): New.
1278 (_initialize_regcache): Register the test.
1279 * target.c: (test_target_has_registers): Moved from
1280 gdbarch-selftests.c.
1281 (test_target_has_stack): Likewise.
1282 (test_target_has_memory): Likewise.
1283 (test_target_prepare_to_store): Likewise.
1284 (test_target_store_registers): Likewise.
1285 * target.h (test_target_ops): New class.
1286
6654d750
AH
12872017-11-24 Alan Hayward <alan.hayward@arm.com>
1288
1289 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1290 selftest.
1291
49bdb7ee
AH
12922017-11-24 Alan Hayward <alan.hayward@arm.com>
1293
1294 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1295 * arch/aarch64.c (aarch64_create_target_description): Create
1296 new target description.
1297 * features/Makefile: Add new files.
1298 * features/aarch64.c: Remove file.
1299 * features/aarch64-core.c: New autogenerated file.
1300 * features/aarch64-fpu.c: New autogenerated file.
1301 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
da434ccb
AH
1302
13032017-11-24 Alan Hayward <alan.hayward@arm.com>
1304
1305 * Makefile.in: Add new files.
1306 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1307 aarch64_read_description.
1308 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1309 Call aarch64_read_description.
1310 * aarch64-tdep.c (aarch64_read_description): New function.
1311 (aarch64_gdbarch_init): Call aarch64_read_description.
1312 * aarch64-tdep.h (aarch64_read_description): New function.
1313 * arch/aarch64.c: New file.
1314 * configure.tgt: Add new files.
1315
98ead37e
YQ
13162017-11-24 Yao Qi <yao.qi@linaro.org>
1317
1318 * mi/mi-main.c (register_changed_p): Update.
1319 * value.c (value_contents_bits_eq): Change return type.
1320 (value_contents_eq): Likewise.
1321 * value.h: Update comments.
1322
62ad7ce7
YQ
13232017-11-24 Yao Qi <yao.qi@linaro.org>
1324
1325 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1326 local 'changed'. Remove error.
1327 (register_changed_p): Change return type to bool.
1328
506fe5f4
YQ
13292017-11-24 Yao Qi <yao.qi@linaro.org>
1330
1331 * arch/tic6x.c: New file.
1332 * arch/tic6x.h: New file.
1333 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1334 tic6x-core.xml and tic6x-gp.xml.
1335 * features/tic6x-c6xp.c: Generated.
1336 * features/tic6x-core.c: Generated.
1337 * features/tic6x-gp.c: Generated.
1338 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1339 "tic6x-".
1340
00ea2e2a
SM
13412017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1342
1343 * mi/mi-main.c (list_available_thread_groups): Change map value
1344 type to std::vector.
1345
f45e2a77
SM
13462017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1347
1348 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1349
bd046f64
SM
13502017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1351
1352 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1353 back to...
1354 <children_requested>: ... this.
1355 (varobj_get_num_children, varobj_update): Adjust.
1356
4c37490d
SM
13572017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1358
1359 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1360 (ada_value_has_mutated): Likewise.
1361 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1362 (c_is_path_expr_parent): Likewise.
1363 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1364 (mi_cmd_var_set_frozen): Likewise.
1365 (mi_cmd_var_update_iter): Likewise.
1366 (mi_cmd_var_update): Likewise.
1367 * varobj.c (pretty_printing): Likewise.
1368 (varobj_enable_pretty_printing): Likewise.
1369 (struct varobj_root) <floating, is_valid>: Likewise.
1370 (struct varobj_dynamic) <children_requested>: Likewise.
1371 (delete_variable): Likewise.
1372 (delete_variable_1): Likewise.
1373 (install_variable): Likewise.
1374 (update_type_if_necessary): Likewise.
1375 (install_new_value): Likewise.
1376 (value_of_root): Likewise.
1377 (is_root_p): Likewise.
1378 (varobj_create): Likewise.
1379 (varobj_delete): Likewise.
1380 (varobj_has_more): Likewise.
1381 (varobj_set_frozen): Likewise.
1382 (varobj_get_frozen): Likewise.
1383 (install_dynamic_child): Likewise.
1384 (dynamic_varobj_has_child_method): Likewise.
1385 (update_dynamic_varobj_children): Likewise.
1386 (varobj_get_num_children): Likewise.
1387 (varobj_list_children): Likewise.
1388 (is_path_expr_parent): Likewise.
1389 (varobj_default_is_path_expr_parent): Likewise.
1390 (varobj_is_dynamic_p): Likewise.
1391 (varobj_set_value): Likewise.
1392 (varobj_value_has_mutated): Likewise.
1393 (varobj_update): Likewise.
1394 (check_scope): Likewise.
1395 (value_of_root_1): Likewise.
1396 (varobj_value_get_print_value): Likewise.
1397 (varobj_editable_p): Likewise.
1398 (varobj_value_is_changeable_p): Likewise.
1399 (varobj_floating_p): Likewise.
1400 (varobj_default_value_is_changeable_p): Likewise.
1401 (varobj_invalidate_iter): Likewise.
1402 * varobj.h (struct varobj_update_result) <type_changed,
1403 children_changed, changed, value_installed>: Likewise.
1404 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1405 (struct lang_varobj_ops) <value_is_changeable_p,
1406 value_has_mutated, is_path_expr_parent>: Likewise.
1407 (varobj_delete): Likewise.
1408 (varobj_set_frozen): Likewise.
1409 (varobj_get_frozen): Likewise.
1410 (varobj_set_value): Likewise.
1411 (varobj_update): Likewise.
1412 (varobj_editable_p): Likewise.
1413 (varobj_floating_p): Likewise.
1414 (varobj_has_more): Likewise.
1415 (varobj_is_dynamic_p): Likewise.
1416 (varobj_default_value_is_changeable_p): Likewise.
1417 (varobj_value_is_changeable_p): Likewise.
1418 (varobj_is_anonymous_child): Likewise.
1419 (varobj_default_is_path_expr_parent): Likewise.
1420
9c23b42f
SDJ
14212017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1422
1423 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1424 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1425 <type_str>: Convert to 'std::string'.
1426 <expr>: Convert to 'expression_up'.
1427 (dtrace_probe_arg_s): Delete type and VEC.
1428 (dtrace_probe_enabler_s): Likewise.
1429 (struct dtrace_probe): Replace by...
1430 (class dtrace_static_probe_ops): ...this and...
1431 (class dtrace_probe): ...this.
1432 (dtrace_probe_is_linespec): Rename to...
1433 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1434 to reflect change.
1435 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1436 Adjust code. Create new instance of 'dtrace_probe'.
1437 (dtrace_build_arg_exprs): Rename to...
1438 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1439 reflect change.
1440 (dtrace_get_probes): Rename to...
1441 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1442 to reflect change.
1443 (dtrace_get_arg): Rename to...
1444 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1445 reflect change.
1446 (dtrace_probe_is_enabled): Rename to...
1447 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1448 change.
1449 (dtrace_get_probe_address): Rename to...
1450 (dtrace_probe::get_relocated_address): ...this. Adjust code
1451 to reflect change.
1452 (dtrace_get_probe_argument_count): Rename to...
1453 (dtrace_probe::get_argument_count): ...this. Adjust code to
1454 reflect change.
1455 (dtrace_can_evaluate_probe_arguments): Rename to...
1456 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1457 to reflect change.
1458 (dtrace_evaluate_probe_argument): Rename to...
1459 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1460 reflect change.
1461 (dtrace_compile_to_ax): Rename to...
1462 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1463 reflect change.
1464 (dtrace_probe_destroy): Delete.
1465 (dtrace_type_name): Rename to...
1466 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1467 reflect change.
1468 (dtrace_probe::get_static_ops): New method.
1469 (dtrace_gen_info_probes_table_header): Rename to...
1470 (dtrace_static_probe_ops::gen_info_probes_table_header):
1471 ...this. Adjust code to reflect change.
1472 (dtrace_gen_info_probes_table_values): Rename to...
1473 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1474 code to reflect change.
1475 (dtrace_enable_probe): Rename to...
1476 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1477 change.
1478 (dtrace_disable_probe): Rename to...
1479 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1480 change.
1481 (struct probe_ops dtrace_probe_ops): Delete.
1482 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1483 instead of 'info_probes_for_ops'.
1484 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1485 of 'all_probe_ops'.
1486
0e9ae10f
SDJ
14872017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1488 Simon Marchi <simark@simark.ca>
1489
1490 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1491 variable.
1492 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1493 <aexpr>: Change type to 'expression_up'.
1494 (stap_probe_arg_s): Delete type and VEC.
1495 (struct stap_probe): Delete. Replace by...
1496 (class stap_static_probe_ops): ...this and...
1497 (class stap_probe): ...this. Rename variables to add 'm_'
1498 prefix. Do not use 'union' for arguments anymore.
1499 (stap_get_expected_argument_type): Receive probe name instead
1500 of 'struct stap_probe'. Adjust code.
1501 (stap_parse_probe_arguments): Rename to...
1502 (stap_probe::parse_arguments): ...this. Adjust code to
1503 reflect change.
1504 (stap_get_probe_address): Rename to...
1505 (stap_probe::get_relocated_address): ...this. Adjust code
1506 to reflect change.
1507 (stap_get_probe_argument_count): Rename to...
1508 (stap_probe::get_argument_count): ...this. Adjust code
1509 to reflect change.
1510 (stap_get_arg): Rename to...
1511 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1512 reflect change.
1513 (can_evaluate_probe_arguments): Rename to...
1514 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1515 to reflect change.
1516 (stap_evaluate_probe_argument): Rename to...
1517 (stap_probe::evaluate_argument): ...this. Adjust code
1518 to reflect change.
1519 (stap_compile_to_ax): Rename to...
1520 (stap_probe::compile_to_ax): ...this. Adjust code to
1521 reflect change.
1522 (stap_probe_destroy): Delete.
1523 (stap_modify_semaphore): Adjust comment.
1524 (stap_set_semaphore): Rename to...
1525 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1526 change.
1527 (stap_clear_semaphore): Rename to...
1528 (stap_probe::clear_semaphore): ...this. Adjust code to
1529 reflect change.
1530 (stap_probe::get_static_ops): New method.
1531 (handle_stap_probe): Adjust code to create instance of
1532 'stap_probe'.
1533 (stap_get_probes): Rename to...
1534 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1535 reflect change.
1536 (stap_probe_is_linespec): Rename to...
1537 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1538 reflect change.
1539 (stap_type_name): Rename to...
1540 (stap_static_probe_ops::type_name): ...this. Adjust code to
1541 reflect change.
1542 (stap_gen_info_probes_table_header): Rename to...
1543 (stap_static_probe_ops::gen_info_probes_table_header):
1544 ...this. Adjust code to reflect change.
1545 (stap_gen_info_probes_table_values): Rename to...
1546 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1547 code to reflect change.
1548 (struct probe_ops stap_probe_ops): Delete.
1549 (info_probes_stap_command): Use 'info_probes_for_spops'
1550 instead of 'info_probes_for_ops'.
1551 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1552 of 'all_probe_ops'.
1553
935676c9
SDJ
15542017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1555
1556 * break-catch-throw.c (fetch_probe_arguments): Use
1557 'probe.prob' instead of 'probe.probe'.
1558 * breakpoint.c (create_longjmp_master_breakpoint): Call
1559 'can_evaluate_arguments' and 'get_relocated_address' methods
1560 from probe.
1561 (create_exception_master_breakpoint): Likewise.
1562 (add_location_to_breakpoint): Use 'sal->prob' instead of
1563 'sal->probe'.
1564 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1565 probe.
1566 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1567 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1568 of 'probe_ops'.
1569 (probe_key_free): Call 'delete' on probe.
1570 (check_exception_resume): Use 'probe.prob' instead of
1571 'probe.probe'.
1572 * location.c (string_to_event_location_basic): Call
1573 'probe_linespec_to_static_ops'.
1574 * probe.c (class any_static_probe_ops): New class.
1575 (any_static_probe_ops any_static_probe_ops): New variable.
1576 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1577 argument. Adjust code to reflect change.
1578 (parse_probes): Use 'static_probe_ops' instead of
1579 'probe_ops'. Adjust code to reflect change.
1580 (find_probes_in_objfile): Call methods to get name and
1581 provider from probe.
1582 (find_probe_by_pc): Use 'result.prob' instead of
1583 'result.probe'. Call 'get_relocated_address' method from
1584 probe.
1585 (collect_probes): Adjust comment and argument list to receive
1586 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1587 reflect change. Call necessary methods from probe.
1588 (compare_probes): Call methods to get name and provider from
1589 probes.
1590 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1591 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1592 adjust code accordingly.
1593 (print_ui_out_not_applicables): Likewise.
1594 (info_probes_for_ops): Rename to...
1595 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1596 as argument instead of 'probe_ops'. Adjust code. Call
1597 necessary methods from probe.
1598 (info_probes_command): Use 'info_probes_for_spops'.
1599 (enable_probes_command): Pass correct argument to
1600 'collect_probes'. Call methods from probe.
1601 (disable_probes_command): Likewise.
1602 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1603 (get_probe_argument_count): Move to
1604 'any_static_probe_ops::get_argument_count'.
1605 (can_evaluate_probe_arguments): Move to
1606 'any_static_probe_ops::can_evaluate_arguments'.
1607 (evaluate_probe_argument): Move to
1608 'any_static_probe_ops::evaluate_argument'.
1609 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1610 'probe.probe'.
1611 (probe_linespec_to_ops): Rename to...
1612 (probe_linespec_to_static_ops): ...this. Adjust code.
1613 (probe_any_is_linespec): Rename to...
1614 (any_static_probe_ops::is_linespec): ...this.
1615 (probe_any_get_probes): Rename to...
1616 (any_static_probe_ops::get_probes): ...this.
1617 (any_static_probe_ops::type_name): New method.
1618 (any_static_probe_ops::gen_info_probes_table_header): New
1619 method.
1620 (compute_probe_arg): Use 'pc_probe.prob' instead of
1621 'pc_probe.probe'. Call methods from probe.
1622 (compile_probe_arg): Likewise.
1623 (std::vector<const probe_ops *> all_probe_ops): Delete.
1624 (std::vector<const static_probe_ops *> all_static_probe_ops):
1625 New variable.
1626 (_initialize_probe): Use 'all_static_probe_ops' instead of
1627 'all_probe_ops'.
1628 * probe.h (struct info_probe_column) <field_name>: Delete
1629 extraneous newline
1630 (info_probe_column_s): Delete type and VEC.
1631 (struct probe_ops): Delete. Replace with...
1632 (class static_probe_ops): ...this and...
1633 (clas probe): ...this.
1634 (struct bound_probe) <bound_probe>: Delete extraneous
1635 newline. Adjust constructor to receive 'probe' instead of
1636 'struct probe'.
1637 <probe>: Rename to...
1638 <prob>: ...this. Delete extraneous newline.
1639 <objfile>: Delete extraneous newline.
1640 (register_probe_ops): Delete unused prototype.
1641 (info_probes_for_ops): Rename to...
1642 (info_probes_for_spops): ...this. Adjust comment.
1643 (get_probe_address): Move to 'probe::get_address'.
1644 (get_probe_argument_count): Move to
1645 'probe::get_argument_count'.
1646 (can_evaluate_probe_arguments): Move to
1647 'probe::can_evaluate_arguments'.
1648 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1649 * solib-svr4.c (struct svr4_info): Adjust comment.
1650 (struct probe_and_action) <probe>: Rename to...
1651 <prob>: ...this.
1652 (register_solib_event_probe): Receive 'probe' instead of
1653 'struct probe' as argument. Use 'prob' instead of 'probe'
1654 when applicable.
1655 (solib_event_probe_action): Call 'get_argument_count' method
1656 from probe. Adjust comment.
1657 (svr4_handle_solib_event): Adjust comment. Call
1658 'evaluate_argument' method from probe.
1659 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1660 from probe.
1661 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1662 'struct probe'. Call 'can_evaluate_arguments' from probe.
1663 * symfile.h: Forward declare 'class probe' instead of 'struct
1664 probe'.
1665 * symtab.h: Likewise.
1666 (struct symtab_and_line) <probe>: Rename to...
1667 <prob>: ...this.
1668 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1669 Call probe methods.
1670 (stop_tracing): Likewise.
1671
8f6cb6c3
JB
16722017-11-22 Joel Brobecker <brobecker@adacore.com>
1673
1674 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1675 trailing newline at end of string in call to warning.
1676
479f8de1
SM
16772017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1678
1679 * osdata.h: Include vector isntead of vec.h.
1680 (osdata_column_s): Remove typedef.
1681 (struct osdata_column): Add constructor.
1682 <name, value>: Change type to std::string.
1683 (DEF_VEC_O (osdata_column_s)): Remove.
1684 (osdata_item_s): Remove typedef.
1685 (struct osdata_item) <columns>: Change type to std::vector.
1686 (DEF_VEC_O (osdata_item_s)): Remove.
1687 (struct osdata): Add constructor.
1688 <type>: Change type to std::string.
1689 <items>: Change type to std::vector.
1690 (osdata_p): Remove typedef.
1691 (DEF_VEC_P (osdata_p)): Remove.
1692 (osdata_parse): Return a unique_ptr.
1693 (osdata_free): Remove.
1694 (make_cleanup_osdata_free): Remove.
1695 (get_osdata): Return a unique_ptr.
1696 (get_osdata_column): Return pointer to std::string, take a
1697 reference to osdata_item as parameter.
1698 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1699 unique_ptr.
1700 <property_name>: Change type to std::string.
1701 (osdata_start_osdata): Allocate osdata with new and adjust.
1702 (osdata_start_item): Adjust.
1703 (osdata_start_column): Adjust.
1704 (osdata_end_column): Adjust.
1705 (clear_parsing_data): Remove.
1706 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1707 (osdata_item_clear): Remove.
1708 (get_osdata): return a unique_ptr and adjust.
1709 (get_osdata_column): Return a pointer to std::string and adjust.
1710 (info_osdata): Adjust.
1711 * mi/mi-main.c: Include <map>.
1712 (free_vector_of_osdata_items): Remove.
1713 (list_available_thread_groups): Adjust, use std::map instead of
1714 splay tree.
1715
41bd68f5
SM
17162017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1717
1718 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1719 case in switch.
1720
7e2fd2f4
SM
17212017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1722
1723 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1724
0604393c
SM
17252017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1726
1727 * varobj.h (struct varobj_update_result): Add constructor, add
1728 move constructor, disable copy and assign, initialize fields.
1729 <newobj>: Change type to std::vector.
1730 (varobj_update): Return std::vector.
1731 * varobj.c (install_dynamic_child): Change VEC parameters to
1732 std::vector and adjust.
1733 (update_dynamic_varobj_children): Likewise.
1734 (varobj_update): Return std::vector and adjust.
1735 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1736
ddf0ea08
SM
17372017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1738
1739 * varobj.h (struct varobj) <parent>: Remove const.
1740 <children>: Change type to std::vector.
1741 (varobj_list_children): Return std::vector const reference.
1742 (varobj_restrict_range): Change parameter type to std::vector
1743 const reference.
1744 * varobj.c (varobj_has_more): Adjust.
1745 (varobj_restrict_range): Change parameter type to std::vector
1746 const reference and adjust.
1747 (install_dynamic_child): Adjust.
1748 (update_dynamic_varobj_children): Adjust.
1749 (varobj_list_children): Return std::vector const reference and
1750 adjust.
1751 (varobj_add_child): Adjust.
1752 (update_type_if_necessary): Adjust.
1753 (varobj_update): Adjust.
1754 (delete_variable_1): Adjust.
1755 * ada-varobj.c (ada_value_has_mutated): Adjust.
1756 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1757
9e5b9d2b
SM
17582017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1759
1760 * varobj.h (struct varobj): Add constructor and destructor,
1761 initialize fields.
1762 * varobj.c (struct varobj_root): Initialize fields.
1763 (struct varobj_dynamic): Initialize fields.
1764 (varobj_create): Use unique_ptr instead of cleanup. Create
1765 varobj with new instead of new_root_variable.
1766 (delete_variable_1): Free variable with delete instead of
1767 free_variable.
1768 (create_child_with_value): Create variable with new instead of
1769 new_variable.
1770 (varobj::varobj): New.
1771 (varobj::~varobj): New (body mostly coming from free_variable).
1772 (new_variable): Remove.
1773 (free_variable): Remove.
1774 (do_free_variable_cleanup): Remove.
1775 (make_cleanup_free_variable): Remove.
1776
fc35dab1
UW
17772017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1778
1779 * core-regset.c: Remove file.
1780 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1781
2400729e
UW
17822017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1783
1784 * NEWS: Document use of GNU MPFR.
1785 * README: Likewise.
1786
1787 * Makefile.in (LIBMPFR): Add define.
1788 (CLIBS): Add $(LIBMPFR).
1789 * configure.ac: Add --with-mpfr configure option.
1790 * configure: Regenerate.
1791 * config.in: Regenerate.
1792
1793 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1794 (class mpfr_float_ops): New type.
1795 (mpfr_float_ops::from_target): Two new overloaded functions.
1796 (mpfr_float_ops::to_target): Likewise.
1797 (mpfr_float_ops::to_string): New function.
1798 (mpfr_float_ops::from_string): Likewise.
1799 (mpfr_float_ops::to_longest): Likewise.
1800 (mpfr_float_ops::from_longest): Likewise.
1801 (mpfr_float_ops::from_ulongest): Likewise.
1802 (mpfr_float_ops::to_host_double): Likewise.
1803 (mpfr_float_ops::from_host_double): Likewise.
1804 (mpfr_float_ops::convert): Likewise.
1805 (mpfr_float_ops::binop): Likewise.
1806 (mpfr_float_ops::compare): Likewise.
1807 (get_target_float_ops): Use mpfr_float_ops if available.
1808
7a26362d
UW
18092017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1810
1811 * target-float.c: Do not include <math.h>.
1812 Include <cmath> and <limits>.
1813 (DOUBLEST): Do not define.
1814 (class target_float_ops): New type.
1815 (class host_float_ops): New templated type.
1816 (class decimal_float_ops): New type.
1817
1818 (floatformat_to_doublest): Rename to ...
1819 (host_float_ops<T>::from_target): ... this. Use template type T
1820 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1821 (host_float_ops<T>::from_target): New overload using a type argument.
1822 (floatformat_from_doublest): Rename to ...
1823 (host_float_ops<T>::to_target): ... this. Use template type T
1824 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1825 (host_float_ops<T>::to_target): New overload using a type argument.
1826 (floatformat_printf_format): New function.
1827 (struct printf_length_modifier): New templated type.
1828 (floatformat_to_string): Rename to ...
1829 (host_float_ops<T>::to_string): ... this. Use type instead of
1830 floatformat argument. Use floatformat_printf_format and
1831 printf_length_modifier. Remove special handling of invalid numbers,
1832 infinities and NaN (moved to target_float_to_string).
1833 (struct scanf_length_modifier): New templated type.
1834 (floatformat_from_string): Rename to ...
1835 (host_float_ops<T>::from_string): ... this. Use type instead of
1836 floatformat argument. Use scanf_length_modifier.
1837 (floatformat_to_longest): Rename to ...
1838 (host_float_ops<T>::to_longest): ... this. Use type instead of
1839 floatformat argument. Handle out-of-range values deterministically.
1840 (floatformat_from_longest): Rename to ...
1841 (host_float_ops<T>::from_longest): ... this. Use type instead of
1842 floatformat argument.
1843 (floatformat_from_ulongest): Rename to ...
1844 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1845 floatformat argument.
1846 (floatformat_to_host_double): Rename to ...
1847 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1848 floatformat argument.
1849 (floatformat_from_host_double): Rename to ...
1850 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1851 floatformat argument.
1852 (floatformat_convert): Rename to ...
1853 (host_float_ops<T>::convert): ... this. Use type instead of
1854 floatformat arguments. Remove handling of no-op conversions.
1855 (floatformat_binop): Rename to ...
1856 (host_float_ops<T>::binop): ... this. Use type instead of
1857 floatformat arguments.
1858 (floatformat_compare): Rename to ...
1859 (host_float_ops<T>::compare): ... this. Use type instead of
1860 floatformat arguments.
1861
1862 (match_endianness): Use type instead of length/byte_order arguments.
1863 (set_decnumber_context): Likewise.
1864 (decimal_from_number): Likewise. Update calls.
1865 (decimal_to_number): Likewise.
1866 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1867 (decimal_float_ops::to_host_double): New dummy function.
1868 (decimal_float_ops::from_host_double): Likewise.
1869 (decimal_to_string): Rename to ...
1870 (decimal_float_ops::to_string): ... this. Use type instead of
1871 length/byte_order arguments. Update calls.
1872 (decimal_from_string): Rename to ...
1873 (decimal_float_ops::from_string): ... this. Use type instead of
1874 length/byte_order arguments. Update calls.
1875 (decimal_from_longest): Rename to ...
1876 (decimal_float_ops::from_longest): ... this. Use type instead of
1877 length/byte_order arguments. Update calls.
1878 (decimal_from_ulongest): Rename to ...
1879 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1880 length/byte_order arguments. Update calls.
1881 (decimal_to_longest): Rename to ...
1882 (decimal_float_ops::to_longest): ... this. Use type instead of
1883 length/byte_order arguments. Update calls.
1884 (decimal_binop): Rename to ...
1885 (decimal_float_ops::binop): ... this. Use type instead of
1886 length/byte_order arguments. Update calls.
1887 (decimal_compare): Rename to ...
1888 (decimal_float_ops::compare): ... this. Use type instead of
1889 length/byte_order arguments. Update calls.
1890 (decimal_convert): Rename to ...
1891 (decimal_float_ops::convert): ... this. Use type instead of
1892 length/byte_order arguments. Update calls.
1893
1894 (target_float_same_category_p): New function.
1895 (target_float_same_format_p): Likewise.
1896 (target_float_format_length): Likewise.
1897 (enum target_float_ops_kind): New type.
1898 (get_target_float_ops_kind): New function.
1899 (get_target_float_ops): Three new overloaded functions.
1900
1901 (target_float_is_zero): Update call.
1902 (target_float_to_string): Add special handling of invalid numbers,
1903 infinities and NaN (moved from floatformat_to_string). Use
1904 target_float_ops callback.
1905 (target_float_from_string): Use target_float_ops callback.
1906 (target_float_to_longest): Likewise.
1907 (target_float_from_longest): Likewise.
1908 (target_float_from_ulongest): Likewise.
1909 (target_float_to_host_double): Likewise.
1910 (target_float_from_host_double): Likewise.
1911 (target_float_convert): Add special case for no-op conversions.
1912 Use target_float_ops callback.
1913 (target_float_binop): Use target_float_ops callback.
1914 (target_float_compare): Likewise.
1915
a9f26f60
YQ
19162017-11-22 Yao Qi <yao.qi@linaro.org>
1917
1918 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1919
29f9a567
YQ
19202017-11-22 Yao Qi <yao.qi@linaro.org>
1921
1922 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1923 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1924
3b1b69bf
JG
19252017-11-21 Jerome Guitton <guitton@adacore.com>
1926
1927 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1928 with event ptid from the lower layer before doing the
1929 ravenscar-specific update.
1930
54aa6c67
JB
19312017-11-21 Joel Brobecker <brobecker@adacore.com>
1932
1933 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1934 the ptid's TID is nonzero.
1935
cf3fbed4
JB
19362017-11-21 Joel Brobecker <brobecker@adacore.com>
1937
1938 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1939 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1940 Make non-static. Change return type to char *. Adjust code
1941 accordingly. Rewrite the function's documentation.
1942 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1943 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1944 we have enough debugging information in the runtime to support
1945 Ada task debugging before we enable the ravenscar-thread layer.
1946
9edcc12f
JB
19472017-11-21 Joel Brobecker <brobecker@adacore.com>
1948
1949 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1950 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1951 * ravenscar-thread.c: Add into comment.
1952 (base_magic_null_ptid): Delete.
1953 (base_ptid): Change documentation.
1954 (ravenscar_active_task): Renames ravenscar_running_thread.
1955 All callers updated throughout.
1956 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1957 (ravenscar_task_is_currently_active): Likewise.
1958 (get_base_thread_from_ravenscar_task): Ditto.
1959 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1960 (ravenscar_runtime_initialized): Likewise.
1961 (get_running_thread_id): Add new parameter "cpu". Adjust
1962 implementation to handle this new parameter.
1963 (ravenscar_fetch_registers): Small adjustment to use
1964 is_ravenscar_task and ravenscar_task_is_currently_active in
1965 order to decide whether to use the target beneath or this
1966 module's arch_ops.
1967 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1968 (ravenscar_stopped_by_sw_breakpoint): Use
1969 get_base_thread_from_ravenscar_task to get the underlying
1970 thread, rather than using base_ptid.
1971 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1972 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1973 Likewise.
1974 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1975
65d40437
JB
19762017-11-21 Joel Brobecker <brobecker@adacore.com>
1977
1978 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1979 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1980 (get_tcb_types_info): Set fieldnos.base_cpu.
1981 (read_atcb): Set task_info->base_cpu.
1982 (info_task): Print "Base CPU" info if set by runtime.
1983
e02544b2
JB
19842017-11-21 Joel Brobecker <brobecker@adacore.com>
1985
1986 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1987 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1988 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1989 New functions.
1990 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1991 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1992 to_stopped_data_address and to_core_of_thread fields of
1993 ravenscar_ops.
1994
ed0f4273
UW
19952017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1996
1997 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1998 (struct gdbarch_tdep): New member long_double_abi.
1999 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2000 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2001 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2002 format depending on long_double_abi tdep member.
2003 (ppc_floatformat_for_type): Handle __ibm128 type.
2004
0fc76421
SM
20052017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2006
2007 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2008
e6b2f5ef
PA
20092017-11-21 Pedro Alves <palves@redhat.com>
2010
2011 * dwarf2read.c (mapped_index::find_name_components_bounds)
2012 <completion mode, upper bound>: Use std::lower_bound instead of
2013 std::upper_bound.
2014 (test_mapped_index_find_name_component_bounds): Remove incorrect
2015 "t1_fund" from expected symbols.
2016
5c58de74
PA
20172017-11-21 Pedro Alves <palves@redhat.com>
2018
2019 * dwarf2read.c (mapped_index::name_components_casing): New field.
2020 (mapped_index) <build_name_components,
2021 find_name_components_bounds): Declare new methods.
2022 (mapped_index::find_name_components_bounds)
2023 (mapped_index::build_name_components): New methods, factored out
2024 from dw2_expand_symtabs_matching_symbol.
2025 (check_find_bounds_finds)
2026 (test_mapped_index_find_name_component_bounds): New.
2027 (run_test): Rename to ...
2028 (test_dw2_expand_symtabs_matching_symbol): ... this.
2029 (run_test): Reimplement.
2030
e1ef7d7a
PA
20312017-11-21 Pedro Alves <palves@redhat.com>
2032
2033 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2034 (symbol_end): Use cp_ident_is_alnum.
2035 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2036 * dwarf2read.c (make_sort_after_prefix_name): New function.
2037 (dw2_expand_symtabs_matching_symbol): Use it.
2038 (test_symbols): Add more symbols.
2039 (run_test): Add tests.
2040
cf724bc9
TT
20412017-11-17 Tom Tromey <tom@tromey.com>
2042
2043 * symtab.h (enum symbol_subclass_kind): New.
2044 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2045 Remove.
2046 <subclass>: New member.
2047 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2048 * rust-lang.c (rust_get_trait_object_pointer): Update.
2049 * dwarf2read.c (read_func_scope): Update.
2050 (read_variable): Update.
2051
68e745e3
TT
20522017-11-17 Tom Tromey <tom@tromey.com>
2053
2054 * dwarf2read.c (read_func_scope): Update.
2055 * symtab.h (struct template_symbol): Derive from symbol.
2056 <base>: Remove.
2057
71a3c369
TT
20582017-11-17 Tom Tromey <tom@tromey.com>
2059
2060 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2061 (struct rust_vtable_symbol): New.
2062 (find_symbol_at_address): Declare.
2063 * symtab.c (find_symbol_at_address): New function.
2064 * symfile.h (struct quick_symbol_functions)
2065 <find_compunit_symtab_by_address>: New member.
2066 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2067 function.
2068 (debug_sym_quick_functions): Link to
2069 debug_qf_find_compunit_symtab_by_address.
2070 * rust-lang.c (rust_get_trait_object_pointer): New function.
2071 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2072 rust_get_trait_object_pointer.
2073 * psymtab.c (psym_relocate): Clear psymbol_map.
2074 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2075 functions.
2076 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2077 * objfiles.h (struct objfile) <psymbol_map>: New member.
2078 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2079 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2080 (rust_containing_type, read_variable): New functions.
2081
7468702d
SM
20822017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2083
2084 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2085
37269bc9
SM
20862017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2087
2088 * common/filestuff.c: Include <algorithm>.
2089 (open_fds): Change type to std::vector<int>.
2090 (do_mark_open_fd): Adjust.
2091 (unmark_fd_no_cloexec): Adjust.
2092 (do_close): Adjust.
2093
5c632425
SM
20942017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2095
2096 * breakpoint.c (output_thread_groups): Take an std::vector.
2097 (print_one_breakpoint_location): Adjust.
2098
ced9779b
JB
20992017-11-17 Joel Brobecker <brobecker@adacore.com>
2100
2101 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2102 (ada_evaluate_subexp_for_cast): New function.
2103 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2104 ada_evaluate_subexp_for_cast.
2105 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2106 eval_skip_value.
2107 * eval.c (evaluate_var_value): Make non-static.
2108 (evaluate_var_msym_value, eval_skip_value): Likewise.
2109 * value.h (evaluate_var_value, evaluate_var_msym_value)
2110 (eval_skip_value): Declare.
2111
b7e22850
JB
21122017-11-16 Joel Brobecker <brobecker@adacore.com>
2113
2114 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2115 Update all callers.
2116
9ccabccd
PA
21172017-11-16 Pedro Alves <palves@redhat.com>
2118
2119 * python/py-unwind.c (pyuw_sniffer): Translate
2120 PyExc_KeyboardInterrupt to a GDB Quit exception.
2121
d930703d
PA
21222017-11-16 Pedro Alves <palves@redhat.com>
2123
2124 * infrun.c (resume_cleanups): Delete.
2125 (resume): No longer install a resume_cleanups cleanup nor call
2126 QUIT.
2127 (proceed): Pass the terminal to the inferior.
2128 (keep_going_pass_signal): No longer install a resume_cleanups
2129 cleanup.
2130
38dc2859
PA
21312017-11-16 Pedro Alves <palves@redhat.com>
2132
2133 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2134 if the prompt is blocked.
2135
688fca4f
PA
21362017-11-16 Pedro Alves <palves@redhat.com>
2137
2138 * breakpoint.c (insert_bp_location): Replace bp_err and
2139 bp_err_message locals by a gdb_exception local.
2140
e2c33ac7
PA
21412017-11-16 Pedro Alves <palves@redhat.com>
2142
2143 * inflow.c (scoped_ignore_sigttou): New class.
2144 (child_terminal_ours_1, new_tty): Use it.
2145
d7236961
UW
21462017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2147
2148 * target-float.c (decimal_from_number): Add byte_order argument and
2149 call match_endianness. Error if unknown floating-point type.
2150 (decimal_to_number): Add byte_order argument and call match_endianness.
2151 (decimal_from_longest): Update call. Do not call match_endianness.
2152 (decimal_from_ulongest): Likewise.
2153 (decimal_binop): Likewise.
2154 (decimal_is_zero): Likewise.
2155 (decimal_compare): Likewise.
2156 (decimal_convert): Likewise.
2157
d8ae99a7
PM
21582017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2159
2160 * python/python.c (gdbpy_rbreak): New function.
2161 * NEWS: Document Python rbreak feature.
2162
c632b645
YQ
21632017-11-16 Yao Qi <yao.qi@linaro.org>
2164
2165 * features/tic6x-c62x.xml: Remove.
2166 * features/tic6x-c64x.xml: Remove.
2167 * features/tic6x-c64xp.xml: Remove.
2168
a014b87a
JB
21692017-11-15 John Baldwin <jhb@FreeBSD.org>
2170
2171 * symtab.h: Include <array>.
2172
94765011
JB
21732017-11-15 John Baldwin <jhb@FreeBSD.org>
2174
2175 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2176 (bsd_kvm_proc_cmd): Likewise.
2177
625ad440
SM
21782017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2179
2180 * tui/tui-win.c (window_name_completer): Replace VEC with
2181 std::vector.
2182
c0c11fa9
AC
21832017-11-15 Andrew Cagney <cagney@gnu.org>
2184
2185 * MAINTAINERS: Remove no-longer applicable entries.
2186
34a7ebaf
AC
21872017-11-15 Andrew Cagney <cagney@gnu.org>
2188
2189 * MAINTAINERS: Move self to Past Maintainers.
2190
5334ef39
YQ
21912017-11-15 Yao Qi <yao.qi@linaro.org>
2192
2193 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2194 * features/nios2-linux.c: Remove.
2195 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2196 initialize_tdesc_nios2_linux.
2197
a714b0d6
YQ
21982017-11-15 Yao Qi <yao.qi@linaro.org>
2199
2200 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2201 M68HC11_LAST_HARD_REG + 1.
2202
92ffd475
PC
22032017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2204
2205 PR gdb/22388
2206 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2207 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2208 Return TARGET_XFER_EOF if size of returned data is 0.
2209
07431908
SM
22102017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2211
2212 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2213 memory-map-selftests.c.
2214 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2215 * memory-map.c (memory_map_start_memory): Fix computation of hi
2216 address.
2217 * unittests/memory-map-selftests.c: New file.
2218
31432a67
JB
22192017-11-09 Joel Brobecker <brobecker@adacore.com>
2220
2221 * ada-lang.c: Fix some typos in the general command documenting
2222 how Ada expressions are being evaluated and how their result
2223 is printed.
2224
e793c052
TT
22252017-11-09 Tom Tromey <tom@tromey.com>
2226
2227 * psymtab.c (psymbol_hash): Do not hash string contents.
2228 (psymbol_compare): Add comment.
2229
7e8835c5
TT
22302017-11-09 Tom Tromey <tom@tromey.com>
2231
2232 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2233
286acbb5
JB
22342017-11-08 Joel Brobecker <brobecker@adacore.com>
2235
2236 * ada-exp.y (write_var_from_sym): Remove parameter
2237 "orig_left_context". Update all callers.
2238
b44ec619
SM
22392017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2240
2241 * tracepoint.h (class collection_list) <stringify>: Return
2242 std::vector<std::string>.
2243 (encode_actions_rsp): Change parameters to
2244 std::vector<std::string> *.
2245 * tracepoint.c (collection_list::stringify): Return
2246 std::vector<std::string> and adjust accordingly.
2247 (encode_actions_rsp): Changee parameters to
2248 std::vector<std::string> and adjust accordingly.
2249 * remote.c (free_actions_list),
2250 free_actions_list_cleanup_wrapper): Remove.
2251 (remote_download_tracepoint): Adjust to std::vector.
2252
2f4732b0
TT
22532017-11-08 Tom Tromey <tom@tromey.com>
2254
2255 * dwarf2read.c (symbolp): Remove typedef.
2256 (read_func_scope): Use std::vector.
2257 (process_structure_scope): Use std::vector.
2258
f9d67a22
PA
22592017-11-08 Pedro Alves <palves@redhat.com>
2260
2261 * ada-lang.c (ada_make_symbol_completion_list): Use
2262 completion_skip_symbol.
2263 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2264 (symbol_is_function_or_method(symbol*)): New.
2265 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2266 completion_skip_symbol.
2267 (default_collect_symbol_completion_matches_break_on): Use
2268 completion_skip_symbol. Pass down mode.
2269 (collect_file_symbol_completion_matches): Pass down mode.
2270 * symtab.h (symbol_is_function_or_method): New declarations.
2271 (completion_skip_symbol): New template function.
2272
56d87ef7
PA
22732017-11-08 Pedro Alves <palves@redhat.com>
2274
2275 * linespec.c (iterate_over_all_matching_symtabs): Add
2276 search_domain parameter. Pass it down to expand_symtabs_matching.
2277 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2278 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2279 search_domain.
2280 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2281 Pass it down.
2282 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2283 symbols.
2284 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2285 it down.
2286
1b026119
PA
22872017-11-08 Pedro Alves <palves@redhat.com>
2288
2289 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2290 text_len locals and don't pass them down.
2291 * symtab.c (completion_list_add_name): Remove
2292 sym_text/sym_text_len parameters and adjust.
2293 (completion_list_add_symbol, completion_list_add_msymbol)
2294 (completion_list_objc_symbol, completion_list_add_fields)
2295 (add_symtab_completions): Likewise.
2296 (default_collect_symbol_completion_matches_break_on)
2297 (collect_file_symbol_completion_matches): Remove sym_text_len
2298 local and don't pass it down.
2299 * symtab.h (completion_list_add_name): Remove
2300 sym_text/sym_text_len parameters.
2301
c62446b1
PA
23022017-11-08 Pedro Alves <palves@redhat.com>
2303
2304 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2305 unittests/lookup_name_info-selftests.c.
2306 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2307 * cp-support.c: Include "selftest.h".
2308 (cp_remove_params_1): Rename from cp_remove_params. Add
2309 'require_param' parameter, and handle it.
2310 (cp_remove_params): Reimplement.
2311 (cp_remove_params_if_any): New.
2312 (selftests::quote): New.
2313 (selftests::check_remove_params): New.
2314 (selftests::test_cp_remove_params): New.
2315 (_initialize_cp_support): Install
2316 selftests::test_cp_remove_params.
2317 * cp-support.h (cp_remove_params_if_any): Declare.
2318 * dwarf2read.c :Include "selftest.h".
2319 (dw2_expand_symtabs_matching_symbol): Use
2320 lookup_name_info::make_ignore_params.
2321 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2322 (selftests::dw2_expand_symtabs_matching::string_or_null)
2323 (selftests::dw2_expand_symtabs_matching::check_match)
2324 (selftests::dw2_expand_symtabs_matching::test_symbols)
2325 (selftests::dw2_expand_symtabs_matching::run_test): New.
2326 (_initialize_dwarf2_read): Register
2327 selftests::dw2_expand_symtabs_matching::run_test.
2328 * psymtab.c (psym_expand_symtabs_matching): Use
2329 lookup_name_info::make_ignore_params.
2330 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2331 If the lookup name wants to ignore parameters, strip them.
2332 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2333 code handling '('.
2334 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2335 (default_collect_symbol_completion_matches_break_on): Don't try to
2336 strip parameters.
2337 * symtab.h (lookup_name_info::lookup_name_info): Add
2338 'ignore_parameters' parameter.
2339 (lookup_name_info::ignore_parameters)
2340 (lookup_name_info::make_ignore_params): New methods.
2341 (lookup_name_info::m_ignore_parameters): New field.
2342 * unittests/lookup_name_info-selftests.c: New file.
2343
61920122
PA
23442017-11-08 Pedro Alves <palves@redhat.com>
2345
2346 * dwarf2read.c (dw2_expand_marked_cus)
2347 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2348 (dw2_expand_symtabs_matching): Move further below.
2349 (dw2_expand_marked_cus): Reindent.
2350
3f563c84
PA
23512017-11-08 Pedro Alves <palves@redhat.com>
2352
2353 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2354 (struct name_component): New.
2355 (mapped_index::name_components): New field.
2356 (mapped_index::symbol_name_at): New method.
2357 (dwarf2_read_index): Call mapped_index ctor.
2358 (dw2_map_matching_symbols): Add comment about name_components
2359 table.
2360 (dw2_expand_symtabs_matching): Factor part to...
2361 (dw2_expand_symtabs_matching_symbol): ... this new function.
2362 Build name components table, and lookup symbols in it before
2363 calling the name matcher.
2364 (dw2_expand_marked_cus): New, factored out from
2365 dw2_expand_symtabs_matching.
2366 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2367
b5ec771e
PA
23682017-11-08 Pedro Alves <palves@redhat.com>
2369
2370 * ada-lang.c (ada_encode): Rename to ..
2371 (ada_encode_1): ... this. Add throw_errors parameter and handle
2372 it.
2373 (ada_encode): Reimplement.
2374 (match_name): Delete, folded into full_name.
2375 (resolve_subexp): No longer pass the encoded name to
2376 ada_lookup_symbol_list.
2377 (should_use_wild_match): Delete.
2378 (name_match_type_from_name): New.
2379 (ada_lookup_simple_minsym): Use lookup_name_info and the
2380 language's symbol_name_matcher_ftype.
2381 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2382 (ada_add_block_renamings): Adjust to use lookup_name_info.
2383 (ada_lookup_name): New.
2384 (add_nonlocal_symbols, ada_add_all_symbols)
2385 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2386 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2387 (ada_name_for_lookup): Delete.
2388 (ada_lookup_encoded_symbol): Construct a verbatim name.
2389 (wild_match): Reverse sense of return type. Use bool.
2390 (full_match): Reverse sense of return type. Inline bits of old
2391 match_name here.
2392 (ada_add_block_symbols): Adjust to use lookup_name_info.
2393 (symbol_completion_match): Delete, folded into...
2394 (ada_lookup_name_info::matches): ... .this new method.
2395 (symbol_completion_add): Delete.
2396 (ada_collect_symbol_completion_matches): Add name_match_type
2397 parameter. Adjust to use lookup_name_info and
2398 completion_list_add_name.
2399 (get_var_value, ada_add_global_exceptions): Adjust to use
2400 lookup_name_info.
2401 (ada_get_symbol_name_cmp): Delete.
2402 (do_wild_match, do_full_match): New functions.
2403 (ada_lookup_name_info::ada_lookup_name_info): New method.
2404 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2405 functions.
2406 (ada_language_defn): Install ada_get_symbol_name_matcher.
2407 * ada-lex.l (processId): If name starts with '<', copy it
2408 verbatim.
2409 * block.c (block_iter_match_step, block_iter_match_first)
2410 (block_iter_match_next, block_lookup_symbol)
2411 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2412 lookup_name_info.
2413 * block.h (block_iter_match_first, block_iter_match_next)
2414 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2415 * c-lang.c (c_language_defn, cplus_language_defn)
2416 (asm_language_defn, minimal_language_defn): Adjust comments to
2417 refer to la_get_symbol_name_matcher.
2418 * completer.c (complete_files_symbols)
2419 (collect_explicit_location_matches, symbol_completer): Pass a
2420 symbol_name_match_type down.
2421 * completer.h (class completion_match, completion_match_result):
2422 New classes.
2423 (completion_tracker::reset_completion_match_result): New method.
2424 (completion_tracker::m_completion_match_result): New field.
2425 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2426 lookup_name_info.
2427 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2428 functions.
2429 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2430 * d-lang.c: Adjust comments to refer to
2431 la_get_symbol_name_matcher.
2432 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2433 Adjust to use lookup_name_info.
2434 (dict_iter_match_first, dict_iter_match_next)
2435 (iter_match_first_hashed, iter_match_next_hashed)
2436 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2437 with a lookup_name_info.
2438 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2439 Likewise.
2440 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2441 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2442 (gdb_index_symbol_name_matcher): New class.
2443 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2444 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2445 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2446 with a symbol_name_match_type.
2447 (f_language_defn): Adjust comments to refer to
2448 la_get_symbol_name_matcher.
2449 * go-lang.c (go_language_defn): Adjust comments to refer to
2450 la_get_symbol_name_matcher.
2451 * language.c (default_symbol_name_matcher)
2452 (language_get_symbol_name_matcher): New functions.
2453 (unknown_language_defn, auto_language_defn): Adjust comments to
2454 refer to la_get_symbol_name_matcher.
2455 * language.h (symbol_name_cmp_ftype): Delete.
2456 (language_defn) <la_collect_symbol_completion_matches>: Add match
2457 type parameter.
2458 <la_get_symbol_name_cmp>: Delete field.
2459 <la_get_symbol_name_matcher>: New field.
2460 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2461 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2462 Declare.
2463 * linespec.c (iterate_over_all_matching_symtabs)
2464 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2465 (find_methods): Add language parameter, and use lookup_name_info
2466 and the language's symbol_name_matcher_ftype.
2467 (linespec_complete_function): Adjust.
2468 (lookup_prefix_sym): Use lookup_name_info.
2469 (add_all_symbol_names_from_pspace): Adjust.
2470 (find_superclass_methods): Add language parameter and pass it
2471 down.
2472 (find_method): Pass symbol language down.
2473 (find_linespec_symbols): Don't demangle or Ada encode here.
2474 (search_minsyms_for_name): Add lookup_name_info parameter.
2475 (add_matching_symbols_to_info): Add name_match_type parameter.
2476 Use lookup_name_info.
2477 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2478 la_get_symbol_name_matcher.
2479 * minsyms.c: Include <algorithm>.
2480 (add_minsym_to_demangled_hash_table): Remove table parameter and
2481 add objfile parameter. Use search_name_hash, and add language to
2482 demangled languages vector.
2483 (struct found_minimal_symbols): New struct.
2484 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2485 New functions.
2486 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2487 input names here. Use lookup_name_info instead. Lookup up
2488 demangled names once for each language in the demangled names
2489 vector.
2490 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2491 demangled names once for each language in the demangled names
2492 vector.
2493 (build_minimal_symbol_hash_tables): Adjust.
2494 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2495 lookup_name_info.
2496 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2497 la_get_symbol_name_matcher.
2498 * objfiles.h: Include <vector>.
2499 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2500 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2501 la_get_symbol_name_matcher.
2502 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2503 la_get_symbol_name_matcher.
2504 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2505 (match_partial_symbol): Use symbol_name_match_type,
2506 lookup_name_info and psymbol_name_matches.
2507 (lookup_partial_symbol): Use lookup_name_info.
2508 (map_block): Use symbol_name_match_type and lookup_name_info.
2509 (psym_map_matching_symbols): Use symbol_name_match_type.
2510 (psymbol_name_matches): New.
2511 (recursively_search_psymtabs): Use lookup_name_info and
2512 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2513 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2514 'kind' parameter to 'domain'.
2515 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2516 la_get_symbol_name_matcher.
2517 * symfile-debug.c (debug_qf_map_matching_symbols)
2518 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2519 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2520 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2521 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2522 Adjust to use symbol_name_match_type.
2523 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2524 (expand_symtabs_matching): Adjust to use lookup_name_info.
2525 * symmisc.c (maintenance_expand_symtabs): Use
2526 lookup_name_info::match_any ().
2527 * symtab.c (symbol_matches_search_name): New.
2528 (eq_symbol_entry): Adjust to use lookup_name_info and the
2529 language's matcher.
2530 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2531 (lookup_name_info::match_any): New.
2532 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2533 (compare_symbol_name): Add language, lookup_name_info and
2534 completion_match_result parameters, and use them.
2535 (completion_list_add_name): Make extern. Add language and
2536 lookup_name_info parameters. Use them.
2537 (completion_list_add_symbol, completion_list_add_msymbol)
2538 (completion_list_objc_symbol): Add lookup_name_info parameters and
2539 adjust. Pass down language.
2540 (completion_list_add_fields): Add lookup_name_info parameters and
2541 adjust. Pass down language.
2542 (add_symtab_completions): Add lookup_name_info parameters and
2543 adjust.
2544 (default_collect_symbol_completion_matches_break_on): Add
2545 name_match_type parameter, and use it. Use lookup_name_info.
2546 (default_collect_symbol_completion_matches)
2547 (collect_symbol_completion_matches): Add name_match_type
2548 parameter, and pass it down.
2549 (collect_symbol_completion_matches_type): Adjust.
2550 (collect_file_symbol_completion_matches): Add name_match_type
2551 parameter, and use lookup_name_info.
2552 * symtab.h: Include <string> and "common/gdb_optional.h".
2553 (enum class symbol_name_match_type): New.
2554 (class ada_lookup_name_info): New.
2555 (struct demangle_for_lookup_info): New.
2556 (class lookup_name_info): New.
2557 (symbol_name_matcher_ftype): New.
2558 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2559 (symbol_matches_search_name): Declare.
2560 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2561 (default_collect_symbol_completion_matches)
2562 (collect_symbol_completion_matches)
2563 (collect_file_symbol_completion_matches): Add name_match_type
2564 parameter.
2565 (iterate_over_symbols): Use lookup_name_info.
2566 (completion_list_add_name): Declare.
2567 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2568 (strncmp_iw_with_mode): Now extern.
2569 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2570 (strncmp_iw_with_mode): Declare.
2571
5ffa0793
PA
25722017-11-08 Keith Seitz <keiths@redhat.com>
2573 Pedro Alves <palves@redhat.com>
2574
2575 * ada-lang.c (ada_language_defn): Install
2576 default_search_name_hash.
2577 * buildsym.c (struct buildsym_compunit): <language>: New field.
2578 (finish_block_internal): Pass language when creating dictionaries.
2579 (start_buildsym_compunit, start_symtab): New language parameters.
2580 Use them.
2581 (restart_symtab): Pass down compilation unit's language.
2582 * buildsym.h (enum language): Forward declare.
2583 (start_symtab): New 'language' parameter.
2584 * c-lang.c (c_language_defn, cplus_language_defn)
2585 (asm_language_defn, minimal_language_defn): Install
2586 default_search_name_hash.
2587 * coffread.c (coff_start_symtab): Adjust.
2588 * d-lang.c (d_language_defn): Install default_search_name_hash.
2589 * dbxread.c (struct symloc): Add 'pst_language' field.
2590 (PST_LANGUAGE): Define.
2591 (start_psymtab, read_ofile_symtab): Use it.
2592 (process_one_symbol): New 'language' parameter. Pass it down.
2593 * dictionary.c (struct dictionary) <language>: New field.
2594 (DICT_LANGUAGE): Define.
2595 (dict_create_hashed, dict_create_hashed_expandable)
2596 (dict_create_linear, dict_create_linear_expandable): New parameter
2597 'language'. Set the dictionary's language.
2598 (iter_match_first_hashed): Adjust to rename.
2599 (insert_symbol_hashed): Assert we don't see mismatching
2600 languages. Adjust to rename.
2601 (dict_hash): Rename to ...
2602 (default_search_name_hash): ... this and make extern.
2603 * dictionary.h (struct language_defn): Forward declare.
2604 (dict_create_hashed): New parameter 'language'.
2605 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2606 * f-lang.c (f_language_defn): Install default_search_name_hash.
2607 * go-lang.c (go_language_defn): Install default_search_name_hash.
2608 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2609 creation.
2610 * language.c (unknown_language_defn, auto_language_defn):
2611 * language.h (language_defn::la_search_name_hash): New field.
2612 (default_search_name_hash): Declare.
2613 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2614 * mdebugread.c (new_block): New parameter 'language'.
2615 * mdebugread.c (parse_symbol): Pass symbol language to block
2616 allocation.
2617 (psymtab_to_symtab_1): Pass down language.
2618 (new_symtab): Pass compunit's language to block allocation.
2619 * objc-lang.c (objc_language_defn): Install
2620 default_search_name_hash.
2621 * opencl-lang.c (opencl_language_defn):
2622 * p-lang.c (pascal_language_defn): Install
2623 default_search_name_hash.
2624 * rust-lang.c (rust_language_defn): Install
2625 default_search_name_hash.
2626 * stabsread.h (enum language): Forward declare.
2627 (process_one_symbol): Add 'language' parameter.
2628 * symtab.c (search_name_hash): New function.
2629 * symtab.h (search_name_hash): Declare.
2630 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2631
2a1dde5d
PA
26322017-11-08 Pedro Alves <palves@redhat.com>
2633
2634 * cp-name-parser.y (main): Don't initialize extra_chars.
2635
95a6b0a1
TT
26362017-11-07 Tom Tromey <tom@tromey.com>
2637
2638 * event-top.h (command_handler): Constify.
2639 * record-full.c (cmd_record_full_start): Update.
2640 * thread.c (thread_apply_all_command): Update.
2641 * printcmd.c (eval_command): Update.
2642 * mi/mi-main.c (mi_execute_cli_command): Update.
2643 (mi_execute_async_cli_command): Update.
2644 * tui/tui-stack.c (tui_update_command): Update.
2645 * cli/cli-interp.c (safe_execute_command): Constify.
2646 * record.c (record_start): Update.
2647 (record_start, record_stop, cmd_record_start): Update.
2648 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2649 (cmd_record_btrace_pt_start): Update.
2650 (cmd_record_btrace_start): Update.
2651 (cmd_record_btrace_start): Update.
2652 * reverse.c (exec_reverse_once): Update.
2653 * python/python.c (execute_gdb_command): Don't copy the command.
2654 * event-top.c (command_line_handler): Update.
2655 (command_handler): Constify.
2656 * defs.h (deprecated_call_command_hook): Constify.
2657 * cli/cli-script.h (execute_user_command): Constify.
2658 * cli/cli-script.c (execute_user_command): Constify.
2659 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2660 (enum command_control_type): Update.
2661 * main.c (catch_command_errors): Remove non-const overload.
2662 (catch_command_errors_ftype): Remove.
2663 * python/py-cmd.c (cmdpy_function): Constify.
2664 * guile/scm-cmd.c (cmdscm_function): Constify.
2665 * cli/cli-dump.c (call_dump_func): Constify.
2666 * cli/cli-decode.c (do_const_cfunc): Constify.
2667 (do_sfunc): Constify.
2668 (cmd_func): Constify.
2669 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2670 * top.h (execute_command): Constify.
2671 * top.c (execute_command): Constify.
2672 (execute_command_to_string): Constify.
2673 (deprecated_call_command_hook): Constify.
2674 * command.h (cmd_func): Constify.
2675 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2676
eb4c3f4a
TT
26772017-11-07 Tom Tromey <tom@tromey.com>
2678
2679 * ada-lang.c (catch_ada_exception_command): Constify.
2680 (catch_assert_command): Constify.
2681 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2682 (catch_rethrow_command): Constify.
2683 (catch_exception_command_1): Constify.
2684 * breakpoint.h (add_catch_command): Constify.
2685 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2686 (catch_syscall_split_args): Constify.
2687 * break-catch-sig.c (catch_signal_command): Constify.
2688 (catch_signal_split_args): Constify.
2689 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2690 cmd_const_sfunc_ftype.
2691 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2692 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2693 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2694 (add_setshow_string_cmd, struct cmd_list_element)
2695 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2696 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2697 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2698 Constify.
2699 (set_cmd_sfunc): Constify.
2700 (empty_sfunc): Constify.
2701 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2702 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2703 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2704 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2705 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2706 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2707 Constify.
2708 (set_cmd_sfunc): Constify.
2709 (cmd_sfunc_ftype): Remove.
2710 * compile/compile.c (set_compile_args): Constify.
2711 * infrun.c (set_disable_randomization): Constify.
2712 * infcmd.c (set_args_command, set_cwd_command): Constify.
2713 * breakpoint.c (set_condition_evaluation_mode): Constify.
2714 (add_catch_command): Constify.
2715 (catch_fork_command_1, catch_exec_command_1)
2716 (catch_load_command_1, catch_unload_command_1): Constify.
2717 (catch_load_or_unload): Constify.
2718 * guile/scm-param.c (pascm_set_func): Constify.
2719 (add_setshow_generic): Constify.
2720 * python/py-param.c (get_set_value): Constify.
2721 * top.h (set_verbose): Constify.
2722 * tui/tui-win.c (tui_set_var_cmd): Constify.
2723 * mi/mi-main.c (set_mi_async_command): Constify.
2724 * cli/cli-logging.c (set_logging_overwrite)
2725 (set_logging_redirect): Constify.
2726 * value.c (set_max_value_size): Constify.
2727 * valprint.c (set_input_radix, set_output_radix): Constify.
2728 * utils.c (set_width_command, set_height_command): Constify.
2729 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2730 * tracepoint.c (set_disconnected_tracing)
2731 (set_circular_trace_buffer, set_trace_buffer_size)
2732 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2733 * top.c (set_history_size_command, set_verbose, set_editing)
2734 (set_gdb_datadir, set_history_filename): Constify.
2735 * target.c (set_targetdebug, maint_set_target_async_command)
2736 (maint_set_target_non_stop_command, set_target_permissions)
2737 (set_write_memory_permission): Constify.
2738 (open_target): Constify.
2739 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2740 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2741 * symtab.c (set_symbol_cache_size_handler): Constify.
2742 * symfile.c (set_ext_lang_command): Constify.
2743 * symfile-debug.c (set_debug_symfile): Constify.
2744 * source.c (set_directories_command): Constify.
2745 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2746 * serial.c (set_parity): Constify.
2747 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2748 * remote.c (set_remote_exec_file, set_remotebreak)
2749 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2750 * record.c (set_record_insn_history_size)
2751 (set_record_call_history_size): Constify.
2752 * record-full.c (set_record_full_insn_max_num): Constify.
2753 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2754 * osabi.c (set_osabi): Constify.
2755 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2756 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2757 * maint.c (maintenance_set_profile_cmd): Constify.
2758 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2759 * language.c (set_language_command, set_range_command)
2760 (set_case_command): Constify.
2761 * infrun.c (set_non_stop, set_observer_mode)
2762 (set_stop_on_solib_events, set_schedlock_func)
2763 (set_exec_direction_func): Constify.
2764 * infcmd.c (set_inferior_tty_command): Constify.
2765 * disasm.c (set_disassembler_options_sfunc): Constify.
2766 * demangle.c (set_demangling_command): Constify.
2767 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2768 * cris-tdep.c (set_cris_version, set_cris_mode)
2769 (set_cris_dwarf2_cfi): Constify.
2770 * corefile.c (set_gnutarget_command): Constify.
2771 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2772 (set_target_wide_charset_sfunc): Constify.
2773 * breakpoint.c (update_dprintf_commands): Constify.
2774 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2775 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2776 (set_disassembly_style_sfunc): Constify.
2777 * arch-utils.c (set_endian, set_architecture): Constify.
2778 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2779 * agent.c (set_can_use_agent): Constify.
2780
5fed81ff
TT
27812017-11-07 Tom Tromey <tom@tromey.com>
2782
2783 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2784 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2785 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2786 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2787 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2788 (parse_int_arg, show_thread_default_detach_sc_cmd)
2789 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2790 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2791 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2792 (show_task_pause_cmd, set_task_detach_sc_cmd)
2793 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2794 (set_noninvasive_cmd, set_thread_pause_cmd)
2795 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2796 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2797 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2798 * windows-nat.c (display_selectors): Constify.
2799 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2800 non-const "cfunc".
2801 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2802 (cmd_cfunc_eq): Likewise.
2803 (struct cmd_list_element): Likewise.
2804 (do_cfunc): Remove.
2805 (cli_user_command_p): Update.
2806 * command.h (add_cmd): Remove non-const overload.
2807 (cmd_cfunc_ftype): Remove typedef.
2808 (cmd_cfunc_eq): Remove non-const overload.
2809 * value.c (show_values): Constify.
2810 * thread.c (thread_apply_all_command): Constify.
2811 * symfile.c (load_command): Constify.
2812 * source.c (directory_command): Constify.
2813 * maint.c (maintenance_internal_error)
2814 (maintenance_demangler_warning, maintenance_space_display)
2815 (maintenance_print_architecture, maintenance_translate_address)
2816 (maintenance_info_selftests, maintenance_internal_warning):
2817 Constify.
2818 * breakpoint.c (disable_trace_command, enable_trace_command):
2819 Constify.
2820 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2821 Constify.
2822 (add_auto_load_safe_path): Constify.
2823 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2824 * top.h (show_commands): Constify.
2825 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2826 * sparc64-tdep.c (adi_examine_command): Constify.
2827 (adi_assign_command): Constify.
2828
1d12d88f
TT
28292017-11-07 Tom Tromey <tom@tromey.com>
2830
2831 * frame.h (info_locals_command, info_args_command): Constify.
2832 * auto-load.h (auto_load_info_scripts): Constify.
2833 * inferior.h (registers_info): Constify.
2834 * copying.c: Rebuild.
2835 * copying.awk: Constify generated commands.
2836 * auto-load.c (auto_load_info_scripts)
2837 (info_auto_load_gdb_scripts): Constify.
2838 * cli/cli-decode.c (struct cmd_list_element): Take a
2839 cmd_const_cfunc_ftype.
2840 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2841 * tui/tui-win.c (tui_all_windows_info): Constify.
2842 * python/py-auto-load.c (info_auto_load_python_scripts):
2843 Constify.
2844 * cli/cli-cmds.c (show_command): Remove non-const overload.
2845 * tracepoint.c (info_tvariables_command, info_scope_command):
2846 Constify.
2847 (info_static_tracepoint_markers_command): Constify.
2848 * thread.c (info_threads_command): Constify.
2849 (print_thread_info_1): Constify.
2850 * target.c (info_target_command): Constify.
2851 * symtab.c (info_sources_command, info_functions_command)
2852 (info_types_command): Constify.
2853 (info_variables_command): Remove non-const overload.
2854 * symfile.c (info_ext_lang_command): Constify.
2855 * stack.c (info_frame_command, info_locals_command)
2856 (info_args_command): Constify.
2857 (backtrace_command): Remove non-const overload.
2858 * source.c (info_source_command, info_line_command): Constify.
2859 * solib.c (info_sharedlibrary_command): Constify.
2860 * skip.c (info_skip_command): Constify.
2861 * ser-go32.c (info_serial_command): Constify.
2862 * reverse.c (info_bookmarks_command): Constify.
2863 * printcmd.c (info_symbol_command, info_address_command)
2864 (info_display_command): Constify.
2865 * osdata.c (info_osdata_command): Constify.
2866 * objc-lang.c (info_selectors_command, info_classes_command):
2867 Constify.
2868 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2869 * memattr.c (info_mem_command): Constify.
2870 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2871 * linux-fork.c (info_checkpoints_command): Constify.
2872 * infrun.c (info_signals_command): Constify.
2873 * inflow.c (info_terminal_command): Constify.
2874 * inferior.c (info_inferiors_command): Constify.
2875 (print_inferior): Constify.
2876 * infcmd.c (info_program_command, info_all_registers_command)
2877 (info_registers_command, info_vector_command)
2878 (info_float_command): Constify.
2879 (registers_info): Constify.
2880 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2881 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2882 Constify.
2883 * f-valprint.c (info_common_command): Constify.
2884 * dcache.c (info_dcache_command): Constify.
2885 (dcache_info_1): Constify.
2886 * darwin-nat-info.c (info_mach_tasks_command)
2887 (info_mach_task_command, info_mach_ports_command)
2888 (info_mach_port_command, info_mach_threads_command)
2889 (info_mach_thread_command, info_mach_regions_command)
2890 (info_mach_regions_recurse_command, info_mach_region_command)
2891 (info_mach_exceptions_command): Constify.
2892 (get_task_from_args): Constify.
2893 * cp-support.c (info_vtbl_command): Constify.
2894 * breakpoint.c (info_watchpoints_command)
2895 (info_tracepoints_command): Constify.
2896 (info_breakpoints_command): Remove non-const overload.
2897 * avr-tdep.c (avr_io_reg_read_command): Constify.
2898 * auxv.c (info_auxv_command): Constify.
2899 * ada-tasks.c (info_tasks_command): Constify.
2900 (info_task): Constify.
2901 * ada-lang.c (info_exceptions_command): Constify.
2902
0b39b52e
TT
29032017-11-07 Tom Tromey <tom@tromey.com>
2904
2905 * solib.h (no_shared_libraries): Constify.
2906 * frame.h (return_command): Constify.
2907 * cli/cli-cmds.h (quit_command): Constify.
2908 * top.h (quit_command, execute_command): Constify.
2909 * target.h (flash_erase_command): Constify.
2910 * inferior.h (set_inferior_args, attach_command): Constify.
2911 * tracepoint.h (start_tracing, stop_tracing): Constify.
2912 * breakpoint.h (break_command, tbreak_command)
2913 (hbreak_command_wrapper, thbreak_command_wrapper)
2914 (rbreak_command_wrapper, watch_command_wrapper)
2915 (awatch_command_wrapper, rwatch_command_wrapper)
2916 (get_tracepoint_by_number): Constify.
2917 * symtab.c (info_variables_command, rbreak_command)
2918 (symtab_symbol_info): Constify.
2919 (info_variables_command): Add non-const overload.
2920 * top.c (dont_repeat_command): Constify.
2921 * breakpoint.c (ignore_command, commands_command)
2922 (condition_command, tbreak_command, hbreak_command)
2923 (thbreak_command, clear_command, break_command)
2924 (info_breakpoints_command, watch_command, rwatch_command)
2925 (awatch_command, trace_command, ftrace_command, strace_command)
2926 (trace_pass_command, break_range_command, dprintf_command)
2927 (agent_printf_command, get_tracepoint_by_number)
2928 (watch_maybe_just_location, trace_pass_command): Constify.
2929 (info_breakpoints_command): Add non-const overload.
2930 * tracefile.c (tsave_command): Constify.
2931 * infcmd.c (attach_command, disconnect_command, signal_command)
2932 (queue_signal_command, stepi_command, nexti_command)
2933 (finish_command, next_command, step_command, until_command)
2934 (advance_command, jump_command, continue_command, run_command)
2935 (start_command, starti_command, interrupt_command)
2936 (run_command_1, set_inferior_args, step_1): Constify.
2937 * inferior.c (add_inferior_command, remove_inferior_command)
2938 (clone_inferior_command): Constify.
2939 * linux-fork.c (checkpoint_command, restart_command): Constify.
2940 * windows-nat.c (signal_event_command): Constify.
2941 * guile/guile.c (guile_repl_command, guile_command): Constify.
2942 * printcmd.c (x_command, display_command, printf_command)
2943 (output_command, set_command, call_command, print_command)
2944 (eval_command): Constify.
2945 (non_const_set_command): Remove.
2946 (_initialize_printcmd): Update.
2947 * source.c (forward_search_command, reverse_search_command):
2948 Constify.
2949 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2950 Constify.
2951 * infrun.c (handle_command): Constify.
2952 * memattr.c (mem_command): Constify.
2953 * stack.c (return_command, up_command, up_silently_command)
2954 (down_command, down_silently_command, frame_command)
2955 (backtrace_command, func_command, backtrace_command_1): Constify.
2956 (backtrace_command): Add non-const overload.
2957 * remote-sim.c (simulator_command): Constify.
2958 * exec.c (set_section_command): Constify.
2959 * tracepoint.c (tdump_command, trace_variable_command)
2960 (tstatus_command, tstop_command, tstart_command)
2961 (end_actions_pseudocommand, while_stepping_pseudocommand)
2962 (collect_pseudocommand, teval_pseudocommand, actions_command)
2963 (start_tracing, stop_tracing): Constify.
2964 * value.c (init_if_undefined_command): Constify.
2965 * tui/tui-stack.c (tui_update_command): Constify.
2966 * tui/tui-win.c (tui_refresh_all_command)
2967 (tui_set_tab_width_command, tui_set_win_height_command)
2968 (tui_set_focus_command, tui_scroll_forward_command)
2969 (tui_scroll_backward_command, tui_scroll_left_command)
2970 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2971 (tui_set_win_height): Constify.
2972 * tui/tui-layout.c (tui_layout_command): Constify.
2973 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2974 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2975 (proc_untrace_sysexit_cmd): Constify.
2976 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2977 (threadset_test_cmd, threadlist_update_test_cmd)
2978 (threadalive_test): Constify.
2979 * objc-lang.c (print_object_command): Constify.
2980 * command.h (add_com): Constify.
2981 * cli/cli-dump.c (restore_command): Constify.
2982 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2983 (help_command, complete_command, shell_command, edit_command)
2984 (list_command, disassemble_command, make_command)
2985 (apropos_command, alias_command): Constify.
2986 * cli/cli-script.c (document_command, define_command)
2987 (while_command, if_command, validate_comname): Constify.
2988 * cli/cli-decode.c (struct cmd_list_element): Change type of
2989 "fun".
2990 * target.c (do_monitor_command, flash_erase_command): Constify.
2991 * regcache.c (reg_flush_command): Constify.
2992 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2993 (reverse_nexti, reverse_continue, reverse_finish)
2994 (save_bookmark_command, goto_bookmark_command)
2995 (exec_reverse_once): Constify.
2996 * python/python.c (python_interactive_command, python_command):
2997 Constify.
2998 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2999 Constify.
3000 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3001 * gcore.c (gcore_command): Constify.
3002
85c4be7c
TT
30032017-11-07 Tom Tromey <tom@tromey.com>
3004
3005 * printcmd.c (x_command): Call set_repeat_arguments.
3006 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3007 * top.c (repeat_arguments): New global.
3008 (set_repeat_arguments): New function.
3009 (execute_command): Handle repeat_arguments.
3010 (show_commands): Calls set_repeat_arguments.
3011 * command.h (set_repeat_arguments): Declare.
3012
022643b4
TT
30132017-11-07 Tom Tromey <tom@tromey.com>
3014
3015 * stack.c (backtrace_command): Use std::string.
3016 (backtrace_command_1): Make "count_exp" const.
3017
5614fb77
TT
30182017-11-07 Tom Tromey <tom@tromey.com>
3019
3020 * source.c (directory_switch, mod_path, add_path): Constify.
3021 * defs.h (add_path, mod_path, directory_switch): Constify.
3022 * mi/mi-cmd-env.c (env_mod_path): Constify.
3023
6be9a197
TT
30242017-11-07 Tom Tromey <tom@tromey.com>
3025
3026 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3027 (run_command_1, continue_command, step_1, jump_command)
3028 (signal_command, until_command, advance_command, finish_command)
3029 (attach_command): Update.
3030
c2252c0d
TT
30312017-11-07 Tom Tromey <tom@tromey.com>
3032
3033 * command.h (set_cmd_cfunc): Don't declare.
3034 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3035
1ee870c5
TT
30362017-11-07 Tom Tromey <tom@tromey.com>
3037
3038 * stack.c (select_frame_command): Constify.
3039 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3040 * command.h (add_com_suppress_notification): Constify.
3041
ee7ddd71
TT
30422017-11-07 Tom Tromey <tom@tromey.com>
3043
3044 * breakpoint.c (stop_command): Constify.
3045 * cli/cli-decode.c (struct cmd_list_element): Constify.
3046 * command.h (add_abbrev_prefix_cmd): Constify.
3047
95e95a6d
PA
30482017-11-07 Pedro Alves <palves@redhat.com>
3049
3050 * breakpoint.c (extract_bp_kind): New enum.
3051 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3052 factored out from ...
3053 (extract_bp_number_and_location): ... here.
3054 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3055
cc638e86
PA
30562017-11-07 Pedro Alves <palves@redhat.com>
3057
3058 * breakpoint.c (extract_bp_number_and_location): Change return
3059 type to void. Throw error instead of warning.
3060 (enable_disable_command): Adjust.
3061
d0fe4701
XR
30622017-11-07 Xavier Roirand <roirand@adacore.com>
3063 Pedro Alves <palves@redhat.com>
3064
3065 * breakpoint.c (map_breakpoint_number_range): New, factored out
3066 from ...
3067 (map_breakpoint_numbers): ... here.
3068 (find_location_by_number): Change parameters from string to
3069 breakpoint number and location.
3070 (extract_bp_number_and_location): New function.
3071 (enable_disable_bp_num_loc)
3072 (enable_disable_breakpoint_location_range)
3073 (enable_disable_command): New functions, factored out ...
3074 (enable_command, disable_command): ... these functions, and
3075 adjusted to support ranges.
3076 * NEWS: Document enable/disable breakpoint location range feature.
3077
635dc5b2
LM
30782017-11-06 Luis Machado <luis.machado@linaro.org>
3079
3080 * MAINTAINERS (Write After Approval): Update my e-mail address.
3081
556e5da5
PA
30822017-11-06 Pedro Alves <palves@redhat.com>
3083
3084 * gnu-nat.c (gnu_terminal_init): Delete.
3085 (gnu_target): Don't install gnu_terminal_init.
3086 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3087 (child_terminal_init): ... this function.
3088
d1928160
PA
30892017-11-06 Pedro Alves <palves@redhat.com>
3090
3091 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3092 sgtty.h.
3093 * config.in, configure: Regenerate.
3094
6aa899ce
PA
30952017-11-06 Pedro Alves <palves@redhat.com>
3096
3097 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3098 (async_init_signals): Adjust.
3099 (handle_stop_sig): Rename to ...
3100 (handle_sigtstp): ... this.
3101 (async_stop_sig): Rename to ...
3102 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3103 SIGTSTP path.
3104 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3105 instead of STOP_SIGNAL thoughout.
3106 (handle_stop_sig): Rename to ...
3107 (handle_sigtstp): ... this.
3108 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3109
a94799ac
PA
31102017-11-06 Pedro Alves <palves@redhat.com>
3111
3112 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3113 longer set flags twice in row.
3114
726e1356
PA
31152017-11-06 Pedro Alves <palves@redhat.com>
3116
3117 * Makefile.in (SER_HARDWIRE): Update comment.
3118 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3119 * common/gdb_termios.h: Delete file.
3120 * common/job-control.c: Include termios.h and unistd.h instead of
3121 gdb_termios.h.
3122 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3123 check.
3124 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3125 Remove sgtty code.
3126 * configure.ac: No longer check for termio.h and sgtty.h.
3127 * configure: Regenerate.
3128 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3129 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3130 Replace PROCESS_GROUP_TYPE references with pid_t references
3131 throughout.
3132 (gdb_getpgrp): Delete.
3133 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3134 (child_terminal_inferior): Remove comment. Remove sgtty code.
3135 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3136 gdb_getpgrp. Use serial_set_tty_state instead aof
3137 serial_noflush_set_tty_state. Remove sgtty code.
3138 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3139 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3140 (inferior_process_group): Now returns pid_t.
3141 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3142 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3143 * ser-event.c (serial_event_ops): Update.
3144 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3145 (dos_ops): Update.
3146 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3147 * ser-pipe.c (pipe_ops): Update.
3148 * ser-tcp.c (tcp_ops): Update.
3149 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3150 HAVE_TERMIOS checks.
3151 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3152 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3153 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3154 assume termios.
3155 (hardwire_noflush_set_tty_state): Delete.
3156 (hardwire_print_tty_state, hardwire_drain_output)
3157 (hardwire_flush_output, hardwire_flush_input)
3158 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3159 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3160 code, and assume termios.
3161 (hardwire_ops): Update.
3162 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3163 * serial.c (serial_noflush_set_tty_state): Delete.
3164 * serial.h (serial_noflush_set_tty_state): Delete.
3165 (serial_ops::noflush_set_tty_state): Delete.
3166
1cfb73db
UW
31672017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3168
3169 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3170 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3171 (COMMON_OBS): Remove doublest.o and dfp.o.
3172 Do not build target-float.c (instead of doublest.c)
3173 with -Wformat-nonliteral.
3174
3175 * doublest.c: Remove file.
3176 * doublest.h: Remove file.
3177 * dfp.c: Remove file.
3178 * dfp.h: Remove file.
3179
3180 * target-float.c: Do not include "doublest.h" and "dfp.h".
3181 (DOUBLEST): Move here from doublest.h.
3182 (enum float_kind): Likewise.
3183 (FLOATFORMAT_CHAR_BIT): Likewise.
3184 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3185 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3186 (floatformat_precision): Likewise.
3187 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3188 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3189 Likewise.
3190 (host_float_format, host_double_format, host_long_double_format):
3191 Likewise.
3192 (floatformat_to_string, floatformat_from_string): Likewise.
3193 (floatformat_to_doublest): Likewise. Also, inline the original
3194 convert_floatformat_to_doublest.
3195 (floatformat_from_doublest): Likewise. Also, inline the original
3196 convert_floatformat_from_doublest.
3197
3198 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3199 (MAX_DECIMAL_STRING): Move here from dfp.c.
3200 (match_endianness): Likewise.
3201 (set_decnumber_context, decimal_check_errors): Likewise.
3202 (decimal_from_number, decimal_to_number): Likewise.
3203 (decimal_to_string, decimal_from_string): Likewise. Make static.
3204 (decimal_from_longest, decimal_from_ulongest): Likewise.
3205 (decimal_to_longest): Likewise.
3206 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3207 (decimal_convert): Likewise.
3208
b07e9c46
UW
32092017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3210
3211 * doublest.c: Do not include "gdbtypes.h".
3212 (extract_typed_floating): Remove.
3213 (store_typed_floating): Remove.
3214 (convert_typed_floating): Remove.
3215 * doublest.h (struct type): Remove.
3216 (DOUBLEST_PRINT_FORMAT): Remove.
3217 (DOUBLEST_SCAN_FORMAT): Remove.
3218 (extract_typed_floating): Remove.
3219 (store_typed_floating): Remove.
3220 (convert_typed_floating): Remove.
3221
3222 * dfp.c (decimal_from_doublest): Remove.
3223 (decimal_to_doublest): Remove.
3224 * dfp.h: Do not include "doublest.h".
3225 (decimal_from_doublest): Remove.
3226 (decimal_to_doublest): Remove.
3227
3228 * value.c: Do not include "doublest.h" and "dfp.h".
3229 (value_as_double): Remove.
3230 (unpack_double): Remove.
3231 (value_from_double): Remove.
3232 (value_from_decfloat): Remove.
3233 * value.h: Do not include "doublest.h".
3234 (value_as_double): Remove.
3235 (unpack_double): Remove.
3236 (value_from_double): Remove.
3237 (value_from_decfloat): Remove.
3238
3b2ca824
UW
32392017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3240
3241 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3242 (i386_extract_return_value): Use target_float_convert.
3243 (i386_store_return_value): Likewise.
3244 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3245 (i387_value_to_register): Likewise.
3246 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3247 (ia64_register_to_value): Use target_float_convert.
3248 (ia64_value_to_register): Likewise.
3249 (ia64_extract_return_value): Likewise.
3250 (ia64_store_return_value): Likewise.
3251 (ia64_push_dummy_call): Likewise.
3252 * m68k-tdep.c: Include "target-float.h".
3253 (m68k_register_to_value): Use target_float_convert.
3254 (m68k_value_to_register): Likewise.
3255 (m68k_svr4_extract_return_value): Likewise.
3256 (m68k_svr4_store_return_value): Likewise.
3257 * ppc-sysv-tdep.c: Include "target-float.h".
3258 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3259 (do_ppc_sysv_return_value): Likewise.
3260 (ppc64_sysv_abi_push_freg): Likewise.
3261 (ppc64_sysv_abi_return_value_base): Likewise.
3262 * rs6000-aix-tdep.c: Include "target-float.h".
3263 (rs6000_push_dummy_call): Use target_float_convert.
3264 (rs6000_return_value): Likewise.
3265 * rs6000-lynx178-tdep.c: Include "target-float.h".
3266 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3267 (rs6000_lynx178_return_value): Likewise.
3268 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3269 (rs6000_register_to_value): Use target_float_convert.
3270 (rs6000_value_to_register): Likewise.
3271 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3272 (arm_extract_return_value): Use target_float_convert.
3273 (arm_store_return_value): Likewise.
3274 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3275 (sh_register_convert_to_virtual): Use target_float_convert.
3276 (sh_register_convert_to_raw): Likewise.
3277 * sh64-tdep.c: Include "target-float.h".
3278 (sh64_extract_return_value): Use target_float_convert.
3279 (sh64_register_convert_to_virtual): Likewise.
3280 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3281
14ad9311
UW
32822017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3283
3284 * target-float.c (floatformat_to_host_double): New function.
3285 (floatformat_from_host_double): Likewise.
3286 (target_float_to_host_double): Likewise.
3287 (target_float_from_host_double): Likewise.
3288 * target-float.h (target_float_to_host_double): Add prototype.
3289 (target_float_from_host_double): Likewise.
3290
3291 * guile/scm-value.c: Include "target-float.h".
3292 (gdbscm_value_to_real): Use target_float_to_host_double.
3293 Handle integer source values via value_as_long.
3294 * guile/scm-math.c: Include "target-float.h". Do not include
3295 "doublest.h", "dfp.h", and "expression.h".
3296 (vlscm_convert_typed_number): Use target_float_from_host_double.
3297 (vlscm_convert_number): Likewise.
3298
3299 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3300 (convert_value_from_python): Use target_float_from_host_double.
3301
50eff16b
UW
33022017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3303
3304 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3305 (cast_from_fixed): Likewise.
3306 (ada_scaling_type): New function.
3307 (ada_delta): Return value instead of DOUBLEST. Perform target
3308 arithmetic instead of host arithmetic.
3309 (scaling_factor): Rename to ...
3310 (ada_scaling_factor) ... this. Make non-static. Return value instead
3311 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3312 (ada_fixed_to_float): Remove.
3313 (ada_float_to_fixed): Remove.
3314 * ada-lang.h (ada_fixed_to_float): Remove.
3315 (ada_float_to_fixed): Remove.
3316 (ada_delta): Return value instead of DOUBLEST.
3317 (ada_scaling_factor): Add prototype.
3318
3319 * ada-typeprint.c: Include "target-float.h".
3320 (print_fixed_point_type): Perform target arithmetic instead of
3321 host arithmetic.
3322 * ada-valprint.c: Include "target-float.h".
3323 (ada_val_print_num): Perform target arithmetic instead of
3324 host arithmetic for fixed-point types.
3325
66c02b9e
UW
33262017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3327
3328 * target-float.c: Include <math.h>.
3329 (floatformat_binop): New function.
3330 (floatformat_compare): Likewise.
3331 (target_float_binop): Likewise.
3332 (target_float_compare): Likewise.
3333 * target-float.h: Include "expression.h".
3334 (target_float_binop): Add prototype.
3335 (target_float_compare): Likewise.
3336
3337 * valarith.c: Do not include "doublest.h" and "dfp.h".
3338 Include "common/byte-vector.h".
3339 (value_args_as_decimal): Remove, replace by ...
3340 (value_args_as_target_float): ... this function. Handle both
3341 binary and decimal target floating-point formats.
3342 (scalar_binop): Handle both binary and decimal FP using
3343 value_args_as_target_float and target_float_binop.
3344 (value_equal): Handle both binary and decimal FP using
3345 value_args_as_target_float and target_float_compare.
3346 (value_less): Likewise.
3347 (value_pos): Handle all scalar types as simple copy.
3348 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3349 * dfp.c (decimal_binop): Throw error instead of internal_error
3350 when called with an unsupported operation code.
3351
f69fdf9b
UW
33522017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3353
3354 * target-float.c (target_float_to_string): New function.
3355 (target_float_from_string): New function.
3356 * target-float.h (target_float_to_string): Add prototype.
3357 (target_float_from_string): Add prototype.
3358
3359 * valprint.c: Include "target-float.h". Do not include
3360 "doublest.h" and "dfp.h".
3361 (print_floating): Use target_float_to_string.
3362 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3363 (printf_floating): Use target_float_to_string.
3364 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3365 (print_i387_value): Use target_float_to_string.
3366 * mips-tdep.c: Include "target-float.h".
3367 (mips_print_fp_register): Use target_float_to_string.
3368 * sh64-tdep.c: Include "target-float.h".
3369 (sh64_do_fp_register): Use target_float_to_string.
3370
3371 * parse.c: Include "target-float.h". Do not include
3372 "doublest.h" and "dfp.h".
3373 (parse_float): Use target_float_from_string.
3374 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3375 (define_symbol): Use target_float_from_string.
3376 * gdbarch-selftests.c: Include "target-float.h".
3377 (register_to_value_test): Use target_float_from_string.
3378
70100014
UW
33792017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3380
3381 * Makefile.c (SFILES): Add target-float.c.
3382 (HFILES_NO_SRCDIR): Add target-float.h.
3383 (COMMON_OBS): Add target-float.o.
3384 * target-float.h: New file.
3385 * target-float.c: New file.
3386
3387 * doublest.c (floatformat_classify): Fix detection of float_zero.
3388
3389 * gdbtypes.c (is_floating_type): New function.
3390 * gdbtypes.h (is_floating_type): Add prototype.
3391
3392 * value.c: Do not include "floatformat.h".
3393 (unpack_double): Use target_float_is_valid.
3394 (is_floating_value): New function.
3395 * value.h (is_floating_value): Add prototype-
3396
3397 * valarith.c: Include "target-float.h".
3398 (value_logical_not): Use target_float_is_zero.
3399
3400 * python/py-value.c: Include "target-float.h".
3401 (valpy_nonzero): Use target_float_is_zero.
3402
ab4b1c46
TT
34032017-11-04 Tom Tromey <tom@tromey.com>
3404
3405 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3406
454dafbd
TT
34072017-11-04 Tom Tromey <tom@tromey.com>
3408
3409 * breakpoint.c (set_momentary_breakpoint): Return
3410 breakpoint_up.
3411 (until_break_command): Update.
3412 (new_until_break_fsm): Change argument types to
3413 breakpoint_up.
3414 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3415 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3416 Remove.
3417 * infcmd.c (finish_forward): Update.
3418 * breakpoint.h (set_momentary_breakpoint)
3419 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3420 (make_cleanup_delete_breakpoint): Remove.
3421 (struct breakpoint_deleter): New.
3422 (breakpoint_up): New typedef.
3423 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3424 (insert_exception_resume_breakpoint): Update.
3425 (insert_exception_resume_from_probe): Update.
3426 (insert_longjmp_resume_breakpoint): Update.
3427 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3428 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3429 * infcall.c (call_function_by_hand_dummy): Update
3430
331b71e5
TT
34312017-11-04 Tom Tromey <tom@tromey.com>
3432
3433 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3434
9f584b37
TT
34352017-11-04 Tom Tromey <tom@tromey.com>
3436
3437 * linux-tdep.c (linux_core_info_proc_mappings): Use
3438 gdb::def_vector.
3439 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3440 "size" argument.
3441 (linux_corefile_thread): Update.
3442 (linux_make_corefile_notes): Remove unused variable.
3443
779bc38e
TT
34442017-11-04 Tom Tromey <tom@tromey.com>
3445
3446 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3447 gdb::byte_vector.
3448
ed2b3126
TT
34492017-11-04 Tom Tromey <tom@tromey.com>
3450
3451 * objfiles.c (do_free_objfile_cleanup): Remove.
3452 * compile/compile-object-load.c (compile_object_load): Update.
3453 * objfiles.h (make_cleanup_free_objfile): Remove.
3454
7f6743fd
TT
34552017-11-04 Tom Tromey <tom@tromey.com>
3456
3457 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3458 (adi_read_versions): Change "tags" to "gdb_byte *".
3459 (adi_print_versions): Likewise.
3460
c80049d3
TT
34612017-11-04 Tom Tromey <tom@tromey.com>
3462
3463 * breakpoint.c
3464 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3465 from start_rbreak_breakpoints.
3466 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3467 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3468 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3469 * symtab.c (do_end_rbreak_breakpoints): Remove.
3470 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3471
167b0be1
TT
34722017-11-04 Tom Tromey <tom@tromey.com>
3473
3474 * cp-namespace.c (reset_directive_searched): Remove.
3475 (cp_lookup_symbol_via_imports): Use scoped_restore.
3476 * cp-support.c (reset_directive_searched): Remove.
3477 (make_symbol_overload_list_using): Use scoped_restore.
3478 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3479 (reset_directive_searched): Remove.
3480
5eae7aea
TT
34812017-11-04 Tom Tromey <tom@tromey.com>
3482
3483 * symfile.c (find_separate_debug_file_by_debuglink): Use
3484 unique_xmalloc_ptr.
3485
c6bcad5f
TT
34862017-11-04 Tom Tromey <tom@tromey.com>
3487
3488 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3489 type of "info".
3490 (compute_stack_depth): Likewise.
3491 (do_compile_dwarf_expr_to_c): Use std::vector.
3492
20dcd8ca
TT
34932017-11-04 Tom Tromey <tom@tromey.com>
3494
3495 * compile/compile-object-load.c (link_callbacks_einfo): Use
3496 std::string.
3497
33c7c59d
TT
34982017-11-04 Tom Tromey <tom@tromey.com>
3499
3500 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3501 Use scoped_free_pendings.
3502 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3503 scoped_free_pendings.
3504 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3505 (xcoff_initial_scan): Likewise.
3506 * buildsym.c (reset_symtab_globals): Update comment.
3507 (scoped_free_pendings): Rename from really_free_pendings.
3508 (prepare_for_building): Update comment.
3509 (buildsym_init): Likewise.
3510 * buildsym.h (class scoped_free_pendings): New class.
3511 (really_free_pendings): Don't declare.
3512
67fa57cf
UW
35132017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3514
3515 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3516 output when converting a zero value to a special byteorder format.
3517
f26ae15b
YQ
35182017-11-02 Yao Qi <yao.qi@linaro.org>
3519
3520 * frame.c (do_frame_register_read): Remove aspace.
3521 * jit.c (jit_frame_sniffer): Likwise.
3522 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3523 * regcache.c (regcache::regcache): Pass nullptr.
3524 (regcache_print): Caller updated.
3525 * regcache.h (regcache::regcache): Remove one constructor
3526 parameter aspace.
3527
6c6e9412
YQ
35282017-11-02 Yao Qi <yao.qi@linaro.org>
3529
3530 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3531
8b86c959
YQ
35322017-11-02 Yao Qi <yao.qi@linaro.org>
3533
3534 * breakpoint.c (insert_single_step_breakpoints): Update.
3535 * frame.c (struct frame_info) <aspace>: Add const.
3536 (frame_save_as_regcache): Add const.
3537 (get_frame_address_space): Return const address_space *.
3538 * frame.h (get_frame_address_space): Update declaration.
3539 * infrun.c (struct step_over_info) <aspace>: Add const.
3540 (set_step_over_info): Make aspace const.
3541 (displaced_step_prepare_throw): Change variable const.
3542 (resume): Likewise.
3543 (proceed): Likewise.
3544 (adjust_pc_after_break): Likewise.
3545 (save_waitstatus): Likewise.
3546 (handle_signal_stop): Likewise.
3547 (keep_going_pass_signal): Likewise.
3548 * jit.c (jit_frame_sniffer): Add const.
3549 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3550 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3551 * record-full.c (record_full_wait_1): Likewise.
3552 * regcache.c (regcache::regcache): Change parameter to const.
3553 * regcache.h (regcache::regcache): Likewise.
3554 (regcache::aspace): Return const address_space *.
3555 (regcache) <m_aspace>: Add const.
3556
a01bda52
YQ
35572017-11-02 Yao Qi <yao.qi@linaro.org>
3558
3559 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3560 * frame.c (create_sentinel_frame): Likewise.
3561 * infrun.c (displaced_step_prepare_throw): Likewise.
3562 (resume): Likewise.
3563 (thread_still_needs_step_over_bp): Likewise.
3564 (proceed): Likewise.
3565 (do_target_wait): Likewise.
3566 (adjust_pc_after_break): Likewise.
3567 (handle_syscall_event): Likewise.
3568 (save_waitstatus): Likewise.
3569 (handle_inferior_event_1): Likewise.
3570 (handle_signal_stop): Likewise.
3571 (keep_going_pass_signal): Likewise.
3572 * linux-nat.c (status_callback): Likewise.
3573 (save_stop_reason): Likewise.
3574 (resume_stopped_resumed_lwps): Likewise.
3575 * record-full.c (record_full_exec_insn): Likewise.
3576 (record_full_wait_1): Likewise.
3577 * regcache.c (get_regcache_aspace): Remove.
3578 * regcache.h (get_regcache_aspace): Remove.
3579
d999647b
YQ
35802017-11-02 Yao Qi <yao.qi@linaro.org>
3581
3582 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3583 (init_regcache_descr): Use gdbarch_num_regs.
3584 (regcache::regcache): Likewise.
3585 (regcache::get_register_status): Likewise.
3586 (regcache::assert_raw_regnum): Likewise.
3587 (regcache::cooked_read): Likewise.
3588 (regcache::cooked_read_value): Likewise.
3589 (regcache::cooked_write): Likewise.
3590 (regcache::dump): Likewise.
3591 (regcache::num_raw_registers): New method.
3592 * regcache.h (class regcache) <num_raw_registers>: New.
3593
4e888c28
YQ
35942017-11-02 Yao Qi <yao.qi@linaro.org>
3595
3596 * regcache.c (regcache::assert_regnum): New method.
3597 (regcache::invalidate): Call assert_regnum.
3598 (regcache::raw_update): Likewise.
3599 (regcache::raw_write): Likewise.
3600 (regcache::raw_read_part): Likewise.
3601 (regcache::raw_write_part): Likewise.
3602 (regcache::raw_supply): Likewise.
3603 (regcache::raw_supply_integer): Likewise.
3604 (regcache::raw_supply_zeroed): Likewise.
3605 (regcache::raw_collect): Likewise.
3606 (regcache::raw_collect_integer): Likewise.
3607 * regcache.h (regcache::assert_regnum): Declare.
3608
2e1b49b3
YQ
36092017-11-02 Yao Qi <yao.qi@linaro.org>
3610
3611 * regcache.c (regcache::dump): Remove code.
3612
6c5218df
YQ
36132017-11-02 Yao Qi <yao.qi@linaro.org>
3614
3615 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3616 Remove.
3617 <sizeof_cooked_register_status>: Remove.
3618 (init_regcache_descr): Update.
3619 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3620 (regcache::save): Likewise.
3621 (regcache::dump): Likewise.
3622
dcc31d28
JB
36232017-11-01 James Bowman <james.bowman@ftdichip.com>
3624
3625 * ft32-tdep.c (ft32_fetch_instruction): New function.
3626 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3627
3a87ae65
SM
36282017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3629
3630 * cli/cli-script.c (execute_control_command): Rename to ...
3631 (execute_control_command_1): ... this.
3632 (execute_control_command): New function.
3633
09b847f3
SM
36342017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3635
3636 * tracepoint.c (tfind_command): Remove const_cast.
3637
f871c485
MG
36382017-10-30 Mike Gulick <mgulick@mathworks.com>
3639
3640 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3641
b020ff80
SM
36422017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3643
3644 * common/common-utils.h (in_inclusive_range): New function.
3645 * arm-tdep.c (arm_record_extension_space): Use
3646 in_inclusive_range.
3647 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3648 * cris-tdep.c (cris_spec_reg_applicable): Use
3649 in_inclusive_range.
3650
1b81856f
PA
36512017-10-30 Pedro Alves <palves@redhat.com>
3652 Simon Marchi <simon.marchi@ericsson.com>
3653
3654 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3655 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3656
31b833b3
PA
36572017-10-30 Pedro Alves <palves@redhat.com>
3658
3659 * common/common-utils.c (string_appendf, string_vappendf): New
3660 functions.
3661 * common/common-utils.h (string_appendf, string_vappendf): New
3662 declarations.
3663 * unittests/common-utils-selftests.c (string_appendf_func)
3664 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3665 (string_vappendf_tests): New functions.
3666 (_initialize_common_utils_selftests): Register "string_appendf" and
3667 "string_vappendf tests".
3668
4a250334
PA
36692017-10-30 Pedro Alves <palves@redhat.com>
3670
3671 * unittests/common-utils-selftests.c (format_func): New typedef.
3672 (string_printf_tests, string_vprintf_tests): Tests factored out
3673 and merged to ...
3674 (test_format_func): ... this new function.
3675 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3676 test_format_func.
3677
16c5c17e
SM
36782017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3679
3680 * darwin-nat.c: Remove include of gdb.h.
3681
7ca51576
SM
36822017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3683
3684 * xtensa-xtregs.c: Fix formatting issues.
3685
c1342859
SM
36862017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3687
3688 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3689
484d8d36
MD
36902017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3691
3692 PR python/21213
3693 * python/py-infthread.c (thpy_get_inferior): Increment reference
3694 of inferior before returning it.
3695
b5540b5f
SM
36962017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3697
3698 * unittests/common-utils-selftests.c (format): Add
3699 ATTRIBUTE_PRINTF.
3700
5a9dcda1
SM
37012017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3702
3703 * xml-syscall.c (struct syscall_desc): Add constructor.
3704 <name>: Change type to std::string.
3705 (syscall_desc_up): New typedef.
3706 (syscall_desc_p): Remove typeder.
3707 (DEF_VEC_P(syscall_desc_p)): Remove.
3708 (struct syscall_group_desc): Add constructor.
3709 <name>: Change type to std::string.
3710 <syscalls>: Change type to std::vector.
3711 (syscall_group_desc_up): New typedef.
3712 (syscall_group_desc_p): Remove typedef.
3713 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3714 (struct syscalls_info) <syscalls>: Change type to std::vector of
3715 unique_ptr.
3716 <groups>: Likewise.
3717 <my_gdb_datadir>: Change type to std::string.
3718 (syscalls_info_up): New typedef.
3719 (allocate_syscalls_info): Remove.
3720 (syscalls_info_free_syscalls_desc): Remove.
3721 (syscalls_info_free_syscall_group_desc): Remove.
3722 (free_syscalls_info): Remove.
3723 (make_cleanup_free_syscalls_info): Remove.
3724 (syscall_group_create_syscall_group_desc): Adjust.
3725 (syscall_group_add_syscall): Adjust.
3726 (syscall_create_syscall_desc): Adjust.
3727 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3728 (init_syscalls_info): Adjust.
3729 (syscall_group_get_group_by_name): Adjust.
3730 (xml_get_syscall_number): Adjust.
3731 (xml_get_syscall_name): Adjust.
3732 (xml_list_of_syscalls): Adjust.
3733 (xml_list_syscalls_by_group): Adjust.
3734 (xml_list_of_groups): Adjust.
3735
45461e0d
SM
37362017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3737
3738 * probe.h: Don't include gdb_vecs.h.
3739 (DEF_VEC_P (probe_p)): Remove.
3740 (find_probes_in_objfile): Return an std::vector.
3741 * probe.c (find_probes_in_objfile): Likewise.
3742 * breakpoint.c (breakpoint_objfile_data)
3743 <longjmp_probes>: Change type to std::vector.
3744 <exception_probes>: Likewise.
3745 (free_breakpoint_probes): Don't manually free vectors.
3746 (create_longjmp_master_breakpoint): Adjust.
3747 (create_exception_master_breakpoint): Adjust.
3748 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3749 parameter type, adjust.
3750 (svr4_create_solib_event_breakpoints): Adjust.
3751
43dce439
SM
37522017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3753
3754 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3755 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3756 with new.
3757 (free_breakpoint_probes): Rename to ...
3758 (free_breakpoint_objfile_data): ... this, and call delete on
3759 bp_objfile_data..
3760
6a1b9516
SM
37612017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3762
3763 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3764 (loaded_script_ptr): Remove typedef.
3765 (DEF_VEC_P (loaded_script_ptr)): Remove.
3766 (struct collect_matching_scripts_data): Add constructor.
3767 <scripts_p>: Change type to (pointer to) std::vector.
3768 (collect_matching_scripts_data): Adjust.
3769 (sort_scripts_by_name): Make suitable for std::sort.
3770 (print_scripts): Don't sort vector, adjust to std::vector.
3771 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3772
593e3209
SM
37732017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3774
3775 * symfile.c (filename_language): Make struct, not typedef. Add
3776 constructor.
3777 <ext>: Change type to std::string.
3778 (DEF_VEC_O (filename_language)): Remove.
3779 (filename_language_table): Change type to std::vector.
3780 (add_filename_language): Adjust.
3781 (set_ext_lang_command): Adjust.
3782 (info_ext_lang_command): Adjust.
3783 (deduce_language_from_filename): Adjust.
3784 (class scoped_restore_filename_language_table): Remove.
3785 (test_filename_language): Use scoped_restore.
3786 (test_set_ext_lang_command): Use scoped_restore, adjust to
3787 std::vector change.
3788
32fa66eb
SM
37892017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3790
3791 * symfile.c: Include selftest.h.
3792 (class scoped_restore_filename_language_table): New.
3793 (test_filename_language): New test.
3794 (test_set_ext_lang_command): New test.
3795 (_initialize_symfile): Register tests.
3796
4a27f119
KS
37972017-10-27 Keith Seitz <keiths@redhat.com>
3798
3799 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3800 in the bp_location, falling back to find_pc_sect_function when
3801 needed.
3802 (add_location_to_breakpoint): Save sal->symbol.
3803 * breakpoint.h (struct bp_location) <symbol>: New field.
3804 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3805 * symtab.h (struct symtab_and_line) <symbol>: New field.
3806
a43f3893
PF
38072017-10-26 Patrick Frants <osscontribute@gmail.com>
3808
7453e6b2 3809 PR gdb/13669
a43f3893
PF
3810 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3811 to rewind obstack.
3812
23cc4e1b
PA
38132017-10-26 Pedro Alves <palves@redhat.com>
3814
3815 * remote.c (remote_async_terminal_ours_p): Delete.
3816 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3817 Remove references to 'remote_async_terminal_ours_p'.
3818
6abc18bb
YQ
38192017-10-26 Yao Qi <yao.qi@linaro.org>
3820
3821 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3822
bd522513
YQ
38232017-10-26 Yao Qi <yao.qi@linaro.org>
3824
3825 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3826 aspace const.
3827 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3828 Likewise.
3829 * breakpoint.c (bpstat_check_location): Remove cast.
3830 (breakpoint_hit_catch_fork): Make aspce const.
3831 (breakpoint_hit_catch_solib): Likewise.
3832 (breakpoint_hit_catch_exec): Likewise.
3833 (breakpoint_hit_ranged_breakpoint): Likewise.
3834 (breakpoint_hit_watchpoint): Likewise.
3835 (base_breakpoint_breakpoint_hit): Likewise.
3836 (bkpt_breakpoint_hit): Likewise.
3837 (dprintf_breakpoint_hit): Likewise.
3838 (tracepoint_breakpoint_hit): Likewise.
3839 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3840
accd0bcd
YQ
38412017-10-26 Yao Qi <yao.qi@linaro.org>
3842
3843 * breakpoint.c (breakpoint_location_address_match): Change
3844 "struct address_space *" to "const address_space".
3845 (breakpoint_location_address_range_overlap): Likewise.
3846 (breakpoint_here_p): Likewise.
3847 (breakpoint_in_range_p): Likewise.
3848 (moribund_breakpoint_here_p): Likewise.
3849 (bp_location_inserted_here_p): Likewise.
3850 (software_breakpoint_inserted_here_p): Likewise.
3851 (hardware_breakpoint_inserted_here_p): Likewise.
3852 (hardware_watchpoint_inserted_in_range): Likewise.
3853 (bpstat_check_location): Likewise.
3854 (bpstat_stop_status): Likewise.
3855 (breakpoint_address_match): Likewise.
3856 (breakpoint_address_match_range): Likewise.
3857 (breakpoint_location_address_match): Likewise.
3858 (breakpoint_location_address_range_overlap): Likewise.
3859 (insert_single_step_breakpoint): Likewise.
3860 (breakpoint_has_location_inserted_here): Likewise.
3861 (single_step_breakpoint_inserted_here_p): Likewise.
3862 (pc_at_non_inline_function): Likewise.
3863 * breakpoint.h (bpstat_stop_status): Update declaration.
3864 (breakpoint_here_p): Likewise.
3865 (breakpoint_in_range_p): Likewise.
3866 (moribund_breakpoint_here_p): Likewise.
3867 (breakpoint_inserted_here_p): Likewise.
3868 (software_breakpoint_inserted_here_p): Likewise.
3869 (hardware_breakpoint_inserted_here_p): Likewise.
3870 (breakpoint_has_location_inserted_here): Likewise.
3871 (single_step_breakpoint_inserted_here_p): Likewise.
3872 (hardware_watchpoint_inserted_in_range): Likewise.
3873 (breakpoint_address_match): Likewise.
3874 (insert_single_step_breakpoint): Likewise.
3875 (pc_at_non_inline_function): Likewise.
3876 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3877 * record.c (record_check_stopped_by_breakpoint): Likewise.
3878 * record.h (record_check_stopped_by_breakpoint): Likewise.
3879 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3880
ac7936df
YQ
38812017-10-25 Yao Qi <yao.qi@linaro.org>
3882
3883 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3884 regcache->arch () instead get_regcache_arch.
3885 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3886 Likewise.
3887 (aarch64_fbsd_store_inferior_registers): Likewise.
3888 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3889 (store_gregs_to_thread): Likewise.
3890 (fetch_fpregs_from_thread): Likewise.
3891 (store_fpregs_to_thread): Likewise.
3892 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3893 (aarch64_store_return_value): Likewise.
3894 (aarch64_software_single_step): Likewise.
3895 * aix-thread.c (aix_thread_wait): Likewise.
3896 (supply_reg32): Likewise.
3897 (supply_sprs64): Likewise.
3898 (supply_sprs32): Likewise.
3899 (fill_gprs64): Likewise.
3900 (fill_gprs32): Likewise.
3901 (fill_sprs64): Likewise.
3902 (fill_sprs32): Likewise.
3903 (store_regs_user_thread): Likewise.
3904 (store_regs_kernel_thread): Likewise.
3905 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3906 (alphabsd_store_inferior_registers): Likewise.
3907 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3908 (alpha_store_return_value): Likewise.
3909 (alpha_deal_with_atomic_sequence): Likewise.
3910 (alpha_next_pc): Likewise.
3911 (alpha_software_single_step): Likewise.
3912 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3913 (amd64bsd_store_inferior_registers): Likewise.
3914 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3915 Likewise.
3916 (amd64_linux_store_inferior_registers): Likewise.
3917 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3918 (amd64_collect_native_gregset): Likewise.
3919 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3920 (amd64obsd_collect_uthread): Likewise.
3921 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3922 (amd64_collect_fpregset): Likewise.
3923 (amd64_supply_fxsave): Likewise.
3924 (amd64_supply_xsave): Likewise.
3925 (amd64_collect_fxsave): Likewise.
3926 (amd64_collect_xsave): Likewise.
3927 * arc-tdep.c (arc_write_pc): Likewise.
3928 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3929 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3930 (arm_fbsd_store_inferior_registers): Likewise.
3931 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3932 (store_vfp_regs): Likewise.
3933 (arm_linux_fetch_inferior_registers): Likewise.
3934 (arm_linux_store_inferior_registers): Likewise.
3935 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3936 (arm_linux_sigreturn_next_pc): Likewise.
3937 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3938 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3939 (fetch_register): Likewise.
3940 (store_register): Likewise.
3941 * arm-tdep.c (arm_is_thumb): Likewise.
3942 (displaced_in_arm_mode): Likewise.
3943 (bx_write_pc): Likewise.
3944 (arm_get_next_pcs_addr_bits_remove): Likewise.
3945 (arm_software_single_step): Likewise.
3946 (arm_extract_return_value): Likewise.
3947 (arm_store_return_value): Likewise.
3948 (arm_write_pc): Likewise.
3949 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3950 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3951 (bsd_uthread_store_registers): Likewise.
3952 * core-regset.c (fetch_core_registers): Likewise.
3953 * corelow.c (get_core_registers): Likewise.
3954 * cris-tdep.c (cris_store_return_value): Likewise.
3955 (cris_extract_return_value): Likewise.
3956 (find_step_target): Likewise.
3957 (find_step_target): Likewise.
3958 (cris_software_single_step): Likewise.
3959 * ctf.c (ctf_fetch_registers): Likewise.
3960 * darwin-nat.c (cancel_breakpoint): Likewise.
3961 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3962 * frv-tdep.c (frv_extract_return_value): Likewise.
3963 * ft32-tdep.c (ft32_store_return_value): Likewise.
3964 (ft32_extract_return_value): Likewise.
3965 * go32-nat.c (fetch_register): Likewise.
3966 (go32_fetch_registers): Likewise.
3967 (go32_store_registers): Likewise.
3968 (store_register): Likewise.
3969 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3970 (h8300_store_return_value): Likewise.
3971 * hppa-linux-nat.c (fetch_register): Likewise.
3972 (store_register): Likewise.
3973 (hppa_linux_fetch_inferior_registers): Likewise.
3974 (hppa_linux_store_inferior_registers): Likewise.
3975 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3976 (i386_darwin_store_inferior_registers): Likewise.
3977 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3978 (gnu_store_registers): Likewise.
3979 * i386-linux-nat.c (fetch_register): Likewise.
3980 (store_register): Likewise.
3981 (supply_gregset): Likewise.
3982 (fill_gregset): Likewise.
3983 (i386_linux_fetch_inferior_registers): Likewise.
3984 (i386_linux_store_inferior_registers): Likewise.
3985 (i386_linux_resume): Likewise.
3986 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3987 Likewise.
3988 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3989 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3990 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3991 (i386obsd_collect_uthread): Likewise.
3992 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3993 (i386_supply_gregset): Likewise.
3994 (i386_collect_gregset): Likewise.
3995 (i386_supply_fpregset): Likewise.
3996 (i386_collect_fpregset): Likewise.
3997 (i386_mpx_bd_base): Likewise.
3998 * i386-v4-nat.c (supply_fpregset): Likewise.
3999 (fill_fpregset): Likewise.
4000 * i387-tdep.c (i387_supply_fsave): Likewise.
4001 (i387_collect_fsave): Likewise.
4002 (i387_supply_fxsave): Likewise.
4003 (i387_collect_fxsave): Likewise.
4004 (i387_supply_xsave): Likewise.
4005 (i387_collect_xsave): Likewise.
4006 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4007 (ia64_linux_store_registers): Likewise.
4008 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4009 (ia64_extract_return_value): Likewise.
4010 (ia64_store_return_value): Likewise.
4011 (find_func_descr): Likewise.
4012 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4013 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4014 (inf_ptrace_store_registers): Likewise.
4015 * infrun.c (use_displaced_stepping): Likewise.
4016 (displaced_step_prepare_throw): Likewise.
4017 (resume): Likewise.
4018 (proceed): Likewise.
4019 (do_target_wait): Likewise.
4020 (adjust_pc_after_break): Likewise.
4021 (handle_inferior_event_1): Likewise.
4022 (handle_signal_stop): Likewise.
4023 (save_infcall_suspend_state): Likewise.
4024 (restore_infcall_suspend_state): Likewise.
4025 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4026 * jit.c (jit_frame_prev_register): Likewise.
4027 * linux-nat.c (save_stop_reason): Likewise.
4028 (linux_nat_wait_1): Likewise.
4029 (resume_stopped_resumed_lwps): Likewise.
4030 * linux-record.c (record_linux_sockaddr): Likewise.
4031 (record_linux_msghdr): Likewise.
4032 (record_linux_system_call): Likewise.
4033 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4034 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4035 (lm32_store_return_value): Likewise.
4036 * m32c-tdep.c (m32c_read_flg): Likewise.
4037 (m32c_pseudo_register_read): Likewise.
4038 (m32c_pseudo_register_write): Likewise.
4039 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4040 (m32r_linux_collect_gregset): Likewise.
4041 * m32r-tdep.c (m32r_store_return_value): Likewise.
4042 (m32r_extract_return_value): Likewise.
4043 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4044 (m68kbsd_collect_fpregset): Likewise.
4045 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4046 * m68k-linux-nat.c (fetch_register): Likewise.
4047 (old_fetch_inferior_registers): Likewise.
4048 (old_store_inferior_registers): Likewise.
4049 (store_regs): Likewise.
4050 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4051 (m68k_svr4_store_return_value): Likewise.
4052 * m88k-tdep.c (m88k_store_arguments): Likewise.
4053 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4054 (mi_cmd_data_write_register_values): Likewise.
4055 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4056 (mips_fbsd_store_inferior_registers): Likewise.
4057 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4058 (mips_fbsd_supply_gregs): Likewise.
4059 (mips_fbsd_collect_fpregs): Likewise.
4060 (mips_fbsd_collect_gregs): Likewise.
4061 (mips_fbsd_supply_fpregset): Likewise.
4062 (mips_fbsd_collect_fpregset): Likewise.
4063 (mips_fbsd_supply_gregset): Likewise.
4064 (mips_fbsd_collect_gregset): Likewise.
4065 * mips-linux-nat.c (supply_gregset): Likewise.
4066 (fill_gregset): Likewise.
4067 (supply_fpregset): Likewise.
4068 (fill_fpregset): Likewise.
4069 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4070 (mips_fill_gregset): Likewise.
4071 (mips_supply_fpregset): Likewise.
4072 (mips_fill_fpregset): Likewise.
4073 (mips64_supply_gregset): Likewise.
4074 (micromips_linux_sigframe_validate): Likewise.
4075 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4076 (mipsnbsd_fetch_inferior_registers): Likewise.
4077 (mipsnbsd_store_inferior_registers): Likewise.
4078 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4079 (mipsnbsd_supply_gregset): Likewise.
4080 (mipsnbsd_iterate_over_regset_sections): Likewise.
4081 (mipsnbsd_supply_reg): Likewise.
4082 (mipsnbsd_supply_fpreg): Likewise.
4083 * mips-tdep.c (mips_in_frame_stub): Likewise.
4084 (mips_dummy_id): Likewise.
4085 (is_octeon_bbit_op): Likewise.
4086 (micromips_bc1_pc): Likewise.
4087 (extended_mips16_next_pc): Likewise.
4088 (mips16_next_pc): Likewise.
4089 (deal_with_atomic_sequence): Likewise.
4090 * moxie-tdep.c (moxie_process_readu): Likewise.
4091 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4092 * nto-procfs.c (procfs_store_registers): Likewise.
4093 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4094 (ppcfbsd_store_inferior_registers): Likewise.
4095 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4096 (fetch_altivec_register): Likewise.
4097 (get_spe_registers): Likewise.
4098 (fetch_spe_register): Likewise.
4099 (fetch_altivec_registers): Likewise.
4100 (fetch_all_gp_regs): Likewise.
4101 (fetch_all_fp_regs): Likewise.
4102 (store_vsx_register): Likewise.
4103 (store_altivec_register): Likewise.
4104 (set_spe_registers): Likewise.
4105 (store_spe_register): Likewise.
4106 (store_altivec_registers): Likewise.
4107 (store_all_gp_regs): Likewise.
4108 (store_all_fp_regs): Likewise.
4109 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4110 (ppc_linux_collect_gregset): Likewise.
4111 (ppc_canonicalize_syscall): Likewise.
4112 (ppc_linux_record_signal): Likewise.
4113 (ppu2spu_prev_register): Likewise.
4114 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4115 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4116 (ppcobsd_store_registers): Likewise.
4117 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4118 Likewise.
4119 (ppc_ravenscar_generic_store_registers): Likewise.
4120 * procfs.c (procfs_fetch_registers): Likewise.
4121 (procfs_store_registers): Likewise.
4122 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4123 (ravenscar_store_registers): Likewise.
4124 (ravenscar_prepare_to_store): Likewise.
4125 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4126 * record-full.c (record_full_wait_1): Likewise.
4127 (record_full_registers_change): Likewise.
4128 (record_full_store_registers): Likewise.
4129 (record_full_core_fetch_registers): Likewise.
4130 (record_full_save): Likewise.
4131 (record_full_goto_insn): Likewise.
4132 * regcache.c (regcache_register_size): Likewise.
4133 (get_regcache_arch): Remove.
4134 (regcache_read_pc): Likewise.
4135 * regcache.h (get_regcache_arch): Remove.
4136 * remote-sim.c (gdbsim_fetch_register): Likewise.
4137 (gdbsim_store_register): Likewise.
4138 * remote.c (fetch_register_using_p): Likewise.
4139 (send_g_packet): Likewise.
4140 (remote_prepare_to_store): Likewise.
4141 (store_registers_using_G): Likewise.
4142 * reverse.c (save_bookmark_command): Likewise.
4143 (goto_bookmark_command): Likewise.
4144 * rs6000-aix-tdep.c (branch_dest): Likewise.
4145 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4146 (fetch_register): Likewise.
4147 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4148 (ppc_collect_reg): Likewise.
4149 (ppc_collect_gregset): Likewise.
4150 (ppc_collect_fpregset): Likewise.
4151 (ppc_collect_vsxregset): Likewise.
4152 (ppc_collect_vrregset): Likewise.
4153 (ppc_displaced_step_hw_singlestep): Likewise.
4154 (rs6000_pseudo_register_read): Likewise.
4155 (rs6000_pseudo_register_write): Likewise.
4156 * s390-linux-nat.c (supply_gregset): Likewise.
4157 (fill_gregset): Likewise.
4158 (s390_linux_fetch_inferior_registers): Likewise.
4159 * s390-linux-tdep.c (s390_write_pc): Likewise.
4160 (s390_software_single_step): Likewise.
4161 (s390_all_but_pc_registers_record): Likewise.
4162 (s390_linux_syscall_record): Likewise.
4163 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4164 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4165 (shnbsd_store_inferior_registers): Likewise.
4166 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4167 (sh_extract_return_value_fpu): Likewise.
4168 (sh_store_return_value_nofpu): Likewise.
4169 (sh_corefile_supply_regset): Likewise.
4170 (sh_corefile_collect_regset): Likewise.
4171 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4172 (sh64_store_return_value): Likewise.
4173 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4174 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4175 (sparc_store_inferior_registers): Likewise.
4176 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4177 (sparc_ravenscar_prepare_to_store): Likewise.
4178 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4179 (sparc_analyze_control_transfer): Likewise.
4180 (sparc_step_trap): Likewise.
4181 (sparc_software_single_step): Likewise.
4182 (sparc32_gdbarch_init): Likewise.
4183 (sparc_supply_rwindow): Likewise.
4184 (sparc_collect_rwindow): Likewise.
4185 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4186 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4187 (sparc64nbsd_collect_gregset): Likewise.
4188 (sparc64nbsd_supply_fpregset): Likewise.
4189 (sparc64nbsd_collect_fpregset): Likewise.
4190 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4191 (sparc64_supply_gregset): Likewise.
4192 (sparc64_collect_gregset): Likewise.
4193 (sparc64_supply_fpregset): Likewise.
4194 (sparc64_collect_fpregset): Likewise.
4195 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4196 * spu-tdep.c (spu_unwind_sp): Likewise.
4197 (spu2ppu_prev_register): Likewise.
4198 (spu_memory_remove_breakpoint): Likewise.
4199 * stack.c (return_command): Likewise.
4200 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4201 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4202 * tracefile.c (trace_save_ctf): Likewise.
4203 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4204 (do_windows_store_inferior_registers): Likewise.
4205 (windows_resume): Likewise.
4206 * xtensa-linux-nat.c (fill_gregset): Likewise.
4207 (supply_gregset_reg): Likewise.
4208 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4209 (xtensa_register_read_masked): Likewise.
4210 (xtensa_supply_gregset): Likewise.
4211 (xtensa_extract_return_value): Likewise.
4212 (xtensa_store_return_value): Likewise.
4213
edd079d9
UW
42142017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4215
4216 * doublest.c (floatformat_from_string): New function.
4217 * doublest.h (floatformat_from_string): Add prototype.
4218
4219 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4220 (OP_FLOAT): ... this.
4221 * expression.h: Do not include "doublest.h".
4222 (union exp_element): Replace doubleconst and decfloatconst by
4223 new element floatconst.
4224 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4225 (ada_evaluate_subexp): Likewise.
4226 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4227 OP_DOUBLE and OP_DECFLOAT.
4228 * expprint.c (print_subexp_standard): Likewise.
4229 (dump_subexp_body_standard): Likewise.
4230 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4231
4232 * parse.c: Include "dfp.h".
4233 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4234 (write_exp_elt_floatcst): New function.
4235 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4236 and OP_DECFLOAT.
4237 (operator_check_standard): Likewise.
4238 (parse_float): Do not accept suffix. Take type as input. Return bool.
4239 Return target format buffer instead of host DOUBLEST.
4240 Use floatformat_from_string and decimal_from_string to parse
4241 either binary or decimal floating-point types.
4242 (parse_c_float): Remove.
4243 * parser-defs.h: Do not include "doublest.h".
4244 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4245 (write_exp_elt_floatcst): Add prototype.
4246 (parse_float): Update prototype.
4247 (parse_c_float): Remove.
4248
4249 * c-exp.y: Do not include "dfp.h".
4250 (typed_val_float): Use byte buffer instead of DOUBLEST.
4251 (typed_val_decfloat): Remove.
4252 (DECFLOAT): Remove.
4253 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4254 (parse_number): Update to new parse_float interface.
4255 Parse suffixes and determine type before calling parse_float.
4256 Handle decimal and binary FP types the same way.
4257
4258 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4259 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4260 (parse_number): Update to new parse_float interface.
4261 Parse suffixes and determine type before calling parse_float.
4262
4263 * f-exp.y: Replace dval by typed_val_float.
4264 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4265 (parse_number): Use parse_float instead of atof.
4266
4267 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4268 (parse_go_float): Remove.
4269 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4270 (parse_number): Call parse_float instead of parse_go_float.
4271 Parse suffixes and determine type before calling parse_float.
4272
4273 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4274 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4275 (parse_number): Update to new parse_float interface.
4276 Parse suffixes and determine type before calling parse_float.
4277
4278 * m2-exp.y: Replace dval by byte buffer val.
4279 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4280 (parse_number): Call parse_float instead of atof.
4281
4282 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4283 (lex_number): Call parse_float instead of strtod.
4284 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4285 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4286 Use write_exp_elt_floatcst.
4287 (unit_testing): Remove static variable.
4288 (rust_type): Do not check unit_testing.
4289 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4290
4291 * ada-exp.y (type_float, type_double): Remove.
4292 (typed_val_float): Use byte buffer instead of DOUBLEST.
4293 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4294 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4295
cc628f3d
AH
42962017-10-25 Alan Hayward <alan.hayward@arm.com>
4297
4298 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4299 * arch/aarch64.h: New file.
4300
09a7c6aa
UW
43012017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4302
4303 * dfp.h (decimal_from_string): Use const reference for argument.
4304 * dfp.c (decimal_from_string): Likewise.
4305
8ba0dd51
UW
43062017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4307
4308 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4309 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4310 * mips-tdep.c (mips_print_fp_register): Likewise.
4311
16e812b2
UW
43122017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4313
4314 * common/format.h (enum argclass): Replace decfloat_arg by
4315 dec32float_arg, dec64float_arg, and dec128float_arg.
4316 * common/format.c (parse_format_string): Update to return
4317 new decimal float argument classes.
4318
4319 * printcmd.c (printf_decfloat): Rename to ...
4320 (printf_floating): ... this. Add argclass argument, and use it
4321 instead of parsing the format string again. Add support for
4322 binary floating-point values, using floatformat_to_string.
4323 Convert value to the target format if it doesn't already match.
4324 (ui_printf): Call printf_floating instead of printf_decfloat,
4325 also for double_arg / long_double_arg. Pass argclass.
4326
4327 * dfp.c (decimal_to_string): Add format string argument.
4328 * dfp.h (decimal_to_string): Likewise.
4329
4330 * doublest.c (floatformat_to_string): Add format string argument.
4331 * doublest.h (floatformat_to_string): Likewise.
4332
fdf0cbc2
UW
43332017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4334
4335 * doublest.c (floatformat_precision): New routine.
4336 (floatformat_to_string): Likewise.
4337 * doublest.c (floatformat_to_string): Add prototype.
4338
4339 * printcmd.c (print_scalar_formatted): Only call print_floating
4340 on floating-point types.
4341 * valprint.c: Do not include "floatformat.h".
4342 (generic_val_print_decfloat): Remove.
4343 (generic_val_print): Call generic_val_print_float for both
4344 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4345 (print_floating): Use floatformat_to_string. Handle decimal float.
4346 (print_decimal_floating): Remove, merge into floatformat_to_string.
4347 * value.h (print_decimal_floating): Remove.
4348
4349 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4350
5033013f
UW
43512017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4352
4353 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4354
a664f67e
SM
43552017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4356
4357 * memattr.h: Don't include vec.h.
4358 (struct mem_attrib): Initialize fields.
4359 <unknown>: New static method.
4360 (struct mem_region): Add constructors, operator<, initialize
4361 fields.
4362 * memattr.c: Include algorithm.
4363 (default_mem_attrib, unknown_mem_attrib): Remove.
4364 (user_mem_region_list): New global.
4365 (target_mem_region_list, mem_region_list): Change type to
4366 std::vector<mem_region>.
4367 (mem_use_target): Now a function.
4368 (target_mem_regions_valid): Change type to bool.
4369 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4370 (require_user_regions): Adjust.
4371 (require_target_regions): Adjust.
4372 (create_mem_region): Adjust.
4373 (lookup_mem_region): Adjust.
4374 (invalidate_target_mem_regions): Adjust.
4375 (mem_clear): Rename to...
4376 (user_mem_clear): ... this, and adjust.
4377 (mem_command): Adjust.
4378 (info_mem_command): Adjust.
4379 (mem_enable, enable_mem_command, mem_disable,
4380 disable_mem_command): Adjust.
4381 (mem_delete): Adjust.
4382 (delete_mem_command): Adjust.
4383 * memory-map.h (parse_memory_map): Return an std::vector.
4384 * memory-map.c (parse_memory_map): Likewise.
4385 (struct memory_map_parsing_data): Add constructor.
4386 <memory_map>: Point to std::vector.
4387 (memory_map_start_memory): Adjust.
4388 (memory_map_end_memory): Adjust.
4389 (memory_map_end_property): Adjust.
4390 (clear_result): Remove.
4391 * remote.c (remote_memory_map): Return an std::vector.
4392 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4393 Remove.
4394 (target_debug_print_mem_region_vector): New.
4395 * target-delegates.c: Regenerate.
4396 * target.h (mem_region_vector): New typedef.
4397 (to_memory_map): Return mem_region_vector.
4398 (target_memory_map): Return an std::vector.
4399 * target.c (target_memory_map): Return an std::vector.
4400 (flash_erase_command): Adjust.
4401
6e17c565
SM
44022017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4403
4404 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4405 Change type to std::string.
4406 (memory_map_start_property): Adjust.
4407 (memory_map_end_property): Adjust.
4408
cfba9872
SM
44092017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4410
4411 * infrun.h: Include common/byte-vector.h.
4412 (struct displaced_step_closure): New struct.
4413 (struct buf_displaced_step_closure): New struct.
4414 * infrun.c (displaced_step_closure::~displaced_step_closure):
4415 Provide default implementation.
4416 (displaced_step_clear): Deallocate step closure with delete.
4417 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4418 (aarch64_displaced_step_closure): ... this, extend
4419 displaced_step_closure.
4420 (aarch64_displaced_step_data) <dsc>: Change type to
4421 aarch64_displaced_step_closure.
4422 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4423 unique_ptr.
4424 (aarch64_displaced_step_fixup): Add cast for displaced step
4425 closure.
4426 * amd64-tdep.c (displaced_step_closure): Rename to ...
4427 (amd64_displaced_step_closure): ... this, extend
4428 displaced_step_closure.
4429 <insn_buf>: Change type to std::vector<gdb_byte>.
4430 <max_len>: Remove.
4431 (fixup_riprel): Change type of DSC parameter, adjust to type
4432 change of insn_buf.
4433 (fixup_displaced_copy): Change type of DSC parameter.
4434 (amd64_displaced_step_copy_insn): Instantiate
4435 amd64_displaced_step_closure.
4436 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4437 to type change of insn_buf.
4438 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4439 parameter DSC.
4440 (arm_linux_copy_svc): Likewise.
4441 (cleanup_kernel_helper_return): Likewise.
4442 (arm_catch_kernel_helper_return): Likewise.
4443 (arm_linux_displaced_step_copy_insn): Instantiate
4444 arm_displaced_step_closure.
4445 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4446 (displaced_read_reg): Change type of parameter DSC.
4447 (branch_write_pc): Likewise.
4448 (load_write_pc): Likewise.
4449 (alu_write_pc): Likewise.
4450 (displaced_write_reg): Likewise.
4451 (arm_copy_unmodified): Likewise.
4452 (thumb_copy_unmodified_32bit): Likewise.
4453 (thumb_copy_unmodified_16bit): Likewise.
4454 (cleanup_preload): Likewise.
4455 (install_preload): Likewise.
4456 (arm_copy_preload): Likewise.
4457 (thumb2_copy_preload): Likewise.
4458 (install_preload_reg): Likewise.
4459 (arm_copy_preload_reg): Likewise.
4460 (cleanup_copro_load_store): Likewise.
4461 (install_copro_load_store): Likewise.
4462 (arm_copy_copro_load_store) Likewise.
4463 (thumb2_copy_copro_load_store): Likewise.
4464 (cleanup_branch): Likewise.
4465 (install_b_bl_blx): Likewise.
4466 (arm_copy_b_bl_blx): Likewise.
4467 (thumb2_copy_b_bl_blx): Likewise.
4468 (thumb_copy_b): Likewise.
4469 (install_bx_blx_reg): Likewise.
4470 (arm_copy_bx_blx_reg): Likewise.
4471 (thumb_copy_bx_blx_reg): Likewise.
4472 (cleanup_alu_imm): Likewise.
4473 (arm_copy_alu_imm): Likewise.
4474 (thumb2_copy_alu_imm): Likewise.
4475 (cleanup_alu_reg): Likewise.
4476 (install_alu_reg): Likewise.
4477 (arm_copy_alu_reg): Likewise.
4478 (thumb_copy_alu_reg): Likewise.
4479 (cleanup_alu_shifted_reg): Likewise.
4480 (install_alu_shifted_reg): Likewise.
4481 (arm_copy_alu_shifted_reg): Likewise.
4482 (cleanup_load): Likewise.
4483 (cleanup_store): Likewise.
4484 (arm_copy_extra_ld_st): Likewise.
4485 (install_load_store): Likewise.
4486 (thumb2_copy_load_literal): Likewise.
4487 (thumb2_copy_load_reg_imm): Likewise.
4488 (arm_copy_ldr_str_ldrb_strb): Likewise.
4489 (cleanup_block_load_all): Likewise.
4490 (cleanup_block_store_pc): Likewise.
4491 (cleanup_block_load_pc): Likewise.
4492 (arm_copy_block_xfer): Likewise.
4493 (thumb2_copy_block_xfer): Likewise.
4494 (cleanup_svc): Likewise.
4495 (install_svc): Likewise.
4496 (arm_copy_svc): Likewise.
4497 (thumb_copy_svc): Likewise.
4498 (arm_copy_undef): Likewise.
4499 (thumb_32bit_copy_undef): Likewise.
4500 (arm_copy_unpred): Likewise.
4501 (arm_decode_misc_memhint_neon): Likewise.
4502 (arm_decode_unconditional): Likewise.
4503 (arm_decode_miscellaneous): Likewise.
4504 (arm_decode_dp_misc): Likewise.
4505 (arm_decode_ld_st_word_ubyte): Likewise.
4506 (arm_decode_media): Likewise.
4507 (arm_decode_b_bl_ldmstm): Likewise.
4508 (arm_decode_ext_reg_ld_st): Likewise.
4509 (thumb2_decode_dp_shift_reg): Likewise.
4510 (thumb2_decode_ext_reg_ld_st): Likewise.
4511 (arm_decode_svc_copro): Likewise.
4512 (thumb2_decode_svc_copro): Likewise.
4513 (install_pc_relative): Likewise.
4514 (thumb_copy_pc_relative_16bit): Likewise.
4515 (thumb_decode_pc_relative_16bit): Likewise.
4516 (thumb_copy_pc_relative_32bit): Likewise.
4517 (thumb_copy_16bit_ldr_literal): Likewise.
4518 (thumb_copy_cbnz_cbz): Likewise.
4519 (thumb2_copy_table_branch): Likewise.
4520 (cleanup_pop_pc_16bit_all): Likewise.
4521 (thumb_copy_pop_pc_16bit): Likewise.
4522 (thumb_process_displaced_16bit_insn): Likewise.
4523 (decode_thumb_32bit_ld_mem_hints): Likewise.
4524 (thumb_process_displaced_32bit_insn): Likewise.
4525 (thumb_process_displaced_insn): Likewise.
4526 (arm_process_displaced_insn): Likewise.
4527 (arm_displaced_init_closure): Likewise.
4528 (arm_displaced_step_fixup): Add cast for closure.
4529 * arm-tdep.h: Include infrun.h.
4530 (displaced_step_closure): Rename to ...
4531 (arm_displaced_step_closure): ... this, extend
4532 displaced_step_closure.
4533 <u::svc::copy_svc_os>: Change type of parameter DSC.
4534 <cleanup>: Likewise.
4535 (arm_process_displaced_insn): Likewise.
4536 (arm_displaced_init_closure): Likewise.
4537 (displaced_read_reg): Likewise.
4538 (displaced_write_reg): Likewise.
4539 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4540 Adjust.
4541 * i386-tdep.h: Include infrun.h.
4542 (i386_displaced_step_closure): New typedef.
4543 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4544 i386_displaced_step_closure.
4545 (i386_displaced_step_fixup): Adjust.
4546 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4547 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4548 and unique_ptr.
4549 (ppc_displaced_step_fixup): Adjust.
4550 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4551 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4552 and unique_ptr.
4553 (s390_displaced_step_fixup): Adjust.
4554
b392b304
SM
45552017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4556
4557 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4558 Remove declarations.
4559
d5833c62
TT
45602017-10-20 Tom Tromey <tom@tromey.com>
4561
4562 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4563 std::vector.
4564 (gdb_bfd_record_inclusion): Update.
4565 (bfdp): Remove typedef.
4566
06d5bbc8
TT
45672017-10-20 Tom Tromey <tom@tromey.com>
4568
4569 * gdb_bfd.c (gdb_bfd_ref): Use new.
4570 (struct gdb_bfd_data): Add constructor, destructor, and member
4571 initializers.
4572 (gdb_bfd_unref): Use delete.
4573
2712ce2e
TT
45742017-10-20 Tom Tromey <tom@tromey.com>
4575
4576 * exec.c (exec_file_attach): Use new_bfd_ref.
4577 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4578 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4579 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4580 new_bfd_ref.
4581 * gdb_bfd.h (new_bfd_ref): New function.
4582
fcc8fb2f
PA
45832017-10-20 Pedro Alves <palves@redhat.com>
4584
4585 * main.c (captured_command_loop): Add attribute noinline.
4586
4c2287b0
SM
45872017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4588
4589 * interps.c (struct interp_factory): Add constructor.
4590 (interp_factory_p): Remove typedef.
4591 (DEF_VEC_P(interp_factory_p)): Remove.
4592 (interpreter_factories): Change type to std::vector.
4593 (interp_factory_register): Adjust.
4594 (interp_lookup): Adjust.
4595 (interpreter_completer): Adjust.
4596
3d415c26
TT
45972017-10-19 Tom Tromey <tom@tromey.com>
4598
4599 * break-catch-syscall.c (catch_syscall_completer): Use
4600 std::string, gdb::unique_xmalloc_ptr.
4601
395423c4
TT
46022017-10-19 Tom Tromey <tom@tromey.com>
4603
4604 * infcall.c (call_function_by_hand_dummy): Use std::string.
4605
54f70bc1
TT
46062017-10-19 Tom Tromey <tom@tromey.com>
4607
4608 * mi/mi-main.c (mi_cmd_execute): Update.
4609 * top.h (prepare_execute_command): Return scoped_value_mark.
4610 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4611 Add move constructor.
4612 * top.c (prepare_execute_command): Return scoped_value_mark.
4613 (execute_command): Update.
4614
63929e84
PA
46152017-10-19 Pedro Alves <palves@redhat.com>
4616
4617 * xml-support.c (xml_fetch_content_from_file): Check fread's
4618 return.
4619
a75868f5
PA
46202017-10-19 Pedro Alves <palves@redhat.com>
4621
4622 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4623 async.
4624 (handle_error_fd): New function.
4625 (ser_base_async): Add/delete an event loop file handler for
4626 error_fd.
4627
2edf834e
PA
46282017-10-19 Pedro Alves <palves@redhat.com>
4629
4630 * xml-support.c (xml_fetch_content_from_file): Don't read in
4631 chunks. Instead use fseek to determine the file's size, and read
4632 it in one go.
4633
c8ba13ad
KS
46342017-11-18 Keith Seitz <keiths@redhat.com>
4635
4636 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4637 types.
4638 Add whitespace to front of type name.
4639
37534686
KS
46402017-10-18 Keith Seitz <keiths@redhat.com>
4641
4642 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4643 DW_AT_accessibility.
4644
28c7c158
YQ
46452017-10-18 Yao Qi <yao.qi@linaro.org>
4646
4647 * features/tic6x-c62x-linux.c: Remove.
4648
30f0b101
TT
46492017-10-17 Tom Tromey <tom@tromey.com>
4650
4651 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4652 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4653 (do_mixed_source_and_assembly): Likewise.
4654
57e12da9
TT
46552017-10-17 Tom Tromey <tom@tromey.com>
4656
4657 * regcache.c (regcache::xfer_part): Remove assertion.
4658
7b700999
PA
46592017-10-17 Pedro Alves <palves@redhat.com>
4660
4661 * xml-support.c (xml_fetch_content_from_file): Call
4662 unique_ptr::release() instead unique_ptr::get() when passing
4663 through xrealloc.
4664
d3037ba6
YQ
46652017-10-17 Yao Qi <yao.qi@linaro.org>
4666
4667 * regcache.c (regcache::xfer_part): Remove parameters read and
4668 write, add parameter is_raw. All callers are updated.
4669
83d5a34d
KS
46702017-10-16 Keith Seitz <keiths@redhat.com>
4671
4672 * c-typeprint.c (enum access_specifier): Moved here from
4673 c_type_print_base.
4674 (output_access_specifier): New function.
4675 (c_type_print_base): Consider typedefs when assessing
4676 whether access labels are needed.
4677 Use output_access_specifier as needed.
4678 Output access specifier for typedefs, if needed.
4679 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4680 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4681 fields.
4682 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4683 accessor macros.
4684
87028b87
TT
46852017-10-16 Tom Tromey <tom@tromey.com>
4686
4687 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4688 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4689 * target.c (target_fileio_read_stralloc): Update.
4690 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4691 * target.h (target_fileio_read_stralloc): Return
4692 unique_xmalloc_ptr.
4693
b7b030ad
TT
46942017-10-16 Tom Tromey <tom@tromey.com>
4695
4696 * xml-syscall.c (xml_init_syscalls_info): Update.
4697 * xml-support.c (xinclude_start_include): Update.
4698 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4699 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4700 (xml_fetch_content_from_file): Likewise.
4701 * osdata.c (get_osdata): Update.
4702 * target.h (target_read_stralloc, target_get_osdata): Return
4703 unique_xmalloc_ptr.
4704 * solib-aix.c (solib_aix_get_library_list): Update.
4705 * solib-target.c (solib_target_current_sos): Update.
4706 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4707 * xml-tdesc.c (fetch_available_features_from_target): Update.
4708 (target_fetch_description_xml): Update.
4709 (file_read_description_xml): Update.
4710 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4711 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4712 (remote_pid_to_exec_file): Update.
4713 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4714 (target_get_osdata): Likewise.
4715
b80406ac
TT
47162017-10-16 Tom Tromey <tom@tromey.com>
4717
4718 * remote.c (remote_register_number_and_offset): Use std::vector.
4719 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4720 (putpkt_binary): Use gdb::def_vector.
4721 (compare_sections_command): Use gdb::byte_vector.
4722
a90ecff8
TT
47232017-10-16 Tom Tromey <tom@tromey.com>
4724
4725 * ppc-linux-nat.c (hwdebug_insert_point): Use
4726 gdb::unique_xmalloc_ptr, XDUP.
4727
2dc0e219
TT
47282017-10-16 Tom Tromey <tom@tromey.com>
4729
4730 * probe.c (parse_probes): Use std::string.
4731 (info_probes_for_ops, enable_probes_command)
4732 (disable_probes_command): Remove cleanups.
4733
b05628f0
TT
47342017-10-16 Tom Tromey <tom@tromey.com>
4735
4736 * buildsym.c (block_compar): Remove.
4737 (end_symtab_get_static_block): Use std::vector.
4738
a79b1bc6
SM
47392017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4740
4741 * memrange.h (struct mem_range): Define operator< and operator==.
4742 (mem_range_s): Remove.
4743 (DEF_VEC_O (mem_range_s)): Remove.
4744 (normalize_mem_ranges): Change parameter type to std::vector.
4745 * memrange.c (compare_mem_ranges): Remove.
4746 (normalize_mem_ranges): Change parameter type to std::vector,
4747 adjust to vector change.
4748 * exec.c (section_table_available_memory): Return vector, remove
4749 parameter.
4750 (section_table_read_available_memory): Adjust to std::vector
4751 change.
4752 * remote.c (remote_read_bytes): Adjust to std::vector
4753 change.
4754 * tracepoint.h (traceframe_available_memory): Change parameter
4755 type to std::vector.
4756 * tracepoint.c (traceframe_available_memory): Change parameter
4757 type to std::vector, adjust.
4758 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4759 std::vector change.
4760 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4761 unittests/memrange-selftests.c.
4762 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4763 * gdb/unittests/memrange-selftests.c: New file.
4764
63f0e930
PA
47652017-10-16 Pedro Alves <palves@redhat.com>
4766
4767 * elfread.c (probe_key_free): Rename range-for variable.
4768 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4769 (find_probe_by_pc, collect_probes): Rename range-for variable.
4770
c40c7bfc
YQ
47712017-10-16 Yao Qi <yao.qi@linaro.org>
4772
4773 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4774 * features/tic6x-c62x.c: Remove.
4775 * features/tic6x-c64x-linux.c: Remove.
4776 * features/tic6x-c64x.c: Remove.
4777 * features/tic6x-c64xp-linux.c: Remove.
4778 * features/tic6x-c64xp.c: Remove.
4779 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4780 initialize_tdesc_tic6x_*_linux functions.
4781 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4782 initialize_tdesc_tic6x_* functions.
4783
df27ae6a
YQ
47842017-10-16 Yao Qi <yao.qi@linaro.org>
4785
4786 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4787 tic6x-c62x.
4788 * regformats/tic6x-c62x.dat: Remove.
4789 * regformats/tic6x-c64x.dat: Remove.
4790 * regformats/tic6x-c64xp.dat: Remove.
4791
86766165
SM
47922017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4793
4794 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4795 (the !HAVE_LIBEXPAT version).
4796
824dfcc3
SM
47972017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4798
4799 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4800 const.
4801
2098b393
SM
48022017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4803
4804 * target.h: Include tracepoint.h.
4805 (enum trace_find_type): Move to tracepoint.h.
4806 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4807 * tracepoint.h: Don't include target.h
4808 (enum trace_find_type): Move from target.h.
4809 (parse_traceframe_info): Return a unique ptr.
4810 * tracepoint.c (current_traceframe_info): Change type to unique
4811 ptr.
4812 (free_traceframe_info): Remove.
4813 (clear_traceframe_info): Don't manually free
4814 current_traceframe_info.
4815 (free_result): Remove.
4816 (parse_traceframe_info): Return a unique ptr.
4817 (get_traceframe_info): Adjust to unique ptr.
4818 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4819 * remote.c (remote_traceframe_info): Return a unique ptr.
4820 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4821 ptr.
4822 * target-debug.h (target_debug_print_traceframe_info_up): New
4823 macro.
4824 * target-delegates.c: Regenerate.
4825
4cdd21a8
SM
48262017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4827
4828 * memrange.h (struct mem_range): Add constructors.
4829 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4830 std::vector<mem_range>.
4831 * tracepoint.c (free_traceframe_info): Don't manually free
4832 vector.
4833 (traceframe_info_start_memory): Adjust to vector change.
4834 (traceframe_available_memory): Likewise.
4835 * tracefile-tfile.c (build_traceframe_info): Likewise.
4836 * ctf.c (ctf_traceframe_info): Likewise.
4837
d0d292a2
SM
48382017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4839
4840 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4841 std::vector<int>.
4842 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4843 (traceframe_info_start_tvar): Adjust to vector change.
4844 (parse_traceframe_info): Allocate with new.
4845 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4846 vector change.
4847 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4848 change.
4849 tfile_traceframe_info): Allocate with new.
4850 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4851 change.
4852
8d3c73ef
SM
48532017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4854
4855 * tracepoint.c (traceframe_info): Rename to...
4856 (current_traceframe_info): ...this.
4857 (clear_traceframe_info): Adjust.
4858 (get_traceframe_info): Adjust.
4859
b129dcac
SM
48602017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4861
4862 * nat/linux-osdata.c: Include algorithm.
4863 (compare_processes): Remove.
4864 (struct pid_pgid_entry): New struct.
4865 (linux_xfer_osdata_processgroups): Use std::vector instead of
4866 XNEWVEC.
4867
af5bf4ad
SM
48682017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4869
4870 * objfiles.h: Don't include symfile.h.
4871 (struct partial_symbol): Remove forward-declaration.
4872 (struct objfile) <global_psymbols, static_psymbols>: Change type
4873 to std::vector<partial_symbol *>.
4874 * objfiles.c (objfile::objfile): Don't memset those fields.
4875 (objfile::~objfile): Don't free those fields.
4876 * psympriv.h (struct psymbol_allocation_list): Remove
4877 forward-declaration.
4878 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4879 to std::vector.
4880 (start_psymtab_common): Change parameters to std::vector.
4881 * psymtab.c: Include algorithm.
4882 (require_partial_symbols): Call shrink_to_fit.
4883 (find_pc_sect_psymbol): Adjust to vector change.
4884 (match_partial_symbol): Likewise.
4885 (lookup_partial_symbol): Likewise.
4886 (psym_relocate): Likewise.
4887 (dump_psymtab): Likewise.
4888 (recursively_search_psymtabs): Likewise.
4889 (compare_psymbols): Remove.
4890 (sort_pst_symbols): Adjust to vector change.
4891 (start_psymtab_common): Likewise.
4892 (end_psymtab_common): Likewise.
4893 (psymbol_bcache_full): De-constify return value.
4894 (add_psymbol_to_bcache): Likewise.
4895 (extend_psymbol_list): Remove.
4896 (append_psymbol_to_list): Adjust to vector change.
4897 (add_psymbol_to_list): Likewise.
4898 (init_psymbol_list): Likewise.
4899 (maintenance_info_psymtabs): Likewise.
4900 (maintenance_check_psymtabs): Likewise.
4901 * symfile.h (struct psymbol_allocation_list): Remove.
4902 * symfile.c (reread_symbols): Adjust to vector change.
4903 * dbxread.c (start_psymtab): Change type of parameters.
4904 (dbx_symfile_read): Adjust to vector change.
4905 (read_dbx_symtab): Likewise.
4906 (start_psymtab): Change type of parameters.
4907 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4908 (create_partial_symtab): Likewise.
4909 (add_partial_symbol): Likewise.
4910 (write_one_signatured_type): Likewise.
4911 (recursively_write_psymbols): Likewise.
4912 * mdebugread.c (parse_partial_symbols): Likewise.
4913 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4914 (scan_xcoff_symtab): Adjust to vector change.
4915 (xcoff_initial_scan): Likewise.
4916
3ec5942f
SM
49172017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4918
4919 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4920
2399fe6a
YQ
49212017-10-13 Yao Qi <yao.qi@linaro.org>
4922
4923 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4924 Remove s390x-*-expedite, add s390x-expedite.
4925
4bf3f4a8
YQ
49262017-10-13 Yao Qi <yao.qi@linaro.org>
4927
4928 * features/s390-gs-linux64.c: Regenerated.
4929 * features/s390x-gs-linux64.c: Regenerated.
4930
9e86da07
TT
49312017-10-13 Tom Tromey <tom@tromey.com>
4932
4933 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4934 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4935 delete.
4936 * symfile.c (symbol_file_add_with_addrs): Use new.
4937 (symbol_file_add_separate): Update comment.
4938 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4939 * jit.c (jit_object_close_impl): Use new.
4940 (jit_unregister_code): Use delete.
4941 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4942 (~objfile): Rename from free_objfile.
4943 (free_objfile_separate_debug, do_free_objfile_cleanup)
4944 (free_all_objfiles, objfile_purge_solibs): Use delete.
4945 * objfiles.h (struct objfile): Add constructor and destructor.
4946 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4947 (allocate_objfile, free_objfile): Don't declare.
4948 (struct objstats): Add initializers.
4949
c2508e90
SM
49502017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4951
4952 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4953 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4954 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4955 * gdbarch.h: Regenerate.
4956 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4957 Adjust comment.
4958 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4959 (i386_displaced_step_fixup): Adjust comment.
4960 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4961
a900ff72
TT
49622017-10-12 Tom Tromey <tom@tromey.com>
4963
4964 * prologue-value.h (pv_area::store_would_trash): Return bool.
4965 (pv_area::find_reg): Likewise.
4966 * prologue-value.c (pv_area::store_would_trash): Return bool.
4967 (pv_area::find_reg): Likewise.
4968
f7b7ed97
TT
49692017-10-12 Tom Tromey <tom@tromey.com>
4970
4971 * s390-linux-tdep.c (s390_store, s390_load)
4972 (s390_check_for_saved, s390_analyze_prologue): Update.
4973 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4974 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4975 * prologue-value.h (class pv_area): Move from prologue-value.c.
4976 Change names of members. Add constructor, destructor, member
4977 functions.
4978 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4979 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4980 (pv_area_fetch, pv_area_scan): Don't declare.
4981 * prologue-value.c (struct pv_area::area_entry): Now member of
4982 pv_area.
4983 (struct pv_area): Move to prologue-value.h.
4984 (pv_area::pv_area): Rename from make_pv_area.
4985 (pv_area::~pv_area): Rename from free_pv_area.
4986 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4987 (clear_entries, find_entry, overlaps, store_would_trash, store)
4988 (fetch, find_reg, scan): Now member of pv_area.
4989 Remove "area" argument. Update.
4990 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4991 Update.
4992 * mn10300-tdep.c (push_reg, check_for_saved)
4993 (mn10300_analyze_prologue): Update.
4994 * mep-tdep.c (is_arg_spill, check_for_saved)
4995 (mep_analyze_prologue): Update.
4996 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4997 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4998 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4999 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5000 Update.
5001 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5002 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5003
466eecee
SM
50042017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5005
5006 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5007 * linux-nat.c (linux_nat_delete_thread): New variable.
5008 (lwp_free): Invoke linux_nat_delete_thread if set.
5009 (linux_nat_set_delete_thread): New function.
5010 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5011 thread delete callback.
5012 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5013 (_initialize_arm_linux_nat): Assign thread delete callback.
5014 * s390-linux-nat.c (s390_delete_thread): New function.
5015 (_initialize_s390_nat): Assign thread delete callback.
5016 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5017 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5018 function.
5019 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5020 declaration.
5021 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5022 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5023
f71c8822
TT
50242017-10-09 Tom Tromey <tom@tromey.com>
5025
5026 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5027 std::string.
5028 * tui/tui-layout.c (enum tui_status): Use std::string.
5029
981a3fb3
TT
50302017-10-11 Tom Tromey <tom@tromey.com>
5031
5032 * gdbthread.h (thread_command): Constify.
5033 * inferior.h (detach_command): Constify.
5034 * top.h (set_history, show_history): Constify.
5035 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5036 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5037 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5038 * printcmd.c (set_command): Constify.
5039 (non_const_set_command): New function.
5040 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5041 * breakpoint.c (enable_command, disable_command, delete_command)
5042 (catch_command, tcatch_command, set_breakpoint_cmd)
5043 (show_breakpoint_cmd): Constify.
5044 * macrocmd.c (macro_command): Constify.
5045 * infcmd.c (unset_command, kill_command, detach_command)
5046 (info_proc_cmd): Constify.
5047 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5048 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5049 (info_auto_load_cmd): Constify.
5050 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5051 (unset_tdesc_cmd): Constify.
5052 * ada-lang.c (set_ada_command, show_ada_command)
5053 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5054 * guile/guile.c (set_guile_command, show_guile_command)
5055 (info_guile_command): Constify.
5056 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5057 Constify.
5058 * skip.c (skip_command): Constify.
5059 * compile/compile.c (_initialize_compile): Constify.
5060 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5061 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5062 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5063 (maint_btrace_pt_show_cmd): Constify.
5064 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5065 Constify.
5066 * python/python.c (user_show_python, user_set_python): Constify.
5067 * mips-tdep.c (set_mips_command, show_mips_command)
5068 (set_mipsfpu_command): Constify.
5069 * record-btrace.c (cmd_record_btrace_start)
5070 (cmd_set_record_btrace, cmd_show_record_btrace)
5071 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5072 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5073 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5074 Constify.
5075 * symfile.c (overlay_command): Constify.
5076 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5077 * cli/cli-logging.c (set_logging_command, show_logging_command):
5078 Constify.
5079 * cli/cli-dump.c (dump_command, append_command)
5080 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5081 (tekhex_dump_command, binary_dump_command)
5082 (binary_append_command): Constify.
5083 * cli/cli-decode.c (struct cmd_list_element): Change type of
5084 "fun".
5085 * cli/cli-cmds.c (info_command, show_command, set_debug)
5086 (show_debug): Constify.
5087 (show_command): Add non-const overload.
5088 * top.c (set_history, show_history): Constify.
5089 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5090 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5091 * target.c (target_command): Constify.
5092 * sparc64-tdep.c (info_adi_command): Constify.
5093 * record-full.c (cmd_record_full_start): Constify.
5094 (set_record_full_command): Constify. Fix typo.
5095 (show_record_full_command): Constify.
5096 * thread.c (thread_command, thread_apply_command): Constify.
5097 * memattr.c (dummy_cmd): Constify.
5098 * value.c (function_command): Constify.
5099 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5100 * probe.c (info_probes_command): Constify.
5101 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5102 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5103 (show_thread_cmd, set_thread_default_cmd)
5104 (show_thread_default_cmd): Constify.
5105 (check_empty): Constify.
5106 * tracepoint.c (tfind_command): Constify.
5107 * cp-support.c (maint_cplus_command): Constify.
5108 * windows-tdep.c (info_w32_command): Constify.
5109 * record.c (cmd_record_start, set_record_command)
5110 (show_record_command, info_record_command, cmd_record_goto):
5111 Constify.
5112 * ravenscar-thread.c (set_ravenscar_command)
5113 (show_ravenscar_command): Constify.
5114 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5115 Constify.
5116 (add_internal_problem_command): Remove casts.
5117 * arc-tdep.c (maintenance_print_arc_command): Constify.
5118 * valprint.c (set_print, show_print, set_print_raw)
5119 (show_print_raw): Constify.
5120 * maint.c (maintenance_command, maintenance_info_command)
5121 (maintenance_print_command, maintenance_set_cmd)
5122 (maintenance_show_cmd, set_per_command_cmd)
5123 (show_per_command_cmd, maintenance_check_command): Constify.
5124 * language.c (set_check, show_check): Constify.
5125 * typeprint.c (show_print_type, set_print_type): Constify.
5126 * go32-nat.c (go32_info_dos_command): Constify.
5127
fdf44873
TT
51282017-10-11 Tom Tromey <tom@tromey.com>
5129
5130 * breakpoint.c (prepare_re_set_context): Remove.
5131 (breakpoint_re_set_one): Update. Don't use cleanups.
5132 (breakpoint_re_set): Use scoped_restore, std::string, and
5133 scoped_restore_current_language.
5134
81b1e71c
TT
51352017-10-11 Tom Tromey <tom@tromey.com>
5136
5137 * breakpoint.c (commands_command_1): Use std::string.
5138 (cleanup_executing_breakpoints): Remove.
5139 (bpstat_do_actions_1): Use scoped_restore.
5140 (bpstat_check_watchpoint): Use std::string.
5141 (decode_static_tracepoint_spec): Likewise.
5142 (break_range_command): Likewise.
5143 (watch_command_1): Likewise.
5144 (compare_breakpoints): Change argument types.
5145 (clear_command): Use std::vector.
5146 (cleanup_executing_breakpoints): Remove.
5147 (update_global_location_list): Use unique_xmalloc_ptr.
5148 (strace_command): Remove unused declaration.
5149
4f9d9906
JB
51502017-10-11 John Baldwin <jhb@FreeBSD.org>
5151
5152 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5153 * NEWS: Mention new FreeBSD/arm native configuration.
5154 * configure.host: Add arm*-*-freebsd*.
5155 * configure.nat: Likewise.
5156 * arm-fbsd-nat.c: New file.
5157
7176dfd2
JB
51582017-10-11 John Baldwin <jhb@FreeBSD.org>
5159
5160 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5161 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5162 * NEWS: Mention new FreeBSD/arm target.
5163 * configure.tgt: Add arm*-*-freebsd*.
5164 * arm-fbsd-tdep.c: New file.
5165 * arm-fbsd-tdep.h: New file.
5166
fe220226
MR
51672017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5168
5169 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5170 `gdbarch_elfcore_write_linux_prpsinfo'.
5171 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5172 method.
5173 (elf_internal_linux_prpsinfo): Remove declaration.
5174 * gdbarch.h: Regenerate.
5175 * gdbarch.c: Regenerate.
5176
a2f63b2e
MR
51772017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5178
5179 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5180 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5181
458ca1d0
PA
51822017-10-11 Pedro Alves <palves@redhat.com>
5183
5184 * breakpoint.c (reattach_breakpoints): Delete.
5185 * breakpoint.h (reattach_breakpoints): Delete.
5186
905014d7
SM
51872017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5188
5189 * symfile.c (registered_sym_fns): Make struct, not typedef.
5190 (DEF_VEC_O (registered_sym_fns)): Remove.
5191 (symtab_fns): Change type to std::vector.
5192 (add_symtab_fns): Adjust.
5193 (find_sym_fns): Adjust.
5194
56d704da
AK
51952017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5196
5197 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5198 * arc-tdep.h (arc_arch_is_em): New function.
5199 (arc_arch_is_hs): Likewise.
5200
7fa29be9
EB
52012017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5202
5203 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5204 parentheses in the declaration.
5205 (macro_lookup_inclusion): Likewise.
5206 (macro_lookup_definition): Likewise.
5207 * p-lang.h (pascal_builtin_types): Likewise.
5208 * tui/tui-data.c (tui_win_list): Likewise.
5209 * tui/tui-data.h (tui_win_list): Likewise.
5210 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5211
d9b477e3
KB
52122017-10-11 Mark Rages <markrages@gmail.com>
5213
5214 * target-memory.c (block_boundaries): Fix for block address not
5215 aligned on block size.
5216
65630365
PA
52172017-10-10 Pedro Alves <palves@redhat.com>
5218 Tom Tromey <tom@tromey.com>
5219
5220 * breakpoint.c (struct captured_breakpoint_query_args)
5221 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5222 (print_breakpoint): New.
5223 * breakpoint.h (print_breakpoint): Declare.
5224 * common/common-exceptions.h (enum return_reason): Remove
5225 references to catch_exceptions.
5226 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5227 Delete.
5228 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5229 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5230 * gdb.h: Delete.
5231 * gdbthread.h (thread_select): Declare.
5232 * mi/mi-cmd-break.c: Don't include gdb.h.
5233 (breakpoint_notify): Use print_breakpoint.
5234 * mi/mi-cmd-catch.c: Don't include gdb.h.
5235 * mi/mi-interp.c: Don't include gdb.h.
5236 (mi_print_breakpoint_for_event): New.
5237 (mi_breakpoint_created, mi_breakpoint_modified): Use
5238 mi_print_breakpoint_for_event.
5239 * mi/mi-main.c: Don't include gdb.h.
5240 (mi_cmd_thread_select): Parse the global thread ID here. Use
5241 thread_select instead of gdb_thread_select.
5242 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5243 of using gdb_list_thread_ids.
5244 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5245 FILEIO_ENOSYS here.
5246 (remote_fileio_request): Use TRY/CATCH instead of
5247 catch_exceptions.
5248 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5249 (symbol_file_add_from_memory_wrapper): Delete.
5250 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5251 * thread.c: Don't include gdb.h.
5252 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5253 (thread_alive): Use thread_select.
5254 (do_captured_thread_select): Delete, parts salvaged as ...
5255 (thread_select): ... this new function.
5256 (gdb_thread_select): Delete.
5257
bf469271
PA
52582017-10-10 Pedro Alves <palves@redhat.com>
5259 Tom Tromey <tom@tromey.com>
5260
5261 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5262 and reverse logic.
5263 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5264 No longer macros. Instead ...
5265 (enum wp_check_result): They're now values of this new
5266 enumeration.
5267 (watchpoint_check): Change return type to wp_check_result and
5268 parameter type to bpstat.
5269 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5270 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5271 catch_errors. Reverse logic of watchpoint_check call.
5272 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5273 pointer as parameter.
5274 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5275 * common/common-exceptions.c (throw_exception_sjlj): Update
5276 comments to avoid mentioning catch_errors.
5277 * exceptions.c (catch_errors): Delete.
5278 * exceptions.h: Update comments to avoid mentioning catch_errors.
5279 (catch_errors_ftype, catch_errors): Delete.
5280 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5281 (hook_stop_stub): Delete.
5282 (restore_selected_frame): Change return type to void, and
5283 parameter type to const frame_id &.
5284 (restore_infcall_control_state): Use TRY/CATCH instead of
5285 catch_errors.
5286 * main.c (captured_command_loop): Return void and remove
5287 parameter. Remove references to catch_errors.
5288 (captured_main): Use TRY/CATCH instead of catch_errors.
5289 * objc-lang.c (objc_submethod_helper_data)
5290 (find_objc_msgcall_submethod_helper): Delete.
5291 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5292 catch_errors.
5293 * record-full.c (record_full_message): Return void.
5294 (record_full_message_args, record_full_message_wrapper): Delete.
5295 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5296 instead of catch_errors.
5297 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5298 parameter type to int.
5299 * solib-darwin.c (open_symbol_file_object): Ditto.
5300 * solib-dsbt.c (open_symbol_file_object): Ditto.
5301 * solib-frv.c (open_symbol_file_object): Ditto.
5302 * solib-svr4.c (open_symbol_file_object): Ditto.
5303 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5304 * solib.c (update_solib_list): Use TRY/CATCH instead of
5305 catch_errors.
5306 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5307 Change type.
5308 * symmisc.c (struct print_symbol_args): Remove.
5309 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5310 (print_symbol): Change type.
5311 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5312 and remove parameters.
5313 (catch_errors): New.
5314 (get_windows_debug_event): Adjust.
5315
1a56bfa5
TT
53162017-10-09 Tom Tromey <tom@tromey.com>
5317
5318 * mi/mi-main.c (free_splay_tree): Remove.
5319 (list_available_thread_groups): Use splay_tree_up.
5320 * common/gdb_splay_tree.h: New file.
5321
0c478e2d
TT
53222017-10-09 Tom Tromey <tom@tromey.com>
5323
5324 * mi/mi-main.c (do_nothing): Remove.
5325 (list_available_thread_groups): Update.
5326
cbd2b4e3
PA
53272017-10-09 Pedro Alves <palves@redhat.com>
5328
5329 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5330 reading registers when switching context.
5331
a181c0bf
JB
53322017-10-09 John Baldwin <jhb@FreeBSD.org>
5333
5334 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5335 (fbsd_convert_siginfo): Likewise.
5336 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5337
6e66f753
SM
53382017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5339
5340 * configure.ac (try_guile_versions): Remove guile-2.2.
5341 * configure: Regenerate.
5342
890e9790
TT
53432017-10-09 Tom Tromey <tom@tromey.com>
5344
5345 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5346 (COMPILE.pre): Use $(CXX).
5347
109483d9
PA
53482017-10-09 Pedro Alves <palves@redhat.com>
5349
5350 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5351 Use bool.
5352 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5353 * cp-support.h (cp_remove_params): Now returns a
5354 gdb::unique_xmalloc_ptr.
5355 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5356 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5357 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5358 returning a gdb::unique_xmalloc_ptr.
5359 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5360 * stack.c (find_frame_funname): Adjust to cp_remove_params
5361 returning a gdb::unique_xmalloc_ptr.
5362
791afaa2
TT
53632017-10-08 Tom Tromey <tom@tromey.com>
5364
5365 * dwarf2read.c (dwarf2_get_dwz_file): Use
5366 gdb::unique_xmalloc_ptr.
5367 (find_slot_in_mapped_hash): Likewise.
5368 (dwarf2_physname): Likewise.
5369 (create_dwo_unit_in_dwp_v1): Use std::string.
5370 (create_dwo_unit_in_dwp_v2): Likewise.
5371 (lookup_dwo_cutu): Likewise.
5372 (inherit_abstract_dies): Use std::vector.
5373 (read_array_type): Likewise.
5374 (dwarf_decode_macros): Remove unused declaration.
5375 (unsigned_int_compar): Remove.
5376 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5377 (psymtabs_addrmap_cleanup): Remove.
5378
30a9c02f
TT
53792017-10-08 Tom Tromey <tom@tromey.com>
5380
5381 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5382 * frame.h (frame_cleanup_after_sniffer): Declare.
5383 (frame_prepare_for_sniffer): Return void.
5384 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5385 type of argument.
5386 (frame_prepare_for_sniffer): Return void.
5387
757325a3
TT
53882017-10-08 Tom Tromey <tom@tromey.com>
5389
5390 * utils.h (make_cleanup_value_free): Remove.
5391 * utils.c (do_value_free, struct cleanup): Remove.
5392 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5393 Use gdb_value_up.
5394 * value.h (struct value_deleter): New.
5395 (gdb_value_up): New typedef.
5396
b9c04fb2
TT
53972017-10-08 Tom Tromey <tom@tromey.com>
5398
5399 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5400 (make_cleanup_free_search_symbols): Remove.
5401 (search_symbols): Return std::vector.
5402 (symbol_search::compare_search_syms): Now member of
5403 symbol_search. Change arguments.
5404 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5405 (symtab_symbol_info, rbreak_command): Update.
5406 * symtab.h (struct symbol_search) <next>: Remove.
5407 Add constructors.
5408 (symbol_search::operator<): New function.
5409 (symbol_search::operator==): New function.
5410 (search_symbols): Remove std::vector.
5411 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5412 (symbol_search::compare_search_syms): Declare.
5413
0d28b0a5
YQ
54142017-10-06 Yao Qi <yao.qi@linaro.org>
5415
5416 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5417 arch/aarch64-insn.o.
5418 Remove one rule.
5419 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5420
71917808
YQ
54212017-10-06 Yao Qi <yao.qi@linaro.org>
5422
5423 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5424 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5425 arch/arm-linux.o respectively.
5426 * configure.tgt: Likewise.
5427
2081b2b2
YQ
54282017-10-06 Yao Qi <yao.qi@linaro.org>
5429
5430 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5431 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5432
a1b85d28
PA
54332017-10-06 Pedro Alves <palves@redhat.com>
5434
5435 * windows-nat.c: Include <algorithm>.
5436
d97987e2
YQ
54372017-10-06 Yao Qi <yao.qi@linaro.org>
5438
5439 * configure.tgt (i386_tobjs): New variable.
5440 (amd64_tobjs): New variable.
5441 Set $cpu_obs and $os_obs.
5442
f38307f5
YQ
54432017-10-06 Yao Qi <yao.qi@linaro.org>
5444
5445 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5446 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5447 (clean): Remove object files and dependency files.
5448 (distclean): Remove the directory.
5449 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5450 * configure: Re-generated.
5451 * configure.tgt: Replace amd64.o with arch/amd64.o.
5452
2f924de6
JM
54532017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5454
5455 PR build/22188
5456 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5457 and SETEND.
5458
2fd9d7ca
PA
54592017-10-05 Pedro Alves <palves@redhat.com>
5460
5461 * linux-nat.c (linux_child_follow_fork): When following the parent
5462 and detaching the child, consult the parent thread's architecture
5463 instead of the child's.
5464
d13b8493
UW
54652017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5466
5467 * ax.h: Do not include "doublest.h".
5468 (union agent_val): Remove.
5469
3b4b2f16
UW
54702017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5471
5472 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5473 (decimal_to_string): Return std::string object.
5474 (decimal_from_string): Accept std::string object. Return bool.
5475 (decimal_from_integral, decimal_from_doublest): Remove.
5476 (decimal_from_longest): Add prototype.
5477 (decimal_from_ulongest): Likewise.
5478 (decimal_to_longest): Likewise.
5479 (decimal_from_doublest): Likewise.
5480 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5481 (MAX_DECIMAL_STRING): Move here.
5482 (decimal_to_string): Return std::string object.
5483 (decimal_from_string): Accept std::string object. Return bool.
5484 (decimal_from_integral): Remove, replace by ...
5485 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5486 (decimal_to_longest): New function.
5487 (decimal_from_floating): Remove, replace by ...
5488 (decimal_from_doublest): ... this new function.
5489 (decimal_to_doublest): Update to new decimal_to_string interface.
5490
5491 * value.c (unpack_long): Use decimal_to_longest.
5492 * valops.c (value_cast): Use decimal_from_doublest instead of
5493 decimal_from_floating. Use decimal_from_[u]longest isntead of
5494 decimal_from_integral.
5495 * valarith.c (value_args_as_decimal): Likewise.
5496 * valprint.c (print_decimal_floating): Update to new
5497 decimal_to_string interface.
5498 * printcmd.c (printf_decfloat): Likewise.
5499 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5500
1841ee5d
UW
55012017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5502
5503 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5504 * gdbtypes.c: Include "floatformat.h".
5505 * value.c: Likewise.
5506 * m68k-tdep.c: Likewise.
5507
5508 * findvar.c: Do not include "floatformat.h".
5509 * amd64-darwin-tdep.c: Likewise.
5510 * arm-linux-tdep.c: Likewise.
5511 * i386-darwin-tdep.c: Likewise.
5512 * i387-tdep.c: Likewise.
5513 * m68k-linux-tdep.c: Likewise.
5514 * mep-tdep.c: Likewise.
5515 * mips-tdep.c: Likewise.
5516 * nios2-tdep.c: Likewise.
5517 * s390-linux-tdep.c: Likewise.
5518 * sparc-obsd-tdep.c: Likewise.
5519 * sparc-tdep.c: Likewise.
5520 * sparc64-tdep.c: Likewise.
5521 * spu-tdep.c: Likewise.
5522 * tic6x-tdep.c: Likewise.
5523 * tilegx-tdep.c: Likewise.
5524 * vax-tdep.c: Likewise.
5525 * xstormy16-tdep.c: Likewise.
5526 * xtensa-tdep.c: Likewise.
5527
5528 * top.c: Do not include "doublest.h".
5529 * aarch64-tdep.c: Likewise.
5530 * alpha-tdep.c: Likewise.
5531 * arm-linux-tdep.c: Likewise.
5532 * m68k-linux-tdep.c: Likewise.
5533 * tilegx-tdep.c: Likewise.
5534 * xstormy16-tdep.c: Likewise.
5535
a80a6471
JB
55362017-10-05 John Baldwin <jhb@FreeBSD.org>
5537
5538 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5539 (mipsn32_fbsd_sigframe): Define.
5540 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5541 for FreeBSD/mipsn32.
5542
12c4bd7f
JB
55432017-10-05 John Baldwin <jhb@FreeBSD.org>
5544
5545 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5546 AT_HWCAP.
5547
c91933e9
TG
55482017-10-05 Tristan Gingold <tgingold@free.fr>
5549
5550 * MAINTAINERS (Misc): Update my email address.
5551
5cd63fda
PA
55522017-10-04 Pedro Alves <palves@redhat.com>
5553
5554 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5555 it instead of target_gdbarch.
5556 (get_remote_state, get_remote_packet_size): Adjust
5557 get_remote_arch_state calls, passing down target_gdbarch
5558 explicitly.
5559 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5560 'gdbarch' and use it instead of target_gdbarch.
5561 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5562 passing down target_gdbarch explicitly.
5563 (struct stop_reply) <arch>: New field.
5564 (remote_parse_stop_reply): Use the stopped thread's architecture,
5565 not the current inferior's. Save the architecture in the
5566 stop_reply.
5567 (process_stop_reply): Use the stop reply's architecture.
5568 (process_g_packet, remote_fetch_registers)
5569 (remote_prepare_to_store, store_registers_using_G)
5570 (remote_store_registers): Adjust get_remote_arch_state calls,
5571 using the regcache's architecture.
5572 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5573 passing down target_gdbarch explicitly.
5574 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5575 beneath instead of calling target_gdbarch.
5576 * target.c (default_thread_architecture): Use the specified
5577 inferior's architecture, instead of the current inferior's
5578 architecture (via target_gdbarch).
5579
ed4227b7
PA
55802017-10-04 Pedro Alves <palves@redhat.com>
5581
5582 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5583 case.
5584 (regcache_print): Handle !target_has_registers here instead.
5585
55b11ddf
PA
55862017-10-04 Pedro Alves <palves@redhat.com>
5587
5588 * frame.c (create_test_frame): Delete.
5589 * frame.h (create_test_frame): Delete.
5590 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5591 (class regcache_test): Delete.
5592 (test_target_has_registers, test_target_has_stack)
5593 (test_target_has_memory, test_target_prepare_to_store)
5594 (test_target_store_registers): New functions.
5595 (test_target_ops): New class.
5596 (register_to_value_test): Error out if there's already a
5597 process_stratum (or higher) target pushed. Create a fuller mock
5598 environment, with mock target_ops, inferior, address space, thread
5599 and inferior_ptid.
5600 * progspace.c (struct address_space): Move to ...
5601 * progspace.h (struct address_space): ... here.
5602 * regcache.h (regcache::~regcache, regcache::raw_write)
5603 [GDB_SELF_TEST]: No longer virtual.
5604
4c71c105
SM
56052017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5606
5607 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5608
73dcd72d
PA
56092017-10-04 Pedro Alves <palves@redhat.com>
5610
5611 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5612 out of 'between TRY and CATCH'.
5613
44704526
PA
56142017-10-04 Pedro Alves <palves@redhat.com>
5615
5616 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5617 * common/common-exceptions.h (TRY): Open an outermost scope.
5618 Expand intro comment.
5619 (CATCH): Reindent.
5620 (END_CATCH): Close the outermost scope.
5621 * completer.c (complete_line_internal): Add missing END_CATCH.
5622
bc3b087d
SDJ
56232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5624
5625 * NEWS (Changes since GDB 8.0): Add entry about new
5626 'set-cwd-on-gdbserver' feature.
5627 (New remote packets): Add entry for QSetWorkingDir.
5628 * common/common-inferior.h (set_inferior_cwd): New prototype.
5629 * infcmd.c (set_inferior_cwd): Remove "static".
5630 (show_cwd_command): Expand text to include remote debugging.
5631 * remote.c: Add PACKET_QSetWorkingDir.
5632 (remote_protocol_features) <QSetWorkingDir>: New entry for
5633 PACKET_QSetWorkingDir.
5634 (extended_remote_set_inferior_cwd): New function.
5635 (extended_remote_create_inferior): Call
5636 "extended_remote_set_inferior_cwd".
5637 (_initialize_remote): Call "add_packet_config_cmd" for
5638 QSetWorkingDir.
5639
d092c5a2
SDJ
56402017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5641
5642 * NEWS (New commands): Mention "set/show cwd".
5643 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5644 "cd" command's help text.
5645 * common/common-inferior.h (get_inferior_cwd): New prototype.
5646 * infcmd.c (inferior_cwd_scratch): New global variable.
5647 (set_inferior_cwd): New function.
5648 (get_inferior_cwd): Likewise.
5649 (set_cwd_command): Likewise.
5650 (show_cwd_command): Likewise.
5651 (_initialize_infcmd): Add "set/show cwd" commands.
5652 * inferior.h (class inferior) <cwd>: New field.
5653 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5654 (fork_inferior): Change inferior's cwd before its execution.
5655 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5656 to CreateProcess.
5657
7da0a886
SDJ
56582017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5659
5660 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5661 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5662 (COMMON_OBS): Add gdb_tilde_expand.o.
5663 * common/gdb_tilde_expand.c: New file.
5664 * common/gdb_tilde_expand.h: Likewise.
5665
db8dd160
MR
56662017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5667
5668 * gdbarch.sh (objfile): Remove duplicate declaration.
5669 * gdbarch.h: Regenerate.
5670
f8bfbf22
TT
56712017-10-03 Tom Tromey <tom@tromey.com>
5672
5673 * utils.c (internal_vproblem): Use string_vprintf.
5674
5178ed48
TT
56752017-10-03 Tom Tromey <tom@tromey.com>
5676
5677 * printcmd.c (info_symbol_command): Use std::string.
5678
8cff8730
TT
56792017-10-03 Tom Tromey <tom@tromey.com>
5680
5681 * top.c (gdb_safe_append_history): Use std::string.
5682
895b8f30
TT
56832017-10-03 Tom Tromey <tom@tromey.com>
5684
5685 * event-top.c (stdin_event_handler): Update.
5686 * main.c (captured_main_1): Update.
5687 * top.h (make_delete_ui_cleanup): Remove.
5688 (struct ui): Add constructor and destructor.
5689 (new_ui, delete_ui): Remove.
5690 * top.c (make_delete_ui_cleanup): Remove.
5691 (new_ui_command): Use std::unique_ptr.
5692 (delete_ui_cleanup): Remove.
5693 (ui::ui): Rename from new_ui. Update.
5694 (free_ui): Remove.
5695 (ui::~ui): Rename from delete_ui. Update.
5696
0efef640
TT
56972017-10-03 Tom Tromey <tom@tromey.com>
5698
5699 * symfile.c (load_progress): Use gdb::byte_vector.
5700
245ad7d3
TT
57012017-10-03 Tom Tromey <tom@tromey.com>
5702
5703 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5704 declaration.
5705 * printcmd.c (x_command): Remove unused declaration.
5706 * symfile.c (symbol_file_command): Remove unused declaration.
5707
e05550d7
TT
57082017-10-03 Tom Tromey <tom@tromey.com>
5709
5710 * utils.c (internal_vproblem): Use std::string.
5711 (defaulted_query): Likewise.
5712
b95de2b7
TT
57132017-10-03 Tom Tromey <tom@tromey.com>
5714
5715 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5716 * top.c (execute_command_to_string): Update.
5717 * utils.c (make_cleanup_restore_page_info): Remove.
5718 (do_restore_page_info_cleanup): Remove.
5719 (set_batch_flag_and_restore_page_info):
5720 New.
5721 (make_cleanup_restore_page_info): Remove.
5722 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5723 (~set_batch_flag_and_restore_page_info): New
5724 (make_cleanup_restore_uinteger): Remove.
5725 (make_cleanup_restore_integer): Remove.
5726 (struct restore_integer_closure): Remove.
5727 (restore_integer): Remove.
5728 * utils.h (struct set_batch_flag_and_restore_page_info): New
5729 class.
5730 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5731 (make_cleanup_restore_page_info): Remove.
5732 (make_cleanup_restore_uinteger) Remove.
5733 (make_cleanup_restore_integer) Remove.
5734
07036511
TT
57352017-10-03 Tom Tromey <tom@tromey.com>
5736
5737 * record-full.h (record_full_gdb_operation_disable_set): Return
5738 scoped_restore_tmpl<int>.
5739 * infrun.c (adjust_pc_after_break): Update.
5740 (handle_signal_stop): Update.
5741 * record-full.c (record_full_gdb_operation_disable_set): Return
5742 scoped_restore_tmpl<int>.
5743 (record_full_wait_1, record_full_insert_breakpoint)
5744 (record_full_remove_breakpoint, record_full_save)
5745 (record_full_goto_insn): Update.
5746
45320ffa
TT
57472017-10-02 Tom Tromey <tom@tromey.com>
5748
5749 PR rust/22236:
5750 * rust-lang.c (rust_val_print_str): New function.
5751 (val_print_struct): Call it.
5752 (rust_subscript): Preserve name of slice type.
5753
b3e3859b
TT
57542017-10-02 Tom Tromey <tom@tromey.com>
5755
5756 * rust-lang.c (rust_subscript): Handle slices in
5757 EVAL_AVOID_SIDE_EFFECTS case.
5758
01af5e0d
TT
57592017-10-02 Tom Tromey <tom@tromey.com>
5760
5761 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5762
888e3ddb
TT
57632017-10-02 Tom Tromey <tom@tromey.com>
5764
5765 * rust-lang.h (rust_slice_type): Add "extern".
5766
cc536b21
PA
57672017-10-02 Tom Tromey <tom@tromey.com>
5768 Pedro Alves <palves@redhat.com>
5769
5770 * ada-lang.h (ada_exc_info::operator<): Make const.
5771 (ada_exc_info::operator==): Make const.
5772 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5773 Make const.
5774
386c8614
TT
57752017-09-29 Tom Tromey <tom@tromey.com>
5776
5777 * target.c (read_whatever_is_readable): Change type of "result".
5778 Update.
5779 (free_memory_read_result_vector): Remove.
5780 (read_memory_robust): Change return type. Update.
5781 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5782 bin2hex, std::string.
5783 * target.h (memory_read_result_s): Remove typedef.
5784 (free_memory_read_result_vector): Remove.
5785 (read_memory_robust): Return std::vector.
5786
789c4b5e
TT
57872017-09-29 Tom Tromey <tom@tromey.com>
5788
5789 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5790
ab816a27
TT
57912017-09-29 Tom Tromey <tom@tromey.com>
5792
5793 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5794 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5795 operator< and operator==.
5796 (ada_exceptions_list): Return a std::vector.
5797 * ada-lang.c (ada_exc_info::operator<): Rename from
5798 compare_ada_exception_info.
5799 (ada_exc_info::operator==): New.
5800 (sort_remove_dups_ada_exceptions_list): Change type of
5801 "exceptions".
5802 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5803 (ada_add_global_exceptions): Likewise.
5804 (ada_exceptions_list_1): Return a std::vector.
5805 (ada_exceptions_list): Likewise.
5806
52f9abe4
TT
58072017-09-29 Tom Tromey <tom@tromey.com>
5808
5809 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5810 'std::set *'.
5811 (print_one_inferior): Update.
5812 (free_vector_of_ints): Remove.
5813 (list_available_thread_groups): Change "ids" to std::set.
5814 (mi_cmd_list_thread_groups): Update.
5815 (struct collect_cores_data) <core>: Now a std::set.
5816 (collect_cores): Update.
5817 (unique): Remove.
5818 (print_one_inferior): Update.
5819
dcd5ddcc
TT
58202017-09-29 Tom Tromey <tom@tromey.com>
5821
5822 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5823 (mi_execute_async_cli_command): Likewise.
5824 (mi_cmd_trace_frame_collected): Use field_fmt.
5825
45d288cc
TT
58262017-09-29 Tom Tromey <tom@tromey.com>
5827
5828 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5829 gdb::byte_vector.
5830
6afe2f4a
TT
58312017-09-29 Tom Tromey <tom@tromey.com>
5832
5833 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5834
9813429a
TT
58352017-09-29 Tom Tromey <tom@tromey.com>
5836
5837 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5838
2d6960b4
TT
58392017-09-29 Tom Tromey <tom@tromey.com>
5840
5841 * varobj.h (varobj_gen_name): Return std::string.
5842 * varobj.c (varobj_gen_name): Return std::string.
5843 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5844 (mi_cmd_var_delete): Don't copy "name".
5845
784c453a
TT
58462017-09-29 Tom Tromey <tom@tromey.com>
5847
5848 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5849 (mi_cmd_break_insert_1): Update.
5850
a9bc57b9
TT
58512017-09-29 Tom Tromey <tom@tromey.com>
5852
5853 * target.h (make_scoped_defer_target_commit_resume): Update.
5854 * target.c (make_scoped_defer_target_commit_resume): Rename from
5855 make_cleanup_defer_target_commit_resume. Return a
5856 scoped_restore.
5857 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5858
9754d8c4
TT
58592017-09-29 Tom Tromey <tom@tromey.com>
5860
5861 * main.c (captured_main_1): Remove unused declaration.
5862 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5863
99ef965c
TT
58642017-09-29 Tom Tromey <tom@tromey.com>
5865
5866 * symtab.c (search_symbols): Remove unused outer cleanup.
5867 (make_source_files_completion_list): Remove unused declaration.
5868
42518ba7
TT
58692017-09-29 Tom Tromey <tom@tromey.com>
5870
5871 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5872
726b2169
TT
58732017-09-29 Tom Tromey <tom@tromey.com>
5874
5875 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5876 gdb::byte_vector.
5877
55b06432
TT
58782017-09-29 Tom Tromey <tom@tromey.com>
5879
5880 * complaints.c (vcomplaint): Use std::string.
5881
8abcee91
TT
58822017-09-29 Tom Tromey <tom@tromey.com>
5883
5884 * tracepoint.c (trace_variable_command): Use std::string.
5885 (encode_actions_1): Remove unused declarations.
5886 (create_tsv_from_upload): Use std::string.
5887
6ad94bc7
TT
58882017-09-29 Tom Tromey <tom@tromey.com>
5889
5890 * cp-support.c (gdb_demangle): Use std::string.
5891
2003f3d8
TT
58922017-09-29 Tom Tromey <tom@tromey.com>
5893
5894 * stack.c (parse_frame_specification): Use std::string
5895 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5896
8f8accb5
TT
58972017-09-29 Tom Tromey <tom@tromey.com>
5898
5899 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5900
200aa7b1
TT
59012017-09-29 Tom Tromey <tom@tromey.com>
5902
5903 * utils.c (vfprintf_maybe_filtered): Use std::string.
5904 (vfprintf_unfiltered): Likewise.
5905
606aae8a
TT
59062017-09-29 Tom Tromey <tom@tromey.com>
5907
5908 * event-top.c (top_level_prompt): Return std::string.
5909 (display_gdb_prompt): Update.
5910
bd413795
TT
59112017-09-29 Tom Tromey <tom@tromey.com>
5912
5913 * unittests/common-utils-selftests.c (format): New function.
5914 (string_vprintf_tests): New function.
5915 (_initialize_common_utils_selftests): Register new tests.
5916 * common/common-utils.c (string_vprintf): New function.
5917 * common/common-utils.h (string_vprintf): Declare.
5918
256642e8
PA
59192017-09-29 Pedro Alves <palves@redhat.com>
5920
5921 * common/rsp-low.c (unpack_varlen_hex): Constify.
5922 * common/rsp-low.h (unpack_varlen_hex): Constify.
5923 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5924 Constify.
5925 * remote.c (remote_set_permissions, read_ptid)
5926 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5927 (remote_static_tracepoint_marker_at)
5928 (remote_static_tracepoint_markers_by_strid)
5929 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5930 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5931 (parse_tracepoint_definition, parse_tsv_definition)
5932 (parse_static_tracepoint_marker_definition): Constify.
5933 * tracepoint.h (parse_static_tracepoint_marker_definition)
5934 (parse_trace_status, parse_tracepoint_status)
5935 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5936
b6bb3468
PA
59372017-09-29 Pedro Alves <palves@redhat.com>
5938
5939 * remote.c (target_buf, target_buf_size): Delete.
5940 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5941 Use the connection's packet buffer instead.
5942 All callers adjusted.
5943 (_initialize_remote): Remove references to target_buf and
5944 target_buf_size.
5945
b2f8eb7a
PA
59462017-09-28 Pedro Alves <palves@redhat.com>
5947
5948 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5949 unittests/common-utils-selftests.c.
5950 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5951 (COMMON_OBS): Remove utils-selftests.o.
5952 * utils-selftests.c: Move to ...
5953 * unittests/common-utils-selftests.c: ... here and rename self
5954 test to "string_printf".
5955
08302ed2
DE
59562017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5957
5958 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5959 having NULL cus or tus.
5960
96a5a1d3
UW
59612017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5962
5963 * arm-tdep.c: (convert_from_extended): Remove.
5964 (convert_to_extended): Likewise.
5965 (arm_extract_return_value): Use convert_typed_floating.
5966 (arm_store_return_value): Likewise.
5967
5968 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5969 * sh-tdep.c: Do not include "floatformat.h".
5970 (sh_littlebyte_bigword_type): New function.
5971 (sh_register_convert_to_virtual): Use convert_typed_floating.
5972 (sh_register_convert_to_raw): Likewise.
5973 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5974 (sh64_littlebyte_bigword_type): New function.
5975 (sh64_extract_return_value): Use convert_typed_floating.
5976 (sh64_register_convert_to_virtual): Likewise.
5977 (sh64_register_convert_to_raw): Likewise.
5978
0db7851f
UW
59792017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5980
5981 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5982 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5983
5984 * gdbtypes.h (union type_specific): Make field floatformat hold
5985 just a single struct floatformat, not an array.
5986 (floatformat_from_type): Move here.
5987 * gdbtypes.c (floatformat_from_type): Move here. Update to
5988 changed TYPE_FLOATFORMAT definition.
5989 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5990 (recursive_dump_type): Likewise.
5991 (init_float_type): Install correct floatformat for byte order.
5992 (arch_float_type): Likewise.
5993
77b7c781
UW
59942017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5995
5996 * gdbtypes.c (init_type): Change incoming argument from
5997 length-in-bytes to length-in-bits. Assert length is a
5998 multiple of TARGET_CHAR_BITS.
5999 (arch_type, arch_flags_type): Likewise.
6000 (init_integer_type): Update call to init_type.
6001 (init_character_type): Likewise.
6002 (init_boolean_type): Likewise.
6003 (init_float_type): Likewise.
6004 (init_decfloat_type): Likewise.
6005 (init_complex_type): Likewise.
6006 (init_pointer_type): Likewise.
6007 (objfile_type): Likewise.
6008 (arch_integer_type): Update call to arch_type.
6009 (arch_character_type): Likewise.
6010 (arch_boolean_type): Likewise.
6011 (arch_float_type): Likewise.
6012 (arch_decfloat_type): Likewise.
6013 (arch_complex_type): Likewise.
6014 (arch_pointer_type): Likewise.
6015 (gdbtypes_post_init): Likewise.
6016
6017 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6018 (read_base_type): Likewise.
6019 * mdebugread.c (basic_type): Likewise.
6020 * stabsread.c (dbx_init_float_type): Likewise.
6021 (rs6000_builtin_type): Likewise.
6022 (read_range_type): Likewise. Also, fix call to init_integer_type
6023 with erroneous length argument.
6024
6025 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6026 * d-lang.c (build_d_types): Likewise.
6027 * f-lang.c (build_fortran_types): Likewise.
6028 * go-lang.c (build_go_types): Likewise.
6029 * opencl-lang.c (build_opencl_types): Likewise.
6030 * jit.c (finalize_symtab): Likewise.
6031 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6032 (build_std_type_info_type): Likewise.
6033 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6034 update call to arch_flags_type.
6035
6036 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6037 arch_type.
6038 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6039 * windows-tdep.c (windows_get_tlb_type): Likewise.
6040
6041 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6042 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6043 * m32c-tdep.c (make_types): Likewise.
6044 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6045 (rl78_psw_type): Update call to arch_flags_type.
6046 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6047 * rx-tdep.c (rx_psw_type): Likewise.
6048 (rx_fpsw_type): Likewise.
6049 * sparc-tdep.c (sparc_psr_type): Likewise.
6050 (sparc_fsr_type): Likewise.
6051 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6052 (sparc64_ccr_type): Likewise.
6053 (sparc64_fsr_type): Likewise.
6054 (sparc64_fprs_type): Likewise.
6055
f21b4d5c
TT
60562017-09-27 Tom Tromey <tom@tromey.com>
6057
6058 * findcmd.c (find_command): Constify.
6059
643c2ffa
TT
60602017-09-27 Tom Tromey <tom@tromey.com>
6061
6062 * ada-tasks.c (task_command_1, task_command): Constify.
6063
510e5e56
TT
60642017-09-27 Tom Tromey <tom@tromey.com>
6065
6066 * symtab.c (maintenance_print_symbol_cache)
6067 (maintenance_flush_symbol_cache)
6068 (maintenance_print_symbol_cache_statistics): Constify.
6069
e503b191
TT
60702017-09-27 Tom Tromey <tom@tromey.com>
6071
6072 * inferior.c (detach_inferior_command, kill_inferior_command)
6073 (inferior_command): Constify.
6074
4e001312
TT
60752017-09-27 Tom Tromey <tom@tromey.com>
6076
6077 * regcache.c (regcache_print, maintenance_print_registers)
6078 (maintenance_print_raw_registers)
6079 (maintenance_print_cooked_registers)
6080 (maintenance_print_register_groups)
6081 (maintenance_print_remote_registers): Constify.
6082
77763700
TT
60832017-09-27 Tom Tromey <tom@tromey.com>
6084
6085 * printcmd.c (map_display_numbers, undisplay_command)
6086 (enable_disable_display_command, enable_display_command)
6087 (disable_display_command): Constify.
6088
4495129a
TT
60892017-09-27 Tom Tromey <tom@tromey.com>
6090
6091 * breakpoint.h (delete_command): Don't declare.
6092 * breakpoint.c (delete_command, enable_once_command)
6093 (enable_count_command, enable_delete_command, breakpoint_1)
6094 (maintenance_info_breakpoints, stopin_command, stopat_command)
6095 (delete_command, delete_trace_command, save_breakpoints)
6096 (save_breakpoints_command, save_tracepoints_command): Constify.
6097
3088cf40
TT
60982017-09-27 Tom Tromey <tom@tromey.com>
6099
6100 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6101 (skip_ws, extract_identifier, macro_define_command)
6102 (macro_undef_command, macro_list_command): Constify.
6103
69f476a3
TT
61042017-09-27 Tom Tromey <tom@tromey.com>
6105
6106 * infcmd.c (environment_info, set_environment_command)
6107 (unset_environment_command, path_info, info_proc_cmd_1)
6108 (info_proc_cmd_mappings, info_proc_cmd_stat)
6109 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6110 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6111
c4a3e68e
TT
61122017-09-27 Tom Tromey <tom@tromey.com>
6113
6114 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6115 Constify.
6116
c9d31bd6
TT
61172017-09-27 Tom Tromey <tom@tromey.com>
6118
6119 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6120
1f3f85eb
TT
61212017-09-27 Tom Tromey <tom@tromey.com>
6122
6123 * demangle.c (demangle_command): Constify.
6124
9c504b5d
TT
61252017-09-27 Tom Tromey <tom@tromey.com>
6126
6127 * progspace.c (maintenance_info_program_spaces_command):
6128 Constify.
6129
6663cf91
TT
61302017-09-27 Tom Tromey <tom@tromey.com>
6131
6132 * compile/compile.c (check_raw_argument, compile_file_command)
6133 (compile_code_command, compile_print_command): Constify.
6134
34e5fa26
TT
61352017-09-27 Tom Tromey <tom@tromey.com>
6136
6137 * reggroups.c (maintenance_print_reggroups): Constify.
6138
8384c356
TT
61392017-09-27 Tom Tromey <tom@tromey.com>
6140
6141 * dwarf2read.c (save_gdb_index_command): Constify.
6142
884beb0c
TT
61432017-09-27 Tom Tromey <tom@tromey.com>
6144
6145 * stap-probe.c (info_probes_stap_command): Constify.
6146
e0b2930c
TT
61472017-09-27 Tom Tromey <tom@tromey.com>
6148
6149 * fork-child.c (unset_exec_wrapper_command): Constify.
6150
f938677d
TT
61512017-09-27 Tom Tromey <tom@tromey.com>
6152
6153 * btrace.c (get_uint, get_context_size, no_chunk)
6154 (maint_btrace_packet_history_cmd)
6155 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6156 (maint_info_btrace_cmd): Constify.
6157
8949cb87
TT
61582017-09-27 Tom Tromey <tom@tromey.com>
6159
6160 * reverse.c (delete_bookmark_command): Constify.
6161
ac88e2de
TT
61622017-09-27 Tom Tromey <tom@tromey.com>
6163
6164 * remote.c (set_memory_packet_size)
6165 (set_memory_write_packet_size, show_memory_write_packet_size)
6166 (set_memory_read_packet_size, show_memory_read_packet_size)
6167 (compare_sections_command, packet_command, remote_put_command)
6168 (remote_get_command, remote_delete_command): Constify.
6169
bd4c9dfe
TT
61702017-09-27 Tom Tromey <tom@tromey.com>
6171
6172 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6173 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6174 (set_mipsfpu_auto_command): Constify.
6175
5e93d4c6
TT
61762017-09-27 Tom Tromey <tom@tromey.com>
6177
6178 * cli/cli-cmds.h (cd_command): Constify.
6179 * cli/cli-cmds.c (cd_command): Constify.
6180
fc41a75b
TT
61812017-09-27 Tom Tromey <tom@tromey.com>
6182
6183 * thread.c (thread_name_command, thread_find_command): Constify.
6184
67810076
TT
61852017-09-27 Tom Tromey <tom@tromey.com>
6186
6187 * probe.c (enable_probes_command, disable_probes_command):
6188 Constify.
6189
1d8b34a7
TT
61902017-09-27 Tom Tromey <tom@tromey.com>
6191
6192 * symfile.c (symbol_file_command): Constify.
6193 * gdbcore.h (deprecated_file_changed_hook): Constify.
6194 * exec.c (deprecated_file_changed_hook, exec_file_command)
6195 (file_command): Constify.
6196 * defs.h (symbol_file_command): Constify.
6197
442019e1
TT
61982017-09-27 Tom Tromey <tom@tromey.com>
6199
6200 * remote-fileio.c (set_system_call_allowed)
6201 (show_system_call_allowed): Constify.
6202
2983f7cb
TT
62032017-09-27 Tom Tromey <tom@tromey.com>
6204
6205 * tracepoint.c (delete_trace_variable_command)
6206 (tfind_end_command, tfind_start_command, tfind_pc_command)
6207 (tfind_tracepoint_command, tfind_line_command)
6208 (tfind_range_command, tfind_outside_command): Constify.
6209
4fd41b24
TT
62102017-09-27 Tom Tromey <tom@tromey.com>
6211
6212 * ax-gdb.c (maint_agent_printf_command, agent_command)
6213 (agent_eval_command): Constify.
6214
f2fc3015
TT
62152017-09-27 Tom Tromey <tom@tromey.com>
6216
6217 * tracepoint.c (info_scope_command): Constify.
6218 * python/python.c (gdbpy_decode_line): Constify.
6219 * python/py-breakpoint.c (bppy_init): Constify.
6220 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6221 * location.h: (new_linespec_location)
6222 (string_to_event_location_basic, string_to_event_location):
6223 Constify.
6224 * location.c (new_linespec_location)
6225 (string_to_event_location_basic, string_to_event_location):
6226 Constify.
6227 * linespec.h (decode_line_with_current_source)
6228 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6229 * linespec.c (linespec_lex_to_end)
6230 (decode_line_with_current_source)
6231 (decode_line_with_last_displayed): Constify.
6232 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6233 Constify.
6234 * cli/cli-cmds.c (edit_command, list_command): Constify.
6235 * breakpoint.h (until_break_command, watch_command_wrapper)
6236 (awatch_command_wrapper, rwatch_command_wrapper)
6237 (init_ada_exception_breakpoint): Constify.
6238 * breakpoint.c (break_command_1, dprintf_command)
6239 (break_range_command, watch_command_wrapper)
6240 (rwatch_command_wrapper, awatch_command_wrapper)
6241 (until_break_command, init_ada_exception_breakpoint)
6242 (strace_marker_create_sals_from_location, trace_command)
6243 (ftrace_command, strace_command, struct tracepoint): Constify.
6244 * ax-gdb.c (agent_command_1): Constify.
6245 * ada-lang.c (ada_exception_sal): Constify.
6246
8c2f95f4
TT
62472017-09-27 Tom Tromey <tom@tromey.com>
6248
6249 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6250 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6251 (get_context_size, no_chunk, get_insn_history_modifiers)
6252 (cmd_record_insn_history, get_call_history_modifiers)
6253 (cmd_record_call_history): Constify.
6254
a0d65762
TT
62552017-09-27 Tom Tromey <tom@tromey.com>
6256
6257 * source.c (show_substitute_path_command)
6258 (unset_substitute_path_command, set_substitute_path_command):
6259 Constify.
6260
58971144
TT
62612017-09-27 Tom Tromey <tom@tromey.com>
6262
6263 * typeprint.c (maintenance_print_type): Constify.
6264 * maint.c (maintenance_dump_me, maintenance_demangle)
6265 (maintenance_time_display, maintenance_info_sections)
6266 (maintenance_print_statistics, maintenance_deprecate)
6267 (maintenance_undeprecate): Constify.
6268 (maintenance_do_deprecate): Constify. Use std::string.
6269 (maintenance_selftest): Constify.
6270 * gdbtypes.h (maintenance_print_type): Constify.
6271
c482f52c
TT
62722017-09-27 Tom Tromey <tom@tromey.com>
6273
6274 * hppa-tdep.c (unwind_command): Constify.
6275
e100df1a
TT
62762017-09-27 Tom Tromey <tom@tromey.com>
6277
6278 * target-descriptions.c (unset_tdesc_filename_cmd)
6279 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6280 Constify.
6281
31d56ade
TT
62822017-09-27 Tom Tromey <tom@tromey.com>
6283
6284 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6285
b961da0b
TT
62862017-09-27 Tom Tromey <tom@tromey.com>
6287
6288 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6289
e2d8ae16
TT
62902017-09-27 Tom Tromey <tom@tromey.com>
6291
6292 * tui/tui-regs.c (tui_reg_command): Constify.
6293
863779b0
TT
62942017-09-27 Tom Tromey <tom@tromey.com>
6295
6296 * skip.c (skip_file_command, skip_function_command)
6297 (skip_enable_command, skip_disable_command, skip_delete_command):
6298 Constify.
6299
cdb34d4a
TT
63002017-09-27 Tom Tromey <tom@tromey.com>
6301
6302 * record-btrace.c (cmd_record_btrace_bts_start)
6303 (cmd_record_btrace_pt_start): Constify.
6304
e99c83e7
TT
63052017-09-27 Tom Tromey <tom@tromey.com>
6306
6307 * symmisc.c (maintenance_print_symbols)
6308 (maintenance_print_msymbols, maintenance_print_objfiles)
6309 (maintenance_info_symtabs, maintenance_check_symtabs)
6310 (maintenance_expand_symtabs, maintenance_info_line_tables):
6311 Constify.
6312
32faf971
TT
63132017-09-27 Tom Tromey <tom@tromey.com>
6314
6315 * top.c (new_ui_command): Constify.
6316
2cf311eb
TT
63172017-09-27 Tom Tromey <tom@tromey.com>
6318
6319 * symfile.c (add_symbol_file_command)
6320 (remove_symbol_file_command, list_overlays_command)
6321 (map_overlay_command, unmap_overlay_command)
6322 (overlay_auto_command, overlay_manual_command)
6323 (overlay_off_command, overlay_load_command): Constify.
6324
e6738699
TT
63252017-09-27 Tom Tromey <tom@tromey.com>
6326
6327 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6328 (info_spu_mailbox_command, info_spu_dma_command)
6329 (info_spu_proxydma_command): Constify.
6330
aa360cd5
TT
63312017-09-27 Tom Tromey <tom@tromey.com>
6332
6333 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6334
898241a5
TT
63352017-09-27 Tom Tromey <tom@tromey.com>
6336
6337 * cli/cli-script.c (user_defined_command): Constify.
6338
2d0ac106
TT
63392017-09-27 Tom Tromey <tom@tromey.com>
6340
6341 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6342 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6343 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6344 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6345 (dump_binary_value, append_binary_memory, append_binary_value):
6346 Constify.
6347 (struct dump_context) <func>: Constify.
6348 (add_dump_command): Update.
6349
dede02ce
TT
63502017-09-27 Tom Tromey <tom@tromey.com>
6351
6352 * cli/cli-cmds.c (show_version, show_configuration)
6353 (source_command, show_user): Constify.
6354
d3cb6b99
TT
63552017-09-27 Tom Tromey <tom@tromey.com>
6356
6357 * target.c (maintenance_print_target_stack): Constify.
6358
1970a12f
TT
63592017-09-27 Tom Tromey <tom@tromey.com>
6360
6361 * interps.c (interpreter_exec_cmd): Constify.
6362
41243651
TT
63632017-09-27 Tom Tromey <tom@tromey.com>
6364
6365 * record-full.c (cmd_record_full_restore): Constify.
6366
4465d9db
TT
63672017-09-27 Tom Tromey <tom@tromey.com>
6368
6369 * memattr.c (enable_mem_command, disable_mem_command)
6370 (delete_mem_command): Constify.
6371
ad25e423
TT
63722017-09-27 Tom Tromey <tom@tromey.com>
6373
6374 * value.c (show_convenience): Constify.
6375
d64097b1
TT
63762017-09-27 Tom Tromey <tom@tromey.com>
6377
6378 * gdbcore.h (core_file_command): Update.
6379 * corefile.c (core_file_command): Constify.
6380
4d4589ef
TT
63812017-09-27 Tom Tromey <tom@tromey.com>
6382
6383 * user-regs.c (maintenance_print_user_registers): Constify.
6384
32a7bf17
TT
63852017-09-27 Tom Tromey <tom@tromey.com>
6386
6387 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6388
4a475551
TT
63892017-09-27 Tom Tromey <tom@tromey.com>
6390
6391 * cp-support.c (first_component_command): Constify.
6392
990b9f9f
TT
63932017-09-27 Tom Tromey <tom@tromey.com>
6394
6395 * psymtab.c (maintenance_print_psymbols)
6396 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6397 Constify.
6398
c281872e
TT
63992017-09-27 Tom Tromey <tom@tromey.com>
6400
6401 * windows-tdep.c (display_tib): Constify.
6402
5b64bf74
TT
64032017-09-27 Tom Tromey <tom@tromey.com>
6404
6405 * linux-fork.c (delete_checkpoint_command)
6406 (detach_checkpoint_command): Constify.
6407
4ada038f
TT
64082017-09-27 Tom Tromey <tom@tromey.com>
6409
6410 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6411
57f5a81b
TT
64122017-09-27 Tom Tromey <tom@tromey.com>
6413
6414 * arc-tdep.c (dump_arc_instruction_command): Constify.
6415
b0a8e6c4
TT
64162017-09-27 Tom Tromey <tom@tromey.com>
6417
6418 * valprint.c (set_radix, show_radix): Constify.
6419
8d97dc1c
TT
64202017-09-27 Tom Tromey <tom@tromey.com>
6421
6422 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6423
eb7c454d
TT
64242017-09-27 Tom Tromey <tom@tromey.com>
6425
6426 * command.h (not_just_help_class_command): Update.
6427 * cli/cli-decode.h (not_just_help_class_command): Update.
6428 * cli/cli-decode.c (not_just_help_class_command): Constify.
6429
e4e33335
TT
64302017-09-27 Tom Tromey <tom@tromey.com>
6431
6432 * gdb_bfd.c (maintenance_info_bfds): Constify.
6433
0450cc4c
TT
64342017-09-27 Tom Tromey <tom@tromey.com>
6435
6436 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6437 overloads.
6438 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6439 (do_const_cfunc): New function.
6440 (cmd_cfunc_eq): New overload.
6441 (cli_user_command_p): Check do_const_cfunc.
6442 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6443 const_cfunc.
6444 * command.h (add_cmd): Add const overload and no-function
6445 overload.
6446 (set_cmd_cfunc): Add const overload.
6447 (cmd_const_cfunc_ftype): Declare.
6448 (cmd_cfunc_eq): Add const overload.
6449 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6450 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6451 overload.
6452
a9bbfbd8
TT
64532017-09-27 Tom Tromey <tom@tromey.com>
6454
6455 * macroexp.c (get_next_token_for_substitution): New function.
6456 (substitute_args): Call it. Check for __VA_OPT__.
6457
5230b05a
WT
64582017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6459 Pedro Alves <palves@redhat.com>
6460
6461 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6462 producer_is_icc_lt_14.
6463 (producer_is_icc_lt_14): New function.
6464 (check_producer): Add code for checking version of ICC.
6465 (producer_is_icc): Move to producer.c.
6466 (read_structure_type): Restrict ICC workaround to ICC<14.
6467 * producer.c: Include selftest.h.
6468 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6469 New functions.
6470 * producer.h (producer_is_icc): New declaration.
6471
b32b108a
WT
64722017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6473
6474 * Makefile.in (SFILES): Add producer.c.
6475 (COMMON_OBS): Add producer.o
6476 * amd64-tdep.c (producer.h): Add new include.
6477 * dwarf2read.c (producer.h): Add new include.
6478 * producer.c: New file.
6479 * producer.h: New file.
6480 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6481 producer.c.
6482 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6483 producer.h.
6484
5007d765
MK
64852017-09-26 Matthias Klose <doko@ubuntu.com>
6486
6487 * configure.ac: Search ncursesw before ncurses.
6488 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6489 * gdb_curses.h: Include <ncursesw/ncurses.h>
6490 * config.in, configure: Regenerate.
6491
281c4447
RO
64922017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6493
6494 PR gdb/22185
6495 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6496 obsolete.
6497 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6498 Remove i386sol2 support.
6499 * configure.nat <i386sol2>: Remove.
6500 <sol2-64>: Fold into ...
6501 <sol2>: ... this.
6502 Move common settings to default section.
6503 Add sol-thread.o.
6504 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6505 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6506 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6507 <i[34567]86-*-solaris*>: Remove.
6508 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6509
6510 * configure.ac: Remove wctype in libw check.
6511 (_MSE_INT_H): Don't define on Solaris 7-9.
6512 <solaris*>: Remove libthread_db.so.1 check.
6513 * configure: Regenerate.
6514 * config.in: Regenerate.
6515
6516 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6517 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6518 (gdb_ps_size_t): Remove.
6519 Use base types in users.
6520 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6521
6522 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6523
39b06c20
RO
65242017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6525
6526 PR build/22206
6527 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6528 (adi_is_addr_mapped): Likewise.
6529 (PSR_ICC): Don't redefine.
6530 (PSR_IMPL): Likewise.
6531
6c3e20f1
TT
65322017-09-25 Tom Tromey <tom@tromey.com>
6533
6534 * regcache.c (regcache::dump): Use string_printf.
6535
b292235f
TT
65362017-09-25 Tom Tromey <tom@tromey.com>
6537
6538 * regcache.c (class regcache_invalidator): New.
6539 (struct register_to_invalidate): Remove.
6540 (make_cleanup_regcache_invalidate): Remove.
6541 (regcache::raw_write): Use regcache_invalidator.
6542
9ac86b52
TT
65432017-09-25 Tom Tromey <tom@tromey.com>
6544
6545 * spu-tdep.c (spu2ppu_sniffer): Update.
6546 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6547 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6548 Remove.
6549 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6550 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6551 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6552 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6553 (frame_pop): Update.
6554
c0e383c6
TT
65552017-09-25 Tom Tromey <tom@tromey.com>
6556
6557 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6558 * regcache.h (regcache_xfree): Don't declare.
6559 * regcache.c (regcache_xfree): Remove.
6560 (do_regcache_xfree): Use delete.
6561 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6562 * linux-fork.c (free_fork): Use delete.
6563 (fork_save_infrun_state): Likewise.
6564 * jit.c (jit_dealloc_cache): Use delete.
6565 * infrun.c (discard_infcall_suspend_state): Use delete.
6566
791199cc
TT
65672017-09-25 Tom Tromey <tom@tromey.com>
6568
6569 * regcache.h (regcache_xmalloc): Don't declare.
6570 (regcache_raw_set_cached_value): Update comment.
6571 * regcache.c (regcache_xmalloc): Remove.
6572 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6573 * jit.c (jit_frame_sniffer): Use new.
6574 * frame.c (frame_save_as_regcache): Use new.
6575
289e23aa
AA
65762017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6577
6578 * NEWS: Advertise support for guarded-storage registers on IBM z.
6579
1b63490c
AA
65802017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6581
6582 * s390-linux-nat.c (have_regset_gs): New static variable.
6583 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6584 control block and guarded-storage broadcast control regsets.
6585 (s390_read_description): Detect whether the target has
6586 guarded-storage support, return appropriate tdesc.
6587 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6588 (features/s390x-gs-linux64.c): Likewise.
6589 (struct gdbarch_tdep) <have_gs>: New field.
6590 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6591 (s390_gsbc_regset): New variables.
6592 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6593 and s390_gsbc_regset, if applicable.
6594 (s390_core_read_description): Check whether core file was from a
6595 target with guarded-storage support; include appropriate regsets.
6596 (s390_gdbarch_init): Add registers for guarded-storage support.
6597 (_initialize_s390_tdep): Initialize new target descriptions that
6598 include registers for guarded-storage support.
6599 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6600 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6601 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6602 (S390_NUM_REGS): Adjust macro definition.
6603 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6604 (tdesc_s390x_gs_linux64): New declarations.
6605
96235dc1
AA
66062017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6607
6608 * features/s390-gs-linux64.xml: New file.
6609 * features/s390-gs.xml: New file.
6610 * features/s390-gsbc.xml: New file.
6611 * features/s390x-gs-linux64.xml: New file.
6612 * features/Makefile (WHICH): Add s390-gs-linux64 and
6613 s390x-gs-linux64.
6614 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6615 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6616 * features/s390-gs-linux64.c: New generated file.
6617 * features/s390x-gs-linux64.c: New file.
6618 * regformats/s390-gs-linux64.dat: New file.
6619 * regformats/s390x-gs-linux64.dat: New file.
6620
b4a7c699
TT
66212017-09-23 Tom Tromey <tom@tromey.com>
6622
6623 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6624
c2f97536
TT
66252017-09-22 Tom Tromey <tom@tromey.com>
6626
6627 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6628 type to scoped_restore_tmpl.
6629 <scoped_input_handler>: Initialize m_quit_handler directly.
6630
43573013
SDJ
66312017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6632
6633 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6634 (cd_command): Likewise. Free "current_directory" before
6635 assigning to it.
6636 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6637 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6638 * top.c (gdb_dirbuf): Remove global declaration.
6639 * top.h (gdb_dirbuf): Likewise.
6640
6ec2e0f5
SDJ
66412017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6642
6643 * gnulib/aclocal.m4: Regenerate.
6644 * gnulib/config.in: Regenerate.
6645 * gnulib/configure: Regenerate.
6646 * gnulib/import/Makefile.am: Regenerate.
6647 * gnulib/import/Makefile.in: Regenerate.
6648 * gnulib/import/assure.h: New file.
6649 * gnulib/import/at-func.c: Likewise
6650 * gnulib/import/chdir-long.c: New file.
6651 * gnulib/import/chdir-long.h: New file.
6652 * gnulib/import/cloexec.c: New file.
6653 * gnulib/import/cloexec.h: New file.
6654 * gnulib/import/close.c: New file.
6655 * gnulib/import/closedir.c: New file.
6656 * gnulib/import/dirent-private.h: New file.
6657 * gnulib/import/dup-safer.c: New file.
6658 * gnulib/import/dup.c: New file.
6659 * gnulib/import/dup2.c: New file.
6660 * gnulib/import/error.c: New file.
6661 * gnulib/import/error.h: New file.
6662 * gnulib/import/exitfail.c: New file.
6663 * gnulib/import/exitfail.h: New file.
6664 * gnulib/import/fchdir.c: New file.
6665 * gnulib/import/fcntl.c: New file.
6666 * gnulib/import/fcntl.in.h: New file.
6667 * gnulib/import/fd-hook.c: New file.
6668 * gnulib/import/fd-hook.h: New file.
6669 * gnulib/import/fd-safer.c: New file.
6670 * gnulib/import/fdopendir.c: New file.
6671 * gnulib/import/filename.h: New file.
6672 * gnulib/import/filenamecat-lgpl.c: New file.
6673 * gnulib/import/filenamecat.h: New file.
6674 * gnulib/import/fstat.c: New file.
6675 * gnulib/import/fstatat.c: New file.
6676 * gnulib/import/getcwd-lgpl.c: New file.
6677 * gnulib/import/getcwd.c: New file.
6678 * gnulib/import/getdtablesize.c: New file.
6679 * gnulib/import/getlogin_r.c: New file.
6680 * gnulib/import/getprogname.c: New file.
6681 * gnulib/import/getprogname.h: New file.
6682 * gnulib/import/gettext.h: New file.
6683 * gnulib/import/glob-libc.h: New file.
6684 * gnulib/import/glob.c: New file.
6685 * gnulib/import/glob.in.h: New file.
6686 * gnulib/import/intprops.h: New file.
6687 * gnulib/import/m4/chdir-long.m4: New file.
6688 * gnulib/import/m4/close.m4: New file.
6689 * gnulib/import/m4/closedir.m4: New file.
6690 * gnulib/import/m4/d-ino.m4: New file.
6691 * gnulib/import/m4/d-type.m4: New file.
6692 * gnulib/import/m4/dup.m4: New file.
6693 * gnulib/import/m4/dup2.m4: New file.
6694 * gnulib/import/m4/error.m4: New file.
6695 * gnulib/import/m4/fchdir.m4: New file.
6696 * gnulib/import/m4/fcntl.m4: New file.
6697 * gnulib/import/m4/fcntl_h.m4: New file.
6698 * gnulib/import/m4/fdopendir.m4: New file.
6699 * gnulib/import/m4/filenamecat.m4: New file.
6700 * gnulib/import/m4/fstat.m4: New file.
6701 * gnulib/import/m4/fstatat.m4: New file.
6702 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6703 * gnulib/import/m4/getcwd-path-max.m4: New file.
6704 * gnulib/import/m4/getcwd.m4: New file.
6705 * gnulib/import/m4/getdtablesize.m4: New file.
6706 * gnulib/import/m4/getlogin_r.m4: New file.
6707 * gnulib/import/m4/getprogname.m4: New file.
6708 * gnulib/import/m4/glob.m4: New file.
6709 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6710 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6711 * gnulib/import/m4/mempcpy.m4: New file.
6712 * gnulib/import/m4/memrchr.m4: New file.
6713 * gnulib/import/m4/mode_t.m4: New file.
6714 * gnulib/import/m4/msvc-inval.m4: New file.
6715 * gnulib/import/m4/msvc-nothrow.m4: New file.
6716 * gnulib/import/m4/open.m4: New file.
6717 * gnulib/import/m4/openat.m4: New file.
6718 * gnulib/import/m4/opendir.m4: New file.
6719 * gnulib/import/m4/readdir.m4: New file.
6720 * gnulib/import/m4/realloc.m4: New file.
6721 * gnulib/import/m4/rewinddir.m4: New file.
6722 * gnulib/import/m4/save-cwd.m4: New file.
6723 * gnulib/import/m4/strdup.m4: New file.
6724 * gnulib/import/m4/strerror.m4: New file.
6725 * gnulib/import/m4/unistd-safer.m4: New file.
6726 * gnulib/import/mempcpy.c: New file.
6727 * gnulib/import/memrchr.c: New file.
6728 * gnulib/import/msvc-inval.c: New file.
6729 * gnulib/import/msvc-inval.h: New file.
6730 * gnulib/import/msvc-nothrow.c: New file.
6731 * gnulib/import/msvc-nothrow.h: New file.
6732 * gnulib/import/open.c: New file.
6733 * gnulib/import/openat-die.c: New file.
6734 * gnulib/import/openat-priv.h: New file.
6735 * gnulib/import/openat-proc.c: New file.
6736 * gnulib/import/openat.c: New file.
6737 * gnulib/import/openat.h: New file.
6738 * gnulib/import/opendir.c: New file.
6739 * gnulib/import/pipe-safer.c: New file.
6740 * gnulib/import/readdir.c: New file.
6741 * gnulib/import/realloc.c: New file.
6742 * gnulib/import/rewinddir.c: New file.
6743 * gnulib/import/save-cwd.c: New file.
6744 * gnulib/import/save-cwd.h: New file.
6745 * gnulib/import/strdup.c: New file.
6746 * gnulib/import/strerror-override.c: New file.
6747 * gnulib/import/strerror-override.h: New file.
6748 * gnulib/import/strerror.c: New file.
6749 * gnulib/import/unistd--.h: New file.
6750 * gnulib/import/unistd-safer.h: New file.
6751 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6752 "getcwd" and "glob".
6753 * ser-tcp.c: Undefine "close" before redefining it.
6754
432ae719
SM
67552017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6756
6757 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6758 get rid of res_val.
6759
4fa7574e
RO
67602017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6761
6762 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6763 <sol2,sparc>: Likewise.
6764 <sol2-64,i386>: Likewise.
6765
6766 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6767 -Wdeprecated-declarations on *-*-solaris*.
6768 * configure: Regenerate.
6769
6770 * procfs.c: Include "nat/inferior.h".
6771 (procfs_info_proc): Fix typo.
6772
f6327dcb
KB
67732017-09-21 Kevin Buettner <kevinb@redhat.com>
6774
6775 * remote.c (vector): Include.
6776 (struct private_thread_info): Add field, thread_handle.
6777 (free_private_thread_info): Deallocate storage associated with
6778 thread handle.
6779 (get_private_info_thread): Initialize `thread_handle' field.
6780 (struct thread_item): Add field, thread_handle.
6781 (clear_threads_listing_context): Deallocate storage associated
6782 with thread handle.
6783 (start_thread): Add support for "handle" attribute.
6784 (thread_attributes): Add "handle".
6785 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6786 field.
6787 (remote_update_thread_list): Update thread_handle.
6788 (remote_thread_handle_to_thread_info): New function.
6789 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6790
fbbe5337
KB
67912017-09-21 Kevin Buettner <kevinb@redhat.com>
6792
6793 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6794 function.
6795 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6796 * python/python-internal.h (thread_object_type): Declare.
6797
e04ee09e
KB
67982017-09-21 Kevin Buettner <kevinb@redhat.com>
6799
6800 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6801 (target_thread_handle_to_thread_info): Declare.
6802 * target.c (target_thread_handle_to_thread_info): New function.
6803 * target-delegates.c: Regenerate.
6804 * gdbthread.h (find_thread_by_handle): Declare.
6805 * thread.c (find_thread_by_handle): New function.
6806 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6807 function.
6808 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6809
1e5b66ed
SM
68102017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6811
6812 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6813
ebe48ba0
SM
68142017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6815
6816 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6817
0a0bf5dc
YQ
68182017-09-21 Yao Qi <yao.qi@linaro.org>
6819
6820 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6821 to gdb_target_obs.
6822
d1b0a7bf
TT
68232017-09-20 Tom Tromey <tom@tromey.com>
6824
6825 * breakpoint.c (struct counted_command_line): Remove.
6826 (breakpoint_commands): Update.
6827 (alloc_counted_command_line, incref_counted_command_line)
6828 (decref_counted_command_line, do_cleanup_counted_command_line)
6829 (make_cleanup_decref_counted_command_line): Remove.
6830 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6831 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6832 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6833 (save_breakpoints): Update.
6834 * breakpoint.h (counted_command_line): Now a typedef to
6835 shared_ptr.
6836 (struct breakpoint) <commands>: Now a counted_command_line.
6837 (struct bpstats) <command>: Likewise.
6838
48649e1b
TT
68392017-09-20 Tom Tromey <tom@tromey.com>
6840
6841 * breakpoint.c (struct commands_info, do_map_commands_command):
6842 Remove.
6843 (commands_command_1): Update.
6844 (iterate_over_related_breakpoints): Take a function_view.
6845 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6846 (delete_command): Update.
6847 (map_breakpoint_numbers): Take a function_view.
6848 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6849 (disable_command): Update.
6850 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6851 (enable_command): Update.
6852 (struct disp_data, do_enable_breakpoint_disp)
6853 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6854 (do_map_enable_delete_breakpoint): Remove.
6855 (enable_once_command, enable_count_command, enable_delete_command)
6856 (delete_trace_variable_command): Update.
6857
04afa70c
TT
68582017-09-20 Tom Tromey <tom@tromey.com>
6859
6860 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6861 (bpstat_clear): Use delete.
6862 (bpstats): New constructors.
6863 (bpstat_copy, bpstat_stop_status): Use new.
6864 (dprintf_after_condition_true): Update.
6865 * breakpoint.h (bpstats::bpstats): Add constructors.
6866 (bpstats::~bpstats): Add destructor.
6867
c83833f4
PA
68682017-09-20 Pedro Alves <palves@redhat.com>
6869
6870 * eval.c (make_params): Delete, refactored as ...
6871 (class fake_method): ... this new type's ctor.
6872 (fake_method::~fake_method): New.
6873 (evaluate_subexp_standard): Use 'fake_method'.
6874
223ffa71
TT
68752017-09-20 Tom Tromey <tom@tromey.com>
6876
6877 * windows-nat.c (get_windows_debug_event, windows_wait)
6878 (do_initial_windows_stuff, windows_attach): Update.
6879 * utils.c (vwarning, internal_vproblem): Update.
6880 (ui_unregister_input_event_handler_cleanup)
6881 (prepare_to_handle_input): Remove.
6882 (class scoped_input_handler): New.
6883 (defaulted_query, prompt_for_continue): Update.
6884 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6885 Update.
6886 * top.c (undo_terminal_modifications_before_exit): Update.
6887 * target/target.h (target_terminal_init, target_terminal_inferior)
6888 (target_terminal_ours): Don't declare.
6889 (class target_terminal): New.
6890 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6891 (target_terminal_ours_for_output)
6892 (make_cleanup_restore_target_terminal): Don't declare.
6893 (target_terminal_info): Remove.
6894 * target.c (enum terminal_state, terminal_state): Remove.
6895 (target_terminal::terminal_state): Define.
6896 (target_terminal::init): Rename from target_terminal_init.
6897 (target_terminal::inferior): Rename from
6898 target_terminal_inferior.
6899 (target_terminal::ours): Rename from target_terminal_ours.
6900 (target_terminal::ours_for_output): Rename from
6901 target_terminal_ours_for_output.
6902 (target_terminal::info): New method.
6903 (cleanup_restore_target_terminal)
6904 (make_cleanup_restore_target_terminal): Remove.
6905 * solib.c (handle_solib_event): Update.
6906 * remote.c (remote_serial_quit_handler): Update.
6907 (remote_terminal_inferior, remote_wait_as): Update.
6908 * record-full.c (record_full_wait_1): Update.
6909 * nto-procfs.c (procfs_create_inferior): Update.
6910 * nat/fork-inferior.c (startup_inferior): Update.
6911 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6912 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6913 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6914 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6915 (mi_breakpoint_created, mi_breakpoint_deleted)
6916 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6917 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6918 (mi_user_selected_context_changed, report_initial_inferior):
6919 Update.
6920 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6921 (linux_nat_terminal_inferior): Update.
6922 * infrun.c (follow_fork_inferior)
6923 (handle_vfork_child_exec_or_exit, do_target_resume)
6924 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6925 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6926 Update.
6927 * inflow.c (child_terminal_init, info_terminal_command): Update.
6928 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6929 (attach_command): Update.
6930 * infcall.c (call_thread_fsm_should_stop): Update.
6931 * gnu-nat.c (gnu_attach): Update.
6932 * extension.c (struct active_ext_lang_state)
6933 (restore_active_ext_lang): Update.
6934 * exceptions.c (print_flush): Update.
6935 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6936 (struct quit_handler_cleanup_data, restore_quit_handler)
6937 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6938 Remove.
6939 * cp-support.c (gdb_demangle): Update.
6940 * breakpoint.c (update_inserted_breakpoint_locations)
6941 (insert_breakpoint_locations, handle_jit_event)
6942 (disable_breakpoints_in_unloaded_shlib): Update.
6943 * annotate.c (annotate_breakpoints_invalid)
6944 (annotate_frames_invalid): Update.
6945
013af3fc
TT
69462017-09-20 Tom Tromey <tom@tromey.com>
6947
6948 * main.c (catch_command_errors): Rename from
6949 catch_command_errors_const.
6950 (captured_main_1): Update.
6951
06871ae8
PA
69522017-09-20 Pedro Alves <palves@redhat.com>
6953
6954 * cli/cli-cmds.c (list_command): Use print_sal_location.
6955 (print_sal_location): New function.
6956 (ambiguous_line_spec): Use print_sal_location.
6957 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6958 * symtab.c (find_function_start_sal): Likewise.
6959 * symtab.h (symtab_and_line::symbol): New field.
6960
e5f25bc5
PA
69612017-09-20 Pedro Alves <palves@redhat.com>
6962
6963 * linespec.c (minsym_found): Handle non-text minsyms.
6964 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6965
1b7fa39e
WT
69662017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6967
6968 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6969 backslash.
6970
37dd0825
WT
69712017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6972
6973 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6974 vmovups instead vmovaps.
6975 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6976
4e5a4f58
JB
69772017-09-19 John Baldwin <jhb@FreeBSD.org>
6978
6979 * NEWS (Changes since GDB 8.0): Add starti.
6980 * infcmd.c (enum run_break): New.
6981 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6982 case.
6983 (run_command): Use enum run_how.
6984 (start_command): Likewise.
6985 (starti_command): New function.
6986 (RUN_ARGS_HELP): New macro.
6987 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6988 commands. Add starti command.
6989
aa70c9f1
YQ
69902017-09-19 Yao Qi <yao.qi@linaro.org>
6991
6992 * Makefile.in (monitor.o): Remove the rule.
6993
d6541620
YQ
69942017-09-19 Yao Qi <yao.qi@linaro.org>
6995
6996 * annotate.h (struct annotate_arg_emitter): Use
6997 DISABLE_COPY_AND_ASSIGN.
6998 * common/refcounted-object.h (refcounted_object): Likewise.
6999 * completer.h (struct completion_result): Likewise.
7000 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7001 * filename-seen-cache.h (filename_seen_cache): Likewise.
7002 * gdbcore.h (thread_section_name): Likewise.
7003 * gdb_regex.h (compiled_regex): Likewise.
7004 * gdbthread.h (scoped_restore_current_thread): Likewise.
7005 * inferior.h (scoped_restore_current_inferior): Likewise.
7006 * jit.c (jit_reader): Likewise.
7007 * linespec.h (struct linespec_result): Likewise.
7008 * mi/mi-parse.h (struct mi_parse): Likewise.
7009 * nat/fork-inferior.c (execv_argv): Likewise.
7010 * progspace.h (scoped_restore_current_program_space): Likewise.
7011 * python/python-internal.h (class gdbpy_enter): Likewise.
7012 * regcache.h (regcache): Likewise.
7013 * target-descriptions.c (struct tdesc_reg): Likewise.
7014 (struct tdesc_type): Likewise.
7015 (struct tdesc_feature): Likewise.
7016 * ui-out.h (ui_out_emit_type): Likewise.
7017
0615127c
SM
70182017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7019
7020 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7021 label abort_expression.
7022
5e187554
SM
70232017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7024
7025 * common/buffer.c (buffer_xml_printf): Adjust.
7026 * common/xml-utils.c (xml_escape_text): Change return type to
7027 std::string, update code accordingly.
7028 * common/xml-utils.h (xml_escape_text): Change return type to
7029 std::string.
7030 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7031 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7032 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7033 Adjust.
7034
c3d7b541
SM
70352017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7036
7037 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7038 (SUBDIR_UNITTESTS_OBS): Add new object file.
7039 * unittests/xml-utils-selftests.c: New file.
7040
1526853e
SM
70412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7042
7043 * common/selftest.h (selftest): New struct/interface.
7044 (register_test): Add name parameter, add new overload.
7045 (run_tests): Add filter parameter.
7046 (for_each_selftest_ftype): New typedef.
7047 (for_each_selftest): New declaration.
7048 * common/selftest.c (tests): Change type to
7049 map<string, unique_ptr<selftest>>.
7050 (simple_selftest): New struct.
7051 (register_test): New function.
7052 (register_test): Add name parameter and use it.
7053 (run_tests): Add filter parameter and use it. Add prints.
7054 Adjust to vector -> map change.
7055 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7056 registering selftests.
7057 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7058 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7059 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7060 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7061 * findvar.c (_initialize_findvar): Likewise.
7062 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7063 * maint.c (maintenance_selftest): Update call to run_tests.
7064 (maintenance_info_selftests): New function.
7065 (_initialize_maint_cmds): Register "maintenance info selftests"
7066 command. Update "maintenance selftest" doc.
7067 * regcache.c (_initialize_regcache): Add names when registering
7068 selftests.
7069 * rust-exp.y (_initialize_rust_exp): Likewise.
7070 * selftest-arch.c (gdbarch_selftest): New struct.
7071 (gdbarch_tests): Remove.
7072 (register_test_foreach_arch): Add name parameter. Call
7073 register_test.
7074 (tests_with_arch): Remove, move most content to
7075 gdbarch_selftest::operator().
7076 (_initialize_selftests_foreach_arch): Remove.
7077 * selftest-arch.h (register_test_foreach_arch): Add name
7078 parameter.
7079 (run_tests_with_arch): New declaration.
7080 * utils-selftests.c (_initialize_utils_selftests): Add names
7081 when registering selftests.
7082 * utils.c (_initialize_utils): Likewise.
7083 * unittests/array-view-selftests.c
7084 (_initialize_array_view_selftests): Likewise.
7085 * unittests/environ-selftests.c (_initialize_environ_selftests):
7086 Likewise.
7087 * unittests/function-view-selftests.c
7088 (_initialize_function_view_selftests): Likewise.
7089 * unittests/offset-type-selftests.c
7090 (_initialize_offset_type_selftests): Likewise.
7091 * unittests/optional-selftests.c
7092 (_initialize_optional_selftests): Likewise.
7093 * unittests/scoped_restore-selftests.c
7094 (_initialize_scoped_restore_selftests): Likewise.
7095 * NEWS: Document "maintenance selftest" and "maint info
7096 selftests".
7097
5846367a
SM
70982017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7099
7100 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7101 scoped_restore.
7102
bd77e8ff
SM
71032017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7104
7105 * mi/mi-main.c (mi_load_progress): Make uiout variable
7106 a unique_ptr.
7107
26a67918
PA
71082017-09-15 Pedro Alves <palves@redhat.com>
7109
7110 * compile/compile-c-types.c (convert_enum, convert_int)
7111 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7112
3f8a7804
SM
71132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7114
7115 * dwarf2read.c (copy_string): Remove.
7116 (parse_macro_definition): Replace copy_string with savestring.
7117
8d200706
YQ
71182017-09-15 Yao Qi <yao.qi@linaro.org>
7119
7120 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7121 gdb_target_obs.
7122 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7123 Likewise.
7124 (i[34567]86-*-linux*): Likewise.
7125
d185219d
SM
71262017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7127
7128 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7129 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7130 <stack>: Change type to std::vector.
7131 <stack_len, stack_allocated>: Remove.
7132 <grow_stack>: Remove.
7133 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7134 (dwarf_expr_context::~dwarf_expr_context): Remove.
7135 (dwarf_expr_context::grow_stack): Remove.
7136 (dwarf_expr_context::push): Adjust.
7137 (dwarf_expr_context::pop): Adjust.
7138 (dwarf_expr_context::fetch): Adjust.
7139 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7140 (dwarf_expr_context::stack_empty_p): Adjust.
7141 (dwarf_expr_context::execute_stack_op): Adjust.
7142
eccd80d6
SM
71432017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7144
7145 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7146 return type to bool.
7147 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7148
69009882
SM
71492017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7150
7151 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7152 Change type to bool.
7153 (dwarf_stack_value) <in_stack_memory>: Likewise.
7154 (dwarf_expr_context) <push_address>: Change parameter type to
7155 bool.
7156 <fetch_in_stack_memory>: Change return type to bool.
7157 <push>: Change parameter type to bool.
7158 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7159 to bool.
7160 (dwarf_expr_context::push_address): Likewise.
7161 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7162 to bool.
7163 (dwarf_expr_context::execute_stack_op): Adjust.
7164 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7165
1e467161
SM
71662017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7167
7168 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7169 (struct dwarf_expr_context) <n_pieces>: Remove.
7170 <pieces>: Change type to std::vector.
7171 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7172 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7173 pieces.
7174 (dwarf_expr_context::add_piece): Adjust.
7175 * dwarf2loc.c (struct piece_closure): Initialize fields.
7176 <n_pieces>: Remove.
7177 <pieces>: Change type to std::vector.
7178 (allocate_piece_closure): Adjust, change parameter to
7179 std::vector rvalue and std::move it to piece_closure.
7180 (rw_pieced_value): Adjust.
7181 (check_pieced_synthetic_pointer): Adjust.
7182 (indirect_synthetic_pointer): Adjust.
7183 (coerce_pieced_ref): Adjust.
7184 (free_pieced_value_closure): Adjust. Use delete to free
7185 piece_closure.
7186 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7187 to allocate_piece_closure.
7188 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7189
0782db84
SM
71902017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7191
7192 * probe.h (probe_ops_cp): Remove typedef.
7193 (DEF_VEC_P (probe_ops_cp)): Remove.
7194 (all_probe_ops): Change type to std::vector.
7195 * probe.c (info_probes_for_ops): Adjust to vector change.
7196 (probe_linespec_to_ops): Likewise.
7197 (all_probe_ops): Change type to std::vector.
7198 (_initialize_probe): Adjust to vector change.
7199 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7200 * elfread.c (elf_get_probes): Likewise.
7201 * stap-probe.c (_initialize_stap_probe): Likewise.
7202
1eac6bea
SM
72032017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7204
7205 * probe.h (struct bound_probe): Define constructors.
7206 * probe.c (bound_probe_s): Remove typedef.
7207 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7208 (collect_probes): Change return type to std::vector, remove
7209 cleanup.
7210 (compare_probes): Return bool, change parameter type. Change
7211 semantic to "less than".
7212 (gen_ui_out_table_header_info): Change parameter to std::vector
7213 and update.
7214 (exists_probe_with_pops): Likewise.
7215 (info_probes_for_ops): Update to std::vector change.
7216 (enable_probes_command): Likewise.
7217 (disable_probes_command): Likewise.
7218
aaa63a31
SM
72192017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7220
7221 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7222 vec to std::vector.
7223 * probe.c (parse_probes_in_pspace): Update.
7224 (find_probes_in_objfile): Update.
7225 (find_probe_by_pc): Update.
7226 (collect_probes): Update.
7227 (probe_any_get_probes): Update.
7228 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7229 return type to reference to std::vector.
7230 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7231 std::vector and update.
7232 (dtrace_process_dof): Likewise.
7233 (dtrace_get_probes): Likewise.
7234 * elfread.c (elf_get_probes): Change return type to std::vector,
7235 store an std::vector in bfd_data.
7236 (probe_key_free): Update to std::vector.
7237 * stap-probe.c (handle_stap_probe): Change parameter to
7238 std::vector and update.
7239 (stap_get_probes): Likewise.
7240 * symfile-debug.c (debug_sym_get_probes): Change return type to
7241 std::vector and update.
7242
cb85b21b
TT
72432017-09-11 Tom Tromey <tom@tromey.com>
7244
7245 * breakpoint.c (program_breakpoint_here_p): Update.
7246 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7247 from make_show_memory_breakpoints_cleanup. Return a
7248 scoped_restore_tmpl<int>.
7249 (restore_show_memory_breakpoints): Remove.
7250 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7251 * mem-break.c (memory_validate_breakpoint): Update.
7252 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7253 (ia64_memory_remove_breakpoint): Update.
7254 (ia64_breakpoint_from_pc): Update.
7255 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7256 from make_show_memory_breakpoints_cleanup.
7257
8fbc99ef
TT
72582017-09-11 Tom Tromey <tom@tromey.com>
7259
7260 * d-namespace.c (d_lookup_symbol): Use std::string.
7261 (find_symbol_in_baseclass): Likewise.
7262
50feb4bd
TT
72632017-09-11 Tom Tromey <tom@tromey.com>
7264
7265 * ctf.c (ctf_start): Use std::string.
7266
c6dc63a1
TT
72672017-09-11 Tom Tromey <tom@tromey.com>
7268
7269 * ada-lang.c (is_known_support_routine): Update.
7270 (ada_unhandled_exception_name_addr_from_raise): Update.
7271 * guile/scm-frame.c (gdbscm_frame_name): Update.
7272 * python/py-frame.c (frapy_name): Update.
7273 (frapy_function): Update.
7274 * stack.h (find_frame_funname): Update.
7275 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7276 (print_frame): Update.
7277
d6b9b80f
TT
72782017-09-11 Tom Tromey <tom@tromey.com>
7279
7280 * findcmd.c (put_bits): Take a gdb::byte_vector.
7281 (parse_find_args): Return gdb::byte_vector. "args" now const.
7282 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7283 cleanups.
7284 (find_command): Update.
7285
a9921622
TT
72862017-09-11 Tom Tromey <tom@tromey.com>
7287
7288 * cli/cli-script.c (class scoped_restore_hook_in): New.
7289 (clear_hook_in_cleanup): Remove.
7290 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7291 scoped_restore_hook_in.
7292
be0d7abb
TT
72932017-09-11 Tom Tromey <tom@tromey.com>
7294
7295 * cli/cli-script.c (restore_interp): Remove.
7296 (read_command_lines): Use scoped_restore_interp.
7297 * interps.c (scoped_restore_interp::set_temp): Rename from
7298 interp_set_temp.
7299 * interps.h (class scoped_restore_interp): New.
7300 (interp_set_temp): Remove.
7301
00f675ff
TT
73022017-09-11 Tom Tromey <tom@tromey.com>
7303
7304 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7305 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7306 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7307 scoped_restore.
7308 (mi_cmd_break_insert_1): Update.
7309 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7310 scoped_restore.
7311
cb791d59
TT
73122017-09-11 Tom Tromey <tom@tromey.com>
7313
7314 * demangle.c (demangle_command): Update.
7315 * breakpoint.c (disable_command): Update.
7316 (enable_command): Update.
7317 (find_location_by_number): Make "number" const. Use
7318 get_number_trailer.
7319 * cli/cli-utils.c (extract_arg): Return std::string.
7320 * probe.c (parse_probe_linespec): Update. Change types.
7321 (collect_probes): Take string arguments.
7322 (parse_probe_linespec): Likewise.
7323 (info_probes_for_ops): Update.
7324 (enable_probes_command): Update.
7325 (disable_probes_command): Update.
7326 * break-catch-sig.c (catch_signal_split_args): Update.
7327 * mi/mi-parse.c (mi_parse): Update.
7328
2039bd9f
TT
73292017-09-11 Tom Tromey <tom@tromey.com>
7330
7331 * language.h (language_enum): Make argument const.
7332 * language.c (language_enum): Make argument const.
7333
f1735a53
TT
73342017-09-11 Tom Tromey <tom@tromey.com>
7335
7336 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7337 as function.
7338 (skip_to_space): Rename from skip_to_space_const.
7339 * common/common-utils.c (skip_to_space): New function.
7340 (skip_to_space): Rename from skip_to_space_const.
7341 * cli/cli-utils.h (get_number): Rename from get_number_const.
7342 (extract_arg): Rename from extract_arg_const.
7343 * cli/cli-utils.c (get_number): Rename from get_number_const.
7344 (extract_arg): Rename from extract_arg_const.
7345 (number_or_range_parser::get_number): Use ::get_number.
7346 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7347 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7348 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7349 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7350 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7351 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7352 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7353 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7354
7d221d74
TT
73552017-09-11 Tom Tromey <tom@tromey.com>
7356
7357 * python/python.c (do_start_initialization): Use
7358 py-event-types.def to initialize types.
7359 Define all object type structures.
7360 * python/python-internal.h: Don't declare event initialization
7361 functions.
7362 * python/py-threadevent.c (thread_event_object_type): Don't
7363 define.
7364 * python/py-stopevent.c (stop_event_object_type): Don't define.
7365 * python/py-signalevent.c (signal_event_object_type): Don't
7366 declare or define.
7367 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7368 (clear_objfiles_event_object_type): Don't declare or define.
7369 * python/py-infevents.c (inferior_call_pre_event_object_type)
7370 (inferior_call_post_event_object_type)
7371 (register_changed_event_object_type)
7372 (memory_changed_event_object_type): Don't declare or define.
7373 * python/py-inferior.c (new_thread_event_object_type)
7374 (new_inferior_event_object_type)
7375 (inferior_deleted_event_object_type): Don't declare or define.
7376 * python/py-exitedevent.c (exited_event_object_type): Don't
7377 declare or define.
7378 * python/py-evts.c (gdbpy_initialize_py_events): Use
7379 py-all-events.def.
7380 * python/py-events.h (thread_event_object_type): Don't declare.
7381 (events_object): Use py-all-events.def.
7382 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7383 py-event-types.def.
7384 * python/py-event-types.def: New file.
7385 * python/py-continueevent.c (create_continue_event_object): Don't
7386 declare or define.
7387 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7388 declare or define.
7389 * python/py-all-events.def: New file.
7390
35c61a1d
TT
73912017-09-11 Tom Tromey <tom@tromey.com>
7392
7393 * python/py-threadevent.c (create_thread_event_object): Return
7394 gdbpy_ref.
7395 * python/py-stopevent.h (create_stop_event_object)
7396 (create_breakpoint_event_object, create_signal_event_object):
7397 Update.
7398 * python/py-stopevent.c (create_stop_event_object): Return
7399 gdbpy_ref.
7400 (emit_stop_event): Update.
7401 * python/py-signalevent.c (create_signal_event_object): Return
7402 gdbpy_ref.
7403 * python/py-infevents.c (create_inferior_call_event_object):
7404 Update.
7405 * python/py-event.h (create_event_object)
7406 (create_thread_event_object): Update.
7407 * python/py-event.c (create_event_object): Return gdbpy_ref.
7408 * python/py-continueevent.c: Return gdbpy_ref.
7409 * python/py-bpevent.c (create_breakpoint_event_object): Return
7410 gdbpy_ref.
7411
7c96f8c1
TT
74122017-09-11 Tom Tromey <tom@tromey.com>
7413
7414 PR python/15622:
7415 * NEWS: Add entry.
7416 * python/python.c (do_start_initialization): Initialize new event
7417 types.
7418 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7419 (gdbpy_initialize_inferior_deleted_event)
7420 (gdbpy_initialize_new_thread_event): Declare.
7421 * python/py-threadevent.c (create_thread_event_object): Add option
7422 "thread" parameter.
7423 * python/py-inferior.c (new_thread_event_object_type)
7424 (new_inferior_event_object_type)
7425 (inferior_deleted_event_object_type): Declare.
7426 (python_new_inferior, python_inferior_deleted): New functions.
7427 (add_thread_object): Emit new_thread event.
7428 (gdbpy_initialize_inferior): Attach new functions to corresponding
7429 observers.
7430 (new_thread, new_inferior, inferior_deleted): Define new event
7431 types.
7432 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7433 registries.
7434 * python/py-events.h (events_object) <new_inferior,
7435 inferior_deleted, new_thread>: New fields.
7436 * python/py-event.h (create_thread_event_breakpoint): Add optional
7437 "thread" parameter.
7438
72542b8e
AB
74392017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7440
7441 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7442 check current_ui instead.
7443 (internal_vproblem): Likewise.
7444
0d64823e
SM
74452017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7446
7447 * thread.c (print_thread_info_1): Remove unnecessary calls to
7448 uiout->is_mi_like_p.
7449
eb1e02fd
TT
74502017-09-09 Tom Tromey <tom@tromey.com>
7451
7452 * namespace.h (add_using_directive): Update.
7453 * namespace.c (add_using_directive): Change type of excludes to
7454 std::vector.
7455 * dwarf2read.c (read_import_statement): Use std::vector.
7456 (read_namespace): Update.
7457 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7458
0fc21fd8
TT
74592017-09-09 Tom Tromey <tom@tromey.com>
7460
7461 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7462
49663d05
TT
74632017-09-09 Tom Tromey <tom@tromey.com>
7464
7465 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7466
0b868b60
TT
74672017-09-09 Tom Tromey <tom@tromey.com>
7468
7469 * stack.c (func_command): Use gdb::def_vector.
7470
c0470d48
TT
74712017-09-09 Tom Tromey <tom@tromey.com>
7472
7473 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7474 ui_out_emit_list, ui_out_emit_tuple.
7475 (mi_cmd_var_update): Likewise.
7476
ca5909c7
TT
74772017-09-09 Tom Tromey <tom@tromey.com>
7478
7479 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7480 ui_out_redirect_pop.
7481 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7482 ui_out_redirect_pop.
7483 * utils.c (do_ui_out_redirect_pop)
7484 (make_cleanup_ui_out_redirect_pop): Remove.
7485 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7486 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7487 * ui-out.h (ui_out_redirect_pop): New class.
7488
e6a2252a
TT
74892017-09-09 Tom Tromey <tom@tromey.com>
7490
7491 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7492 (list_available_thread_groups, mi_cmd_list_thread_groups)
7493 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7494 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7495 Likewise.
7496
393702cd
TT
74972017-09-09 Tom Tromey <tom@tromey.com>
7498
7499 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7500 ui_out_emit_tuple.
7501
76f9c9cf
TT
75022017-09-09 Tom Tromey <tom@tromey.com>
7503
7504 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7505 * stack.c (print_frame): Use ui_out_emit_tuple.
7506 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7507 (info_spu_mailbox_command, info_spu_dma_command)
7508 (info_spu_proxydma_command): Likewise.
7509 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7510 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7511 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7512 ui_out_emit_tuple.
7513 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7514
dc9fe180
TT
75152017-09-09 Tom Tromey <tom@tromey.com>
7516
7517 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7518 (class ui_out_emit_table): Update comment.
7519 * ui-out.c (do_cleanup_table_end)
7520 (make_cleanup_ui_out_table_begin_end): Remove.
7521 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7522 (info_spu_dma_cmdlist): Likewise.
7523 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7524 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7525 ui_out_emit_table.
7526
f8cc3da6
TT
75272017-09-09 Tom Tromey <tom@tromey.com>
7528
7529 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7530 ui_out_emit_list, gdb::optional.
7531
481695ed
JB
75322017-09-09 John Baldwin <jhb@FreeBSD.org>
7533
7534 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7535 prototype.
7536 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7537 prototype.
7538 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7539 prototype.
7540 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7541 * ada-exp.y: Remove _initialize_ada_exp prototype.
7542 * ada-lang.c: Remove _initialize_ada_language prototype.
7543 * ada-tasks.c: Remove _initialize_tasks prototype.
7544 * addrmap.c: Remove _initialize_addrmap prototype.
7545 * agent.c: Remove _initialize_agent prototype.
7546 * aix-thread.c: Remove _initialize_aix_thread prototype.
7547 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7548 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7549 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7550 prototype.
7551 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7552 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7553 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7554 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7555 prototype.
7556 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7557 prototype.
7558 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7559 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7560 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7561 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7562 prototype.
7563 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7564 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7565 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7566 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7567 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7568 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7569 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7570 prototype.
7571 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7572 prototype.
7573 * annotate.c: Remove _initialize_annotate prototype.
7574 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7575 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7576 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7577 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7578 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7579 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7580 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7581 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7582 prototype.
7583 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7584 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7585 * auto-load.c: Remove _initialize_auto_load prototype.
7586 * auxv.c: Remove _initialize_auxv prototype.
7587 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7588 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7589 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7590 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7591 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7592 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7593 prototype.
7594 * break-catch-throw.c: Remove _initialize_break_catch_throw
7595 prototype.
7596 * breakpoint.c: Remove _initialize_breakpoint prototype.
7597 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7598 * btrace.c: Remove _initialize_btrace prototype.
7599 * charset.c: Remove _initialize_charset prototype.
7600 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7601 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7602 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7603 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7604 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7605 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7606 * coffread.c: Remove _initialize_coffread prototype.
7607 * compile/compile.c: Remove _initialize_compile prototype.
7608 * complaints.c: Remove _initialize_complaints prototype.
7609 * completer.c: Remove _initialize_completer prototype.
7610 * copying.awk: Remove _initialize_copying prototype.
7611 * copying.c: Regenerate.
7612 * core-regset.c: Remove _initialize_core_regset prototype.
7613 * corefile.c: Remove _initialize_core prototype.
7614 * corelow.c: Remove _initialize_corelow prototype.
7615 * cp-abi.c: Remove _initialize_cp_abi prototype.
7616 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7617 * cp-support.c: Remove _initialize_cp_support prototype.
7618 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7619 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7620 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7621 * ctf.c: Remove _initialize_ctf prototype.
7622 * d-lang.c: Remove _initialize_d_language prototype.
7623 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7624 prototype.
7625 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7626 * dbxread.c: Remove _initialize_dbxread prototype.
7627 * dcache.c: Remove _initialize_dcache prototype.
7628 * demangle.c: Remove _initialize_demangler prototype.
7629 * disasm-selftests.c: Remove _initialize_disasm_selftests
7630 prototype.
7631 * disasm.c: Remove _initialize_disasm prototype.
7632 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7633 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7634 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7635 prototype.
7636 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7637 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7638 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7639 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7640 * elfread.c: Remove _initialize_elfread prototype.
7641 * exec.c: Remove _initialize_exec prototype.
7642 * extension.c: Remove _initialize_extension prototype.
7643 * f-lang.c: Remove _initialize_f_language prototype.
7644 * f-valprint.c: Remove _initialize_f_valprint prototype.
7645 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7646 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7647 * filesystem.c: Remove _initialize_filesystem prototype.
7648 * findcmd.c: Remove _initialize_mem_search prototype.
7649 * fork-child.c: Remove _initialize_fork_child prototype.
7650 * frame-base.c: Remove _initialize_frame_base prototype.
7651 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7652 * frame.c: Remove _initialize_frame prototype.
7653 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7654 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7655 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7656 * gcore.c: Remove _initialize_gcore prototype.
7657 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7658 * gdbarch.c: Regenerate.
7659 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7660 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7661 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7662 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7663 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7664 * go-lang.c: Remove _initialize_go_language prototype.
7665 * go32-nat.c: Remove _initialize_go32_nat prototype.
7666 * guile/guile.c: Remove _initialize_guile prototype.
7667 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7668 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7669 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7670 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7671 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7672 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7673 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7674 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7675 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7676 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7677 prototype.
7678 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7679 prototype.
7680 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7681 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7682 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7683 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7684 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7685 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7686 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7687 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7688 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7689 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7690 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7691 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7692 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7693 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7694 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7695 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7696 prototype.
7697 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7698 prototype.
7699 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7700 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7701 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7702 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7703 * infcall.c: Remove _initialize_infcall prototype.
7704 * infcmd.c: Remove _initialize_infcmd prototype.
7705 * inferior.c: Remove _initialize_inferiors prototype.
7706 * inflow.c: Remove _initialize_inflow prototype.
7707 * infrun.c: Remove _initialize_infrun prototype.
7708 * interps.c: Remove _initialize_interpreter prototype.
7709 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7710 * jit.c: Remove _initialize_jit prototype.
7711 * language.c: Remove _initialize_language prototype.
7712 * linux-fork.c: Remove _initialize_linux_fork prototype.
7713 * linux-nat.c: Remove _initialize_linux_nat prototype.
7714 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7715 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7716 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7717 * m2-lang.c: Remove _initialize_m2_language prototype.
7718 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7719 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7720 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7721 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7722 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7723 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7724 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7725 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7726 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7727 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7728 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7729 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7730 * machoread.c: Remove _initialize_machoread prototype.
7731 * macrocmd.c: Remove _initialize_macrocmd prototype.
7732 * macroscope.c: Remove _initialize_macroscope prototype.
7733 * maint.c: Remove _initialize_maint_cmds prototype.
7734 * mdebugread.c: Remove _initialize_mdebugread prototype.
7735 * memattr.c: Remove _initialize_mem prototype.
7736 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7737 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7738 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7739 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7740 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7741 * microblaze-linux-tdep.c: Remove
7742 _initialize_microblaze_linux_tdep prototype.
7743 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7744 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7745 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7746 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7747 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7748 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7749 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7750 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7751 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7752 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7753 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7754 prototype.
7755 * mipsread.c: Remove _initialize_mipsread prototype.
7756 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7757 prototype.
7758 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7759 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7760 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7761 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7762 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7763 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7764 prototype.
7765 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7766 * nto-procfs.c: Remove _initialize_procfs prototype.
7767 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7768 * objc-lang.c: Remove _initialize_objc_language prototype.
7769 * objfiles.c: Remove _initialize_objfiles prototype.
7770 * observer.c: Remove observer_test_first_notification_function,
7771 observer_test_second_notification_function,
7772 observer_test_third_notification_function, and
7773 _initialize_observer prototypes.
7774 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7775 * osabi.c: Remove _initialize_gdb_osabi prototype.
7776 * osdata.c: Remove _initialize_osdata prototype.
7777 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7778 * parse.c: Remove _initialize_parse prototype.
7779 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7780 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7781 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7782 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7783 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7784 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7785 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7786 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7787 * printcmd.c: Remove _initialize_printcmd prototype.
7788 * probe.c: Remove _initialize_probe prototype.
7789 * proc-api.c: Remove _initialize_proc_api prototype.
7790 * proc-events.c: Remove _initialize_proc_events prototype.
7791 * proc-service.c: Remove _initialize_proc_service prototype.
7792 * procfs.c: Remove _initialize_procfs prototype.
7793 * psymtab.c: Remove _initialize_psymtab prototype.
7794 * python/python.c: Remove _initialize_python prototype.
7795 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7796 * record-btrace.c: Remove _initialize_record_btrace prototype.
7797 * record-full.c: Remove _initialize_record_full prototype.
7798 * record.c: Remove _initialize_record prototype.
7799 * regcache.c: Remove _initialize_regcache prototype.
7800 * reggroups.c: Remove _initialize_reggroup prototype.
7801 * remote-notif.c: Remove _initialize_notif prototype.
7802 * remote-sim.c: Remove _initialize_remote_sim prototype.
7803 * remote.c: Remove _initialize_remote prototype.
7804 * reverse.c: Remove _initialize_reverse prototype.
7805 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7806 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7807 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7808 prototype.
7809 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7810 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7811 * rust-exp.y: Remove _initialize_rust_exp prototype.
7812 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7813 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7814 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7815 * score-tdep.c: Remove _initialize_score_tdep prototype.
7816 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7817 prototype.
7818 * ser-go32.c: Remove _initialize_ser_dos prototype.
7819 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7820 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7821 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7822 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7823 * serial.c: Remove _initialize_serial prototype.
7824 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7825 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7826 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7827 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7828 * skip.c: Remove _initialize_step_skip prototype.
7829 * sol-thread.c: Remove _initialize_sol_thread prototype.
7830 * solib-aix.c: Remove _initialize_solib_aix prototype.
7831 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7832 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7833 * solib-frv.c: Remove _initialize_frv_solib prototype.
7834 * solib-spu.c: Remove _initialize_spu_solib prototype.
7835 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7836 * solib-target.c: Remove _initialize_solib_target prototype.
7837 * solib.c: Remove _initialize_solib prototype.
7838 * source.c: Remove _initialize_source prototype.
7839 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7840 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7841 prototype.
7842 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7843 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7844 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7845 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7846 prototype.
7847 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7848 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7849 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7850 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7851 prototype.
7852 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7853 prototype.
7854 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7855 prototype.
7856 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7857 prototype.
7858 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7859 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7860 prototype.
7861 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7862 prototype.
7863 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7864 prototype.
7865 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7866 prototype.
7867 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7868 prototype.
7869 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7870 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7871 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7872 * stabsread.c: Remove _initialize_stabsread prototype.
7873 * stack.c: Remove _initialize_stack prototype.
7874 * stap-probe.c: Remove _initialize_stap_probe prototype.
7875 * std-regs.c: Remove _initialize_frame_reg prototype.
7876 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7877 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7878 * symfile.c: Remove _initialize_symfile prototype.
7879 * symmisc.c: Remove _initialize_symmisc prototype.
7880 * symtab.c: Remove _initialize_symtab prototype.
7881 * target-dcache.c: Remove _initialize_target_dcache prototype.
7882 * target-descriptions.c: Remove _initialize_target_descriptions
7883 prototype.
7884 * thread.c: Remove _initialize_thread prototype.
7885 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7886 prototype.
7887 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7888 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7889 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7890 prototype.
7891 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7892 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7893 * tracefile.c: Remove _initialize_tracefile prototype.
7894 * tracepoint.c: Remove _initialize_tracepoint prototype.
7895 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7896 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7897 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7898 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7899 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7900 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7901 * tui/tui.c: Remove _initialize_tui prototype.
7902 * typeprint.c: Remove _initialize_typeprint prototype.
7903 * user-regs.c: Remove _initialize_user_regs prototype.
7904 * utils.c: Remove _initialize_utils prototype.
7905 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7906 * valarith.c: Remove _initialize_valarith prototype.
7907 * valops.c: Remove _initialize_valops prototype.
7908 * valprint.c: Remove _initialize_valprint prototype.
7909 * value.c: Remove _initialize_values prototype.
7910 * varobj.c: Remove _initialize_varobj prototype.
7911 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7912 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7913 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7914 * windows-nat.c: Remove _initialize_windows_nat,
7915 _initialize_check_for_gdb_ini, and _initialize_loadable
7916 prototypes.
7917 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7918 * xcoffread.c: Remove _initialize_xcoffread prototype.
7919 * xml-support.c: Remove _initialize_xml_support prototype.
7920 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7921 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7922 prototype.
7923 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7924 prototype.
7925 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7926
a611b5cb
KS
79272017-09-08 Keith Seitz <keiths@redhat.com>
7928
7929 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7930 field.
7931
469412dd
CW
79322017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7933
7934 * f-valprint.c (f_val_print): Remove check for one byte
7935 sized integers. Remove printing of character type.
7936
a5ad232b
FP
79372017-09-08 Frank Penczek <frank.penczek@intel.com>
7938 Christoph Weinmann <christoph.t.weinmann@intel.com>
7939 Bernhard Heckel <bernhard.heckel@intel.com>
7940
7941 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7942 to maintain proper indentation when printing pointers/refs.
7943
e5014227
JB
79442017-09-07 Joel Brobecker <brobecker@adacore.com>
7945
7946 GDB 8.0.1 released.
7947
63c99141
JB
79482017-09-07 Joel Brobecker <brobecker@adacore.com>
7949
7950 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7951
69c1e056
TT
79522017-09-05 Tom Tromey <tom@tromey.com>
7953
7954 * parse.c (funcall_chain): Now a std::vector.
7955 (start_arglist, end_arglist): Simplify.
7956 (free_funcalls): Remove.
7957 (parse_exp_in_context_1): Remove cleanup.
7958
fef704bf
TT
79592017-09-05 Tom Tromey <tom@tromey.com>
7960
7961 * go-exp.y (go_parse): Don't create a cleanup.
7962
5613c585
TT
79632017-09-05 Tom Tromey <tom@tromey.com>
7964
7965 * d-exp.y (PrimaryExpression): Use std::string.
7966 (d_parse): Don't create a cleanup.
7967
eae49211
TT
79682017-09-05 Tom Tromey <tom@tromey.com>
7969
7970 * utils.c (do_clear_parser_state): Remove.
7971 (make_cleanup_clear_parser_state): Remove.
7972 * p-exp.y (pascal_parse): Use scoped_restore.
7973 * m2-exp.y (m2_parse): Use scoped_restore.
7974 * f-exp.y (f_parse): Use scoped_restore.
7975 * d-exp.y (d_parse): Use scoped_restore.
7976 * c-exp.y (c_parse): Use scoped_restore.
7977 * ada-exp.y (ada_parse): Use scoped_restore.
7978 * utils.h (make_cleanup_clear_parser_state): Remove.
7979
73b9be8b
KS
79802017-09-06 Keith Seitz <keiths@redhat.com>
7981
7982 * dwarf2read.c (dw2_linkage_name_attr): New function.
7983 (dw2_linkage_name): New function.
7984 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7985 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7986 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7987
a102602b
KR
79882017-09-06 Kamil Rytarowski <n54@gmx.com>
7989
7990 * config/djgpp/djconfig.sh: Correct shell portability issue.
7991
28ad437d
KR
79922017-09-06 Kamil Rytarowski <n54@gmx.com>
7993
7994 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7995
351787dd
JB
79962017-09-06 John Baldwin <jhb@FreeBSD.org>
7997
7998 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7999 * NEWS: Mention new FreeBSD/mips native configuration.
8000 * configure.host: Add aarch64*-*-freebsd*.
8001 * configure.nat: Likewise.
8002 * aarch64-fbsd-nat.c: New file.
8003
c0f84956
JB
80042017-09-06 John Baldwin <jhb@FreeBSD.org>
8005
8006 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8007 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8008 * NEWS: Mention new FreeBSD/aarch64 target.
8009 * configure.tgt: Add aarch64*-*-freebsd*.
8010 * aarch64-fbsd-tdep.c: New file.
8011 * aarch64-fbsd-tdep.h: New file.
8012
7610297a
KR
80132017-09-06 Kamil Rytarowski <n54@gmx.com>
8014
8015 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8016
fbd1b771
JK
80172017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8018
8019 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8020 of TLS symbols.
8021
5ca79eae
PW
80222017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8023
8024 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8025 call.
8026
bf93d7ba
SM
80272017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8028
8029 * infrun.c (follow_exec): Call add_thread after
8030 target_find_description.
8031
1bb7c059
SM
80322017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8033
8034 * infrun.c (handle_inferior_event_1): When exec'ing, read
8035 stop_pc after follow_exec.
8036
fc809827
SM
80372017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8038
8039 * remote.c (process_g_packet): Update error message.
8040
d2fcdd85
YQ
80412017-09-05 Yao Qi <yao.qi@linaro.org>
8042
8043 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8044 targets.
8045
e69570ee
PA
80462017-09-05 Pedro Alves <palves@redhat.com>
8047
8048 * eval.c (eval_call, evaluate_funcall): New functions, factored
8049 out from ...
8050 (evaluate_subexp_standard): ... this.
8051
22916b07
YQ
80522017-09-05 Yao Qi <yao.qi@linaro.org>
8053
8054 * amd64-tdep.c (amd64_target_description): Create target
8055 descriptions.
8056 (_initialize_amd64_tdep): Don't call functions
8057 initialize_tdesc_amd64_*. Add self tests.
8058 * arch/amd64.c (amd64_create_target_description): Add parameter
8059 is_linux. Call set_tdesc_osabi if is_linux is true.
8060 * arch/amd64.h (amd64_create_target_description): Update the
8061 declaration.
8062 * arch/i386.c (i386_create_target_description): Add parameter
8063 is_linux. Call set_tdesc_osabi if is_linux is true.
8064 * arch/i386.h (i386_create_target_description): Update
8065 declaration.
8066 * configure.tgt: Add i386.o to gdb_target_obs.
8067 * features/Makefile (XMLTOC): Remove i386/*.xml.
8068 * features/i386/amd64-avx-avx512.c: Remove.
8069 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8070 * features/i386/amd64-avx-mpx.c: Remove.
8071 * features/i386/amd64-avx.c: Remove.
8072 * features/i386/amd64-mpx.c: Remove.
8073 * features/i386/amd64.c: Remove.
8074 * features/i386/i386-avx-avx512.c: Remove.
8075 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8076 * features/i386/i386-avx-mpx.c: Remove.
8077 * features/i386/i386-avx.c: Remove.
8078 * features/i386/i386-mmx.c: Remove.
8079 * features/i386/i386-mpx.c: Remove.
8080 * features/i386/i386.c: Remove.
8081 * i386-tdep.c: Don't include features/i386/i386*.c., include
8082 target-descriptions.h and arch/i386.h.
8083 (i386_target_description): Create target descriptions.
8084 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8085 functions. Do self tests.
8086
0854b7b1
YQ
80872017-09-05 Yao Qi <yao.qi@linaro.org>
8088
8089 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8090 * features/i386/amd64-avx-avx512-linux.c: Removed.
8091 * features/i386/amd64-avx-linux.c: Removed.
8092 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8093 * features/i386/amd64-avx-mpx-linux.c: Removed.
8094 * features/i386/amd64-linux.c: Removed.
8095 * features/i386/amd64-mpx-linux.c: Removed.
8096 * features/i386/x32-avx-avx512-linux.c: Removed.
8097 * features/i386/x32-avx-linux.c: Removed.
8098 * features/i386/x32-linux.c: Removed.
8099
b4570e4b
YQ
81002017-09-05 Yao Qi <yao.qi@linaro.org>
8101
8102 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8103 features/i386/*.c.
8104 (amd64_linux_read_description): Call
8105 amd64_create_target_description.
8106 * arch/amd64.c: New file.
8107 * arch/amd64.h: New file.
8108 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8109 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8110
6c73f67f
YQ
81112017-09-05 Yao Qi <yao.qi@linaro.org>
8112
8113 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8114 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8115 (amd64_linux_read_description): Create target descriptions.
8116 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8117 functions. Add unit tests.
8118 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8119 x32-core.xml.
8120 * features/i386/64bit-avx.c: Generated.
8121 * features/i386/64bit-avx512.c: Generated.
8122 * features/i386/64bit-core.c: Generated.
8123 * features/i386/64bit-linux.c: Generated.
8124 * features/i386/64bit-mpx.c: Generated.
8125 * features/i386/64bit-pkeys.c: Generated.
8126 * features/i386/64bit-segments.c: Generated.
8127 * features/i386/64bit-sse.c: Generated.
8128 * features/i386/x32-core.c: Generated.
8129 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8130 c files for amd64-linux and x32-linux.
8131
9d3d478b
YQ
81322017-09-05 Yao Qi <yao.qi@linaro.org>
8133
8134 * amd64-linux-tdep.c (amd64_linux_read_description): New
8135 function.
8136 (amd64_linux_core_read_description): Call
8137 amd64_linux_read_description.
8138 (amd64_linux_init_abi): Likewise.
8139 (amd64_x32_linux_init_abi): Likewise.
8140 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8141 * x86-linux-nat.c (x86_linux_read_description): Call
8142 amd64_linux_read_description.
8143
b9f1d50f
YQ
81442017-09-05 Yao Qi <yao.qi@linaro.org>
8145
8146 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8147 comments.
8148
188c9e6d
YQ
81492017-09-05 Yao Qi <yao.qi@linaro.org>
8150
8151 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8152 * features/i386/i386-avx-avx512-linux.c: Remove.
8153 * features/i386/i386-avx-linux.c: Remove.
8154 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8155 * features/i386/i386-avx-mpx-linux.c: Remove.
8156 * features/i386/i386-linux.c: Remove.
8157 * features/i386/i386-mmx-linux.c: Remove.
8158 * features/i386/i386-mpx-linux.c: Remove.
8159
5f035c07
YQ
81602017-09-05 Yao Qi <yao.qi@linaro.org>
8161
8162 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8163 (SFILES): Add arch/i386.c.
8164 (HFILES_NO_SRCDIR): Add arch/i386.h.
8165 * arch/i386.c: New file.
8166 * arch/i386.h: New file.
8167 * arch/tdesc.h (allocate_target_description): Declare.
8168 (set_tdesc_architecture): Declare.
8169 (set_tdesc_osabi): Declare.
8170 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8171 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8172 include arch/i386.h.
8173 (i386_linux_read_description): Remove code and call
8174 i386_create_target_description.
8175 (set_tdesc_architecture): New function.
8176 (set_tdesc_osabi): New function.
8177 * target-descriptions.h (allocate_target_description): Remove.
8178
0abe8a89
YQ
81792017-09-05 Yao Qi <yao.qi@linaro.org>
8180
8181 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8182 * target-descriptions.c (tdesc_create_feature): Likewise, and
8183 adjust code.
8184 * features/i386/32bit-avx.c: Re-generated.
8185 * features/i386/32bit-avx512.c: Re-generated.
8186 * features/i386/32bit-core.c: Re-generated.
8187 * features/i386/32bit-linux.c: Re-generated.
8188 * features/i386/32bit-mpx.c: Re-generated.
8189 * features/i386/32bit-pkeys.c: Re-generated.
8190 * features/i386/32bit-sse.c: Re-generated.
8191
0a188386
YQ
81922017-09-05 Yao Qi <yao.qi@linaro.org>
8193
8194 * regformats/regdef.h (struct reg): Override operator == and !=.
8195
f49ff000
YQ
81962017-09-05 Yao Qi <yao.qi@linaro.org>
8197
8198 * arch/tdesc.h: New file.
8199 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8200 * target-descriptions.c: Update comments.
8201 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8202 declarations.
8203 * features/i386/32bit-avx.c: Re-generated.
8204 * features/i386/32bit-avx512.c: Re-generated.
8205 * features/i386/32bit-core.c: Re-generated.
8206 * features/i386/32bit-linux.c: Re-generated.
8207 * features/i386/32bit-mpx.c: Re-generated.
8208 * features/i386/32bit-pkeys.c: Re-generated.
8209 * features/i386/32bit-sse.c: Re-generated.
8210
f7000548
YQ
82112017-09-05 Yao Qi <yao.qi@linaro.org>
8212
8213 * regformats/regdat.sh: Update generated code.
8214
c9a5e2a5
YQ
82152017-09-05 Yao Qi <yao.qi@linaro.org>
8216
8217 * regformats/regdat.sh: Adjust code order.
8218
d6b687ac
SM
82192017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8220
8221 * expprint.c (dump_subexp_body_standard): Use constant format
8222 string in fprintf_filtered call.
8223
a379bfd0
JB
82242017-09-04 John Baldwin <jhb@FreeBSD.org>
8225
8226 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8227 NetBSD/i386.
8228 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8229
f7efc967
JB
82302017-09-04 John Baldwin <jhb@FreeBSD.org>
8231
8232 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8233
c49fbc6c
JB
82342017-09-04 John Baldwin <jhb@FreeBSD.org>
8235
8236 * bsd-kvm.o: Define _KMEMUSER.
8237 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8238 * configure: Regenerate.
8239
26562e73
JB
82402017-09-04 John Baldwin <jhb@FreeBSD.org>
8241
8242 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8243 * i386-fbsd-nat.c: Likewise.
8244
31cf1487
JB
82452017-09-04 John Baldwin <jhb@FreeBSD.org>
8246
8247 * unittests/array-view-selftests.c: Add include of <array>.
8248
5b9f8a7c
JB
82492017-09-04 John Baldwin <jhb@FreeBSD.org>
8250
8251 * spu-tdep.c (flush_ea_cache): Add missing argument to
8252 call_function_by_hand.
8253
d69cf9b2
PA
82542017-09-04 Pedro Alves <palves@redhat.com>
8255
8256 * NEWS (Safer support for debugging with no debug info): New.
8257
3693fdb3
PA
82582017-09-04 Pedro Alves <palves@redhat.com>
8259
8260 * c-exp.y (function_method, function_method_void): Add current
8261 instance flags to TYPE_INSTANCE.
8262 * dwarf2read.c (check_modifier): New.
8263 (compute_delayed_physnames): Assert that only C++ adds delayed
8264 physnames. Mark fn_fields as const/volatile depending on
8265 physname.
8266 * eval.c (make_params): New type_instance_flags parameter. Use
8267 it as the new type's instance flags.
8268 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8269 flags element and pass it to make_params.
8270 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8271 instance flags element.
8272 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8273 * gdbtypes.h: Include "enum-flags.h".
8274 (type_instance_flags): New enum-flags type.
8275 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8276 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8277 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8278 (follow_type_instance_flags): New function.
8279 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8280 * parser-defs.h (follow_type_instance_flags): Declare.
8281 * valops.c (value_struct_elt_for_reference): const/volatile must
8282 match too.
8283
e68cb8e0
PA
82842017-09-04 Pedro Alves <palves@redhat.com>
8285
8286 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8287 function/method scopes; lookup the nested name as a function local
8288 static variable.
8289
858be34c
PA
82902017-09-04 Pedro Alves <palves@redhat.com>
8291
8292 (%type <voidval>): Add function_method.
8293 * c-exp.y (exp): New production for calls with no arguments.
8294 (function_method, function_method_void_or_typelist): New
8295 productions.
8296 (exp): New production for "method()::static_var".
8297 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8298 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8299 Handle OP_FUNC_STATIC_VAR.
8300 * parse.c (operator_length_standard):
8301 Handle OP_FUNC_STATIC_VAR.
8302
dd5901a6
PA
83032017-09-04 Pedro Alves <palves@redhat.com>
8304
8305 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8306 handling.
8307 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8308 Ditto.
8309 * parse.c (operator_length_standard, operator_check_standard):
8310 Ditto.
8311 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8312
46a4882b
PA
83132017-09-04 Pedro Alves <palves@redhat.com>
8314
8315 * ax-gdb.c: Include "typeprint.h".
8316 (gen_expr_for_cast): New function.
8317 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8318 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8319 type is unknown.
8320 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8321 nodebug_data_symbol.
8322 * eval.c: Include "typeprint.h".
8323 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8324 Error out if symbol has unknown type.
8325 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8326 evaluate_subexp_for_cast.
8327 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8328 OP_VAR_MSYM_VALUE.
8329 (evaluate_subexp_for_cast): New function.
8330 * gdbtypes.c (init_nodebug_var_type): New function.
8331 (objfile_type): Use it to initialize types of variables with no
8332 debug info.
8333 * typeprint.c (error_unknown_type): New.
8334 * typeprint.h (error_unknown_type): New declaration.
8335 * compile/compile-c-types.c (convert_type_basic): Handle
8336 TYPE_CODE_ERROR; warn and fallback to int for variables with
8337 unknown type.
8338
fe13dfec
PA
83392017-09-04 Pedro Alves <palves@redhat.com>
8340
8341 * eval.c (evaluate_var_value): New function, factored out from ...
8342 (evaluate_subexp_standard): ... here.
8343
d008ee21
PA
83442017-09-04 Pedro Alves <palves@redhat.com>
8345
8346 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8347 Remove useless assignments to 'op'.
8348
827d0c51
PA
83492017-09-04 Pedro Alves <palves@redhat.com>
8350
8351 * eval.c (eval_skip_value): New function.
8352 (evaluate_subexp_standard): Use it.
8353
2c5a2be1
PA
83542017-09-04 Pedro Alves <palves@redhat.com>
8355
8356 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8357 function name from symbol/minsym and pass it to
8358 error_call_unknown_return_type.
8359
74ea4be4
PA
83602017-09-04 Pedro Alves <palves@redhat.com>
8361
8362 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8363 * ax-gdb.c (gen_msym_var_ref): New function.
8364 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8365 * eval.c (evaluate_var_msym_value): New function.
8366 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8367 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8368 to call_function_by_hand.
8369 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8370 Handle OP_VAR_MSYM_VALUE.
8371 (union exp_element) <msymbol>: New field.
8372 * minsyms.h (struct type): Forward declare.
8373 (find_minsym_type_and_address): Declare.
8374 * parse.c (write_exp_elt_msym): New function.
8375 (write_exp_msymbol): Delete, refactored as ...
8376 (find_minsym_type_and_address): ... this new function.
8377 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8378 (operator_length_standard, operator_check_standard): Handle
8379 OP_VAR_MSYM_VALUE.
8380 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8381
7022349d
PA
83822017-09-04 Pedro Alves <palves@redhat.com>
8383
8384 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8385 TYPE_GNU_IFUNC specially here. Throw error if return type is
8386 unknown.
8387 * ada-typeprint.c (print_func_type): Handle functions with unknown
8388 return type.
8389 * c-typeprint.c (c_type_print_base): Handle functions and methods
8390 with unknown return type.
8391 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8392 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8393 * compile/compile-c-types.c: Include "objfiles.h".
8394 (convert_func): For functions with unknown return type, warn and
8395 default to int.
8396 * compile/compile-object-run.c (compile_object_run): Adjust call
8397 to call_function_by_hand_dummy.
8398 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8399 call_function_by_hand.
8400 * eval.c (evaluate_subexp_standard): Adjust calls to
8401 call_function_by_hand. Handle functions and methods with unknown
8402 return type. Pass expect_type to call_function_by_hand.
8403 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8404 return type.
8405 * gcore.c (call_target_sbrk): Adjust call to
8406 call_function_by_hand.
8407 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8408 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8409 an integer address type instead of nodebug.
8410 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8411 call_function_by_hand.
8412 * infcall.c (error_call_unknown_return_type): New function.
8413 (call_function_by_hand): New "default_return_type" parameter.
8414 Pass it down.
8415 (call_function_by_hand_dummy): New "default_return_type"
8416 parameter. Use it instead of defaulting to int. If there's no
8417 default and the return type is unknown, throw an error. If
8418 there's a default return type, and the called function has no
8419 debug info, then assume the function is prototyped.
8420 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8421 New "default_return_type" parameter.
8422 (error_call_unknown_return_type): New declaration.
8423 * linux-fork.c (call_lseek): Cast return type of lseek.
8424 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8425 call_function_by_hand.
8426 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8427 calls to call_function_by_hand.
8428 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8429 return type.
8430 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8431 (value_nsstring, print_object_command): Adjust calls to
8432 call_function_by_hand.
8433 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8434 functions with unknown return type.
8435 (pascal_type_print_func_varspec_suffix): New function.
8436 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8437 TYPE_CODE_METHOD>: Use it.
8438 * python/py-value.c (valpy_call): Adjust call to
8439 call_function_by_hand.
8440 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8441 call_function_by_hand.
8442 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8443 call_function_by_hand.
8444 * valops.c (value_allocate_space_in_inferior): Adjust call to
8445 call_function_by_hand.
8446 * typeprint.c (type_print_unknown_return_type): New function.
8447 * typeprint.h (type_print_unknown_return_type): New declaration.
8448
54990598
PA
84492017-09-04 Pedro Alves <palves@redhat.com>
8450
8451 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8452 types with more than one parameter as prototyped.
8453
9a24775b
PA
84542017-09-04 Pedro Alves <palves@redhat.com>
8455
8456 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8457 (disassemble_command): Use gdb_disassembly_flags instead of bare
8458 int.
8459 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8460 (dump_insns, do_mixed_source_and_assembly_deprecated)
8461 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8462 Use gdb_disassembly_flags instead of bare int.
8463 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8464 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8465 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8466 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8467 (enum gdb_disassembly_flag): ... values of this new enumeration.
8468 (gdb_disassembly_flags): Define.
8469 (gdb_disassembly)
8470 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8471 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8472 gdb_disassembly_flags instead of bare int.
8473 * record-btrace.c (btrace_insn_history)
8474 (record_btrace_insn_history, record_btrace_insn_history_range)
8475 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8476 instead of bare int.
8477 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8478 Use gdb_disassembly_flags instead of bare int.
8479 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8480 Define.
8481 * target-delegates.c: Regenerate.
8482 * target.c (target_insn_history, target_insn_history_from)
8483 (target_insn_history_range): Use gdb_disassembly_flags instead of
8484 bare int.
8485 * target.h: Include "disasm.h".
8486 (struct target_ops) <to_insn_history, to_insn_history_from,
8487 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8488 int.
8489 (target_insn_history, target_insn_history_from)
8490 (target_insn_history_range): Use gdb_disassembly_flags instead of
8491 bare int.
8492
80a65e9b
SM
84932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8494
8495 * cli/cli-script.c (build_command_line): For if/while commands,
8496 check whether args is empty.
8497
6b66338c
SM
84982017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8499
8500 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8501 (enum command_control_type): Likewise.
8502 (struct command_line): Likewise.
8503 (free_command_lines): Likewise.
8504 (struct command_lines_deleter): Likewise.
8505 (command_line_up): Likewise.
8506 (read_command_lines): Likewise.
8507 (read_command_lines_1): Likewise.
8508 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8509 (enum command_control_type): Likewise.
8510 (struct command_line): Likewise.
8511 (free_command_lines): Likewise.
8512 (struct command_lines_deleter): Likewise.
8513 (command_line_up): Likewise.
8514 (read_command_lines): Likewise.
8515 (read_command_lines_1): Likewise.
8516 * breakpoint.h: Include cli/cli-script.h.
8517 * extension-priv.h: Likewise.
8518 * gdbcmd.h: Likewise.
8519
51abb421
PA
85202017-09-04 Pedro Alves <palves@redhat.com>
8521
8522 * ada-lang.c (is_known_support_routine): Move sal declaration to
8523 where it is initialized.
8524 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8525 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8526 (clear_command, update_static_tracepoint): Remove init_sal
8527 references. Move declarations closer to initializations.
8528 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8529 initializations.
8530 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8531 references. Move sal declarations closer to initializations.
8532 * frame.c (find_frame_sal): Return a symtab_and_line via function
8533 return instead of output parameter. Remove init_sal references.
8534 * frame.h (find_frame_sal): Return a symtab_and_line via function
8535 return instead of output parameter.
8536 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8537 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8538 instead of memset.
8539 (gdbscm_find_pc_line): Remove init_sal reference.
8540 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8541 references. Move declarations closer to initializations.
8542 * infcmd.c (set_step_frame): Update. Move declarations closer to
8543 initializations.
8544 (finish_backward): Remove init_sal references. Move declarations
8545 closer to initializations.
8546 * infrun.c (process_event_stop_test, handle_step_into_function)
8547 (insert_hp_step_resume_breakpoint_at_frame)
8548 (insert_step_resume_breakpoint_at_caller): Likewise.
8549 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8550 (symbol_to_sal): Likewise.
8551 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8552 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8553 to its initialization.
8554 * reverse.c (save_bookmark_command): Use new/delete. Remove
8555 init_sal references. Move declarations closer to initializations.
8556 * source.c (get_current_source_symtab_and_line): Remove brace
8557 initialization.
8558 (set_current_source_symtab_and_line): Now takes the sal by const
8559 reference. Remove brace initialization.
8560 (line_info): Remove init_sal reference.
8561 * source.h (set_current_source_symtab_and_line): Now takes a
8562 symtab_and_line via const reference.
8563 * stack.c (set_current_sal_from_frame): Adjust.
8564 (print_frame_info): Adjust.
8565 (get_last_displayed_sal): Return the sal via function return
8566 instead of via output parameter. Simplify.
8567 (frame_info): Adjust.
8568 * stack.h (get_last_displayed_sal): Return the sal via function
8569 return instead of via output parameter.
8570 * symtab.c (init_sal): Delete.
8571 (find_pc_sect_line): Remove init_sal references. Move
8572 declarations closer to initializations.
8573 (find_function_start_sal): Remove init_sal references. Move
8574 declarations closer to initializations.
8575 * symtab.h (struct symtab_and_line): In-class initialize all
8576 fields.
8577 * tracepoint.c (set_traceframe_context)
8578 (print_one_static_tracepoint_marker): Remove init_sal references.
8579 Move declarations closer to initializations.
8580 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8581 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8582 declarations closer to initializations.
8583 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8584 init_sal references. Adjust.
8585
6c5b2ebe
PA
85862017-09-04 Pedro Alves <palves@redhat.com>
8587
8588 * ax-gdb.c (agent_command_1): Use range-for.
8589 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8590 * breakpoint.c: Include "common/array-view.h".
8591 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8592 parameter from struct symtabs_and_lines to
8593 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8594 (breakpoint_sals_to_pc): Change sals parameter from struct
8595 symtabs_and_lines to std::vector reference.
8596 (check_fast_tracepoint_sals): Change sals parameter from struct
8597 symtabs_and_lines to std::array_view. Use range-for.
8598 (decode_static_tracepoint_spec): Return a std::vector instead of
8599 symtabs_and_lines. Update.
8600 (create_breakpoint): Update.
8601 (break_range_command, until_break_command, clear_command): Update.
8602 (base_breakpoint_decode_location, bkpt_decode_location)
8603 (bkpt_probe_create_sals_from_location)
8604 (bkpt_probe_decode_location, tracepoint_decode_location)
8605 (tracepoint_probe_decode_location)
8606 (strace_marker_create_sals_from_location): Return a std::vector
8607 instead of symtabs_and_lines.
8608 (strace_marker_create_breakpoints_sal): Update.
8609 (strace_marker_decode_location): Return a std::vector instead of
8610 symtabs_and_lines. Update.
8611 (update_breakpoint_locations): Change struct symtabs_and_lines
8612 parameters to gdb::array_view. Adjust.
8613 (location_to_sals): Return a std::vector instead of
8614 symtabs_and_lines. Update.
8615 (breakpoint_re_set_default): Use std::vector instead of struct
8616 symtabs_and_lines.
8617 (decode_location_default): Return a std::vector instead of
8618 symtabs_and_lines. Update.
8619 * breakpoint.h: Include "common/array-view.h".
8620 (struct breakpoint_ops) <decode_location>: Now returns a
8621 std::vector instead of returning a symtabs_and_lines via output
8622 parameter.
8623 (update_breakpoint_locations): Change sals parameters to use
8624 gdb::array_view.
8625 * cli/cli-cmds.c (edit_command, list_command): Update to use
8626 std::vector and gdb::array_view.
8627 (ambiguous_line_spec): Adjust to use gdb::array_view and
8628 range-for.
8629 (compare_symtabs): Rename to ...
8630 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8631 const reference and adjust.
8632 (filter_sals): Rewrite using std::vector and standard algorithms.
8633 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8634 (jump_command): Update to use std::vector.
8635 * linespec.c (struct linespec_state) <canonical_names>: Update
8636 comment.
8637 (add_sal_to_sals_basic): Delete.
8638 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8639 (decode_line_2, create_sals_line_offset)
8640 (convert_address_location_to_sals, convert_linespec_to_sals)
8641 (convert_explicit_location_to_sals, parse_linespec)
8642 (event_location_to_sals, decode_line_full, decode_line_1)
8643 (decode_line_with_current_source)
8644 (decode_line_with_last_displayed, decode_objc)
8645 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8646 (linespec_result::~linespec_result): Adjust to use std::vector
8647 instead of symtabs_and_lines.
8648 * linespec.h (linespec_sals::sals): Now a std::vector.
8649 (struct linespec_result): Use std::vector, bool, and in-class
8650 initialization.
8651 (decode_line_1, decode_line_with_current_source)
8652 (decode_line_with_last_displayed): Return std::vector.
8653 * macrocmd.c (info_macros_command): Use std::vector.
8654 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8655 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8656 std::vector.
8657 * probe.h (parse_probes): Return a std::vector.
8658 * python/python.c (gdbpy_decode_line): Use std::vector and
8659 gdb::array_view.
8660 * source.c (select_source_symtab, line_info): Use std::vector.
8661 * stack.c (func_command): Use std::vector.
8662 * symtab.h (struct symtabs_and_lines): Delete.
8663 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8664
7c44b49c
PA
86652017-09-04 Pedro Alves <palves@redhat.com>
8666
8667 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8668 unittests/array-view-selftests.c.
8669 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8670 * common/array-view.h: New file.
8671 * unittests/array-view-selftests.c: New file.
8672
e439fa14
PA
86732017-09-04 Pedro Alves <palves@redhat.com>
8674
8675 * cli/cli-cmds.c (edit_command): Pass message to
8676 ambiguous_line_spec.
8677 (list_command): Pass message to ambiguous_line_spec. Say
8678 "first"/"last" instead of "start" and "end" to be consistent with
8679 the manual.
8680 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8681 them to print formatted message.
8682
7525b645
PA
86832017-09-04 Pedro Alves <palves@redhat.com>
8684
8685 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8686 ftrace_update_insns by reference instead of pointer.
8687
badc0020
YQ
86882017-09-04 Yao Qi <yao.qi@linaro.org>
8689
8690 * i386-go32-tdep.c: Include x86-xstate.h.
8691 (i386_go32_init_abi): Call i386_target_description.
8692 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8693 if xcr0 is X86_XSTATE_X87_MASK.
8694 * i386-tdep.h (tdesc_i386): Remove the declaration.
8695 (tdesc_i386_mmx): Likewise.
8696
d78bdb54
YQ
86972017-09-04 Yao Qi <yao.qi@linaro.org>
8698
8699 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8700 X86_XSTATE_SSE_MASK instead of 0.
8701
ca1fa5ee
YQ
87022017-09-04 Yao Qi <yao.qi@linaro.org>
8703
8704 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8705 i386_target_description.
8706 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8707 i386_target_description.
8708 * i386-tdep.c (i386_gdbarch_init): Likewise.
8709
2434b019
YQ
87102017-09-04 Yao Qi <yao.qi@linaro.org>
8711
8712 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8713 (x86_darwin_init_abi_64): Call amd64_target_description.
8714 * amd64-dicos-tdep.c: Likewise.
8715 * amd64-fbsd-nat.c: Likewise.
8716 * amd64-fbsd-tdep.c: Likewise.
8717 * amd64-nbsd-tdep.c: Likewise.
8718 * amd64-obsd-tdep.c: Likewise.
8719 * amd64-sol2-tdep.c: Likewise.
8720 * amd64-windows-tdep.c: Likewise.
8721 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8722
0860c437
SM
87232017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8724
8725 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8726 (btrace_function) <insn>: Change type to use std::vector.
8727 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8728 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8729 ftrace_update_insns, ftrace_compute_global_level_offset,
8730 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8731 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8732 change to std::vector.
8733 (ftrace_update_insns): Adjust to change to std::vector, change
8734 type of INSN parameter.
8735 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8736 * record-btrace.c (btrace_call_history_insn_range,
8737 btrace_compute_src_line_range,
8738 record_btrace_frame_prev_register): Adjust to change to
8739 std::vector.
8740 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8741 to change to std::vector.
8742
0638b7f9
TT
87432017-09-03 Tom Tromey <tom@tromey.com>
8744
8745 * corefile.c (reopen_exec_file): Use std::string.
8746
8f84fb0e
TT
87472017-09-03 Tom Tromey <tom@tromey.com>
8748
8749 * compile/compile.c (compile_register_name_mangled): Return
8750 std::string.
8751 * compile/compile-loc2c.c (pushf_register_address): Update.
8752 (pushf_register): Update.
8753 * compile/compile-c-types.c (convert_array): Update.
8754 * compile/compile-c-symbols.c (generate_vla_size): Update.
8755 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8756 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8757 (convert_one_symbol): Update.
8758 (generate_c_for_for_one_variable): Update.
8759 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8760 std::string.
8761 (generate_register_struct): Update.
8762 * compile/compile-internal.h (c_get_range_decl_name): Return a
8763 std::string.
8764 (compile_register_name_mangled): Return std::string.
8765
18e9961f
TT
87662017-09-03 Tom Tromey <tom@tromey.com>
8767
8768 * utils.c (perror_string): Return a std::string.
8769 (throw_perror_with_name, perror_warning_with_name): Update.
8770
45343786
TT
87712017-09-03 Tom Tromey <tom@tromey.com>
8772
8773 * demangle.c (demangle_command): Use std::string,
8774 unique_xmalloc_ptr.
8775
b57af503
TT
87762017-09-03 Tom Tromey <tom@tromey.com>
8777
8778 * cli/cli-setshow.c (do_set_command): Use std::string.
8779
6eecf35f
TT
87802017-09-03 Tom Tromey <tom@tromey.com>
8781
8782 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8783
56496dd4
TT
87842017-09-03 Tom Tromey <tom@tromey.com>
8785
8786 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8787
e91a1fa7
TT
87882017-09-03 Tom Tromey <tom@tromey.com>
8789
8790 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8791 gdb::unique_xmalloc_ptr.
8792
7ffd83d7
TT
87932017-09-03 Tom Tromey <tom@tromey.com>
8794
8795 * thread.c (print_thread_info_1): Use string_printf.
8796 (thread_apply_command, thread_apply_all_command): Use
8797 std::string.
8798
1ccbe998
TT
87992017-09-03 Tom Tromey <tom@tromey.com>
8800
8801 * valprint.c (val_print_string): Update.
8802 * gdbcore.h (memory_error_message): Return std::string.
8803 * corefile.c (memory_error_message): Return std::string.
8804 (memory_error): Update.
8805 * breakpoint.c (insert_bp_location): Update.
8806
23fdd69e
SM
88072017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8808
8809 * target/waitstatus.h (target_waitstatus_to_string): Change
8810 return type to std::string.
8811 * target/waitstatus.c (target_waitstatus_to_string): Return
8812 std::string.
8813 * target.h (target_waitstatus_to_string): Remove declaration.
8814 * infrun.c (resume, clear_proceed_status_thread,
8815 print_target_wait_results, do_target_wait, save_waitstatus,
8816 stop_all_threads): Adjust.
8817 * record-btrace.c (record_btrace_wait): Adjust.
8818 * target-debug.h
8819 (target_debug_print_struct_target_waitstatus_p): Adjust.
8820
5c811d30
JK
88212017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8822
8823 PR gdb/22046
8824 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8825 detection.
8826
0a2dde4a
SDJ
88272017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8828
8829 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8830 for setting/unsetting environment variables on the remote target.
8831 (New remote packets): Add entries for QEnvironmentHexEncoded,
8832 QEnvironmentUnset and QEnvironmentReset.
8833 * common/environ.c (gdb_environ::operator=): Extend method to
8834 handle m_user_set_env_list and m_user_unset_env_list.
8835 (gdb_environ::clear): Likewise.
8836 (match_var_in_string): Change type of first parameter from 'char
8837 *' to 'const char *'.
8838 (gdb_environ::set): Extend method to handle
8839 m_user_set_env_list and m_user_unset_env_list.
8840 (gdb_environ::unset): Likewise.
8841 (gdb_environ::clear_user_set_env): New method.
8842 (gdb_environ::user_set_envp): Likewise.
8843 (gdb_environ::user_unset_envp): Likewise.
8844 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8845 m_user_unset_env_list on move constructor/assignment.
8846 (unset): Add new default parameter 'update_unset_list = true'.
8847 (clear_user_set_env): New method.
8848 (user_set_envp): Likewise.
8849 (user_unset_envp): Likewise.
8850 (m_user_set_env_list): New std::set.
8851 (m_user_unset_env_list): Likewise.
8852 * common/rsp-low.c (hex2str): New function.
8853 (bin2hex): New overload for bin2hex function.
8854 * common/rsp-low.c (hex2str): New prototype.
8855 (str2hex): New overload prototype.
8856 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8857 QEnvironmentUnset and QEnvironmentReset.
8858 (remote_protocol_features): Add QEnvironmentHexEncoded,
8859 QEnvironmentUnset and QEnvironmentReset packets.
8860 (send_environment_packet): New function.
8861 (extended_remote_environment_support): Likewise.
8862 (extended_remote_create_inferior): Call
8863 extended_remote_environment_support.
8864 (_initialize_remote): Add QEnvironmentHexEncoded,
8865 QEnvironmentUnset and QEnvironmentReset packet configs.
8866 * unittests/environ-selftests.c (gdb_selftest_env_var):
8867 New variable.
8868 (test_vector_initialization): New function.
8869 (test_init_from_host_environ): Likewise.
8870 (test_reinit_from_host_environ): Likewise.
8871 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8872 Likewise.
8873 (test_unset_set_empty_vector): Likewise.
8874 (test_vector_clear): Likewise.
8875 (test_std_move): Likewise.
8876 (test_move_constructor):
8877 (test_self_move): Likewise.
8878 (test_set_unset_reset): Likewise.
8879 (run_tests): Rewrite in terms of the functions above.
8880
654670a4
WP
88812017-08-31 Weimin Pan <weimin.pan@oracle.com>
8882
8883 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8884 (adi_available): Use a temp variable of type CORE_ADDR as argument
8885 3 when calling target_auxv_search.
8886 (adi_normalize_address): Use masks and xor operators to calculate
8887 normalized address.
8888 (adi_read_versions, adi_write_versions, adi_print_versions)
8889 (do_examine, do_assign): Use paddress.
8890
7755ddb7
JB
88912017-08-29 John Baldwin <jhb@FreeBSD.org>
8892
8893 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8894 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8895 out of loop and add supply of FIR.
8896 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8897 add collect of FIR.
8898
fd437cbc
SM
88992017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8900
3804a343 8901 PR gdb/21827
fd437cbc
SM
8902 * cli/cli-script.c (define_command): Don't convert command name
8903 to lower case.
8904
988f6b3d
JB
89052017-08-25 Joel Brobecker <brobecker@adacore.com>
8906
8907 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8908 Update all callers accordingly. Remove all code blocks handling
8909 the case where DISPP is not NULL.
8910
663c44ac
JK
89112017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8912
8913 PR symtab/22003
8914 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8915 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8916 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8917
f1902523
JK
89182017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8919
8920 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8921 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8922 (read_comp_units_from_section): New parameter abbrev_section, use
8923 read_and_check_comp_unit_head, allocate signatured_type if needed.
8924 (create_all_comp_units): Update read_comp_units_from_section caller.
8925
87215ad1
SDJ
89262017-08-23 Pedro Alves <palves@redhat.com>
8927
8928 PR remote/21852
8929 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8930 to null_ptid and switch to thread without reading the registers
8931 after adding the inferior.
8932
6e41ddec
JK
89332017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8934
8935 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8936 compile-gcc.
8937 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8938 (compile_to_object): Implement compile_gcc.
8939 (_initialize_compile): Install "set compile-gcc". Initialize
8940 compile_gcc.
8941
e68c32d5
JK
89422017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8943
8944 * compile/compile.c (compile_to_object): Conditionally call
8945 set_verbose. Conditionally call compile or compile_v0.
8946
58afddc6
WP
89472017-08-07 Weimin Pan <weimin.pan@oracle.com>
8948
8949 * sparc64-tdep.h: (adi_normalize_address): New export.
8950 * sparc-nat.h: (open_adi_tag_fd): New export.
8951 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8952 * sparc64-linux-tdep.c:
8953 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8954 (sparc64_linux_handle_segmentation_fault): New function.
8955 (sparc64_linux_init_abi): Register
8956 sparc64_linux_handle_segmentation_fault
8957 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8958 (sparc64_addr_bits_remove): New function.
8959 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8960 (MAX_PROC_NAME_SIZE): New macro.
8961 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8962 (sparc64adilist): New variable.
8963 (adi_proc_list): New variable.
8964 (find_adi_info): New function.
8965 (add_adi_info): New function.
8966 (get_adi_info_proc): New function.
8967 (get_adi_info): New function.
8968 (info_adi_command): New function.
8969 (read_maps_entry): New function.
8970 (adi_available): New function.
8971 (adi_normalize_address): New function.
8972 (adi_align_address): New function.
8973 (adi_convert_byte_count): New function.
8974 (adi_tag_fd): New function.
8975 (adi_is_addr_mapped): New function.
8976 (adi_read_versions): New function.
8977 (adi_write_versions): New function.
8978 (adi_print_versions): New function.
8979 (do_examine): New function.
8980 (do_assign): New function.
8981 (adi_examine_command): New function.
8982 (adi_assign_command): New function.
8983 (_initialize_sparc64_adi_tdep): New function.
8984
11db9430
SM
89852017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8986
8987 * breakpoint.c (breakpoints_info): Rename to ...
8988 (info_breakpoints_command): ... this.
8989 (watchpoints_info): Rename to ...
8990 (info_watchpoints_command): ... this.
8991 (tracepoints_info): Rename to ...
8992 (info_tracepoints_command): ... this.
8993 (_initialize_breakpoint): Adjust.
8994 * dcache.c (dcache_info): Rename to ...
8995 (info_display_command): ... this.
8996 (_initialize_dcache): Adjust.
8997 * frame.h (args_info): Rename to ...
8998 (info_args_command): ... this.
8999 (locals_info): Rename to ...
9000 (info_locals_command): ... this.
9001 * infcmd.c (nofp_registers_info): Rename to ...
9002 (info_registers_command): ... this.
9003 (float_info): Rename to ...
9004 (info_float_command): ... this.
9005 (program_info): Rename to ...
9006 (info_program_command): ... this.
9007 (all_registers_info): Rename to ...
9008 (info_all_registers_command): ... this.
9009 (vector_info): Rename to ...
9010 (info_vector_command): ... this.
9011 (float_info): Rename to ...
9012 (info_float_command): ... this.
9013 (_initialize_infcmd): Adjust.
9014 * inferior.h (term_info): Rename to ...
9015 (info_terminal_command): ... this.
9016 * inflow.c (term_info): Rename to ...
9017 (info_terminal_command): ... this.
9018 (_initialize_inflow): Adjust.
9019 * infrun.c (signals_info): Rename to ...
9020 (info_signals_command): ... this.
9021 (_initialize_infrun): Adjust.
9022 * objc-lang.c (classes_info): Rename to ...
9023 (info_classes_command): ... this.
9024 (selectors_info): Rename to ...
9025 (info_selectors_command): ... this.
9026 (_initialize_objc_language): Adjust.
9027 * printcmd.c (sym_info): Rename to ...
9028 (info_symbol_command): ... this.
9029 (address_info): Rename to ...
9030 (info_address_command): ... this.
9031 (display_info): Rename to ...
9032 (info_display_command): ... this.
9033 (_initialize_printcmd): Adjust.
9034 * reverse.c (bookmarks_info): Rename to ...
9035 (info_breakpoints_command): ... this.
9036 (_initialize_reverse): Adjust.
9037 * ser-go32.c (dos_info): Rename to ...
9038 (info_serial_command): ... this.
9039 (_initialize_ser_dos): Adjust.
9040 * skip.c (skip_info): Rename to ...
9041 (info_skip_command): ... this.
9042 (_initialize_step_skip): Adjust.
9043 * source.c (line_info): Rename to ...
9044 (info_line_command): ... this.
9045 (source_info): Rename to ...
9046 (info_source_command)
9047 * stack.c (frame_info): Rename to ...
9048 (info_frame_command): ... this.
9049 (locals_info): Rename to ...
9050 (info_locals_command): ... this.
9051 (args_info): Rename to ...
9052 (info_args_command): ... this.
9053 (_initialize_stack): Adjust.
9054 * symtab.c (sources_info): Rename to ...
9055 (info_sources_command): ... this.
9056 (variables_info): Rename to ...
9057 (info_variables_command): ... this.
9058 (functions_info): Rename to ...
9059 (info_functions_command): ... this.
9060 (types_info): Rename to ...
9061 (info_types_command): ... this.
9062 (_initialize_symtab): Adjust.
9063 * target.c (target_info): Rename to ...
9064 (info_target_command): ... this.
9065 (initialize_targets): Adjust.
9066 * tracepoint.c (tvariables_info): Rename to ...
9067 (info_tvariables_command): ... this.
9068 (scope_info): Rename to ...
9069 (info_scope_command): ... this.
9070 (trace_dump_actions): Adjust.
9071 (_initialize_tracepoint): Adjust.
9072
b270e6f9
TT
90732017-08-22 Tom Tromey <tom@tromey.com>
9074
9075 * breakpoint.h (install_breakpoint): Update.
9076 * breakpoint.c (add_solib_catchpoint): Update.
9077 (install_breakpoint): Change argument to a std::unique_ptr.
9078 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9079 (create_breakpoint_sal, create_breakpoint): Update.
9080 (watch_command_1, catch_exec_command_1)
9081 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9082 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9083 Return the breakpoint.
9084 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9085 (new_single_step_breakpoint): Update.
9086 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9087 std::unique_ptr.
9088 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9089 std::unique_ptr.
9090 * break-catch-sig.c (create_signal_catchpoint): Use
9091 std::unique_ptr.
9092 * ada-lang.c (create_ada_exception_catchpoint): Use
9093 std::unique_ptr.
9094
36bd8eaa
TT
90952017-08-22 Tom Tromey <tom@tromey.com>
9096
9097 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9098
56f37645
TT
90992017-08-22 Tom Tromey <tom@tromey.com>
9100
9101 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9102 (lookup_partial_symbol): Update.
9103
0b581c69
TT
91042017-08-22 Tom Tromey <tom@tromey.com>
9105
9106 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9107 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9108 (find_and_open_source, symtab_to_fullname): Update.
9109 * psymtab.c (psymtab_to_fullname): Update.
9110
14278e1f
TT
91112017-08-22 Tom Tromey <tom@tromey.com>
9112
9113 * exec.c (exec_file_attach): Update.
9114 * linux-thread-db.c (try_thread_db_load): Update.
9115 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9116 * utils.c (gdb_realpath): Change return type.
9117 (gdb_realpath_keepfile): Update.
9118 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9119 (_initialize_utils): Register the new self test.
9120 * source.c (openp): Update.
9121 (find_and_open_source): Update.
9122 * nto-tdep.c (nto_find_and_open_solib): Update.
9123 * main.c (set_gdb_data_directory): Update.
9124 (captured_main_1): Update.
9125 * dwarf2read.c (dwarf2_get_dwz_file): Update
9126 (dw2_map_symbol_filenames): Update.
9127 * auto-load.c (auto_load_safe_path_vec_update): Update.
9128 (filename_is_in_auto_load_safe_path_vec): Change type of
9129 "filename_realp".
9130 (auto_load_objfile_script): Update.
9131 (file_is_auto_load_safe): Update. Use std::string.
9132 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9133
4971c9a7
TT
91342017-08-22 Tom Tromey <tom@tromey.com>
9135
9136 * utils.c (gdb_realpath_keepfile): Return a
9137 gdb::unique_xmalloc_ptr.
9138 * exec.c (exec_file_attach): Update.
9139 * utils.h (gdb_realpath_keepfile): Return a
9140 gdb::unique_xmalloc_ptr.
9141
e3e41d58
TT
91422017-08-22 Tom Tromey <tom@tromey.com>
9143
9144 * compile/compile.c (compile_file_command): Use
9145 gdb::unique_xmalloc_ptr, std::string.
9146 * utils.c (gdb_abspath): Change return type.
9147 * source.c (openp): Update.
9148 * objfiles.c (allocate_objfile): Update.
9149 * main.c (set_gdb_data_directory): Update.
9150 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9151
0d999a6e
ZZ
91522017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9153
9154 * cli-cmds.c (list_commands): List actual code around more than
9155 one location.
9156
329d5e7e
JB
91572017-08-21 John Baldwin <jhb@FreeBSD.org>
9158
9159 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9160
bf223d3e
PA
91612017-08-21 Pedro Alves <palves@redhat.com>
9162
9163 PR gdb/19487
9164 * c-exp.y (variable production): Handle function aliases.
9165 * minsyms.c (msymbol_is_text): New function.
9166 * minsyms.h (msymbol_is_text): Declare.
9167 * symtab.c (find_function_alias_target): New function.
9168 * symtab.h (find_function_alias_target): Declare.
9169
c973d0aa
PA
91702017-08-21 Pedro Alves <palves@redhat.com>
9171
9172 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9173 typedefs.
9174 * typeprint.c (whatis_exp): If handling "whatis", and expression
9175 is OP_TYPE, strip one typedef level. Otherwise don't strip
9176 typedefs here.
9177 * valops.c (value_cast): Save "to" type before resolving
9178 stubs/typedefs. Use that type as resulting value's type.
9179
2989a365
TT
91802017-08-18 Tom Tromey <tom@tromey.com>
9181 Pedro Alves <palves@redhat.com>
9182
9183 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9184 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9185 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9186 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9187 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9188 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9189 (linux_get_siginfo_data): Add "thread" argument. Use
9190 scoped_restore.
9191 * linux-nat.c (linux_child_follow_fork)
9192 (check_stopped_by_watchpoint): Use scoped_restore.
9193 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9194 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9195 (restore_inferior_ptid, save_inferior_ptid): Remove.
9196 * btrace.c (btrace_fetch): Use scoped_restore.
9197 * bsd-uthread.c (bsd_uthread_fetch_registers)
9198 (bsd_uthread_store_registers): Use scoped_restore.
9199 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9200 scoped_restore.
9201 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9202 (aix_thread_xfer_partial): Use scoped_restore.
9203 * inferior.h (save_inferior_ptid): Remove.
9204
e60eb288
YQ
92052017-08-18 Yao Qi <yao.qi@linaro.org>
9206
9207 PR tdep/21818
9208 * arm-tdep.c (gdb_print_insn_arm): Mark
9209 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9210
6d580b63
YQ
92112017-08-18 Yao Qi <yao.qi@linaro.org>
9212
9213 * NEWS: Mention GDBserver's new option "--selftest".
9214 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9215 * selftest.c: Move it to common/selftest.c.
9216 * selftest.h: Move it to common/selftest.h.
9217 * selftest-arch.c (reset): New function.
9218 (tests_with_arch): Call reset.
9219
86dcbf50
YQ
92202017-08-18 Yao Qi <yao.qi@linaro.org>
9221
9222 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9223 instead of exception_fprintf and printf_filtered.
9224
7649770c
YQ
92252017-08-18 Yao Qi <yao.qi@linaro.org>
9226
9227 * selftest.c (register_self_test): Rename it to
9228 selftests::register_test.
9229 (run_self_tests): selftest::run_tests.
9230 * selftest.h: Update declarations.
9231 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9232 selftests::register_test_foreach_arch.
9233 * selftest-arch.h: Update declaration.
9234 * aarch64-tdep.c: Update.
9235 * arm-tdep.c: Likewise.
9236 * disasm-selftests.c: Likewise.
9237 * dwarf2loc.c: Likewise.
9238 * dwarf2-frame.c: Likewise.
9239 * findvar.c: Likewise.
9240 * gdbarch-selftests.c: Likewise.
9241 * maint.c (maintenance_selftest): Likewise.
9242 * regcache.c: Likewise.
9243 * rust-exp.y: Likewise.
9244 * selftest-arch.c: Likewise.
9245 * unittests/environ-selftests.c: Likewise.
9246 * unittests/function-view-selftests.c: Likewise.
9247 * unittests/offset-type-selftests.c: Likewise.
9248 * unittests/optional-selftests.c: Likewise.
9249 * unittests/scoped_restore-selftests.c: Likewise.
9250 * utils-selftests.c: Likewise.
9251
b0cba12e
PA
92522017-08-17 Pedro Alves <palves@redhat.com>
9253
9254 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9255 local.
9256
4c8aa72d
PA
92572017-08-17 Pedro Alves <palves@redhat.com>
9258
9259 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9260 field.
9261 (reset_die_in_process): Delete, replaced by ...
9262 (process_die_scope): ... this new class. Make it responsible for
9263 freeing cu->line_header too.
9264 (process_die): Use process_die_scope.
9265 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9266 cu->line_header_die_owner. Don't release the line header if it's
9267 owned by the CU.
9268 (setup_type_unit_groups): Make the CU/DIE own the line header.
9269 Don't release the line header here.
9270
ba713918
AL
92712017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9272
9273 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9274
44d0fb3a
RK
92752017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9276
9277 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9278 Single-Key mode
9279
a5afdb16
RK
92802017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9281
9282 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9283 mode command list.
9284
47613aeb
SH
92852017-08-15 Stafford Horne <shorne@gmail.com>
9286
9287 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9288
9c3cc999
SH
92892017-08-15 Stafford Horne <shorne@gmail.com>
9290
9291 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9292
206726fb
SDJ
92932017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9294
9295 PR gdb/21954
9296 * infcmd.c (unset_environment_command): Use the 'clear' method on
9297 the environment instead of resetting it.
9298
0335ac6d
JB
92992017-08-15 John Baldwin <jhb@FreeBSD.org>
9300
9301 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9302 platforms.
9303
d3abe1c8
TT
93042017-08-14 Tom Tromey <tom@tromey.com>
9305
9306 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9307 (print_binary_chars): Likewise.
9308 (BITS_IN_BYTES): Remove.
9309
d6382fff
TT
93102017-08-14 Tom Tromey <tom@tromey.com>
9311
9312 PR gdb/21675
9313 * valprint.c (LOW_ZERO): Change value to 034.
9314 (print_octal_chars): Add static_asserts for octal constants.
9315 * printcmd.c (print_scalar_formatted): Add 'd' case.
9316
f978cb06
TT
93172017-08-11 Tom Tromey <tom@tromey.com>
9318
9319 * symfile.c (add_symbol_file_command): Use std::vector.
9320
2f5404b3
TT
93212017-08-14 Tom Tromey <tom@tromey.com>
9322
9323 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9324 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9325 std::move.
9326 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9327
de7985c3
PA
93282017-08-11 Pedro Alves <palves@redhat.com>
9329
9330 * infrun.c (process_event_stop_test): Adjust
9331 function_name_is_marked_for_skip call.
9332 * skip.c: Include <list>.
9333 (skiplist_entry): Make it a class with private fields, and
9334 getters/setters.
9335 (skiplist_entry_chain): Delete.
9336 (skiplist_entries): New.
9337 (skiplist_entry_count): Delete.
9338 (highest_skiplist_entry_num): New.
9339 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9340 (add_skiplist_entry): Delete.
9341 (skiplist_entry::skiplist_entry): New.
9342 (skiplist_entry::add_entry): New.
9343 (skip_file_command, skip_function): Adjust.
9344 (compile_skip_regexp): Delete.
9345 (skip_command): Don't compile regexp here. Adjust to use
9346 skiplist_entry::add_entry.
9347 (skip_info): Adjust to use range-for and getters.
9348 (skip_enable_command, skip_disable_command): Adjust to use
9349 range-for and setters.
9350 (skip_delete_command): Adjust to use std::list.
9351 (add_skiplist_entry): Delete.
9352 (skip_file_p): Delete, refactored as ...
9353 (skiplist_entry::do_skip_file_p): ... this new method.
9354 (skip_gfile_p): Delete, refactored as ...
9355 (skiplist_entry::do_gskip_file_p): ... this new method.
9356 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9357 (skiplist_entry::skip_function_p): ... this new method.
9358 (function_name_is_marked_for_skip): Now returns bool, and takes
9359 the function sal by const reference. Adjust to use range-for and
9360 skiplist_entry methods.
9361 (_initialize_step_skip): Remove references to
9362 skiplist_entry_chain, skiplist_entry_count.
9363 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9364 takes the function sal by const reference.
9365
be7d3cd5
YQ
93662017-08-11 Yao Qi <yao.qi@linaro.org>
9367
9368 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9369 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9370 (dwarf2_frame_cache):
9371 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9372 RETURN_MASK_ALL and set *this_case to NULL.
9373 * frame-unwind.h: Update comments.
9374
1c90d9f0
YQ
93752017-08-11 Yao Qi <yao.qi@linaro.org>
9376
9377 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9378 (dwarf2_frame_state_copy_regs): Remove.
9379 (dwarf2_frame_state_free_regs): Remove.
9380 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9381 (dwarf2_restore_rule): Call method .alloc_regs instead of
9382 dwarf2_frame_state_alloc_regs.
9383 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9384 constructor. Call std::move.
9385 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9386 (dwarf2_frame_cache): Likewise.
9387
9388 [GDB_SELF_TEST]: Include selftest.h and
9389 selftest-arch.h.
9390 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9391 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9392 execute_cfa_program_test.
9393
9394 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9395 copy ctor, assignment operator, move assignment.
9396 <alloc_regs>: New method.
9397 <swap>: New method.
9398 (struct dwarf2_frame_state): Delete dtor.
9399 (dwarf2_frame_state_alloc_regs): Remove declaration.
9400 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9401 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9402
afe37d6b
YQ
94032017-08-11 Yao Qi <yao.qi@linaro.org>
9404
9405 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9406 (dwarf2_frame_state::dwarf2_frame_state): New.
9407 (dwarf2_frame_state::~dwarf2_frame_state): New.
9408 (dwarf2_fetch_cfa_info): Update.
9409 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9410 rather than a pointer. Update code.
9411 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9412 dtor.
9413 <data_align, code_align, retaddr_column>: Change them to const.
9414 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9415 to bool.
9416
b348037f
YQ
94172017-08-11 Yao Qi <yao.qi@linaro.org>
9418
9419 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9420 <loc.exp>: New field.
9421 * dwarf2-frame.c (execute_cfa_program): Update.
9422 (dwarf2_frame_prev_register): Update.
9423
e7c9de26
PA
94242017-08-10 Pedro Alves <palves@redhat.com>
9425
9426 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9427
e8c6b620
JB
94282017-08-09 John Baldwin <jhb@FreeBSD.org>
9429
9430 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9431 (fbsd_pending_children): Use std::list.
9432 (fbsd_remember_child): Likewise.
9433 (fbsd_is_child_pending): Likewise.
9434 (fbsd_pending_vfork_done): Use std::forward_list.
9435 (fbsd_add_vfork_done): Likewise.
9436 (fbsd_is_vfork_done_pending): Likewise.
9437 (fbsd_next_vfork_done): Likewise.
9438
e4a26669
JB
94392017-08-09 John Baldwin <jhb@FreeBSD.org>
9440
9441 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9442 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9443 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9444 for `mapfilename'.
9445 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 9446 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 9447
142311d3
JB
94482017-08-09 John Baldwin <jhb@FreeBSD.org>
9449
9450 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9451 "filestuff.h".
9452 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9453
42fa2e0e
TT
94542017-08-09 Tom Tromey <tom@tromey.com>
9455
9456 * skip.c (skiplist_entry): New constructor.
9457 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9458 (skiplist_entry::file_is_glob): Now bool.
9459 (skiplist_entry::file, skiplist_entry::function): Now
9460 std::string.
9461 (make_skip_entry): Return a unique_ptr. Use new.
9462 (free_skiplist_entry, free_skiplist_entry_cleanup)
9463 (make_free_skiplist_entry_cleanup): Remove.
9464 (skip_command, skip_disable_command, add_skiplist_entry)
9465 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9466 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9467 (function_name_is_marked_for_skip): Update.
9468 (skip_delete_command): Update. Use delete.
9469
cd3af38d
JW
94702017-08-09 Jiong Wang <jiong.wang@arm.com>
9471
9472 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9473 (aarch64_linux_core_read_description): New function.
9474 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9475
29592bde
PA
94762017-08-09 Pedro Alves <palves@redhat.com>
9477
9478 * cp-name-parser.y (cp_comp_to_string): Return a
9479 gdb::unique_xmalloc_ptr<char>.
9480 * cp-support.c (replace_typedefs_qualified_name)
9481 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9482 (cp_canonicalize_string_full): Use op= instead of explicit
9483 convertion.
9484 (cp_class_name_from_physname, method_name_from_physname)
9485 (cp_func_name, cp_remove_params): Adjust to use
9486 gdb::unique_xmalloc_ptr<char>.
9487 * cp-support.h (cp_comp_to_string): Return a
9488 gdb::unique_xmalloc_ptr<char>.
9489 * python/py-type.c (typy_lookup_type): Adjust to use
9490 gdb::unique_xmalloc_ptr<char>.
9491
b3340438
L
94922017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9493
9494 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9495
e88e8651
YQ
94962017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9497 Yao Qi <yao.qi@linaro.org>
9498
9499 * cp-support.c (cp_canonicalize_string_full): Use
9500 gdb::unique_xmalloc_ptr<char>.
9501 (cp_canonicalize_string): Likewise.
9502
f5a29eb0
YQ
95032017-08-09 Yao Qi <yao.qi@linaro.org>
9504
9505 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9506 * regformats/i386/amd64-avx-avx512.dat: Remove.
9507 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9508 * regformats/i386/amd64-avx-mpx.dat:Remove.
9509 * regformats/i386/amd64-avx.dat: Remove.
9510 * regformats/i386/amd64-mpx.dat: Remove.
9511 * regformats/i386/i386-avx-avx512.dat: Remove.
9512 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9513 * regformats/i386/i386-avx-mpx.dat: Remove.
9514 * regformats/i386/i386-mmx.dat: Remove.
9515 * regformats/i386/i386-mpx.dat: Remove.
9516
57757c2f
YQ
95172017-08-09 Yao Qi <yao.qi@linaro.org>
9518
9519 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9520 * amd64-tdep.c: Don't include features/i386/x32*.c.
9521 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9522 functions.
9523 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9524 and i386/x32-avx-avx512.
9525 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9526 and i386/x32.xml.
9527 * features/i386/x32-avx-avx512.c: Removed.
9528 * features/i386/x32-avx-avx512.xml: Removed.
9529 * features/i386/x32-avx.c: Removed.
9530 * features/i386/x32-avx.xml: Removed.
9531 * features/i386/x32.c: Removed.
9532 * features/i386/x32.xml: Removed.
9533 * regformats/i386/x32-avx-avx512.dat: Removed.
9534 * regformats/i386/x32-avx.dat: Removed.
9535 * regformats/i386/x32.dat: Removed.
9536
ba7b109b
MR
95372017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9538
9539 PR breakpoints/21886
9540 * mem-break.c (default_memory_insert_breakpoint): Use
9541 `->placed_address' rather than `->reqstd_address' for the
9542 breakpoint location.
9543
e347efc3
MR
95442017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9545
9546 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9547 assertions.
9548
0dba2a6c
MR
95492017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9550
9551 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9552 a union of `tdep_info', `tdesc_data' and `id'.
9553 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9554 rather than `info.tdep_info'.
9555 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9556 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9557 * i386-tdep.c (i386_gdbarch_init): Likewise.
9558 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9559 * mips-tdep.c (mips_gdbarch_init): Likewise.
9560 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9561 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9562 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9563 `info.tdep_info'.
9564 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9565 `info.tdep_info'.
9566 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9567 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9568 `info.tdep_info'.
9569 * spu-tdep.c (spu_gdbarch_init): Likewise.
9570 * gdbarch.h: Regenerate.
9571
16eb6b2d
LS
95722017-08-07 Leszek Swirski <leszeks@google.com>
9573
7b005726 9574 PR symtab/20899
16eb6b2d
LS
9575 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9576
74cbb09e
SM
95772017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9578
9579 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9580 (gdbsim_open): Rename gdb_argv args object to argv.
9581
ee0c3293
TT
95822017-08-05 Tom Tromey <tom@tromey.com>
9583
9584 * compile/compile-object-load.c (compile_object_load): Use
9585 gdb::unique_xmalloc_ptr.
9586 * cli/cli-dump.c (scan_filename): Rename from
9587 scan_filename_with_cleanup. Change return type.
9588 (scan_expression): Rename from scan_expression_with_cleanup.
9589 Change return type.
9590 (dump_memory_to_file, dump_value_to_file, restore_command):
9591 Use gdb::unique_xmalloc_ptr. Update.
9592 * cli/cli-cmds.c (find_and_open_script): Use
9593 gdb::unique_xmalloc_ptr.
9594 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9595 * symmisc.c (maintenance_print_symbols)
9596 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9597 * symfile.c (symfile_bfd_open, generic_load)
9598 (add_symbol_file_command, remove_symbol_file_command): Use
9599 gdb::unique_xmalloc_ptr.
9600 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9601 * psymtab.c (maintenance_print_psymbols): Use
9602 gdb::unique_xmalloc_ptr.
9603 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9604 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9605 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9606 (reload_shared_libraries_1): Likewise.
9607
3232fabd
TT
96082017-08-05 Tom Tromey <tom@tromey.com>
9609
9610 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9611 (rust_op_vector, rust_set_vector): New typedefs.
9612 (current_parser): New global.
9613 (work_obstack): Change to pointer type. Update all users.
9614 (rust_ast, pstate): Remove globals.
9615 (struct rust_parser): New.
9616 (%union) <params, field_inits>: Change type.
9617 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9618 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9619 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9620 (convert_params_to_types, convert_params_to_expression): Change
9621 type of "params".
9622 (ast_string): Change type of "fields".
9623 (rust_parse): Make a rust_parser. Remove cleanups.
9624 (rust_lex_tests): Make and install an auto_obstack.
9625
f02fd774
YQ
96262017-08-04 Yao Qi <yao.qi@linaro.org>
9627
9628 * configure.srv (ipa_x32_linux_regobj): New.
9629 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9630 instead of X86_TDESC_AVX512.
9631 (initialize_low_tracepoint): Call
9632 init_registers_x32_avx_avx512_linux.
9633
91975afd
YQ
96342017-08-04 Yao Qi <yao.qi@linaro.org>
9635
9636 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9637
2331fa3a
RK
96382017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9639
9640 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9641
744e4fe1
TT
96422017-08-03 Tom Tromey <tom@tromey.com>
9643
9644 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9645 Remove.
9646 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9647
1c034b67
TT
96482017-08-03 Tom Tromey <tom@tromey.com>
9649
9650 * python/py-param.c (compute_enum_values): Use gdb_argv.
9651
773a1edc
TT
96522017-08-03 Tom Tromey <tom@tromey.com>
9653
9654 * utils.h (struct gdb_argv_deleter): New.
9655 (gdb_argv): New class.
9656 * utils.c (gdb_argv::reset): New method.
9657 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9658 * tracefile.c (tsave_command): Use gdb_argv.
9659 * top.c (new_ui_command): Use gdb_argv.
9660 * symmisc.c (maintenance_print_symbols)
9661 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9662 * symfile.c (symbol_file_command, generic_load)
9663 (remove_symbol_file_command): Use gdb_argv.
9664 * stack.c (backtrace_command): Use gdb_argv.
9665 * source.c (add_path, show_substitute_path_command)
9666 (unset_substitute_path_command, set_substitute_path_command):
9667 Use gdb_argv.
9668 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9669 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9670 * remote.c (extended_remote_run, remote_put_command)
9671 (remote_get_command, remote_delete_command): Use gdb_argv.
9672 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9673 (gdbsim_open): Use gdb_argv.
9674 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9675 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9676 * procfs.c (procfs_info_proc): Use gdb_argv.
9677 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9678 * infrun.c (handle_command): Use gdb_argv.
9679 * inferior.c (add_inferior_command, clone_inferior_command):
9680 Use gdb_argv.
9681 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9682 * exec.c (exec_file_command): Use gdb_argv.
9683 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9684 * compile/compile.c (build_argc_argv): Use gdb_argv.
9685
0d50bde3
TT
96862017-08-03 Tom Tromey <tom@tromey.com>
9687
9688 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9689
7f968c89
TT
96902017-08-03 Tom Tromey <tom@tromey.com>
9691
9692 * python/python.c (compute_python_string): Return std::string.
9693 (gdbpy_eval_from_control_command): Update.
9694 (do_start_initialization): Use std::string.
9695 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9696 xstrprintf.
9697 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9698 xstrprintf.
9699
3c9ebddd
TT
97002017-08-03 Tom Tromey <tom@tromey.com>
9701
9702 * top.h (do_restore_instream_cleanup): Remove.
9703 * top.c (do_restore_instream_cleanup): Remove.
9704 (read_command_file): Use scoped_restore.
9705 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9706
b51b225e
TT
97072017-08-03 Tom Tromey <tom@tromey.com>
9708
9709 * cli/cli-script.c (execute_user_command)
9710 (execute_control_command): Use scoped_restore.
9711
ac991630
TT
97122017-08-03 Tom Tromey <tom@tromey.com>
9713
9714 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9715 (execute_user_command): Remove user_call_depth; use
9716 user_args_stack's size instead.
9717
898e0c8e
TT
97182017-08-03 Tom Tromey <tom@tromey.com>
9719
9720 * top.h (in_user_command): Remove.
9721 * top.c (in_user_command): Remove.
9722 * cli/cli-script.c (do_restore_user_call_depth)
9723 (execute_user_command): Update.
9724
26fcd5d7
TT
97252017-08-03 Tom Tromey <tom@tromey.com>
9726
9727 * valops.c (search_struct_method): Use gdb::byte_vector.
9728 * valarith.c (value_concat): Use std::vector.
9729 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9730 (simple_search_memory): Likewise.
9731 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9732 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9733 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9734 * elfread.c (elf_rel_plt_read): Use std::string.
9735 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9736 * cli/cli-dump.c (restore_section_callback): Use
9737 gdb::byte_vector.
9738
7c218e6c
TT
97392017-08-03 Tom Tromey <tom@tromey.com>
9740
9741 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9742
31b68d4a
TT
97432017-08-03 Tom Tromey <tom@tromey.com>
9744
9745 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9746 (tui_register_format): Use scoped_restore.
9747
2ec845e7
TT
97482017-08-03 Tom Tromey <tom@tromey.com>
9749
9750 * reverse.c (exec_direction_default): Remove.
9751 (exec_reverse_once): Use scoped_restore.
9752 * remote.c (restore_remote_timeout): Remove.
9753 (remote_flash_erase, remote_flash_write, remote_flash_done)
9754 (readchar, remote_serial_write): Use scoped_restore.
9755 * cli/cli-script.c (struct source_cleanup_lines_args)
9756 (source_cleanup_lines): Remove.
9757 (script_from_file): Use scoped_restore.
9758 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9759 (source_command): Use scoped_restore.
9760
b3bc8453
TT
97612017-08-03 Tom Tromey <tom@tromey.com>
9762
9763 * utils.h (make_cleanup_free_so): Remove.
9764 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9765 * solist.h (struct so_deleter): New.
9766 (so_list_up): New typedef.
9767 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9768
e3ad2841
TT
97692017-08-03 Tom Tromey <tom@tromey.com>
9770
9771 * utils.h (make_cleanup_restore_current_language): Remove.
9772 * utils.c (do_restore_current_language)
9773 (make_cleanup_restore_current_language): Remove.
9774 * parse.c (parse_exp_in_context_1)
9775 (parse_expression_with_language): Use
9776 scoped_restore_current_language.
9777 * mi/mi-main.c (mi_cmd_execute): Use
9778 scoped_restore_current_language.
9779 * language.h (scoped_restore_current_language): New class.
9780
b80cf838
TT
97812017-08-03 Tom Tromey <tom@tromey.com>
9782
9783 * compile/compile.c (cleanup_unlink_file): Remove.
9784 (compile_to_object): Use gdb::unlinker.
9785 (eval_compile_command): Likewise.
9786
fad0444a
TT
97872017-08-03 Tom Tromey <tom@tromey.com>
9788
9789 * utils.h (make_cleanup_fclose): Remove.
9790 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9791
6e7bc05c
TT
97922017-08-03 Tom Tromey <tom@tromey.com>
9793
9794 * top.c (open_terminal_stream): Return gdb_file_up.
9795 (new_ui_command): Update.
9796
4a45905b
TT
97972017-08-03 Tom Tromey <tom@tromey.com>
9798
9799 * source.c (print_source_lines_base, forward_search_command)
9800 (reverse_search_command): Use gdb_file_up.
9801
7cd06d6e
TT
98022017-08-03 Tom Tromey <tom@tromey.com>
9803
9804 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9805
ed166945
TT
98062017-08-03 Tom Tromey <tom@tromey.com>
9807
9808 * cli/cli-cmds.c (find_and_open_script): Change return type.
9809 Remove "streamp" and "full_path" parameters.
9810 (source_script_with_search): Update.
9811 * auto-load.c (source_script_file): Update.
9812 * cli/cli-cmds.h (find_and_open_script): Change type.
9813 (open_script): New struct.
9814
d419f42d
TT
98152017-08-03 Tom Tromey <tom@tromey.com>
9816
9817 * xml-support.c (xml_fetch_content_from_file): Update.
9818 * ui-file.c (stdio_file::open): Update.
9819 * tracefile-tfile.c (tfile_start): Update.
9820 * remote.c (remote_file_put, remote_file_get): Update.
9821 * nat/linux-procfs.c (linux_proc_get_int)
9822 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9823 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9824 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9825 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9826 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9827 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9828 * linux-nat.c (linux_proc_pending_signals): Update.
9829 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9830 (file_closer): Remove.
9831 * compile/compile.c (compile_to_object): Update.
9832 * common/filestuff.h (struct gdb_file_deleter): New.
9833 (gdb_file_up): New typedef.
9834 (gdb_fopen_cloexec): Change return type.
9835 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9836 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9837 (dump_binary_file, restore_binary_file): Update.
9838 * auto-load.c (auto_load_objfile_script_1): Update.
9839
4a2b031d
TT
98402017-08-03 Tom Tromey <tom@tromey.com>
9841
9842 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9843 (info_static_tracepoint_markers_command): Likewise.
9844 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9845 * skip.c (skip_info): Use ui_out_emit_table.
9846 * progspace.c (print_program_space): Use ui_out_emit_table.
9847 * osdata.c (info_osdata): Use ui_out_emit_table.
9848 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9849 ui_out_emit_table.
9850 * linux-thread-db.c (info_auto_load_libthread_db): Use
9851 ui_out_emit_table.
9852 * inferior.c (print_inferior): Use ui_out_emit_table.
9853 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9854 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9855 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9856 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9857 * ui-out.h (class ui_out_emit_table): New.
9858
a4f320fd
MR
98592017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9860
9861 * mips-tdep.c (mips_fpu_type_str): New function.
9862 (mips_dump_tdep): Call it.
9863
a2f1f308
MR
98642017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9865
9866 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9867 `->mips_fpu_type'.
9868
7e5ed83b
XR
98692017-07-31 Xavier Roirand <roirand@adacore.com>
9870
9871 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9872
4c9dc811
XR
98732017-07-27 Xavier Roirand <roirand@adacore.com>
9874
9875 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9876
27d41eac
YQ
98772017-07-26 Yao Qi <yao.qi@linaro.org>
9878
9879 * cli/cli-cmds.c (maintenancechecklist): New variable.
9880 * gdbcmd.h (maintenancechecklist): Declare it.
9881 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9882 Call i386_linux_read_description with different masks.
9883 * maint.c (maintenance_check_command): New function.
9884 (_initialize_maint_cmds): Call add_prefix_cmd.
9885 * target-descriptions.c (tdesc_reg): override operator != and ==.
9886 (tdesc_type): Likewise.
9887 (tdesc_feature): Likewise.
9888 (target_desc): Likewise.
9889 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9890 (maintenance_check_xml_descriptions): New function.
9891 (_initialize_target_descriptions) Add command "xml-descriptions".
9892 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9893
ea03d0d3
YQ
98942017-07-26 Yao Qi <yao.qi@linaro.org>
9895
9896 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9897 Include features/i386/32bit-*.c.
9898 (i386_linux_read_description): Generate target description if it
9899 doesn't exist.
9900 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9901 functions.
9902 * features/i386/32bit-linux.c: Re-generated.
9903 * features/i386/32bit-sse.c: Likewise.
9904 * target-descriptions.c (print_c_feature::visit): Print code to
9905 set register number if needed.
9906 (print_c_feature) <m_next_regnum>: New field.
9907
25aa13e5
YQ
99082017-07-26 Yao Qi <yao.qi@linaro.org>
9909
9910 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9911 (FEATURE_XMLFILES): New.
9912 (FEATURE_CFILES): New.
9913 New rules.
9914 (clean-cfiles): Remove generated c files.
9915 * features/i386/32bit-avx.c: Generated.
9916 * features/i386/32bit-avx512.c: Generated.
9917 * features/i386/32bit-core.c: Generated.
9918 * features/i386/32bit-linux.c: Generated.
9919 * features/i386/32bit-mpx.c: Generated.
9920 * features/i386/32bit-pkeys.c: Generated.
9921 * features/i386/32bit-sse.c: Generated.
9922 * target-descriptions.c: Include algorithm.
9923 (tdesc_element_visitor): Add method visit_end.
9924 (print_c_tdesc): Implement visit_end.
9925 (print_c_tdesc:: m_filename_after_features): Move it to
9926 protected.
9927 (print_c_feature): New class.
9928 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9929 name starts with "i386/32bit-".
9930
6eb1e6a8
YQ
99312017-07-26 Yao Qi <yao.qi@linaro.org>
9932
9933 * target-descriptions.c (tdesc_element_visitor): New class.
9934 (tdesc_element): New class.
9935 (tdesc_reg): Inherit from tdesc_element.
9936 (tdesc_reg::accept): New function.
9937 (tdesc_type): Inherit from tdesc_element.
9938 (tdesc_type::accept): New function.
9939 (tdesc_feature): Inherit from tdesc_element.
9940 (tdesc_feature::accept): New function.
9941 (target_desc): Inherit from tdesc_element.
9942 (target_desc::target_desc): New.
9943 (target_desc::~target_desc): New.
9944 (target_desc::accept): New.
9945 (allocate_target_description): Use new.
9946 (free_target_description): Use delete.
9947 (print_c_tdesc): New class.
9948 (maint_print_c_tdesc_cmd): Adjust.
9949
9950 * features/aarch64.c: Re-generated.
9951 * features/arc-arcompact.c: Re-generated.
9952 * features/arc-v2.c: Re-generated.
9953 * features/arm/arm-with-iwmmxt.c: Re-generated.
9954 * features/arm/arm-with-m.c: Re-generated.
9955 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9956 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9957 * features/arm/arm-with-neon.c: Re-generated.
9958 * features/arm/arm-with-vfpv2.c: Re-generated.
9959 * features/arm/arm-with-vfpv3.c: Re-generated.
9960 * features/i386/amd64-avx-avx512.c: Re-generated.
9961 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9962 * features/i386/amd64-avx.c: Re-generated.
9963 * features/i386/amd64-avx-linux.c: Re-generated.
9964 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9965 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9966 * features/i386/amd64-avx-mpx.c: Re-generated.
9967 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9968 * features/i386/amd64.c: Re-generated.
9969 * features/i386/amd64-linux.c: Re-generated.
9970 * features/i386/amd64-mpx.c: Re-generated.
9971 * features/i386/amd64-mpx-linux.c: Re-generated.
9972 * features/i386/i386-avx-avx512.c: Re-generated.
9973 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9974 * features/i386/i386-avx.c: Re-generated.
9975 * features/i386/i386-avx-linux.c: Re-generated.
9976 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9977 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9978 * features/i386/i386-avx-mpx.c: Re-generated.
9979 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9980 * features/i386/i386.c: Re-generated.
9981 * features/i386/i386-linux.c: Re-generated.
9982 * features/i386/i386-mmx.c: Re-generated.
9983 * features/i386/i386-mmx-linux.c: Re-generated.
9984 * features/i386/i386-mpx.c: Re-generated.
9985 * features/i386/i386-mpx-linux.c: Re-generated.
9986 * features/i386/x32-avx-avx512.c: Re-generated.
9987 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9988 * features/i386/x32-avx.c: Re-generated.
9989 * features/i386/x32-avx-linux.c: Re-generated.
9990 * features/i386/x32.c: Re-generated.
9991 * features/i386/x32-linux.c: Re-generated.
9992 * features/microblaze.c: Re-generated.
9993 * features/microblaze-with-stack-protect.c: Re-generated.
9994 * features/mips64-dsp-linux.c: Re-generated.
9995 * features/mips64-linux.c: Re-generated.
9996 * features/mips-dsp-linux.c: Re-generated.
9997 * features/mips-linux.c: Re-generated.
9998 * features/nds32.c: Re-generated.
9999 * features/nios2.c: Re-generated.
10000 * features/nios2-linux.c: Re-generated.
10001 * features/rs6000/powerpc-32.c: Re-generated.
10002 * features/rs6000/powerpc-32l.c: Re-generated.
10003 * features/rs6000/powerpc-403.c: Re-generated.
10004 * features/rs6000/powerpc-403gc.c : Re-generated.
10005 * features/rs6000/powerpc-405.c: Re-generated.
10006 * features/rs6000/powerpc-505.c: Re-generated.
10007 * features/rs6000/powerpc-601.c: Re-generated.
10008 * features/rs6000/powerpc-602.c: Re-generated.
10009 * features/rs6000/powerpc-603.c: Re-generated.
10010 * features/rs6000/powerpc-604.c: Re-generated.
10011 * features/rs6000/powerpc-64.c: Re-generated.
10012 * features/rs6000/powerpc-64l.c: Re-generated.
10013 * features/rs6000/powerpc-7400.c: Re-generated.
10014 * features/rs6000/powerpc-750.c: Re-generated.
10015 * features/rs6000/powerpc-860.c: Re-generated.
10016 * features/rs6000/powerpc-altivec32.c: Re-generated.
10017 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10018 * features/rs6000/powerpc-altivec64.c: Re-generated.
10019 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10020 * features/rs6000/powerpc-cell32l.c: Re-generated.
10021 * features/rs6000/powerpc-cell64l.c: Re-generated.
10022 * features/rs6000/powerpc-e500.c: Re-generated.
10023 * features/rs6000/powerpc-e500l.c: Re-generated.
10024 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10025 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10026 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10027 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10028 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10029 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10030 * features/rs6000/powerpc-vsx32.c: Re-generated.
10031 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10032 * features/rs6000/powerpc-vsx64.c: Re-generated.
10033 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10034 * features/rs6000/rs6000.c: Re-generated.
10035 * features/s390-linux32.c: Re-generated.
10036 * features/s390-linux32v1.c: Re-generated.
10037 * features/s390-linux32v2.c: Re-generated.
10038 * features/s390-linux64.c: Re-generated.
10039 * features/s390-linux64v1.c: Re-generated.
10040 * features/s390-linux64v2.c: Re-generated.
10041 * features/s390-te-linux64.c: Re-generated.
10042 * features/s390-tevx-linux64.c: Re-generated.
10043 * features/s390-vx-linux64.c: Re-generated.
10044 * features/s390x-linux64.c: Re-generated.
10045 * features/s390x-linux64v1.c: Re-generated.
10046 * features/s390x-linux64v2.c: Re-generated.
10047 * features/s390x-te-linux64.c: Re-generated.
10048 * features/s390x-tevx-linux64.c: Re-generated.
10049 * features/s390x-vx-linux64.c: Re-generated.
10050 * features/sparc/sparc32-solaris.c: Re-generated.
10051 * features/sparc/sparc64-solaris.c: Re-generated.
10052 * features/tic6x-c62x.c: Re-generated.
10053 * features/tic6x-c62x-linux.c: Re-generated.
10054 * features/tic6x-c64x.c: Re-generated.
10055 * features/tic6x-c64x-linux.c: Re-generated.
10056 * features/tic6x-c64xp.c: Re-generated.
10057 * features/tic6x-c64xp-linux.c: Re-generated.
10058
35b4818d
YQ
100592017-07-26 Yao Qi <yao.qi@linaro.org>
10060
10061 * i386-linux-tdep.c (i386_linux_read_description): New function.
10062 (i386_linux_core_read_description): Call
10063 i386_linux_read_description.
10064 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10065 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10066 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10067 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10068 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10069 * x86-linux-nat.c (x86_linux_read_description): Call
10070 i386_linux_read_description.
10071
8e2141c6
YQ
100722017-07-26 Yao Qi <yao.qi@linaro.org>
10073
10074 * NEWS: Mention it.
10075 * features/Makefile (%.c: %.xml): Pass the xml file name to
10076 command "maint print c-tdesc".
10077 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10078 name from 'arg'.
10079
b468ff4c
YQ
100802017-07-26 Yao Qi <yao.qi@linaro.org>
10081
10082 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10083 in-class initialization.
10084 (tdesc_create_feature): Call new instead of XCNEW.
10085 (free_target_description): Ue delete.
10086
b9c0e1b4
JB
100872017-07-25 John Baldwin <jhb@FreeBSD.org>
10088
10089 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10090
a04b5337
YQ
100912017-07-25 Yao Qi <yao.qi@linaro.org>
10092
10093 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10094 constant.
10095 (amd64_x32_init_abi): Likewise.
10096 * amd64-tdep.h (amd64_init_abi): Update declaration.
10097 (amd64_x32_init_abi): Likewise.
10098
02ad7fc2
YQ
100992017-07-25 Yao Qi <yao.qi@linaro.org>
10100
10101 PR tdep/21717
10102 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10103 condition for FPSCR.
10104 (arm_linux_store_inferior_registers): Likewise.
10105
b6f48cb0
TT
101062017-07-22 Tom Tromey <tom@tromey.com>
10107
10108 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10109 <syscalls_counts>: Now a std::vector.
10110 (get_catch_syscall_inferior_data): Use "new".
10111 (catch_syscall_inferior_data_cleanup): Use "delete".
10112 (insert_catch_syscall, remove_catch_syscall)
10113 (clear_syscall_counts): Update.
10114
e12c9b7a
TT
101152017-07-22 Tom Tromey <tom@tromey.com>
10116
10117 * break-catch-syscall.c (syscall_catchpoint)
10118 <syscalls_to_be_caught>: Now a std::vector<int>
10119 (~syscall_catchpoint): Remove.
10120 (insert_catch_syscall, remove_catch_syscall)
10121 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10122 (print_mention_catch_syscall, print_recreate_catch_syscall):
10123 Update.
10124 (create_syscall_event_catchpoint): Change type of "filter"
10125 parameter.
10126 (catch_syscall_split_args): Return a std::vector.
10127 (catch_syscall_command_1, catching_syscall_number_1): Update.
10128
4fa8aeac
TT
101292017-07-22 Tom Tromey <tom@tromey.com>
10130
10131 * break-catch-throw.c (struct exception_catchpoint)
10132 <exception_rx>: Now a std::string.
10133 (~exception_catchpoint): Remove.
10134 (print_one_detail_exception_catchpoint): Update.
10135 (handle_gnu_v3_exceptions): Change type of except_rx.
10136 (extract_exception_regexp): Return a std::string.
10137 (catch_exception_command_1): Update.
10138
f746a154
TT
101392017-07-22 Tom Tromey <tom@tromey.com>
10140
10141 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10142 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10143 std::vector.
10144 <catch_all>: Now a bool.
10145 (~signal_catchpoint): Remove.
10146 (signal_catchpoint_insert_location)
10147 (signal_catchpoint_remove_location)
10148 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10149 (signal_catchpoint_print_mention)
10150 (signal_catchpoint_print_recreate)
10151 (signal_catchpoint_explains_signal): Update.
10152 (create_signal_catchpoint): Change type of "filter" and
10153 "catch_all".
10154 (catch_signal_split_args): Return a std::vector. Change type of
10155 "catch_all".
10156 (catch_signal_command): Update.
10157
47e77640
PA
101582017-07-20 Pedro Alves <palves@redhat.com>
10159
10160 * ada-lang.c (ada_language_defn): Make extern.
10161 (_initialize_ada_language): Remove add_language call.
10162 * c-lang.c (c_language_defn, cplus_language_defn)
10163 (asm_language_defn, minimal_language_defn): Make extern.
10164 (_initialize_c_language): Delete.
10165 * completer.c (compare_cstrings): Delete, moved to utils.h.
10166 * d-lang.c (d_language_defn): Make extern.
10167 (_initialize_d_language): Remove add_language calls.
10168 * defs.h (enum language): Add comment.
10169 * f-lang.c (f_language_defn): Make extern.
10170 (_initialize_f_language): Remove add_language call.
10171 * go-lang.c (go_language_defn): Make extern.
10172 (_initialize_go_language): Remove add_language call.
10173 * language.c: Include <algorithm>.
10174 (languages): Redefine as const array.
10175 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10176 (set_language_command): Handle "local". Use for-range loop.
10177 (set_language): Remove loop.
10178 (language_enum): Rewrite.
10179 (language_def, language_str): Remove loops.
10180 (add_language): Delete.
10181 (add_set_language_command): New, based on add_languages.
10182 (skip_language_trampoline): Adjust.
10183 (local_language_defn): Delete.
10184 (language_gdbarch_post_init): Adjust.
10185 (_initialize_language): Remove add_language calls. Call
10186 add_set_language_command.
10187 * language.h (add_language): Delete.
10188 (auto_language_defn)
10189 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10190 (asm_language_defn, c_language_defn, cplus_language_defn)
10191 (d_language_defn, f_language_defn, go_language_defn)
10192 (m2_language_defn, objc_language_defn, opencl_language_defn)
10193 (pascal_language_defn, rust_language_defn): Declare.
10194 * m2-lang.c (m2_language_defn): Make extern.
10195 (_initialize_m2_language): Remove add_language call.
10196 * objc-lang.c (objc_language_defn): Make extern.
10197 (_initialize_objc_language): Remove add_language call.
10198 * opencl-lang.c (opencl_language_defn): Make extern.
10199 (_initialize_opencl_language): Remove add_language call.
10200 * p-lang.c (pascal_language_defn): Make extern.
10201 (_initialize_pascal_language): Delete.
10202 * rust-lang.c (rust_language_defn): Make extern.
10203 (_initialize_rust_language): Delete.
10204 * utils.h (compare_cstrings): New static inline function.
10205
edb0c9cb
PA
102062017-07-20 Pedro Alves <palves@redhat.com>
10207
10208 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10209 (get_var_value): Constify parameters.
10210 (get_int_var_value): Change prototype.
10211 (to_fixed_range_type): Adjust.
10212 * ada-lang.h (get_int_var_value): Change prototype.
10213
a778f165
PA
102142017-07-20 Pedro Alves <palves@redhat.com>
10215
10216 * dwarf2read.c (dw2_lookup_symbol): Use
10217 SYMBOL_MATCHES_SEARCH_NAME.
10218 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10219
42edd901
PA
102202017-07-20 Pedro Alves <palves@redhat.com>
10221
10222 * block.c (block_iter_name_step, block_iter_name_first)
10223 (block_iter_name_next): Delete.
10224 (block_lookup_symbol_primary): Adjust to use
10225 dict_iter_match_first/dict_iter_match_next.
10226 * block.h (block_iter_name_first, block_iter_name_next): Delete
10227 declarations.
10228 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10229 dict_iter_match_first/dict_iter_match_next.
10230
cf325299
PA
102312017-07-20 Pedro Alves <palves@redhat.com>
10232
10233 * cp-support.c (cp_find_first_component_aux): Add missing case for
10234 end of string.
10235
c5ed0576
DB
102362017-07-18 David Blaikie <dblaikie@gmail.com>
10237
10238 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10239 of dwo_cu's dwo_file.
10240
27841e76
YQ
102412017-07-18 Yao Qi <yao.qi@linaro.org>
10242
10243 * remote.c (store_registers_using_G): Remove one line comment.
10244
cfb7e58b
YQ
102452017-07-18 Yao Qi <yao.qi@linaro.org>
10246
10247 * regcache.c (regcache_cpy): Simplify it.
10248 (regcache::cpy_no_passthrough): Remove it.
10249 * regcache.h (cpy_no_passthrough): Remove it.
10250 (regcache_dup, regcache_cpy): Update comments.
10251
386535dd
PA
102522017-07-18 Pedro Alves <palves@redhat.com>
10253
10254 * remote-sim.c (sim_command_completer): Adjust to work with a
10255 completion_tracker instead of a VEC.
10256
c45ec17c
PA
102572017-07-17 Pedro Alves <palves@redhat.com>
10258
10259 * completer.c (complete_source_filenames): New function.
10260 (complete_address_and_linespec_locations): New function.
10261 (location_completer): Use complete_address_and_linespec_locations.
10262 (completion_tracker::build_completion_result): Honor the tracker's
10263 request to suppress append.
10264 * completer.h (completion_tracker::suppress_append_ws)
10265 (completion_tracker::set_suppress_append_ws): New methods.
10266 (completion_tracker::m_suppress_append_ws): New field.
10267 (complete_source_filenames): New declaration.
10268 * linespec.c (linespec_complete_what): New.
10269 (struct ls_parser) <complete_what, completion_word,
10270 completion_quote_char, completion_quote_end, completion_tracker>:
10271 New fields.
10272 (string_find_incomplete_keyword_at_end): New.
10273 (linespec_lexer_lex_string): Record quote char. If in completion
10274 mode, don't throw.
10275 (linespec_lexer_consume_token): Advance the completion word point.
10276 (linespec_lexer_peek_token): Save/restore completion info.
10277 (save_stream_and_consume_token): New.
10278 (set_completion_after_number): New.
10279 (linespec_parse_basic): Set what to complete next depending on
10280 token. Handle function and label completions specially.
10281 (parse_linespec): Disable objc shortcut in completion mode. Set
10282 what to complete next depending on token type. Skip keyword if in
10283 completion mode.
10284 (complete_linespec_component, linespec_complete): New.
10285 * linespec.h (linespec_complete): Declare.
10286
be966d42
PA
102872017-07-17 Pedro Alves <palves@redhat.com>
10288
10289 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10290 Handle 'operator<' / 'operator<<'.
10291
a2459270
PA
102922017-07-17 Pedro Alves <palves@redhat.com>
10293
10294 * completer.c (collect_explicit_location_matches): Handle
10295 MATCH_LABEL.
10296 (convert_explicit_location_to_linespec): New, factored out from
10297 ...
10298 (convert_explicit_location_to_sals): ... this.
10299 (complete_label): New.
10300 (linespec_complete_label, find_label_symbols_in_block): New.
10301 (find_label_symbols): Add completion_mode parameter and adjust to
10302 call find_label_symbols_in_block.
10303 * linespec.h (linespec_complete_label): Declare.
10304
c6756f62
PA
103052017-07-17 Pedro Alves <palves@redhat.com>
10306
10307 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10308 complete_symbol_mode parameter.
10309 * cli/cli-cmds.c (complete_command): Get the completion result out
10310 of the handle_brkchars tracker if used a custom word point.
10311 * completer.c: Include "linespec.h".
10312 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10313 (advance_to_expression_complete_word_point): New.
10314 (completion_tracker::completes_to_completion_word): New.
10315 (complete_files_symbols): Pass down
10316 complete_symbol_mode::EXPRESSION.
10317 (explicit_options, probe_options): New.
10318 (collect_explicit_location_matches): Complete on the
10319 explictit_loc->foo instead of word. Use
10320 linespec_complete_function. Handle MATCH_LINE. Handle offering
10321 keyword and options completions.
10322 (backup_text_ptr): Delete.
10323 (skip_keyword): New.
10324 (complete_explicit_location): Remove 'word' parameter. Add
10325 language, quoted_arg_start and quoted_arg_end parameters.
10326 Rewrite, parsing left to right.
10327 (location_completer): Rewrite.
10328 (location_completer_handle_brkchars): New function.
10329 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10330 (enum complete_line_internal_reason): Adjust comments.
10331 (completion_tracker::discard_completions): New.
10332 (completer_handle_brkchars_func_for_completer): Handle
10333 location_completer.
10334 (gdb_custom_word_point_brkchars)
10335 (gdb_org_rl_basic_quote_characters): New.
10336 (gdb_completion_word_break_characters_throw)
10337 (completion_find_completion_word): Handle trackers that use a
10338 custom word point.
10339 (completion_tracker::advance_custom_word_point_by): New.
10340 (completion_tracker::build_completion_result): Don't rely on
10341 readline appending the quote char.
10342 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10343 use a custom word point.
10344 (gdb_rl_attempted_completion_function): Restore
10345 rl_basic_quote_characters.
10346 * completer.h (class completion_tracker): Extend intro comment.
10347 (completion_tracker::set_quote_char)
10348 (completion_tracker::quote_char)
10349 (completion_tracker::set_use_custom_word_point)
10350 (completion_tracker::use_custom_word_point)
10351 (completion_tracker::custom_word_point)
10352 (completion_tracker::set_custom_word_point)
10353 (completion_tracker::advance_custom_word_point_by)
10354 (completion_tracker::completes_to_completion_word)
10355 (completion_tracker::discard_completions): New methods.
10356 (completion_tracker::m_quote_char)
10357 (completion_tracker::m_use_custom_word_point)
10358 (completion_tracker::m_custom_word_point): New fields.
10359 (advance_to_expression_complete_word_point): Declare.
10360 * f-lang.c (f_collect_symbol_completion_matches): Add
10361 complete_symbol_mode parameter.
10362 * language.h (struct language_defn)
10363 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10364 parameter.
10365 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10366 (linespec_complete_function): New function.
10367 (linespec_lexer_lex_keyword): Adjust.
10368 * linespec.h (linespec_keywords, linespec_complete_function): New
10369 declarations.
10370 * location.c (find_end_quote): New function.
10371 (explicit_location_lex_one): Add explicit_completion_info
10372 parameter. Save quoting info. Don't throw if being called for
10373 completion. Don't handle Ada operators here.
10374 (is_cp_operator, skip_op_false_positives, first_of)
10375 (explicit_location_lex_one_function): New function.
10376 (string_to_explicit_location): Replace 'dont_throw' parameter with
10377 an explicit_completion_info pointer parameter. Handle it. Don't
10378 use explicit_location_lex_one to lex function names. Use
10379 explicit_location_lex_one_function instead.
10380 * location.h (struct explicit_completion_info): New.
10381 (string_to_explicit_location): Replace 'dont_throw' parameter with
10382 an explicit_completion_info pointer parameter.
10383 * symtab.c (default_collect_symbol_completion_matches_break_on):
10384 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10385 (default_collect_symbol_completion_matches)
10386 (collect_symbol_completion_matches): Add complete_symbol_mode
10387 parameter.
10388 (collect_symbol_completion_matches_type): Pass down
10389 complete_symbol_mode::EXPRESSION.
10390 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10391 parameter. Handle LINESPEC mode.
10392 * symtab.h (complete_symbol_mode): New.
10393 (default_collect_symbol_completion_matches_break_on)
10394 (default_collect_symbol_completion_matches)
10395 (collect_symbol_completion_matches)
10396 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10397 parameter.
10398
1d550c82
PA
103992017-07-17 Pedro Alves <palves@redhat.com>
10400
10401 * utils.c (enum class strncmp_iw_mode): New.
10402 (strcmp_iw): Rename to ...
10403 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10404 parameters. Handle them.
10405 (strncmp_iw): New.
10406 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10407 * utils.h (strncmp_iw): Declare.
10408 (strcmp_iw): Move describing comments here.
10409
8090b426
PA
104102017-07-17 Pedro Alves <palves@redhat.com>
10411
10412 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10413 CP_OPERATOR_STR.
10414 * c-typeprint.c (is_type_conversion_operator): Use
10415 CP_OPERATOR_STR.
10416 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10417 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10418 CP_OPERATOR_LEN.
10419 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10420 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10421 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10422 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10423 CP_OPERATOR_STR.
10424 * location.c: Include "cp-support.h".
10425 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10426 CP_OPERATOR_STR.
10427 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10428 CP_OPERATOR_LEN.
10429
6a2c1b87
PA
104302017-07-17 Pedro Alves <palves@redhat.com>
10431
10432 * cli/cli-cmds.c (complete_command): Use a completion tracker
10433 along with completion_find_completion_word for handle_brkchars
10434 phase.
10435 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10436 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10437 (struct gdb_rl_completion_word_info): New.
10438 (gdb_rl_find_completion_word): New.
10439 (completion_find_completion_word): New.
10440 * completer.h (completion_find_completion_word): Declare.
10441
eb3ff9a5
PA
104422017-07-17 Pedro Alves <palves@redhat.com>
10443
10444 * ada-lang.c (symbol_completion_match): Adjust comments.
10445 (symbol_completion_add): Replace vector parameter with
10446 completion_tracker parameter. Use it.
10447 (ada_make_symbol_completion_list): Rename to...
10448 (ada_collect_symbol_completion_matches): ... this. Add
10449 completion_tracker parameter and use it.
10450 (ada_language_defn): Adjust.
10451 * break-catch-syscall.c (catch_syscall_completer): Adjust
10452 prototype and work with completion_tracker instead of VEC.
10453 * breakpoint.c (condition_completer): Adjust prototype and work
10454 with completion_tracker instead of VEC.
10455 * c-lang.c (c_language_defn, cplus_language_defn)
10456 (asm_language_defn, minimal_language_defn): Adjust to renames.
10457 * cli/cli-cmds.c (complete_command): Rework using
10458 completion_tracker. Catch exceptions when completing.
10459 * cli/cli-decode.c (integer_unlimited_completer)
10460 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10461 with completion_tracker instead of VEC.
10462 * command.h (struct completion_tracker): Forward declare.
10463 (completer_ftype, completer_handle_brkchars_ftype): Change
10464 types.
10465 (complete_on_cmdlist, complete_on_enum): Adjust.
10466 * completer.c: Include <algorithm>.
10467 (struct gdb_completer_state): New.
10468 (current_completion): New global.
10469 (readline_line_completion_function): Delete.
10470 (noop_completer, filename_completer)
10471 (filename_completer_handle_brkchars, complete_files_symbols)
10472 (linespec_location_completer): Adjust to work with a
10473 completion_tracker instead of a VEC.
10474 (string_or_empty): New.
10475 (collect_explicit_location_matches): Adjust to work with a
10476 completion_tracker instead of a VEC.
10477 (explicit_location_completer): Rename to ...
10478 (complete_explicit_location): ... this and adjust to work with a
10479 completion_tracker instead of a VEC.
10480 (location_completer): Adjust to work with a completion_tracker
10481 instead of a VEC.
10482 (add_struct_fields): Adjust to work with a completion_list instead
10483 of VEC.
10484 (expression_completer): Rename to ...
10485 (complete_expression): ... this and adjust to work with a
10486 completion_tracker instead of a VEC. Use complete_files_symbols.
10487 (expression_completer): Reimplement on top of complete_expression.
10488 (symbol_completer): Adjust to work with a completion_tracker
10489 instead of a VEC.
10490 (enum complete_line_internal_reason): Add describing comments.
10491 (complete_line_internal_normal_command): Adjust to work with a
10492 completion_tracker instead of a VEC.
10493 (complete_line_internal): Rename to ...
10494 (complete_line_internal_1): ... this and adjust to work with a
10495 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10496 handle_brkchars phase.
10497 (new_completion_tracker): Delete.
10498 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10499 complete_line_internal_1.
10500 (free_completion_tracker): Delete.
10501 (INITIAL_COMPLETION_HTAB_SIZE): New.
10502 (completion_tracker::completion_tracker)
10503 (completion_tracker::~completion_tracker): New.
10504 (maybe_add_completion): Delete.
10505 (completion_tracker::maybe_add_completion)
10506 (completion_tracker::add_completion)
10507 (completion_tracker::add_completions): New.
10508 (throw_max_completions_reached_error): Delete.
10509 (complete_line): Adjust to work with a completion_tracker instead
10510 of a VEC. Don't create a completion_tracker_t or check for max
10511 completions here.
10512 (command_completer, command_completer_handle_brkchars)
10513 (signal_completer, reg_or_group_completer_1)
10514 (reg_or_group_completer, default_completer_handle_brkchars):
10515 Adjust to work with a completion_tracker.
10516 (gdb_completion_word_break_characters_throw): New.
10517 (gdb_completion_word_break_characters): Reimplement.
10518 (line_completion_function): Delete.
10519 (completion_tracker::recompute_lowest_common_denominator)
10520 (expand_preserving_ws)
10521 (completion_tracker::build_completion_result)
10522 (completion_result::completion_result)
10523 (completion_result::completion_result)
10524 (completion_result::~completion_result)
10525 (completion_result::completion_result)
10526 (completion_result::release_match_list, compare_cstrings)
10527 (completion_result::sort_match_list)
10528 (completion_result::reset_match_list)
10529 (gdb_rl_attempted_completion_function_throw)
10530 (gdb_rl_attempted_completion_function): New.
10531 * completer.h (completion_list, struct completion_result)
10532 (class completion_tracker): New.
10533 (complete_line): Add completion_tracker parameter.
10534 (readline_line_completion_function): Delete.
10535 (gdb_rl_attempted_completion_function): New.
10536 (noop_completer, filename_completer, expression_completer)
10537 (location_completer, symbol_completer, command_completer)
10538 (signal_completer, reg_or_group_completer): Update prototypes.
10539 (completion_tracker_t, new_completion_tracker)
10540 (make_cleanup_free_completion_tracker): Delete.
10541 (enum maybe_add_completion_enum): Delete.
10542 (maybe_add_completion): Delete.
10543 (throw_max_completions_reached_error): Delete.
10544 * corefile.c (complete_set_gnutarget): Adjust to work with a
10545 completion_tracker instead of a VEC.
10546 * cp-abi.c (cp_abi_completer): Adjust to work with a
10547 completion_tracker instead of a VEC.
10548 * d-lang.c (d_language_defn): Adjust.
10549 * disasm.c (disassembler_options_completer): Adjust to work with a
10550 completion_tracker instead of a VEC.
10551 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10552 (f_collect_symbol_completion_matches): ... this. Adjust to work
10553 with a completion_tracker instead of a VEC.
10554 (f_language_defn): Adjust.
10555 * go-lang.c (go_language_defn): Adjust.
10556 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10557 Adjust to work with a completion_tracker instead of a VEC.
10558 * infrun.c (handle_completer): Likewise.
10559 * interps.c (interpreter_completer): Likewise.
10560 * interps.h (interpreter_completer): Likewise.
10561 * language.c (unknown_language_defn, auto_language_defn)
10562 (local_language_defn): Adjust.
10563 * language.h (language_defn::la_make_symbol_completion_list):
10564 Rename to ...
10565 (language_defn::la_collect_symbol_completion_matches): ... this
10566 and adjust to work with a completion_tracker instead of a VEC.
10567 * m2-lang.c (m2_language_defn): Adjust.
10568 * objc-lang.c (objc_language_defn): Adjust.
10569 * opencl-lang.c (opencl_language_defn): Adjust.
10570 * p-lang.c (pascal_language_defn): Adjust.
10571 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10572 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10573 with a completion_tracker.
10574 * rust-lang.c (rust_language_defn): Adjust.
10575 * symtab.c (free_completion_list, do_free_completion_list)
10576 (return_val, completion_tracker): Delete.
10577 (completion_list_add_name, completion_list_add_symbol)
10578 (completion_list_add_msymbol, completion_list_objc_symbol)
10579 (completion_list_add_fields, add_symtab_completions): Add
10580 completion_tracker parameter and use it.
10581 (default_make_symbol_completion_list_break_on_1): Rename to...
10582 (default_collect_symbol_completion_matches_break_on): ... this.
10583 Add completion_tracker parameter and use it instead of allocating
10584 a completion tracker here.
10585 (default_make_symbol_completion_list_break_on): Delete old
10586 implementation.
10587 (default_make_symbol_completion_list): Delete.
10588 (default_collect_symbol_completion_matches): New.
10589 (make_symbol_completion_list): Delete.
10590 (collect_symbol_completion_matches): New.
10591 (make_symbol_completion_type): Rename to ...
10592 (collect_symbol_completion_matches_type): ... this. Add
10593 completion_tracker parameter and use it instead of VEC.
10594 (make_file_symbol_completion_list_1): Rename to...
10595 (collect_file_symbol_completion_matches): ... this. Add
10596 completion_tracker parameter and use it instead of VEC.
10597 (make_file_symbol_completion_list): Delete.
10598 (add_filename_to_list): Use completion_list instead of a VEC.
10599 (add_partial_filename_data::list): Now a completion_list.
10600 (make_source_files_completion_list): Work with a completion_list
10601 instead of a VEC.
10602 * symtab.h: Include "completer.h".
10603 (default_make_symbol_completion_list_break_on)
10604 (default_make_symbol_completion_list, make_symbol_completion_list)
10605 (make_symbol_completion_type, make_file_symbol_completion_list)
10606 (make_source_files_completion_list): Delete.
10607 (default_collect_symbol_completion_matches_break_on)
10608 (default_collect_symbol_completion_matches)
10609 (collect_symbol_completion_matches)
10610 (collect_symbol_completion_matches_type)
10611 (collect_file_symbol_completion_matches)
10612 (make_source_files_completion_list): New.
10613 * top.c (init_main): Don't install a rl_completion_entry_function
10614 hook. Install a rl_attempted_completion_function hook instead.
10615 * tui/tui-layout.c (layout_completer): Adjust to work with a
10616 completion_tracker.
10617 * tui/tui-regs.c (tui_reggroup_completer):
10618 * tui/tui-win.c (window_name_completer, focus_completer)
10619 (winheight_completer): Adjust to work with a completion_tracker.
10620 * value.c: Include "completer.h".
10621 (complete_internalvar): Adjust to work with a completion_tracker.
10622 * value.h (complete_internalvar): Likewise.
10623
6e1dbf8c
PA
106242017-07-17 Pedro Alves <palves@redhat.com>
10625
10626 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10627 renames.
10628 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10629 comments to completer_ftype's declaration.
10630 <completer_handle_brkchars>: Change type to
10631 completer_handle_brkchars_ftype.
10632 * command.h (completer_ftype): Add describing comment and give
10633 names to parameters.
10634 (completer_ftype_void): Rename to ...
10635 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10636 (set_cmd_completer_handle_brkchars): Adjust.
10637 * completer.c (filename_completer_handle_brkchars): New function.
10638 (complete_line_internal_normal_command): New function, factored
10639 out from ...
10640 (complete_line_internal): ... here.
10641 (command_completer_handle_brkchars)
10642 (default_completer_handle_brkchars)
10643 (completer_handle_brkchars_func_for_completer): New functions.
10644 * completer.h (set_gdb_completion_word_break_characters): Delete
10645 declaration.
10646 (completer_handle_brkchars_func_for_completer): New declaration.
10647 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10648 completer_handle_brkchars_func_for_completer.
10649
78b13106
PA
106502017-07-17 Pedro Alves <palves@redhat.com>
10651
10652 * completer.c (symbol_completer): New function, based on
10653 make_symbol_completion_list_fn.
10654 * completer.h (symbol_completer): New declaration.
10655 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10656 * python/py-cmd.c (completers): Adjust.
10657 * symtab.c (make_symbol_completion_list_fn): Delete.
10658 * symtab.h (make_symbol_completion_list_fn): Delete.
10659 * cli/cli-decode.c (add_cmd): Adjust.
10660
bbf2f4df
PA
106612017-07-17 Pedro Alves <palves@redhat.com>
10662
10663 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10664 * dwarf2read.c: Include "filename-seen-cache.h".
10665 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10666 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10667 * filename-seen-cache.c: New file.
10668 * filename-seen-cache.h: New file.
10669 * symtab.c: Include "filename-seen-cache.h".
10670 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10671 (create_filename_seen_cache, clear_filename_seen_cache)
10672 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10673 to filename-seen-cache.h/filename-seen-cache.c.
10674 (output_source_filename, sources_info)
10675 (maybe_add_partial_symtab_filename)
10676 (make_source_files_completion_list): Adjust to use
10677 filename_seen_cache.
10678
330cdd98
PA
106792017-07-17 Pedro Alves <palves@redhat.com>
10680
10681 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10682 fields.
10683 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10684 dwarf2_debug_sections*)): New.
10685 (dwarf2_per_objfile::dwarf2_per_objfile(const
10686 dwarf2_per_objfile&)): Declare as deleted.
10687 (dwarf2_per_objfile::operator=): Declare as deleted.
10688 (dwarf2_per_objfile::dwarf2_per_objfile)
10689 (dwarf2_per_objfile::~dwarf2_per_objfile)
10690 (dwarf2_per_objfile::free_cached_comp_units): New.
10691 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10692 ctor. Call dwarf2_per_objfile's ctor manually.
10693 (dwarf2_locate_sections): Deleted/refactored as ...
10694 (dwarf2_per_objfile::locate_sections): ... this new method.
10695 (free_cached_comp_units): Defer to
10696 dwarf2_per_objfile::free_cached_comp_units.
10697 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10698
8880f2a9
TT
106992017-07-14 Tom Tromey <tom@tromey.com>
10700
10701 PR rust/21764:
10702 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10703 parameter.
10704 <UNOP_SIZEOF>: Split into separate case.
10705 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10706
65547233
TT
107072017-07-14 Tom Tromey <tom@tromey.com>
10708
10709 PR rust/21763:
10710 * symtab.c (symbol_matches_domain): Add language_rust to special
10711 case.
10712 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10713 treat LOC_TYPEDEF symbols as variables.
10714
8f14146e
PA
107152017-07-14 Pedro Alves <palves@redhat.com>
10716
10717 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10718 symtabs matching all symtabs with SRCFILE as file name instead of
10719 only considering the first hit, with lookup_symtab.
10720
2347965c
SM
107212017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10722
10723 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10724 operator_name parameters.
10725 (gen_expr): Update function call.
10726
40f4af28
SM
107272017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10728
10729 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10730 parameter.
10731 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10732 Likewise.
10733 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10734 parameter, use agent_expr::gdbarch instead, update function
10735 calls.
10736 (locexpr_tracepoint_var_ref): Likewise.
10737 (loclist_tracepoint_var_ref): Likewise.
10738 * ax-gdb.c (gen_trace_static_fields): Likewise.
10739 (gen_traced_pop): Likewise.
10740 (gen_frame_args_address): Likewise.
10741 (gen_frame_locals_address): Likewise.
10742 (gen_var_ref): Likewise.
10743 (gen_struct_ref_recursive): Likewise.
10744 (gen_static_field): Likewise.
10745 (gen_maybe_namespace_elt): Likewise.
10746 (gen_expr): Likewise.
10747 (gen_trace_for_var): Likewise.
10748 (gen_trace_for_expr): Likewise.
10749 (gen_trace_for_return_address): Likewise.
10750
053f8057
SM
107512017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10752
10753 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10754 parameter.
10755 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10756
6661ad48
SM
107572017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10758
10759 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10760 from ax, update calls.
10761 (gen_usual_arithmetic): Likewise.
10762 (gen_integral_promotions): Likewise.
10763 (gen_bitfield_ref): Likewise.
10764 (gen_primitive_field): Likewise.
10765 (gen_struct_ref_recursive): Likewise.
10766 (gen_struct_ref): Likewise.
10767 (gen_maybe_namespace_elt): Likewise.
10768 (gen_struct_elt_for_reference): Likewise.
10769 (gen_namespace_elt): Likewise.
10770 (gen_aggregate_elt_ref): Likewise.
10771 (gen_expr): Get gdbarch from ax, update calls.
10772 (gen_expr_binop_rest): Likewise.
10773
c55a47e7
PA
107742017-07-13 Pedro Alves <palves@redhat.com>
10775
10776 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10777 as default tdesc.
10778 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10779 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10780 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10781 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10782 tdep.
10783 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10784 Get final tdesc from the tdep.
10785 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10786 default tdesc.
10787 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10788 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10789 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10790 Use it as default tdesc.
10791 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10792 down to amd_init_abi. No longer handle fallback tdesc here.
10793 * amd64-tdep.h (tdesc_x32): Declare.
10794 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10795 parameter.
10796 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10797 as default tdesc.
10798
55efceab
AA
107992017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10800
10801 * s390-linux-tdep.c (s390_process_record): Add support for
10802 instructions new in arch12.
10803
0aa37b65
JB
108042017-07-11 John Baldwin <jhb@FreeBSD.org>
10805
10806 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10807 PT_GETFSBASE and PT_GETGSBASE.
10808 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10809 PT_SETGSBASE.
10810
48aeef91
JB
108112017-07-11 John Baldwin <jhb@FreeBSD.org>
10812
10813 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10814 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10815 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10816 those rules.
10817 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10818 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10819 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10820 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10821 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10822 * features/i386/amd64.xml: Add 64bit-segments.xml.
10823 * features/i386/amd64-avx-avx512.c: Regenerated.
10824 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10825 * features/i386/amd64-avx-mpx.c: Regenerated.
10826 * features/i386/amd64-avx.c: Regenerated.
10827 * features/i386/amd64-mpx.c: Regenerated.
10828 * features/i386/amd64.c: Regenerated.
10829 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10830 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10831 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10832 * regformats/i386/amd64-avx.dat: Regenerated.
10833 * regformats/i386/amd64-mpx.dat: Regenerated.
10834 * regformats/i386/amd64.dat: Regenerated.
10835
77c501bc
YQ
108362017-07-10 Yao Qi <yao.qi@linaro.org>
10837
10838 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10839 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10840
6dc8d757
AK
108412017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10842
10843 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10844 unsetenv.
10845 * gnulib/aclocal.m4: Regenerate.
10846 * gnulib/config.in: Regenerate.
10847 * gnulib/configure: Regenerate.
10848 * gnulib/import/Makefile.am: Regenerate.
10849 * gnulib/import/Makefile.in: Regenerate.
10850 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10851 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10852 * gnulib/import/m4/environ.m4: New file.
10853 * gnulib/import/m4/setenv.m4: New file.
10854 * gnulib/import/setenv.c: New file.
10855 * gnulib/import/unsetenv.c: New file.
10856
266934d1
SM
108572017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10858
10859 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10860 address when op is DW_OP_addr.
10861
03278692
TT
108622017-07-09 Tom Tromey <tom@tromey.com>
10863
10864 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10865 check and apply to outer type.
10866
4b654465
JB
108672017-07-07 John Baldwin <jhb@FreeBSD.org>
10868
10869 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10870 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10871 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10872 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10873
2af9fc44
JB
108742017-07-07 John Baldwin <jhb@FreeBSD.org>
10875
10876 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10877
382b69bb
JB
108782017-07-07 John Baldwin <jhb@FreeBSD.org>
10879
10880 * corelow.c (get_core_siginfo): Remove.
10881 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10882 instead of get_core_siginfo.
10883 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10884 * gdbarch.h: Re-generate.
10885 * gdbarch.c: Re-generate.
10886 * linux-tdep.c (linux_core_xfer_siginfo): New.
10887 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10888
6e5eab33
JB
108892017-07-07 John Baldwin <jhb@FreeBSD.org>
10890
10891 * corelow.c (thread_section_name): Move to ...
10892 * gdbcore.h (thread_section_name): ... here.
10893
929edea9
JB
108942017-07-07 John Baldwin <jhb@FreeBSD.org>
10895
10896 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10897 (struct siginfo32): New.
10898 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10899 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10900 via ptrace(PT_LWPINFO).
10901
762c974a
JB
109022017-07-07 John Baldwin <jhb@FreeBSD.org>
10903
10904 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10905 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10906 (fbsd_get_siginfo_type): New.
10907 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10908 (_initialize_fbsd_tdep): New.
10909
33c5cd75
DB
109102017-07-06 David Blaikie <dblaikie@gmail.com>
10911
10912 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10913 a singular dwo_unit*) to support multiple CUs in the same way that
10914 multiple TUs are supported.
10915 (create_cus_hash_table): Replace create_dwo_cu with a function for
10916 parsing multiple CUs from a DWO file.
10917 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10918 create_dwo_cu.
10919 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10920 htab_find, rather than comparing the signature to a singleton CU in
10921 the dwo_file.
10922
8455d262
PA
109232017-07-06 Pedro Alves <palves@redhat.com>
10924
10925 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10926
4da3eb35
PA
109272017-07-04 Pedro Alves <palves@redhat.com>
10928
10929 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10930 * gdbtypes.h (TYPE_STATIC): Delete.
10931 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10932 is_synchronized, is_native>: Delete.
10933 <dummy>: Bump.
10934 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10935 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10936 (TYPE_FN_FIELD_ABSTRACT): Delete.
10937
5bfd255c
SM
109382017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10939
10940 * buffer.h (buffer_finish): Fix spelling mistakes.
10941
25c54127
EZ
109422017-07-01 Eli Zaretskii <eliz@gnu.org>
10943
10944 * .dir-locals.el: Automatically switch to C-style comments in
10945 versions of Emacs that support the feature.
10946
dc4bde35
SDJ
109472017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10948 Pedro Alves <palves@redhat.com>
10949
10950 PR cli/21688
10951 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10952 (process_next_line): New variable 'inline_cmd'.
10953 Adjust 'if' clauses for "python", "compile" and "guile" to use
10954 'command_name_equals' and check for '!inline_cmd'.
10955
51ed89aa
SDJ
109562017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10957
10958 PR cli/21688
10959 * cli/cli-script.c (command_name_equals_not_inline): New function.
10960 (process_next_line): Adjust 'if' clauses for "python", "compile"
10961 and "guile" to use command_name_equals_not_inline.
10962
eb17d413
PA
109632017-06-29 Pedro Alves <palves@redhat.com>
10964
10965 * completer.c (expression_completer): Call
10966 linespec_location_completer instead of location_completer.
10967
195bcdd5
PA
109682017-06-29 Pedro Alves <palves@redhat.com>
10969
10970 * completer.c (expression_completer): Remove code that recomputes
10971 'text' from 'word'.
10972
adc764e7
YQ
109732017-06-29 Yao Qi <yao.qi@linaro.org>
10974
10975 * regformats/regdat.sh: Generate code with
10976 "ifndef IN_PROCESS_AGENT".
10977
6e75794e
PA
109782017-06-28 Pedro Alves <palves@redhat.com>
10979
10980 * command.h: Include "common/scoped_restore.h".
10981
bc491f2e
YQ
109822017-06-28 Yao Qi <yao.qi@linaro.org>
10983
10984 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10985 instead of obstack_grow.
10986
41664b45
DG
109872017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10988
10989 PR gdb/21337
10990 * symfile.c (reread_symbols): Call objfiles_changed just before
10991 read_symbols.
10992
6da67eb1
PA
109932017-06-27 Pedro Alves <palves@redhat.com>
10994
10995 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10996 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10997 (completion_list_add_symbol, completion_list_add_msymbol):
10998 ... these new functions.
10999 (add_symtab_completions)
11000 (default_make_symbol_completion_list_break_on_1): Adjust.
11001
23732b1e
PA
110022017-06-27 Pedro Alves <palves@redhat.com>
11003
11004 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11005 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11006 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11007 dtor.
11008 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11009 'storage_obstack' field an auto_obstack. In-class initialize all
11010 non-bitfield fields. Make minsyms_read bool.
11011 * symfile.c (read_symbols): Adjust.
11012
a4d1e79a
AH
110132017-06-27 Alan Hayward <alan.hayward@arm.com>
11014
11015 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11016 (gdbsim_store_register): Likewise.
11017
8268c778
PA
110182017-06-27 Pedro Alves <palves@redhat.com>
11019
11020 * c-exp.y (name_obstack): Now an auto_obstack.
11021 (yylex): Use auto_obstack::clear.
11022 (c_parse): Use auto_obstack::clear instead of reinitializing and
11023 freeing the obstack.
11024 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11025 * d-exp.y (name_obstack): Now an auto_obstack.
11026 (yylex): Use auto_obstack::clear.
11027 (d_parse): Use auto_obstack::clear instead of reinitializing and
11028 freeing the obstack.
11029 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11030 auto_obstack.
11031 * dwarf2read.c (create_addrmap_from_index)
11032 (dwarf2_build_psymtabs_hard)
11033 (update_enumeration_type_from_children): Likewise.
11034 * gdb_obstack.h (auto_obstack): New type.
11035 * go-exp.y (name_obstack): Now an auto_obstack.
11036 (build_packaged_name): Use auto_obstack::clear.
11037 (go_parse): Use auto_obstack::clear instead of reinitializing and
11038 freeing the obstack.
11039 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11040 auto_obstack.
11041 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11042 * rust-exp.y (work_obstack): Now an auto_obstack.
11043 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11044 reinitializing and freeing the obstack.
11045 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11046 (host_char_to_target): Use auto_obstack.
11047 * utils.h (make_cleanup_obstack_free): Delete declaration.
11048 * valprint.c (generic_emit_char, generic_printstr): Use
11049 auto_obstack.
11050
db665f42
SM
110512017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11052
11053 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11054 thread.
11055 (darwin_init_thread_list): Don't update dummy thread.
11056 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11057
873c0814
SM
110582017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11059
11060 * record-full.c (netorder16): Remove.
11061
8b5a7a6e
SM
110622017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11063
11064 * common/diagnostics.h: Define macros for GCC.
11065 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11066 * common/vec.h: Include diagnostics.h.
11067 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11068 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11069 warning.
11070
d1435379
SM
110712017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11072
11073 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11074 New macro.
11075 * ada-lex.l: Ignore deprecated register warnings.
11076
cc75e0fd
SM
110772017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11078
11079 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11080 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11081
07809eaf
SM
110822017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11083
11084 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11085 its own line.
11086
f076f034
SM
110872017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11088
11089 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11090
0dd5cbc5
AH
110912017-06-23 Alan Hayward <alan.hayward@arm.com>
11092
11093 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11094 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11095 (xtensa_register_read_masked): Likewise.
11096
d4c6ce5b
SDJ
110972017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11098
11099 * common/environ.c (gdb_environ::unset): Update comment.
11100
16892a03
AH
111012017-06-22 Alan Hayward <alan.hayward@arm.com>
11102
11103 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11104 registers.
11105
d7dcbefc
AH
111062017-06-22 Alan Hayward <alan.hayward@arm.com>
11107
11108 * record-full.c (record_full_exec_insn): Use byte_vector.
11109
b30ff123
YQ
111102017-06-22 Yao Qi <yao.qi@linaro.org>
11111
11112 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11113 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11114
4fa847d7
AH
111152017-06-22 Alan Hayward <alan.hayward@arm.com>
11116
11117 * remote.c (cached_reg): Move from here...
11118 * regcache.h (cached_reg): ...to here.
11119 * python/py-unwind.c (struct reg_info): Remove.
11120 (cached_frame_info): Use cached_reg_t.
11121 (pyuw_prev_register): Likewise.
11122 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11123 (pyuw_dealloc_cache): Free all registers.
11124
f4906a9a
PA
111252017-06-22 Pedro Alves <palves@redhat.com>
11126 Simon Marchi <simon.marchi@ericsson.com>
11127
11128 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11129 warning.
11130 * common/diagnostics.h: New file.
11131
b45a1208
PA
111322017-06-22 Pedro Alves <palves@redhat.com>
11133
11134 * common/agent.h: Add include guards.
11135
e4da2c61
SM
111362017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11137
11138 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11139 talk about addressable units instead of bytes.
11140
96160d60
SDJ
111412017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11142
11143 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11144 of '::const_iterator'.
11145
9a6c7d9c
SDJ
111462017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11147
11148 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11149 'unittests/environ-selftests.c'.
11150 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11151 * charset.c (find_charset_names): Declare object 'iconv_env'.
11152 Update code to use 'iconv_env' object. Remove call to
11153 'free_environ'.
11154 * common/environ.c: Include <utility>.
11155 (make_environ): Delete function.
11156 (free_environ): Delete function.
11157 (gdb_environ::clear): New function.
11158 (gdb_environ::operator=): New function.
11159 (gdb_environ::get): Likewise.
11160 (environ_vector): Delete function.
11161 (set_in_environ): Delete function.
11162 (gdb_environ::set): New function.
11163 (unset_in_environ): Delete function.
11164 (gdb_environ::unset): New function.
11165 (gdb_environ::envp): Likewise.
11166 * common/environ.h: Include <vector>.
11167 (struct gdb_environ): Delete; transform into...
11168 (class gdb_environ): ... this class.
11169 (free_environ): Delete prototype.
11170 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11171 environ_vector): Likewise.
11172 * infcmd.c (run_command_1): Update code to call
11173 'envp' from 'gdb_environ' class.
11174 (environment_info): Update code to call methods from 'gdb_environ'
11175 class.
11176 (unset_environment_command): Likewise.
11177 (path_info): Likewise.
11178 (path_command): Likewise.
11179 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11180 (inferior::inferior): Initialize 'environment' using the host's
11181 information.
11182 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11183 Include "environ.h".
11184 (class inferior) <environment>: Change type from 'struct
11185 gdb_environ' to 'gdb_environ'.
11186 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11187 methods from 'gdb_environ' class.
11188 * solib.c (solib_find_1): Likewise
11189 * unittests/environ-selftests.c: New file.
11190
75c554cf
YQ
111912017-06-20 Yao Qi <yao.qi@linaro.org>
11192
11193 * features/i386/i386-linux.xml: Exchange the order of including
11194 32bit-linux.xml and 32bit-sse.xml.
11195 * features/i386/i386-linux.c: Regenerated.
11196
72ddacb7
YQ
111972017-06-20 Yao Qi <yao.qi@linaro.org>
11198
11199 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11200 Delete copy ctor and assignment operator.
11201 (tdesc_type): Likewise.
11202 (tdesc_feature): Likewise.
11203 (tdesc_free_reg): Remove.
11204 (tdesc_create_reg): Use new.
11205 (tdesc_free_type): Remove.
11206 (tdesc_create_vector): Use new.
11207 (tdesc_create_union): Likewise.
11208 (tdesc_create_flags): Likewise.
11209 (tdesc_create_enum): Likewise.
11210 (tdesc_free_feature): Delete.
11211 (free_target_description): Use delete.
11212
325c9fd4
JB
112132017-06-19 John Baldwin <jhb@FreeBSD.org>
11214
11215 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11216 registers.
11217
16b7a719
PA
112182017-06-19 Pedro Alves <palves@redhat.com>
11219
11220 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11221 after gdb::unlinker.
11222
1c8e01c9
SDJ
112232017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11224
11225 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11226 gdb_environ to access an environment variable.
11227
ffce45d2
TP
112282017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11229
11230 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11231 gdb_byte*.
11232
1d4fbac9
SM
112332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11234
11235 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11236
8465943a
SM
112372017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11238
11239 * configure: Re-generate.
11240 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11241
3e019bdc
SM
112422017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11243
11244 * configure: Re-generate.
11245 * warning.m4: Pass -Werror to compiler when checking for
11246 supported warning flags.
11247
cf0dd6f0
SM
112482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11249
11250 * Makefile.in (COMPILE.pre): Add "-x c++".
11251
6f98355c
YQ
112522017-06-16 Alan Hayward <alan.hayward@arm.com>
11253 Pedro Alves <palves@redhat.com>
11254 Yao Qi <yao.qi@linaro.org>
11255
11256 * defs.h (RequireLongest): New.
11257 (extract_integer): Declare function template.
11258 (extract_signed_integer): Remove the declaration, but define it
11259 static inline.
11260 (extract_unsigned_integer): Likewise.
11261 (store_integer): Declare function template.
11262 (store_signed_integer): Remove the declaration, but define it
11263 static inline.
11264 (store_unsigned_integer): Likewise.
11265 * findvar.c (extract_integer): New function template.
11266 (extract_signed_integer): Remove.
11267 (extract_unsigned_integer): Remove.
11268 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11269 instantiations.
11270 (store_integer): New function template.
11271 (store_signed_integer): Remove.
11272 (store_unsigned_integer): Remove.
11273 (store_integer): Explicit instantiations.
11274 * regcache.c (regcache_raw_read_signed): Update.
11275 (regcache::raw_read): New function.
11276 (regcache::raw_read_signed): Remove.
11277 (regcache::raw_read_unsigned): Remove.
11278 (regcache_raw_read_unsigned): Update.
11279 (regcache_raw_write_unsigned): Update.
11280 (regcache::raw_write_signed): Remove.
11281 (regcache::raw_write): New function.
11282 (regcache_cooked_read_signed): Update.
11283 (regcache::raw_write_unsigned): Remove.
11284 (regcache::cooked_read_signed): Remove.
11285 (regcache_cooked_read_unsigned): Update.
11286 (regcache::cooked_read_unsigned): Remove.
11287 (regcache_cooked_write_signed): Update.
11288 (regcache_cooked_write_unsigned): Update.
11289 * regcache.h (regcache) <raw_read_signed>: Remove.
11290 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11291 <raw_read, raw_write>: New.
11292 <cooked_read_signed, cooked_write_signed>: Remove.
11293 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11294 <cooked_read, cooked_write>: New.
11295 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11296 (sh64_pseudo_register_write): Update.
11297
a87dc45a
AK
112982017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11299
11300 * arc-tdep.c (arc_disassembler_options): New variable.
11301 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11302 of default_print_insn.
11303 (arc_delayed_print_insn): Set info->section when needed,
11304 use default_print_insn to retrieve a disassembler.
11305
45159d6a
SDJ
113062017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11307
11308 PR gdb/21574
11309 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11310 to mention $SHELL and startup-with-shell.
11311
b46c4cf0
MF
113122017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11313
11314 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11315
6394c606
YQ
113162017-06-14 Yao Qi <yao.qi@linaro.org>
11317
11318 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11319 default_print_insn instead of print_insn_aarch64.
11320 * arm-tdep.c (gdb_print_insn_arm): Call
11321 default_print_insn instead of print_insn_big_arm
11322 and print_insn_little_arm.
11323 * i386-tdep.c (i386_print_insn): Call default_print_insn
11324 instead of print_insn_i386.
11325 * ia64-tdep.c (ia64_print_insn): Call
11326 default_print_insn instead of print_insn_ia64.
11327 * mips-tdep.c (gdb_print_insn_mips): Call
11328 default_print_insn instead of print_insn_big_mips
11329 and print_insn_little_mips.
11330 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11331 instead of print_insn_spu.
11332
d5722aa2
PA
113332017-06-14 Pedro Alves <palves@redhat.com>
11334
11335 * ada-lang.c: Include "common/byte-vector.h".
11336 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11337 * charset.c (wchar_iterator::iterate): Resize the vector instead
11338 of reserving it.
11339 * common/byte-vector.h: Include "common/def-vector.h".
11340 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11341 * cli/cli-dump.c: Include "common/byte-vector.h".
11342 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11343 * common/byte-vector.h: New file.
11344 * common/def-vector.h: New file.
11345 * common/default-init-alloc.h: New file.
11346 * dwarf2loc.c: Include "common/byte-vector.h".
11347 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11348 instead of reserving it.
11349 * dwarf2read.c: Include "common/byte-vector.h".
11350 (data_buf::m_vec): Now a gdb::byte_vector.
11351 * gdb_regex.c: Include "common/def-vector.h".
11352 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11353 * mi/mi-main.c: Include "common/byte-vector.h".
11354 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11355 * printcmd.c: Include "common/byte-vector.h".
11356 (print_scalar_formatted): Use gdb::byte_vector.
11357 * valprint.c: Include "common/byte-vector.h".
11358 (maybe_negate_by_bytes, print_decimal_chars): Use
11359 gdb::byte_vector.
11360
01ec7a27
SM
113612017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11362
11363 * darwin-nat.c: Include "nat/fork-inferior.h".
11364
848d9074
SM
113652017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11366
11367 * configure.nat: Factor out Darwin bits that are not
11368 architecture-specific. Add fork-inferior.o.
11369
3b912944
SM
113702017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11371
11372 * configure.nat: Factor out AIX bits that are not
11373 architecture-specific. Add fork-inferior.o.
11374
55acdf22
AA
113752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11376
11377 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11378 (read_pieced_value, write_pieced_value): ...here. Reduce to
11379 wrappers that just call rw_pieced_value.
11380
f65e2044
AA
113812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11382
11383 * dwarf2loc.c (write_pieced_value): When writing the data for a
11384 memory piece, use write_memory_with_notification instead of
11385 write_memory.
11386
23f945bf
AA
113872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11388
11389 * valops.c (read_value_memory): Change embedded_offset to
11390 represent a bit offset instead of a byte offset.
11391 * value.h (read_value_memory): Adjust comment.
11392
f236533e
AA
113932017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11394
11395 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11396 dest_offset_bits and source_offset_bits.
11397 (write_pieced_value): Likewise.
11398
65d84b76
AA
113992017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11400
11401 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11402 given by DW_OP_bit_piece.
11403 (write_pieced_value): Likewise.
11404
242d31ab
AA
114052017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11406
11407 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11408 some other preparations to the places where sufficient information
11409 is available.
11410 (write_pieced_value): Likewise.
11411
03c8af18
AA
114122017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11413
11414 * dwarf2loc.c (bits_to_bytes): New function.
11415 (read_pieced_value): Fix offset calculations for register pieces
11416 on big-endian targets.
11417 (write_pieced_value): Likewise.
11418
840989c1
AA
114192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11420
11421 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11422 (write_pieced_value): Likewise.
11423
359b19bb
AA
114242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11425
11426 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11427 transfer the source value's least significant bits, instead of its
11428 lowest-addressed ones. Rename type_len to max_offset.
11429 (read_pieced_value): Mirror above changes to write_pieced_value as
11430 applicable.
11431
07c9ca3b
AA
114322017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11433
11434 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11435 truncate full bytes from dest_offset_bits before using it as an
11436 offset into the buffer.
11437
f1cc9874
AA
114382017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11439
11440 * dwarf2loc.c (write_pieced_value): Include transfer size in
11441 byte-wise check.
11442
cdaac320
AA
114432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11444
11445 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11446 calculation of this_size.
11447
af547a96
AA
114482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11449
11450 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11451 when targeting a bit-field.
11452 (write_pieced_value): Likewise.
11453
ddd7882a
AA
114542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11455
11456 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11457 (allocate_piece_closure): Drop addr_size parameter.
11458 (dwarf2_evaluate_loc_desc_full): Adjust call to
11459 allocate_piece_closure.
11460
e9352324
AA
114612017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11462
11463 PR gdb/21226
11464 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11465 the LSB end, independent of endianness.
11466
d5d1163e
AA
114672017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11468
11469 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11470 size capping.
11471
032bb6ea
YQ
114722017-06-13 Yao Qi <yao.qi@linaro.org>
11473
11474 * mips-linux-nat.c: Move include features/mips*-linux.c to
11475 mips-linux-tdep.c.
11476 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11477 to mips-linux-tdep.c.
11478 * mips-linux-tdep.c: Include features/mips*-linux.c
11479 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11480 functions.
11481 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11482 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11483 (tdesc_mips64_dsp_linux): Declare.
11484
f12f6bad
TT
114852017-06-12 Tom Tromey <tom@tromey.com>
11486
11487 * valprint.h (val_print_type_code_int): Remove.
11488 * valprint.c (generic_val_print_int): Always call
11489 val_print_scalar_formatted.
11490 (val_print_type_code_int): Remove.
11491 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11492 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11493 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11494 * ada-valprint.c (ada_val_print_num): Use
11495 val_print_scalar_formatted.
11496
d9109c80
TT
114972017-06-12 Tom Tromey <tom@tromey.com>
11498
11499 * printcmd.c (print_scalar_formatted): Unify the two switches.
11500 Don't convert scalars to LONGEST.
11501
4ac0cb1c
TT
115022017-06-12 Tom Tromey <tom@tromey.com>
11503
11504 PR exp/16225:
11505 * valprint.h (print_decimal_chars): Update.
11506 * valprint.c (maybe_negate_by_bytes): New function.
11507 (print_decimal_chars): Add "is_signed" argument.
11508 * printcmd.c (print_scalar_formatted): Update.
11509
30a25466
TT
115102017-06-12 Tom Tromey <tom@tromey.com>
11511
11512 PR exp/16225:
11513 * valprint.h (print_binary_chars, print_hex_chars): Update.
11514 * valprint.c (val_print_type_code_int): Update.
11515 (print_binary_chars): Add "zero_pad" argument.
11516 (emit_octal_digit): New function.
11517 (print_octal_chars): Don't zero-pad.
11518 (print_decimal_chars): Likewise.
11519 (print_hex_chars): Add "zero_pad" argument.
11520 * sh64-tdep.c (sh64_do_fp_register): Update.
11521 * regcache.c (regcache::dump): Update.
11522 * printcmd.c (print_scalar_formatted): Update.
11523 * infcmd.c (default_print_one_register_info): Update.
11524
b3464d03
PA
115252017-06-12 Pedro Alves <palves@redhat.com>
11526 Alan Hayward <alan.hayward@arm.com>
11527
11528 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11529 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11530 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11531 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11532 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11533
4b76cda9
PA
115342017-06-12 Pedro Alves <palves@redhat.com>
11535
11536 * dwarf2read.c (mapped_symtab::data): Now a vector of
11537 symtab_index_entry instead of vector of
11538 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11539 whether an element's name is NULL instead of checking whether the
11540 element itself is NULL.
11541 (find_slot): Change return type. Adjust.
11542 (hash_expand, , add_index_entry, uniquify_cu_indices)
11543 (write_hash_table): Adjust.
11544
e8f8bcb3
PA
115452017-06-12 Pedro Alves <palves@redhat.com>
11546
11547 * dwarf2read.c (recursively_count_psymbols): New function.
11548 (write_psymtabs_to_index): Call it to compute number of psyms and
11549 pass estimate size of psyms_seen to unordered_set's ctor.
11550
70a1152b
PA
115512017-06-12 Pedro Alves <palves@redhat.com>
11552
11553 * dwarf2read.c (write_hash_table): Check if key already exists
11554 before emplacing.
11555
c2f134ac
PA
115562017-06-12 Pedro Alves <palves@redhat.com>
11557
11558 * dwarf2read.c (data_buf::append_space): Rename to...
11559 (data_buf::grow): ... this, and make private. Adjust all callers.
11560 (data_buf::append_uint): New method.
11561 (add_address_entry, write_one_signatured_type)
11562 (write_psymtabs_to_index): Use it.
11563
a81e6d4d
PA
115642017-06-12 Pedro Alves <palves@redhat.com>
11565
11566 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11567 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11568 (data_buf::file_write): Call ::fwrite directly.
11569
6fd931f2
PA
115702017-06-12 Pedro Alves <palves@redhat.com>
11571
11572 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11573 std::vector::erase.
11574
bc8f2430
JK
115752017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11576
11577 Code cleanup: C++ify .gdb_index producer.
11578 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11579 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11580 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11581 (create_strtab, add_string): Remove.
11582 (file_write, data_buf): New.
11583 (struct symtab_index_entry): Use std::vector for cu_indices.
11584 (struct mapped_symtab): Use std::vector for data.
11585 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11586 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11587 Remove.
11588 (find_slot): Change return type. Update it to the new data structures.
11589 (hash_expand, add_index_entry): Update it to the new data structures.
11590 (offset_type_compare): Remove.
11591 (uniquify_cu_indices): Update it to the new data structures.
11592 (c_str_view, c_str_view_hasher, vector_hasher): New.
11593 (add_indices_to_cpool): Remove.
11594 (write_hash_table): Update it to the new data structures.
11595 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11596 (eq_psymtab_cu_index): Remove.
11597 (psym_index_map): New typedef.
11598 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11599 reference and std::unordered_map for cu_index_htab.
11600 (add_address_entry, add_address_entry_worker, write_address_map)
11601 (write_psymbols): Update it to the new data structures.
11602 (write_obstack): Remove.
11603 (struct signatured_type_index_data): Change types_list to a data_buf
11604 reference and psyms_seen to a std::unordered_set reference.
11605 (write_one_signatured_type, recursively_write_psymbols)
11606 (write_psymtabs_to_index): Update it to the new data structures.
11607
c4dcb155
SM
116082017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11609
11610 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11611 separate-debug-file commands.
11612 * symfile.h (separate_debug_file_debug): New global.
11613 * symfile.c (separate_debug_file_debug): New global.
11614 (separate_debug_file_exists, find_separate_debug_file): Add
11615 debug output.
11616 (_initialize_symfile): Add "set debug separate-debug-file"
11617 command.
11618 * build-id.c (build_id_to_debug_bfd,
11619 find_separate_debug_file_by_buildid): Add debug output.
11620
6d45d4b4
SM
116212017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11622
11623 * gdbarch.sh (displaced_step_free_closure): Remove.
11624 * gdbarch.h, gdbarch.c: Re-generate.
11625 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11626 displaced_step_free_closure.
11627 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11628 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11629 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11630 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11631 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11632 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11633 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11634 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11635 * infrun.c (displaced_step_clear): Call xfree instead of
11636 gdbarch_displaced_step_free_closure.
11637
2f91880f
SDJ
116382017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11639
11640 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11641 NULL".
11642
b8b6e72f
AH
116432017-06-08 Alan Hayward <alan.hayward@arm.com>
11644
11645 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11646 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11647 (mn10300_push_dummy_call): Likewise.
11648
5369082e
AH
116492017-06-08 Alan Hayward <alan.hayward@arm.com>
11650
11651 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11652
ff4ca5ac
AH
116532017-06-08 Alan Hayward <alan.hayward@arm.com>
11654
11655 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11656
aefd8b33
SDJ
116572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11658
11659 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11660 able to start inferiors using a shell.
11661 (New remote packets): Announce new packet "QStartupWithShell".
11662 * remote.c: Add PACKET_QStartupWithShell.
11663 (extended_remote_create_inferior): Handle new
11664 PACKET_QStartupWithShell.
11665 (remote_protocol_features) <QStartupWithShell>: New entry for
11666 PACKET_QStartupWithShell.
11667 (_initialize_remote): Call "add_packet_config_cmd" for
11668 QStartupShell.
11669
2090129c
SDJ
116702017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11671 Pedro Alves <palves@redhat.com>
11672
11673 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11674 and "nat/fork-inferior.h".
11675 * common/common-inferior.h: New file, with contents from
11676 "gdb/inferior.h".
11677 * commom/common-utils.c: Include "common-utils.h".
11678 (stringify_argv): New function.
11679 * common/common-utils.h (stringify_argv): New prototype.
11680 * configure.nat: Add "fork-inferior.o" as a dependency for
11681 "*linux*", "fbsd*" and "nbsd*" hosts.
11682 * corefile.c (get_exec_file): Update comment.
11683 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11684 instead of "startup_inferior".
11685 (darwin_create_inferior): Call "add_thread_silent" after
11686 "fork_inferior".
11687 * fork-child.c: Cleanup unnecessary includes.
11688 (SHELL_FILE): Move to "common/common-fork-child.c".
11689 (environ): Likewise.
11690 (exec_wrapper): Initialize.
11691 (get_exec_wrapper): New function.
11692 (breakup_args): Move to "common/common-fork-child.c"; rename to
11693 "breakup_args_for_exec".
11694 (escape_bang_in_quoted_argument): Move to
11695 "common/common-fork-child.c".
11696 (saved_ui): New variable.
11697 (prefork_hook): New function.
11698 (postfork_hook): Likewise.
11699 (postfork_child_hook): Likewise.
11700 (gdb_startup_inferior): Likewise.
11701 (fork_inferior): Move to "common/common-fork-child.c". Update
11702 function to support gdbserver.
11703 (startup_inferior): Likewise.
11704 * gdbcore.h (get_exec_file): Remove declaration.
11705 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11706 instead of "startup_inferior". Call "add_thread_silent" after
11707 "fork_inferior".
11708 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11709 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11710 instead of "startup_inferior". Call "add_thread_silent" after
11711 "fork_inferior".
11712 * inferior.h: Include "common-inferior.h".
11713 (trace_start_error): Move to "common/common-utils.h".
11714 (trace_start_error_with_name): Likewise.
11715 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11716 (startup_inferior): Likewise.
11717 (gdb_startup_inferior): New prototype.
11718 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11719 * nat/fork-inferior.h: New file.
11720 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11721 instead of "startup_inferior". Call "add_thread_silent" after
11722 "fork_inferior".
11723 * target.h (target_terminal_init): Move prototype to
11724 "target/target.h".
11725 (target_terminal_inferior): Likewise.
11726 (target_terminal_ours): Likewise.
11727 * target/target.h (target_terminal_init): New prototype, moved
11728 from "target.h".
11729 (target_terminal_inferior): Likewise.
11730 (target_terminal_ours): Likewise.
11731 * utils.c (gdb_flush_out_err): New function.
11732
043a4934
SDJ
117332017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11734
11735 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11736 * common/common-gdbthread.h: New file, with parts from
11737 "gdb/gdbthread.h".
11738 * gdbthread.h: Include "common-gdbthread.h".
11739 (switch_to_thread): Moved to "common/common-gdbthread.h".
11740
15652511
SDJ
117412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11742
11743 * Makefile.in (SFILES): Add "common/job-control.c".
11744 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11745 (COMMON_OBS): Add "job-control.o".
11746 * common/job-control.c: New file, with contents from
11747 "gdb/inflow.c".
11748 * common/job-control.h: New file, with contents from "terminal.h".
11749 * fork-child.c: Include "job-control.h".
11750 * inflow.c: Include "job-control.h".
11751 (gdb_setpgid): Move to "common/common-inflow.c".
11752 (_initialize_inflow): Move setting of "job_control" to
11753 "handle_job_control".
11754 * terminal.h (job_control): Moved to "common/common-terminal.h".
11755 (gdb_setpgid): Likewise.
11756 * top.c: Include "job_control.h".
11757 * utils.c: Likewise.
11758 (job_control): Moved to "job-control.c".
11759
2d7cc5c7
PA
117602017-06-07 Pedro Alves <palves@redhat.com>
11761
11762 * Makefile.in (SFILES): Add gdb_regex.c.
11763 (COMMON_OBS): Add gdb_regex.o.
11764 * ada-lang.c (ada_add_standard_exceptions)
11765 (ada_add_exceptions_from_frame, name_matches_regex)
11766 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11767 parameter type to compiled_regex. Adjust.
11768 (ada_exceptions_list): Use compiled_regex.
11769 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11770 std::unique_ptr<compiled_regex>.
11771 (exception_catchpoint::~exception_catchpoint): Remove regfree
11772 call.
11773 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11774 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11775 * breakpoint.c (solib_catchpoint::compiled): Now a
11776 std::unique_ptr<compiled_regex>.
11777 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11778 (check_status_catch_solib): Adjust to use compiled_regex.
11779 (add_solib_catchpoint): Adjust to use compiled_regex.
11780 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11781 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11782 compiled_regex reference. Adjust to use it.
11783 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11784 declaration. Include "gdb_regex.h".
11785 (apropos_cmd): Change regex parameter to compiled_regex reference.
11786 * gdb_regex.c: New file.
11787 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11788 declarations.
11789 (class compiled_regex): New.
11790 * linux-tdep.c: Include "common/gdb_optional.h".
11791 (struct mapping_regexes): New, factored out from
11792 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11793 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11794 gdb::optional and remove cleanups. Adjust to compiled_regex.
11795 * probe.c: Include "common/gdb_optional.h".
11796 (collect_probes): Use compiled_regex and gdb::optional and remove
11797 cleanups.
11798 * skip.c: Include "common/gdb_optional.h".
11799 (skiplist_entry::compiled_function_regexp): Now a
11800 gdb::optional<compiled_regex>.
11801 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11802 (free_skiplist_entry): Remove regfree call.
11803 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11804 compiled_regex and gdb::optional.
11805 * symtab.c: Include "common/gdb_optional.h".
11806 (search_symbols): Use compiled_regex and gdb::optional.
11807 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11808 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11809 to gdb_regex.c.
11810
50d6adef
AH
118112017-06-07 Alan Hayward <alan.hayward@arm.com>
11812
11813 * regcache.c (regcache::save): Avoid buffer use.
11814 (regcache::dump): Likewise.
11815
4a8a33c8
AH
118162017-06-07 Alan Hayward <alan.hayward@arm.com>
11817
11818 * sh-tdep.c (sh_pseudo_register_read): Remove
11819 MAX_REGISTER_SIZE.
11820 (sh_pseudo_register_write): Likewise.
11821 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11822 (sh64_pseudo_register_write): Likewise
11823
d1be909e
AH
118242017-06-07 Alan Hayward <alan.hayward@arm.com>
11825
11826 * aarch64-tdep.c (aarch64_store_return_value): Use
11827 V_REGISTER_SIZE.
11828 (aarch64_pseudo_read_value): Likewise.
11829 (aarch64_pseudo_write): Likewise.
11830
f4a65042
YQ
118312017-06-06 Yao Qi <yao.qi@linaro.org>
11832
11833 * regformats/regdef.h (set_register_cache): Remove the
11834 declaration.
11835
9f7fb0aa
AH
118362017-06-06 Alan Hayward <alan.hayward@arm.com>
11837
11838 * frame.c (frame_unwind_register_signed): Use
11839 frame_unwind_register_value.
11840
e1e01040
PA
118412017-06-06 Pedro Alves <palves@redhat.com>
11842
11843 PR breakpoints/21553
11844 * breakpoint.c (create_breakpoints_sal_default)
11845 (init_breakpoint_sal, create_breakpoint_sal): Use
11846 gdb::unique_xmalloc_ptr for string parameters.
11847 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11848 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11849 (base_breakpoint_create_breakpoints_sal)
11850 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11851 (strace_marker_create_breakpoints_sal)
11852 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11853 string parameters.
11854 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11855 gdb::unique_xmalloc_ptr for string parameters.
11856 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11857 parameters.
11858
fbe654c8
AH
118592017-06-06 Alan Hayward <alan.hayward@arm.com>
11860
11861 * alpha-tdep.c (alpha_register_to_value): Use
11862 get_frame_register_value.
11863 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11864
ae0d01d6
AH
118652017-06-06 Alan Hayward <alan.hayward@arm.com>
11866
11867 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11868 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11869 (ia64_value_to_register): Likewise.
11870 (ia64_extract_return_value): Likewise.
11871 (ia64_store_return_value): Likewise.
11872 (ia64_push_dummy_call): Likewise.
11873
49cf576c
JB
118742017-06-04 Joel Brobecker <brobecker@adacore.com>
11875
11876 GDB 8.0 released.
11877
26b6a6ab
SM
118782017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11879
11880 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11881
22827c51
SM
118822017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11883
11884 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11885 parameter.
11886 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11887
0e05cf3a
SM
118882017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11889
11890 * event-loop.c (poll_timers): Unallocate timer using delete
11891 instead of xfree.
11892
c1fc2657
SM
118932017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11894
11895 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11896 (struct breakpoint) <~breakpoint>: New.
11897 (struct watchpoint): Inherit from breakpoint.
11898 <~watchpoint>: New.
11899 <base>: Remove.
11900 (struct tracepoint): Inherit from breakpoint.
11901 <base>: Remove.
11902 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11903 (struct longjmp_breakpoint): Inherit from breakpoint.
11904 <~longjmp_breakpoint>: New.
11905 <base>: Remove.
11906 (new_breakpoint_from_type): Remove casts.
11907 (watchpoint_in_thread_scope): Remove reference to base field.
11908 (watchpoint_del_at_next_stop): Likewise.
11909 (update_watchpoint): Likewise.
11910 (watchpoint_check): Likewise.
11911 (bpstat_check_watchpoint): Likewise.
11912 (set_longjmp_breakpoint): Likewise.
11913 (struct fork_catchpoint): Inherit from breakpoint.
11914 <base>: Remove.
11915 (struct solib_catchpoint): Inherit from breakpoint.
11916 <~solib_catchpoint>: New.
11917 <base>: Remove.
11918 (dtor_catch_solib): Change to ...
11919 (solib_catchpoint::~solib_catchpoint): ... this.
11920 (breakpoint_hit_catch_solib): Remove reference to base field.
11921 (add_solib_catchpoint): Likewise.
11922 (create_fork_vfork_event_catchpoint): Likewise.
11923 (struct exec_catchpoint): Inherit from breakpoint.
11924 <~exec_catchpoint>: New.
11925 <base>: Remove.
11926 (dtor_catch_exec): Change to ...
11927 (exec_catchpoint::~exec_catchpoint): ... this.
11928 (dtor_watchpoint): Change to ...
11929 (watchpoint::~watchpoint): ... this.
11930 (watch_command_1): Remove reference to base field.
11931 (catch_exec_command_1): Likewise.
11932 (base_breakpoint_dtor): Change to ...
11933 (breakpoint::~breakpoint): ... this.
11934 (base_breakpoint_ops): Remove dtor field value.
11935 (longjmp_bkpt_dtor): Change to ...
11936 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11937 (strace_marker_create_breakpoints_sal): Remove reference to base
11938 field.
11939 (delete_breakpoint): Don't manually call breakpoint destructor.
11940 (create_tracepoint_from_upload): Remove reference to base field.
11941 (trace_pass_set_count): Likewise.
11942 (initialize_breakpoint_ops): Don't initialize
11943 momentary_breakpoint_ops, don't set dtors.
11944 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11945 <~ada_catchpoint>: New.
11946 <base>: Remove.
11947 (create_excep_cond_exprs): Remove reference to base field.
11948 (dtor_exception): Change to ...
11949 (ada_catchpoint::~ada_catchpoint): ... this.
11950 (dtor_catch_exception): Remove.
11951 (dtor_catch_exception_unhandled): Remove.
11952 (dtor_catch_assert): Remove.
11953 (create_ada_exception_catchpoint): Remove reference to base
11954 field.
11955 (initialize_ada_catchpoint_ops): Don't set dtors.
11956 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11957 breakpoint.
11958 <~signal_catchpoint>: New.
11959 <base>: Remove.
11960 (signal_catchpoint_dtor): Change to ...
11961 (signal_catchpoint::~signal_catchpoint): ... this.
11962 (create_signal_catchpoint): Remove reference to base field.
11963 (initialize_signal_catchpoint_ops): Don't set dtor.
11964 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11965 from breakpoint.
11966 <~syscall_catchpoint>: New.
11967 <base>: Remove.
11968 (dtor_catch_syscall): Change to ...
11969 (syscall_catchpoint::~syscall_catchpoint): ... this.
11970 (create_syscall_event_catchpoint): Remove reference to base
11971 field.
11972 (initialize_syscall_catchpoint_ops): Don't set dtor.
11973 * break-catch-throw.c (struct exception_catchpoint): Inherit
11974 from breakpoint.
11975 <~exception_catchpoint>: New.
11976 <base>: Remove.
11977 (dtor_exception_catchpoint): Change to ...
11978 (exception_catchpoint::~exception_catchpoint): ... this.
11979 (handle_gnu_v3_exceptions): Remove reference to base field.
11980 (initialize_throw_catchpoint_ops): Don't set dtor.
11981 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11982 field.
11983 * remote.c (remote_get_tracepoint_status): Likewise.
11984 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11985 * tracefile.c (tracefile_fetch_registers): Likewise.
11986 * tracepoint.c (actions_command): Likewise.
11987 (validate_actionline): Likewise.
11988 (tfind_1): Likewise.
11989 (get_traceframe_location): Likewise.
11990 (find_matching_tracepoint_location): Likewise.
11991 (parse_tracepoint_status): Likewise.
11992 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11993
3b0871f4
SM
119942017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11995
11996 * breakpoint.c (struct longjmp_breakpoint): New struct.
11997 (is_tracepoint_type): Change return type to bool.
11998 (is_longjmp_type): New function.
11999 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12000 (set_raw_breakpoint_without_location): Use
12001 new_breakpoint_from_type.
12002 (set_raw_breakpoint): Likewise.
12003
a5e364af
SM
120042017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12005
12006 * breakpoint.c (new_breakpoint_from_type): New function.
12007 (create_breakpoint_sal): Use new_breakpoint_from_type and
12008 unique_ptr.
12009 (create_breakpoint): Likewise.
12010
ae3b3f34
SM
120112017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12012
12013 * memattr.c (mem_info_command): Rename to ...
12014 (info_mem_command): ... this.
12015 (mem_enable_command): Rename to ...
12016 (enable_mem_command): ... this.
12017 (mem_disable_command): Rename to ...
12018 (disable_mem_command): ... this.
12019 (mem_delete_command): Rename to ...
12020 (delete_mem_command): ... this.
12021 (_initialize_mem): Adjust function names.
12022
13ace077
MM
120232017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12024
12025 * btrace.c (handle_pt_insn_events): New.
12026 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12027 STATUS. Split into this and ...
12028 (handle_pt_insn_event_flags): ... this.
12029
c56ccc05
MM
120302017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12031
12032 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12033 and struct pt_insn.resynced.
12034 * configure: Regenerated.
12035 * config.in: Regenerated.
12036
08c3f6d2
TW
120372017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12038
12039 * btrace.c (ftrace_find_call_by_number): New function.
12040 (ftrace_new_function): Store objects, not pointers.
12041 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12042 ftrace_new_gap, ftrace_update_function,
12043 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12044 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12045 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12046 btrace_ends_with_single_insn, btrace_call_get): Account for
12047 btrace_thread_info::functions now storing objects.
12048 * btrace.h (struct btrace_thread_info): Add constructor.
12049 (struct btrace_thread_info) <functions>: Make std::vector.
12050 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12051 Initialize with default values.
12052 * record-btrace.c (record_btrace_frame_sniffer): Account for
12053 btrace_thread_info::functions now storing objects.
12054
8ffd39f2
TW
120552017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12056
12057 * btrace.c: Remove typedef bfun_s.
12058 (ftrace_new_gap): Directly add gaps to the list of gaps.
12059 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12060 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12061 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12062 instead of gdb VEC.
12063
4aeb0dfc
TW
120642017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12065
12066 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12067 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12068 with btrace_thread_info::next_segment and
12069 btrace_thread_info::prev_segment.
12070 * btrace.h: Remove struct btrace_func_link.
12071 (struct btrace_function): Replace pair of function segment pointers
12072 with pair of indices.
12073 * python/py-record-btrace.c (btpy_call_prev_sibling,
12074 btpy_call_next_sibling): Replace references to
12075 btrace_thread_info::segment with btrace_thread_info::next_segment and
12076 btrace_thread_info::prev_segment.
12077 * record-btrace.c (record_btrace_frame_this_id): Use
12078 btrace_find_call_by_number.
12079
eb8f2b9c
TW
120802017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12081
12082 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12083 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12084 btrace_insn_next, btrace_insn_prev): Remove references to
12085 btrace_thread_info::flow.
12086 * btrace.h (struct btrace_function): Remove FLOW.
12087
42bfe59e
TW
120882017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12089
12090 * btrace.c (ftrace_find_call_by_number): New function.
12091 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12092 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12093 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12094 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12095 index.
12096 * btrace.h (struct btrace_function): Turn UP into an index.
12097 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12098 as an index.
12099 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12100 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12101 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12102
b54b03bd
TW
121032017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12104
12105 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12106 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12107 ftrace_update_function, ftrace_compute_global_level_offset,
12108 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12109 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12110 btrace_insn_end, btrace_is_empty): Remove references to
12111 btrace_thread_info::begin and btrace_thread_info::end.
12112 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12113 (struct btrace_thread_info) <functions>: Adjust comment.
12114 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12115 btrace_thread_info::begin.
12116
8286623c
TW
121172017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12118
12119 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12120 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12121 ftrace_update_function): Remove arguments that implicitly were always
12122 BTINFO->END.
12123 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12124 Don't pass BTINFO->END.
12125
a0f1b963
TW
121262017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12127
12128 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12129 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12130 btrace_find_insn_by_number): Replace function segment pointer with
12131 index.
12132 (btrace_insn_cmp): Simplify.
12133 * btrace.h: (struct btrace_insn_iterator) Rename index to
12134 insn_index. Replace function segment pointer with index into function
12135 segment vector.
12136 * record-btrace.c (record_btrace_call_history): Replace function
12137 segment pointer use with index.
12138 (record_btrace_frame_sniffer): Retrieve function call segment through
12139 vector.
12140 (record_btrace_set_replay): Remove defunc't safety check.
12141
f158f208
TW
121422017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12143
12144 * btrace.c (btrace_ends_with_single_insn): New function.
12145 (btrace_call_get, btrace_call_number, btrace_call_begin,
12146 btrace_call_end, btrace_call_next, btrace_call_prev,
12147 btrace_find_call_by_number): Use index into call segment vector
12148 instead of pointer.
12149 (btrace_call_cmp): Simplify.
12150 * btrace.h (struct btrace_call_iterator): Replace function call segment
12151 pointer with index into vector.
12152 * record-btrace.c (record_btrace_call_history): Use index instead of
12153 pointer.
12154
521103fd
TW
121552017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12156
12157 * btrace.c (btrace_insn_begin, btrace_insn_end,
12158 btrace_find_insn_by_number): Add btinfo to iterator.
12159 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12160
17b89b34
TW
121612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12162
12163 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12164 and save pointers directly.
12165 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12166 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12167 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12168 changed signature of functions.
12169 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12170 (btrace_fetch): Remove code that adds btrace_function pointers to
12171 vector of btrace_functions.
12172 (btrace_clear): Simplify freeing vector of btrace_functions.
12173
2b51eddc
TW
121742017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12175
12176 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12177 Replace VEC_* with std::vector functions.
12178 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12179 (struct btrace_thread_info)<functions>: Change type to std::vector.
12180
db6be0d5
SM
121812017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12182
12183 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12184 "Removed targets and native configurations" up. Merge duplicate
12185 "New commands" sub-sections. Add "New options" sub-sections.
12186
b057297a
AH
121872017-05-26 Alan Hayward <alan.hayward@arm.com>
12188
12189 * defs.h (copy_integer_to_size): New declaration.
12190 * findvar.c (copy_integer_to_size): New function.
12191 (do_cint_test): New selftest function.
12192 (copy_integer_to_size_test): Likewise.
12193 (_initialize_findvar): Likewise.
12194 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12195 (mips_fbsd_collect_reg): Use raw_collect_integer.
12196 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12197 (mips64_fill_gregset): Use raw_collect_integer
12198 (mips64_fill_fpregset): Use raw_supply_integer.
12199 * regcache.c (regcache::raw_supply_integer): New function.
12200 (regcache::raw_collect_integer): Likewise.
12201 * regcache.h: (regcache::raw_supply_integer): New declaration.
12202 (regcache::raw_collect_integer): Likewise.
12203
b77b02a5
YQ
122042017-05-24 Yao Qi <yao.qi@linaro.org>
12205
12206 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12207 (COMMON_OBS): Add gdbarch-selftests.o.
12208 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12209 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12210 * gdbarch-selftests.c: New file.
12211 * regcache.h (regcache) <~regcache>: Mark it virtual if
12212 GDB_SELF_TEST.
12213 <raw_write>: Likewise.
12214
e521e87e
YQ
122152017-05-24 Yao Qi <yao.qi@linaro.org>
12216
12217 * regcache.c (current_regcache): Change it to
12218 regcache::current_regcache.
12219 (regcache_observer_target_changed): Update.
12220 (regcache_thread_ptid_changed): Make it a regcache static
12221 method.
12222 (regcache_thread_ptid_changed): Update.
12223 (class regcache_access): New.
12224 (current_regcache_test): Update.
12225 (_initialize_regcache): Update.
12226 * regcache.h: Include forward_list.
12227 (regcache): Declare regcache_thread_ptid_changed and declare
12228 registers_changed_ptid as friend.
12229
d8e07dda
YQ
122302017-05-24 Yao Qi <yao.qi@linaro.org>
12231
12232 * i387-tdep.c (i387_register_to_value): Use register_size
12233 instead of TYPE_LENGTH.
12234 * m68k-tdep.c (m68k_register_to_value): Likewise.
12235
8c8f9122
YQ
122362017-05-24 Yao Qi <yao.qi@linaro.org>
12237
12238 * i387-tdep.c (i387_convert_register_p): Return false if type
12239 code isn't TYPE_CODE_FLT.
12240
68fce50f
YQ
122412017-05-24 Yao Qi <yao.qi@linaro.org>
12242
12243 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12244 length is 4.
12245 (alpha_register_to_value): Remove type length check.
12246 (alpha_value_to_register): Likewise.
12247
88954b49
YQ
122482017-05-24 Yao Qi <yao.qi@linaro.org>
12249
12250 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12251 TYPE_CODE_FLT.
12252
e3ec9b69
YQ
122532017-05-24 Yao Qi <yao.qi@linaro.org>
12254
12255 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12256 TYPE_CODE_FLT or not.
12257
cdd238da
YQ
122582017-05-24 Yao Qi <yao.qi@linaro.org>
12259
12260 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12261 * avr-tdep.c (avr_gdbarch_init): Likewise.
12262 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12263 * cris-tdep.c (cris_gdbarch_init): Likewise.
12264 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12265 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12266 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12267 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12268 * mep-tdep.c (mep_gdbarch_init): Likewise.
12269 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12270 * mips-tdep.c (mips_gdbarch_init): Likewise.
12271 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12272 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12273 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12274 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12275 * v850-tdep.c (v850_gdbarch_init): Likewise.
12276
7a3929c4
YQ
122772017-05-24 Yao Qi <yao.qi@linaro.org>
12278
12279 * selftest-arch.c (tests_with_arch): Call registers_changed
12280 and reinit_frame_cache.
12281 * selftest.c (run_self_tests): Likewise.
12282
f4985dba
YQ
122832017-05-24 Yao Qi <yao.qi@linaro.org>
12284
12285 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12286 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12287
ab20fa4a
YQ
122882017-05-24 Yao Qi <yao.qi@linaro.org>
12289
12290 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12291 set_gdbarch_print_insn.
12292
f532ab94
YQ
122932017-05-24 Yao Qi <yao.qi@linaro.org>
12294
12295 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12296 set_gdbarch_print_insn.
12297
39503f82
YQ
122982017-05-24 Yao Qi <yao.qi@linaro.org>
12299
12300 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12301 set_gdbarch_print_insn.
12302 * arc-tdep.c (arc_gdbarch_init): Likewise.
12303 * arch-utils.c: include dis-asm.h.
12304 (default_print_insn): New function.
12305 * arch-utils.h (default_print_insn): Declare.
12306 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12307 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12308 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12309 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12310 * frv-tdep.c (frv_gdbarch_init): Likewise.
12311 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12312 * gdbarch.sh (print_insn): Use default_print_insn.
12313 * gdbarch.c: Regenerated.
12314 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12315 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12316 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12317 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12318 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12319 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12320 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12321 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12322 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12323 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12324 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12325 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12326 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12327 * mt-tdep.c (mt_gdbarch_init): Likewise.
12328 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12329 * nios2-tdep.c (nios2_print_insn): Remove.
12330 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12331 * rx-tdep.c (rx_gdbarch_init): Likewise.
12332 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12333 * score-tdep.c (score_print_insn): Remove.
12334 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12335 * sh-tdep.c (sh_gdbarch_init): Likewise.
12336 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12337 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12338 * tic6x-tdep.c (tic6x_print_insn): Remove.
12339 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12340 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12341 * v850-tdep.c (v850_gdbarch_init): Likewise.
12342 * vax-tdep.c (vax_gdbarch_init): Likewise.
12343 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12344 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12345
f7241d4f
JB
123462017-05-23 John Baldwin <jhb@FreeBSD.org>
12347
12348 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12349 (MIPS_FP0_REGNUM): Remove.
12350 (MIPS_FSR_REGNUM): Remove.
12351 (mips_fbsd_supply_fpregs): Use mips_regnum.
12352 (mips_fbsd_supply_gregs): Likewise.
12353 (mips_fbsd_collect_fpregs): Likewise.
12354 (mips_fbsd_collect_gregs): Likewise.
12355
d489d81d
JB
123562017-05-23 John Baldwin <jhb@FreeBSD.org>
12357
12358 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12359 (getpfpregs_supplies): New function.
12360 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12361 getfpregs_supplies.
12362 (mips_fbsd_store_inferior_registers): Likewise.
12363
e11b3cdc
PA
123642017-05-22 Pedro Alves <palves@redhat.com>
12365
12366 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12367 maintainer.
12368
0f068fb5
AH
123692017-05-22 Alan Hayward <alan.hayward@arm.com>
12370
12371 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12372 (store_register): Likewise.
12373 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12374 (get_decimal_float_return_value): Likewise.
12375 (do_ppc_sysv_return_value): Likewise.
12376 (ppc64_sysv_abi_push_integer): Likewise.
12377 (ppc64_sysv_abi_push_freg): Likewise.
12378 (ppc64_sysv_abi_return_value_base): Likewise.
12379 (ppc64_sysv_abi_return_value): Likewise.
12380 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12381 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12382 * rs6000-nat.c: Likewise.
12383 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12384 (rs6000_value_to_register): Likewise.
12385 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12386
e6cf65f2
TT
123872017-05-21 Tom Tromey <tom@tromey.com>
12388
12389 PR rust/21466:
12390 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12391 arrays as "[T]", not "[T; ]".
12392
43cc5389
TT
123932017-05-19 Tom Tromey <tom@tromey.com>
12394
12395 PR rust/21484:
12396 * rust-lang.c (exp_descriptor_rust): New function.
12397 (rust_language_defn): Use it.
12398 * p-lang.c (pascal_language_defn): Update.
12399 * opencl-lang.c (opencl_language_defn): Update.
12400 * objc-lang.c (objc_language_defn): Update.
12401 * m2-lang.c (m2_language_defn): Update.
12402 * language.h (struct language_defn)
12403 <la_watch_location_expression>: New member.
12404 * language.c (unknown_language_defn, auto_language_defn)
12405 (local_language_defn): Update.
12406 * go-lang.c (go_language_defn): Update.
12407 * f-lang.c (f_language_defn): Update.
12408 * d-lang.c (d_language_defn): Update.
12409 * c-lang.h (c_watch_location_expression): Declare.
12410 * c-lang.c (c_watch_location_expression): New function.
12411 (c_language_defn, cplus_language_defn, asm_language_defn)
12412 (minimal_language_defn): Use it.
12413 * breakpoint.c (watch_command_1): Call
12414 la_watch_location_expression.
12415 * ada-lang.c (ada_language_defn): Update.
12416
7a6e7fcc
RO
124172017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12418
6e7e1744
RO
12419 PR tui/21482
12420 * gdb_curses.h (NOMACROS): Define.
12421 (NCURSES_NOMACROS): Define.
12422
124232017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12424
12425 PR tui/21482
7a6e7fcc
RO
12426 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12427 arg to char *.
12428 * tui/tui-wingeneral.c (box_win): Likewise.
12429 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12430 (tui_show_source_line): Likewise.
12431 (tui_show_exec_info_content): Likewise.
12432
1933fd8e
VM
124332017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12434
12435 * sparc-tdep.c (sparc_structure_return_p)
12436 (sparc_arg_on_registers_p): New functions.
12437 (sparc32_store_arguments): Use them.
12438 * sparc64-tdep.c (sparc64_16_byte_align_p)
12439 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12440 Handle TYPE_CODE_ARRAY.
12441
21873064
YQ
124422017-05-17 Yao Qi <yao.qi@linaro.org>
12443
12444 * cli/cli-decode.c (add_alias_cmd): New function.
12445 * command.h (add_alias_cmd): Declare.
12446 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12447 instead call add_alias_cmd.
12448
2b351b19
PA
124492017-05-17 Pedro Alves <palves@redhat.com>
12450
12451 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12452 (nat_makefile_frag): ... this. All references updated.
12453 * configure.ac: Likewise.
12454 * configure.nat: Likewise. Enhance comments.
12455 * configure: Regenerate.
12456
5f2ad7a3
RO
124572017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12458
12459 * procfs.c (procfs_create_inferior): Change prototype to match
12460 definition.
12461
adf3dde5
EZ
124622017-05-13 Eli Zaretskii <eliz@gnu.org>
12463
12464 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12465 C++ compiler warning.
12466
6830f270
TT
124672017-05-12 Tom Tromey <tom@tromey.com>
12468
12469 PR rust/21483:
12470 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12471 recurse, just call value_struct_elt directly.
12472
68f2f2e3
TT
124732017-05-12 Tom Tromey <tom@tromey.com>
12474
12475 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12476 OP_RUST_ARRAY>: Fix.
12477
256afbc2
TT
124782017-05-12 Tom Tromey <tom@tromey.com>
12479
12480 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12481
94bb8dfe
YQ
124822017-05-09 Yao Qi <yao.qi@linaro.org>
12483
12484 * regcache.c: Include <forward_list>.
12485 (struct regcache_list): Remove.
12486 (current_regcache): Update.
12487 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12488 (regcache_thread_ptid_changed): Likewise.
12489 (registers_changed_ptid): Likewise.
12490 (current_regcache_size): Likewise.
12491
8248946c
YQ
124922017-05-09 Yao Qi <yao.qi@linaro.org>
12493
12494 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12495 (current_regcache_size): New function.
12496 (current_regcache_test): New function.
12497 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12498
313c5961
AH
124992017-05-08 Alan Hayward <alan.hayward@arm.com>
12500
12501 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12502 (print_gp_register_row): Use get_frame_register_value.
12503
27bfc1d1
AH
125042017-05-08 Alan Hayward <alan.hayward@arm.com>
12505
12506 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12507 (mips_supply_fpregset): Likewise.
12508 (mips64_supply_gregset): Likewise.
12509
146e6c5c
AH
125102017-05-08 Alan Hayward <alan.hayward@arm.com>
12511
12512 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12513 regcache->raw_supply_zeroed.
12514
e50f25ec
SDJ
125152017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12516
12517 * configure.nat: Rearrange 'case' statements to match
12518 host before cpu.
12519
21ea5acd
SDJ
125202017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12521
12522 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12523 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12524 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12525 "@nat_extra_makefile_frag@".
12526 (Makefile): Remove dependency on "@frags@".
12527 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12528 (data-directory/Makefile): Likewise.
12529 * config/aarch64/linux.mh: Deleted; moved contents to
12530 "gdb/configure.nat".
12531 * config/alpha/alpha-linux.mh: Likewise.
12532 * config/alpha/nbsd.mh: Likewise.
12533 * config/arm/linux.mh: Likewise.
12534 * config/arm/nbsdelf.mh: Likewise.
12535 * config/i386/cygwin.mh: Likewise.
12536 * config/i386/cygwin64.mh: Likewise.
12537 * config/i386/darwin.mh: Likewise.
12538 * config/i386/fbsd.mh: Likewise.
12539 * config/i386/fbsd64.mh: Likewise.
12540 * config/i386/go32.mh: Likewise.
12541 * config/i386/i386gnu.mh: Likewise.
12542 * config/i386/i386sol2.mh: Likewise.
12543 * config/i386/linux.mh: Likewise.
12544 * config/i386/linux64.mh: Likewise.
12545 * config/i386/mingw.mh: Likewise.
12546 * config/i386/mingw64.mh: Likewise.
12547 * config/i386/nbsd64.mh: Likewise.
12548 * config/i386/nbsdelf.mh: Likewise.
12549 * config/i386/nto.mh: Likewise.
12550 * config/i386/obsd.mh: Likewise.
12551 * config/i386/obsd64.mh: Likewise.
12552 * config/i386/sol2-64.mh: Likewise.
12553 * config/ia64/linux.mh: Likewise.
12554 * config/m32r/linux.mh: Likewise.
12555 * config/m68k/linux.mh: Likewise.
12556 * config/m68k/nbsdelf.mh: Likewise.
12557 * config/m68k/obsd.mh: Likewise.
12558 * config/m88k/obsd.mh: Likewise.
12559 * config/mips/fbsd.mh: Likewise.
12560 * config/mips/linux.mh: Likewise.
12561 * config/mips/nbsd.mh: Likewise.
12562 * config/mips/obsd64.mh: Likewise.
12563 * config/pa/linux.mh: Likewise.
12564 * config/pa/nbsd.mh: Likewise.
12565 * config/pa/obsd.mh: Likewise.
12566 * config/powerpc/aix.mh: Likewise.
12567 * config/powerpc/fbsd.mh: Likewise.
12568 * config/powerpc/linux.mh: Likewise.
12569 * config/powerpc/nbsd.mh: Likewise.
12570 * config/powerpc/obsd.mh: Likewise.
12571 * config/powerpc/ppc64-linux.mh: Likewise.
12572 * config/powerpc/spu-linux.mh: Likewise.
12573 * config/s390/linux.mh: Likewise.
12574 * config/sh/nbsd.mh: Likewise.
12575 * config/sparc/fbsd.mh: Likewise.
12576 * config/sparc/linux.mh: Likewise.
12577 * config/sparc/linux64.mh: Likewise.
12578 * config/sparc/nbsd64.mh: Likewise.
12579 * config/sparc/nbsdelf.mh: Likewise.
12580 * config/sparc/obsd64.mh: Likewise.
12581 * config/sparc/sol2.mh: Likewise.
12582 * config/tilegx/linux.mh: Likewise.
12583 * config/vax/nbsdelf.mh: Likewise.
12584 * config/vax/obsd.mh: Likewise.
12585 * config/xtensa/linux.mh: Likewise.
12586 * config/i386/i386gnu.mn: New file, with excerpts from
12587 "config/i386/i386gnu.mh".
12588 * configure: Regenerate.
12589 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12590 *.mh files under "gdb/config".
12591 * configure.nat: New file, with contents from the
12592 "gdb/config/*/*.mh" files.
12593
7ed1acaf
TW
125942017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12595
12596 * btrace.c (btrace_clear): Free insn vector.
12597
e13cb306
PA
125982017-05-05 Pedro Alves <palves@redhat.com>
12599
12600 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12601 * configure: Regenerate.
12602
5ed8105e
PA
126032017-05-04 Pedro Alves <palves@redhat.com>
12604
12605 * Makefile.in (SFILES): Add progspace-and-thread.c.
12606 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12607 (COMMON_OBS): Add progspace-and-thread.o.
12608 * breakpoint.c: Include "progspace-and-thread.h".
12609 (update_inserted_breakpoint_locations)
12610 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12611 Use scoped_restore_current_pspace_and_thread.
12612 (create_std_terminate_master_breakpoint): Use
12613 scoped_restore_current_program_space.
12614 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12615 (print_breakpoint_location): Use
12616 scoped_restore_current_program_space.
12617 (bp_loc_is_permanent): Use
12618 scoped_restore_current_pspace_and_thread.
12619 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12620 (download_tracepoint_locations): Use
12621 scoped_restore_current_pspace_and_thread.
12622 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12623 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12624 (enum step_over_calls_kind): Moved from inferior.h.
12625 (class scoped_restore_current_thread): New class.
12626 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12627 declaration.
12628 (scoped_restore_current_thread): New class.
12629 * infcmd.c: Include "common/gdb_optional.h".
12630 (continue_1, proceed_after_attach): Use
12631 scoped_restore_current_thread.
12632 (notice_new_inferior): Use scoped_restore_current_thread.
12633 * inferior.c: Include "progspace-and-thread.h".
12634 (restore_inferior, save_current_inferior): Delete.
12635 (add_inferior_command, clone_inferior_command): Use
12636 scoped_restore_current_pspace_and_thread.
12637 * inferior.h (scoped_restore_current_inferior): New class.
12638 * infrun.c: Include "progspace-and-thread.h" and
12639 "common/gdb_optional.h".
12640 (follow_fork_inferior): Use
12641 scoped_restore_current_pspace_and_thread.
12642 (scoped_restore_exited_inferior): New class.
12643 (handle_vfork_child_exec_or_exit): Use
12644 scoped_restore_exited_inferior,
12645 scoped_restore_current_pspace_and_thread,
12646 scoped_restore_current_thread and scoped_restore.
12647 (fetch_inferior_event): Use scoped_restore_current_thread.
12648 * linespec.c (decode_line_full, decode_line_1): Use
12649 scoped_restore_current_program_space.
12650 * mi/mi-main.c: Include "progspace-and-thread.h".
12651 (exec_continue): Use scoped_restore_current_thread.
12652 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12653 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12654 * proc-service.c (ps_pglobal_lookup): Use
12655 scoped_restore_current_program_space.
12656 * progspace-and-thread.c: New file.
12657 * progspace-and-thread.h: New file.
12658 * progspace.c (release_program_space, clone_program_space): Use
12659 scoped_restore_current_program_space.
12660 (restore_program_space, save_current_program_space)
12661 (save_current_space_and_thread): Delete.
12662 (switch_to_program_space_and_thread): Moved to
12663 progspace-and-thread.c.
12664 * progspace.h (save_current_program_space)
12665 (save_current_space_and_thread): Delete declarations.
12666 (scoped_restore_current_program_space): New class.
12667 * remote.c (remote_btrace_maybe_reopen): Use
12668 scoped_restore_current_thread.
12669 * symtab.c: Include "progspace-and-thread.h".
12670 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12671 * thread.c (print_thread_info_1): Use
12672 scoped_restore_current_thread.
12673 (struct current_thread_cleanup): Delete.
12674 (do_restore_current_thread_cleanup)
12675 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12676 (scoped_restore_current_thread::~scoped_restore_current_thread):
12677 ... this new dtor.
12678 (make_cleanup_restore_current_thread): Rename/convert to ...
12679 (scoped_restore_current_thread::scoped_restore_current_thread):
12680 ... this new ctor.
12681 (thread_apply_all_command): Use scoped_restore_current_thread.
12682 (thread_apply_command): Use scoped_restore_current_thread.
12683 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12684 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12685
f6223dbb
PA
126862017-05-04 Pedro Alves <palves@redhat.com>
12687
12688 * thread.c (make_cleanup_restore_current_thread): Move
12689 find_thread_ptid call before the is_stopped call. Assert that the
12690 thread is found. Replace is_stopped call by checking the thread's
12691 state directly. Remove unnecessary NULL-thread check.
12692
3c3ae77e
PA
126932017-05-04 Pedro Alves <palves@redhat.com>
12694
12695 * corelow.c (thread_section_name): New class.
12696 (get_core_register_section, get_core_siginfo): Use it.
12697
45eba0ab
AA
126982017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12699
12700 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12701 (get_core_register_section): Remove xfree of NULL pointer.
12702
f81fdd35
AH
127032017-05-03 Alan Hayward <alan.hayward@arm.com>
12704
12705 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12706 * regcache.c (regcache::raw_supply_zeroed): New function.
12707 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12708
35837774
SM
127092017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12710
12711 * gdbarch.sh: Remove commented out definition of
12712 TARGET_CHAR_BIT.
12713 * gdbarch.h: Re-generate.
12714
c94fee56
SDJ
127152017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12716
12717 * configure: Regenerate.
12718
d17f7b36
SM
127192017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12720
12721 * solib-target.c (solib_target_relocate_section_addresses):
12722 Remove num_section_bases, num_bases, segment_bases variables.
12723
b560ebd6
SM
127242017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12725
12726 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12727
f2f46dfc
SM
127282017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12729
12730 * solib-target.c: Include <vector>
12731 (struct lm_info_target) <~lm_info_target>: Remove.
12732 <segment_bases, section_bases>: Change type to
12733 std::vector<CORE_ADDR>.
12734 (library_list_start_segment, library_list_start_section,
12735 library_list_end_library,
12736 solib_target_relocate_section_addresses): Adjust.
12737
a0ff9e1a
SM
127382017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12739
12740 * gdbarch.sh (software_single_step): Change return type to
12741 std::vector<CORE_ADDR>.
12742 * gdbarch.c, gdbarch.h: Re-generate.
12743 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12744 Adjust.
12745 (arm_deal_with_atomic_sequence_raw): Adjust.
12746 (thumb_get_next_pcs_raw): Adjust.
12747 (arm_get_next_pcs_raw): Adjust.
12748 (arm_get_next_pcs): Adjust.
12749 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12750 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12751 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12752 (alpha_software_single_step): Adjust.
12753 * alpha-tdep.h (alpha_software_single_step): Adjust.
12754 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12755 * arm-tdep.c (arm_software_single_step): Adjust.
12756 (arm_breakpoint_kind_from_current_state): Adjust.
12757 * arm-tdep.h (arm_software_single_step): Adjust.
12758 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12759 * cris-tdep.c (cris_software_single_step): Adjust.
12760 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12761 (micromips_deal_with_atomic_sequence): Adjust.
12762 (deal_with_atomic_sequence): Adjust.
12763 (mips_software_single_step): Adjust.
12764 * mips-tdep.h (mips_software_single_step): Adjust.
12765 * moxie-tdep.c (moxie_software_single_step): Adjust.
12766 * nios2-tdep.c (nios2_software_single_step): Adjust.
12767 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12768 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12769 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12770 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12771 * sparc-tdep.c (sparc_software_single_step): Adjust.
12772 * spu-tdep.c (spu_software_single_step): Adjust.
12773 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12774
ea480a30
SM
127752017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12776
12777 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12778 * gdbarch.h: Re-generate.
12779
d050f7d7
TW
127802017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12781
12782 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12783 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12784 * python/py-instruction.c, python/py-instruction.h: New file.
12785 * python/py-record.c: Add py-instruction.h include.
12786 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12787 gdb.RecordInstruction.
12788 * python/python-internal.h: Add gdbpy_initialize_instruction
12789 declaration.
12790 * python/python.c (do_start_initialization): Add
12791 gdbpy_initialize_instruction.
12792
14f819c8
TW
127932017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12794
12795 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12796 Remove.
12797 (btrace_func_from_recpy_func): New function.
12798 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12799 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12800 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12801 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12802 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12803 Also, use new helper functions.
12804 (btpy_list_item): Use new helper functions.
12805 (recpy_bt_function_call_history): Use new type name.
12806 (btpy_call_getset): Remove.
12807 (gdbpy_initialize_btrace): Remove code to initialize
12808 gdb.BtraceFunctionCall.
12809 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12810 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12811 recpy_bt_func_prev, recpy_bt_func_next): New export.
12812 * python/py-record.c (recpy_func_type): New static object.
12813 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12814 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12815 recpy_func_next): New function.
12816 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12817 (recpy_func_getset): New static object.
12818 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12819 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12820
0ed5da75
TW
128212017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12822
12823 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12824 (btpy_object, btpy_insn_type, btpy_new): Remove.
12825 (btpy_list_object): Use gdb.RecordInstruction type instead of
12826 gdb.BtraceInstruction type.
12827 (btrace_insn_from_recpy_insn): New function.
12828 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12829 btpy_new.
12830 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12831 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12832 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12833 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12834 instead of btpy_object.
12835 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12836 btpy_insn_data, btpy_insn_decode): Rename to ...
12837 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12838 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12839 recpy_bt_insn_decode): This. Also, use new helper functions.
12840 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12841 recpy_insn_type.
12842 (btpy_insn_getset): Remove.
12843 (gdbpy_initialize_btrace): Remove code to initialize
12844 gdb.BtraceInstruction. Use recpy_element_object.
12845 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12846 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12847 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12848 * python/py-record.c (recpy_insn_type): New static object.
12849 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12850 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12851 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12852 New function.
12853 (recpy_insn_getset): New static object.
12854 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12855 * python/py-record.h (recpy_element_object): New typedef.
12856 (recpy_insn_type, recpy_insn_new): New export.
12857
913aeadd
TW
128582017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12859
12860 * py-record-btrace.c (btpy_insn_new): Removed.
12861 (btpy_insn_or_gap_new): New function.
12862 (btpy_insn_error): Removed.
12863 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12864 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12865 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12866 btpy_insn_or_gap_new instead of btpy_insn_new.
12867 (btpy_insn_getset): Remove btpy_insn_error.
12868 * py-record.c (recpy_gap_type): New static object.
12869 (recpy_gap_object): New typedef.
12870 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12871 recpy_gap_reason_string): New function.
12872 (recpy_gap_getset): New static object.
12873 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12874 * py-record.h (recpy_gap_new): New export.
12875
a3be24ad
TW
128762017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12877
12878 * python/py-record.c (recpy_ptid): Remove.
12879 (recpy_record_getset): Remove recpy_ptid.
12880
ae20e79a
TW
128812017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12882
12883 * btrace.c (btrace_fetch): Set inferior_ptid.
12884 * python/py-record-btrace.c: Add "py-record.h" include.
12885 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12886 recpy_bt_end, recpy_bt_instruction_history,
12887 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12888 in gdb.Record object instead of current ptid.
12889 * python/py-record.c: Include new "py-record.h" file.
12890 (recpy_record_object): Moved to py-record.h.
12891 * python/py-record.h: New file.
12892
8d0050ea
TW
128932017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12894
12895 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12896 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12897 indentation.
12898
3f380b50
JB
128992017-05-01 Joel Brobecker <brobecker@adacore.com>
12900
12901 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12902 the past maintainers section.
12903
07495424
YQ
129042017-04-28 Yao Qi <yao.qi@linaro.org>
12905
12906 * infcmd.c (get_return_value): Use regcache ctor, and remove
12907 cleanup.
12908
deb1fa3e
YQ
129092017-04-28 Yao Qi <yao.qi@linaro.org>
12910 Pedro Alves <palves@redhat.com>
12911
12912 * regcache.c (regcache::regcache): New tag dispatch ctor.
12913 (do_cooked_read): Moved above.
12914 (regcache_dup): Use the tag dispatch ctor..
12915 * regcache.h (regcache): Declare ctor, delete copy ctor and
12916 assignment operator, remove friend regcache_dup.
12917
b421c83c
YQ
129182017-04-28 Yao Qi <yao.qi@linaro.org>
12919
12920 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12921 call method save instead of regcache_cpy.
12922 * regcache.h (struct regcache): Make regcache_dup a friend.
12923
ef79d9a3
YQ
129242017-04-28 Yao Qi <yao.qi@linaro.org>
12925
12926 * regcache.c (struct regcache): Move to regcache.h
12927 (regcache::arch): New method.
12928 (regcache_get_ptid): Update.
12929 (get_regcache_arch): Call arch method.
12930 (get_regcache_aspace): Call method aspace.
12931 (register_buffer): Change it to method.
12932 (regcache_save): Change it to regcache::save.
12933 (regcache_restore): Likewise.
12934 (regcache_cpy_no_passthrough): Remove the declaration.
12935 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12936 (regcache_cpy_no_passthrough): Change it to method
12937 cpy_no_passthrough.
12938 (regcache_register_status): Change it to method
12939 get_register_status.
12940 (regcache_invalidate): Change it to method invalidate.
12941 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12942 (regcache_raw_update): Change it to method raw_update.
12943 (regcache_raw_read): Likewise.
12944 (regcache_raw_read_signed): Likewise.
12945 (regcache_raw_read_unsigned): Likewise.
12946 (regcache_raw_write_signed): Likewise.
12947 (regcache_raw_write_unsigned): Likewise.
12948 (regcache_cooked_read): Likewise.
12949 (regcache_cooked_read_value): Likewise.
12950 (regcache_cooked_read_signed): Likewise.
12951 (regcache_cooked_read_unsigned): Likewise.
12952 (regcache_cooked_write_signed): Likewise.
12953 (regcache_cooked_write_unsigned): Likewise.
12954 (regcache_raw_set_cached_value): Likewise.
12955 (regcache_raw_write): Likewise.
12956 (regcache_cooked_write): Likewise.
12957 (regcache_xfer_part): Likewise.
12958 (regcache_raw_read_part): Likewise.
12959 (regcache_raw_write_part): Likewise.
12960 (regcache_cooked_read_part): Likewise.
12961 (regcache_cooked_write_part): Likewise.
12962 (regcache_raw_supply): Likewise.
12963 (regcache_raw_collect): Likewise.
12964 (regcache_transfer_regset): Likewise.
12965 (regcache_supply_regset): Likewise.
12966 (regcache_collect_regset): Likewise.
12967 (regcache_debug_print_register): Likewise.
12968 (enum regcache_dump_what): Move it to regcache.h.
12969 (regcache_dump): Change it to method dump.
12970 * regcache.h (enum regcache_dump_what): New.
12971 (class regcache): New.
12972 * target.c (target_fetch_registers): Call method
12973 debug_print_register.
12974 (target_store_registers): Likewise.
12975
f8fdb78e
SM
129762017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12977
12978 * windows-nat.c (struct lm_info_windows): Initialize field.
12979 (windows_make_so): Allocate lm_info_windows with new.
12980 (windows_free_so): Free lm_info_windows with delete.
12981
9ccbfd7b
SM
129822017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12983
12984 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12985 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12986 cleanup.
12987 (darwin_free_so): Free lm_info_darwin with delete.
12988
76e75227
SM
129892017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12990
12991 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12992 <l_addr_p>: Change type to bool.
12993 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12994 (svr4_free_so): Free lm_info_svr4 with delete.
12995 (svr4_copy_library_list): Replace memcpy with call to copy
12996 constructor.
12997 (library_list_start_library, svr4_default_sos): Allocate
12998 lm_info_svr4 with new.
12999
51046d9e
SM
130002017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13001
13002 * solib-target.c (struct lm_info_target): Add destructor,
13003 initialize fields.
13004 <name>: Change type to std::string.
13005 (library_list_start_library): Allocate lm_info_target with new.
13006 (solib_target_free_library_list): Free lm_info_target with
13007 delete.
13008 (solib_target_current_sos): Adapt to std::string.
13009 (solib_target_free_so): Free lm_info_target with delete.
13010
4023ae76
SM
130112017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13012
13013 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13014 fields.
13015 (frv_current_sos): Allocate lm_info_frv with new.
13016 (frv_relocate_main_executable): Free lm_info_frv with delete,
13017 allocate with new.
13018 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13019
af43057b
SM
130202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13021
13022 * solib-frv.c (struct lm_info_frv): Fix indentation.
13023
b0911207
SM
130242017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13025
13026 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13027 map field.
13028 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13029 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13030 and allocate with new.
13031 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13032
6c401f72
SM
130332017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13034
13035 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13036 <filename, member_name>: Change type to std::string.
13037 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13038 (library_list_start_library): Allocate lm_info_aix with new.
13039 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13040 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13041 with copy constructor.
13042
d0e449a1
SM
130432017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13044
13045 * solist.h (struct lm_info): Remove.
13046 (struct lm_info_base): New class.
13047 (struct so_list) <lm_info>: Change type to lm_info_base *.
13048 * nto-tdep.c (struct lm_info): Remove.
13049 (lm_addr): Adjust.
13050 * solib-aix.c (struct lm_info): Rename to ...
13051 (struct lm_info_aix): ... this. Extend lm_info_base.
13052 (lm_info_p): Rename to ...
13053 (lm_info_aix_p): ... this, and adjust.
13054 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13055 solib_aix_parse_libraries, library_list_start_library,
13056 solib_aix_free_library_list, solib_aix_parse_libraries,
13057 solib_aix_get_library_list,
13058 solib_aix_relocate_section_addresses, solib_aix_free_so,
13059 solib_aix_get_section_offsets,
13060 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13061 Adjust.
13062 (struct solib_aix_inferior_data) <library_list>: Adjust.
13063 * solib-darwin.c (struct lm_info): Rename to ...
13064 (struct lm_info_darwin): ... this. Extend lm_info_base.
13065 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13066 * solib-dsbt.c (struct lm_info): Rename to ...
13067 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13068 (struct dsbt_info) <main_executable_lm_info): Adjust.
13069 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13070 dsbt_relocate_section_addresses): Adjust.
13071 * solib-frv.c (struct lm_info): Rename to ...
13072 (struct lm_info_frv): ... this. Extend lm_info_base.
13073 (main_executable_lm_info): Adjust.
13074 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13075 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13076 find_canonical_descriptor_in_load_object,
13077 frv_fdpic_find_canonical_descriptor): Adjust.
13078 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13079 to lm_info_svr4.
13080 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13081 svr4_clear_so, svr4_copy_library_list,
13082 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13083 svr4_current_sos, svr4_fetch_objfile_link_map,
13084 solist_update_incremental): Adjust.
13085 * solib-svr4.h (struct lm_info_svr4): Move here from
13086 solib-svr4.c.
13087 * solib-target.c (struct lm_info): Rename to ...
13088 (struct lm_info_target): ... this. Extend lm_info_base.
13089 (lm_info_p): Rename to ...
13090 (lm_info_target_p): ... this.
13091 (solib_target_parse_libraries, library_list_start_segment,
13092 library_list_start_section, library_list_start_library,
13093 library_list_end_library, solib_target_free_library_list,
13094 solib_target_current_sos, solib_target_free_so,
13095 solib_target_relocate_section_addresses): Adjust.
13096 * windows-nat.c (struct lm_info): Rename to ...
13097 (struct lm_info_windows): ... this. Extend lm_info_base.
13098 (windows_make_so, handle_load_dll, handle_unload_dll,
13099 windows_xfer_shared_libraries): Adjust.
13100
434a4023
SM
131012017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13102
13103 * solib-darwin.c (struct darwin_so_list): Remove.
13104 (darwin_current_sos): Allocate an so_list object instead of a
13105 darwin_so_list, separately allocate an lm_info object.
13106 (darwin_free_so): Free lm_info.
13107
428544e8
JB
131082017-04-28 John Baldwin <jhb@FreeBSD.org>
13109
13110 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13111 with fprintf_filtered.
13112
4621115f
YQ
131132017-04-28 Yao Qi <yao.qi@linaro.org>
13114
13115 * regcache.c (regcache::regcache): New function.
13116 (regcache::~regcache): New function.
13117 (regcache_xmalloc_1): Remove.
13118 (regcache_xmalloc): Call new regcache.
13119 (regcache_xfree): Call delete regcache.
13120 (get_thread_arch_aspace_regcache): Call new regcache.
13121
339053c2
YQ
131222017-04-28 Yao Qi <yao.qi@linaro.org>
13123
13124 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13125 lwp instead of ptid_get_lwp.
13126
7974a605
YQ
131272017-04-28 Yao Qi <yao.qi@linaro.org>
13128
13129 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13130 lwp_info instead of getting from inferior_ptid.
13131
e15c3eb4
KS
131322017-04-27 Keith Seitz <keiths@redhat.com>
13133
13134 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13135 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13136 (CV_CONVERSION_BADNESS): Define.
13137 (rank_one_type): Remove overly restrictive rvalue reference
13138 rank checks.
13139 Add cv-qualifier checks and subranks for type equality.
13140 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13141 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13142 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13143
72bc1d24
SM
131442017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13145
13146 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13147 count when creating the object.
13148
55bcecda
UW
131492017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13150 Ulrich Weigand <uweigand@de.ibm.com>
13151
13152 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13153 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13154 is used in AIX.
13155 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13156 (process_xcoff_symbol): Likewise.
13157 (scan_xcoff_symtab): Likewise.
13158
5c99fcf8
AH
131592017-04-26 Alan Hayward <alan.hayward@arm.com>
13160
13161 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13162 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13163 (ia64_access_reg): Use get_frame_register_unsigned.
13164 (ia64_access_rse_reg): Likewise.
13165 (ia64_libunwind_frame_prev_register): Likewise.
13166
b41c5a85
JW
131672017-04-26 Jiong Wang <jiong.wang@arm.com>
13168
13169 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13170 * gdbarch.c: Regenerated.
13171 * gdbarch.h: Regenerated.
13172 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13173 visibility external.
13174 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13175 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13176 (enum cfa_how_kind): Move to ...
13177 (struct dwarf2_frame_state_reg_info): Likewise.
13178 (struct dwarf2_frame_state): Likewise.
13179 * dwarf2-frame.h: ... here.
13180 (dwarf2_frame_state_alloc_regs): New declaration.
13181 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13182 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13183
c185f580
AH
131842017-04-26 Alan Hayward <alan.hayward@arm.com>
13185
13186 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13187 regcache_raw_read_unsigned.
13188 (xtensa_pseudo_register_write): Likewise.
13189
19c45594
AH
131902017-04-26 Alan Hayward <alan.hayward@arm.com>
13191
13192 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13193 (nds32_pseudo_register_write): Likewise.
13194
4658f12e
YQ
131952017-04-25 Yao Qi <yao.qi@linaro.org>
13196
13197 * regcache.c (struct regcache) <readonly_p>: Change its type
13198 to bool.
13199 (regcache_xmalloc_1): Update parameter type and callers update.
13200
d581dda8
YQ
132012017-04-25 Yao Qi <yao.qi@linaro.org>
13202
13203 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13204 set_gdbarch_wchar_bit.
13205 * arm-tdep.c (arm_gdbarch_init): Likewise.
13206
debed3db
PA
132072017-04-25 Pedro Alves <palves@redhat.com>
13208
13209 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13210 (BothAreRelocatable, memcopy, memmove): Don't define.
13211 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13212 macros.
13213
b0b92aeb
PA
132142017-04-25 Pedro Alves <palves@redhat.com>
13215
13216 * common/common-defs.h: Include "common/poison.h".
13217 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13218 and adjust.
13219 * common/poison.h: New file.
13220 * common/traits.h: Include <type_traits>.
13221 (Not, Or, Requires): New, moved from common/function-view.h.
13222
16c4d54a
PA
132232017-04-25 Pedro Alves <palves@redhat.com>
13224
13225 * breakpoint.h (struct breakpoint): In-class initialize all
13226 fields. Make boolean fields "bool".
13227 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13228 memset call and initializations no longer necessary.
13229
b5c36682
PA
132302017-04-25 Pedro Alves <palves@redhat.com>
13231
13232 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13233 reference.
13234 (pt_btrace_insn): New function.
13235 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13236
5625a286
PA
132372017-04-25 Pedro Alves <palves@redhat.com>
13238
13239 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13240 "base" field and inherit from "bp_location" instead. Add
13241 non-default ctor.
13242 (allocate_location_exception): Use new non-default ctor.
13243 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13244 (init_bp_location): Convert to ...
13245 (bp_location::bp_location): ... this new ctor, and remove memset
13246 call.
13247 (base_breakpoint_allocate_location): Use the new non-default ctor.
13248 * breakpoint.h (bp_location): Now a class. Declare default and
13249 non-default ctors. In-class initialize all members.
13250 (init_bp_location): Remove declaration.
13251
23bcc18f
PA
132522017-04-25 Pedro Alves <palves@redhat.com>
13253
13254 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13255 assignment operator.
13256
e1ba3053
YQ
132572017-04-24 Yao Qi <yao.qi@linaro.org>
13258
13259 * doublest.c (convert_doublest_to_floatformat): Call
13260 floatformat_totalsize_bytes.
13261
10f489e5
TT
132622017-04-22 Tom Tromey <tom@tromey.com>
13263
13264 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13265 ui_out_emit_list.
13266 * stack.c (print_frame): Use ui_out_emit_list.
13267 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13268 ui_out_emit_list.
13269 * mi/mi-main.c (print_one_inferior)
13270 (mi_cmd_data_list_register_names)
13271 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13272 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13273 ui_out_emit_list.
13274 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13275 (mi_output_solib_attribs): Use ui_out_emit_list,
13276 ui_out_emit_tuple.
13277 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13278 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13279 (mi_cmd_stack_list_args, list_args_or_locals): Use
13280 ui_out_emit_list.
13281 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13282 * breakpoint.c (print_solib_event, output_thread_groups): Use
13283 ui_out_emit_list.
13284
0092b74d
TT
132852017-04-22 Tom Tromey <tom@tromey.com>
13286
13287 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13288 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13289 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13290
a14a62dd
TT
132912017-04-22 Tom Tromey <tom@tromey.com>
13292
13293 * tracepoint.c (tvariables_info_1)
13294 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13295
46b9c129
TT
132962017-04-22 Tom Tromey <tom@tromey.com>
13297
13298 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13299 annotate_arg_emitter.
13300 * breakpoint.c (print_mention_watchpoint)
13301 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13302 * annotate.h (struct annotate_arg_emitter): New.
13303
2e783024
TT
133042017-04-22 Tom Tromey <tom@tromey.com>
13305
13306 * record-btrace.c (record_btrace_insn_history)
13307 (record_btrace_insn_history_range, record_btrace_call_history)
13308 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13309 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13310 ui_out_emit_tuple.
13311 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13312 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13313 * skip.c (skip_info): Use ui_out_emit_tuple.
13314 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13315 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13316 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13317 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13318 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13319 ui_out_emit_tuple.
13320 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13321 (output_register, mi_cmd_data_read_memory)
13322 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13323 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13324 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13325 Use ui_out_emit_tuple.
13326 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13327 ui_out_emit_tuple.
13328 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13329 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13330 * linux-thread-db.c (info_auto_load_libthread_db): Use
13331 ui_out_emit_tuple.
13332 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13333 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13334 * disasm.c (do_mixed_source_and_assembly_deprecated)
13335 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13336 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13337 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13338 * breakpoint.c (print_one_breakpoint_location)
13339 (print_one_breakpoint): Use ui_out_emit_tuple.
13340 * auto-load.c (print_script, info_auto_load_cmd): Use
13341 ui_out_emit_tuple.
13342 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13343
9be21bb4
SM
133442017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13345
13346 * thread.c (print_thread_info_1): Remove dead code.
13347
0d4c07af
JK
133482017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13349
13350 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13351 GDB_SELF_TEST.
13352 * arm-tdep.c (selftests::arm_record_test): Likewise.
13353
4daf993d
YQ
133542017-04-21 Yao Qi <yao.qi@linaro.org>
13355
13356 * regcache.c (regcache_restore): Remove argument 2. Replace
13357 argument 3 with regcache. Get register status from
13358 src->register_status and get register contents from
13359 register_buffer (src, regnum).
13360 (regcache_cpy): Update.
13361
a6c21d4a
PA
133622017-04-19 Pedro Alves <palves@redhat.com>
13363
13364 * gdbthread.h (thread): Add missing closing parenthesis in
13365 comment.
13366
3a3fd0fd
PA
133672017-04-19 Pedro Alves <palves@redhat.com>
13368
13369 * common/refcounted-object.h: New file.
13370 * gdbthread.h: Include "common/refcounted-object.h".
13371 (thread_info): Inherit from refcounted_object and add comments.
13372 (thread_info::incref, thread_info::decref)
13373 (thread_info::m_refcount): Delete.
13374 (thread_info::deletable): Use the refcounted_object::refcount()
13375 method.
13376 * inferior.c (current_inferior_): Add comment.
13377 (set_current_inferior): Increment/decrement refcounts.
13378 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13379 not-deletable instead of comparing with the current inferior.
13380 (initialize_inferiors): Increment the initial inferior's refcount.
13381 * inferior.h (struct inferior): Forward declare.
13382 Include "common/refcounted-object.h".
13383 (current_inferior, set_current_inferior): Move declaration to
13384 before struct inferior's definition, and fix comment.
13385 (inferior): Inherit from refcounted_object. Add comments.
13386 * thread.c (switch_to_thread_no_regs): Reference the thread's
13387 inferior pointer directly instead of doing a ptid lookup.
13388 (switch_to_no_thread): New function.
13389 (switch_to_thread(thread_info *)): New function, factored out
13390 from ...
13391 (switch_to_thread(ptid_t)): ... this.
13392 (restore_current_thread): Delete.
13393 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13394 fields, and add 'inf' field.
13395 (do_restore_current_thread_cleanup): Check whether old->inf is
13396 alive instead of looking up an inferior by ptid. Use
13397 switch_to_thread and switch_to_no_thread.
13398 (restore_current_thread_cleanup_dtor): Use old->inf directly
13399 instead of lookup up an inferior by id. Decref the inferior.
13400 Don't restore 'removable'.
13401 (make_cleanup_restore_current_thread): Same the inferior pointer
13402 in old, instead of the inferior number. Incref the inferior.
13403 Don't save/clear 'removable'.
13404
9bcb1f16
PA
134052017-04-19 Pedro Alves <palves@redhat.com>
13406
13407 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13408 unittests/scoped_restore-selftests.c.
13409 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13410 * common/scoped_restore.h (scoped_restore_base): Make "class".
13411 (scoped_restore_base::release): New public method.
13412 (scoped_restore_base::scoped_restore_base): New protected ctor.
13413 (scoped_restore_base::m_saved_var): New protected field.
13414 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13415 scoped_restore_base base class instead of m_saved_var directly.
13416 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13417 (scoped_restore_tmpl::scoped_restore_tmpl(const
13418 scoped_restore_tmpl<T>&)): Likewise.
13419 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13420 method.
13421 (scoped_restore_tmpl::saved_var): New method.
13422 (scoped_restore_tmpl::m_saved_var): Delete.
13423 * inferior.h (inferior::detaching): Now a bool.
13424 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13425 cleanup.
13426 * unittests/scoped_restore-selftests.c: New file.
13427
26fcd539
PA
134282017-04-19 Pedro Alves <palves@redhat.com>
13429
13430 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13431 Re-sort in alphabetic order.
13432
fdd243b0
PA
134332017-04-18 Pedro Alves <palves@redhat.com>
13434
13435 * xml-support.c (obstack_xml_printf): Delete.
13436 * xml-support.h (obstack_xml_printf): Delete.
13437
4895cde2
PA
134382017-04-18 Pedro Alves <palves@redhat.com>
13439
13440 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13441 vdebug, verror, body_text, start_element, end_element, name,
13442 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13443 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13444 is_xinclude>: Make private and add m_ prefix.
13445 (gdb_xml_parser::body_text): New method, based on ...
13446 (gdb_xml_body_text): ... this. Adjust.
13447 (gdb_xml_parser::vdebug): New method, based on ...
13448 (gdb_xml_debug): ... this. Adjust.
13449 (gdb_xml_parser::verror): New method, based on ...
13450 (gdb_xml_error): ... this. Adjust.
13451 (gdb_xml_parser::start_element): New method, based on ...
13452 (gdb_xml_start_element): ... this. Adjust.
13453 (gdb_xml_start_element_wrapper): Defer to
13454 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13455 (gdb_xml_parser::end_element): New method, based on ...
13456 (gdb_xml_end_element_wrapper): ... this. Adjust.
13457 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13458 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13459 (gdb_xml_parser::use_dtd): New method, based on ...
13460 (gdb_xml_use_dtd): ... this. Adjust.
13461 (gdb_xml_parser::parse): New method, based on ...
13462 (gdb_xml_parse): ... this. Adjust.
13463 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13464 (xinclude_start_include): Adjust to call the parser's name method.
13465 (xml_xinclude_default, xml_xinclude_start_doctype)
13466 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13467 method.
13468 (xml_process_xincludes): Adjust to call parser methods.
13469 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13470 declarations.
13471
bd8a901f
PA
134722017-04-18 Pedro Alves <palves@redhat.com>
13473
13474 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13475 gdb::optional<std::string>.
13476 * xml-support.c: Include <string>.
13477 (scope_level::scope_level(scope_level &&))
13478 (scope_level::~scope_level): Delete.
13479 (scope_level::body): Now a std::string.
13480 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13481 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13482 parameter.
13483 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13484 (xinclude_parsing_data::output): Now a std::string reference.
13485 (xinclude_start_include): Adjust.
13486 (xml_xinclude_default): Adjust.
13487 (xml_process_xincludes): Add 'output' parameter, and return bool.
13488 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13489 and return bool.
13490 * xml-tdesc.c: Include <unordered_map> and <string>.
13491 (tdesc_xml_cache): Delete.
13492 (tdesc_xml_cache_s): Delete.
13493 (xml_cache): Now an std::unordered_map.
13494 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13495 (target_fetch_description_xml): Change return type to
13496 gdb::optional<std::string>, and adjust.
13497 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13498 (target_fetch_description_xml): Change return type to
13499 gdb::optional<std::string>.
13500
d35d1958
PA
135012017-04-18 Pedro Alves <palves@redhat.com>
13502
13503 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13504 unittests/optional-selftests.c.
13505 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13506 * unittests/optional-selftests.c: New file.
13507 * unittests/optional/assignment/1.cc: New file.
13508 * unittests/optional/assignment/2.cc: New file.
13509 * unittests/optional/assignment/3.cc: New file.
13510 * unittests/optional/assignment/4.cc: New file.
13511 * unittests/optional/assignment/5.cc: New file.
13512 * unittests/optional/assignment/6.cc: New file.
13513 * unittests/optional/assignment/7.cc: New file.
13514 * unittests/optional/cons/copy.cc: New file.
13515 * unittests/optional/cons/default.cc: New file.
13516 * unittests/optional/cons/move.cc: New file.
13517 * unittests/optional/cons/value.cc: New file.
13518 * unittests/optional/in_place.cc: New file.
13519 * unittests/optional/observers/1.cc: New file.
13520 * unittests/optional/observers/2.cc: New file.
13521
22796e97
PA
135222017-04-18 Pedro Alves <palves@redhat.com>
13523
13524 * common/gdb_optional.h: Include common/traits.h.
13525 (in_place_t): New type.
13526 (in_place): New constexpr variable.
13527 (optional::optional): Remove member initialization of
13528 m_instantiated.
13529 (optional::optional(in_place_t...)): New constructor.
13530 (optional::~optional): Use reset.
13531 (optional::optional(const optional&)): New.
13532 (optional::optional(const optional&&)): New.
13533 (optional::optional(T &)): New.
13534 (optional::optional(T &&)): New.
13535 (operator::operator=(const optional &)): New.
13536 (operator::operator=(optional &&)): New.
13537 (operator::operator= (const T &))
13538 (operator::operator= (T &&))
13539 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13540 (operator::reset): New.
13541 (operator::m_instantiated):: Add in-class initializer.
13542 * common/traits.h: Include <type_traits>.
13543 (struct And): New types.
13544
a7fc9b61
PA
135452017-04-18 Pedro Alves <palves@redhat.com>
13546
13547 * xml-support.c: Include <vector>.
13548 (scope_level::scope_level(const gdb_xml_element *))
13549 (scope_level::scope_level(scope_level&&)): New.
13550 (scope_level::~scope_level): New.
13551 (scope_level_s): Delete.
13552 (gdb_xml_parser::scopes): Now a std::vector.
13553 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13554 Use std::vector.
13555 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13556 scope cleanup code.
13557 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13558 of the scopes member. Use std::vector::emplace_back.
13559
010151c9
PA
135602017-04-18 Pedro Alves <palves@redhat.com>
13561
13562 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13563 a bool.
13564 (gdb_xml_end_element): Change type of first parameter.
13565 (gdb_xml_cleanup): Rename to ...
13566 (gdb_xml_parser::~gdb_xml_parser): ... this.
13567 (gdb_xml_create_parser_and_cleanup): Delete with ...
13568 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13569 to this new ctor.
13570 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13571 using gdb_xml_create_parser_and_cleanup.
13572 (xinclude_parsing_data): Add ctor/dtor.
13573 (xml_xinclude_cleanup): Delete.
13574 (xml_process_xincludes): Create a local xinclude_parsing_data
13575 instead of heap-allocating one. Create a local gdb_xml_parser
13576 instead of heap-allocating one with
13577 gdb_xml_create_parser_and_cleanup.
13578
d56060f0
JB
135792017-04-18 John Baldwin <jhb@FreeBSD.org>
13580
13581 PR threads/20743
13582 * fbsd-nat.c (resume_one_thread_cb): Remove.
13583 (resume_all_threads_cb): Remove.
13584 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13585 iterate_over_threads.
13586
305d16a9
JB
135872017-04-17 Joel Brobecker <brobecker@adacore.com>
13588
13589 * NEWS: Create a new section for the next release branch.
13590 Rename the section of the current branch, now that it has
13591 been cut.
13592
8bb57231
JB
135932017-04-17 Joel Brobecker <brobecker@adacore.com>
13594
13595 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13596 * version.in: Bump version to 8.0.50.DATE-git.
13597
096c92dd
SDJ
135982017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13599
13600 PR gdb/21385
13601 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13602 independently of the host, and fix build breakage on Cygwin.
13603
0550c955
PA
136042017-04-13 Pedro Alves <palves@redhat.com>
13605
13606 * inferior.c (free_inferior): Convert to ...
13607 (inferior::~inferior): ... this dtor.
13608 (inferior::inferior): New ctor, factored out from ...
13609 (add_inferior_silent): ... here. Allocate the inferior with a new
13610 expression.
13611 (delete_inferior): Call delete instead of free_inferior.
13612 * inferior.h (gdb_environ, continuation): Forward declare.
13613 (inferior): Now a class. Add in-class initialization to all
13614 members. Make boolean fields bool, except 'detaching'.
13615 (inferior::inferior): New explicit ctor.
13616 (inferior::~inferior): New.
13617
e3d60dfc
PA
136182017-04-13 Pedro Alves <palves@redhat.com>
13619
13620 * inferior.c (init_inferior_list): Delete.
13621 * inferior.h (init_inferior_list): Delete.
13622
5fd69d0a
PA
136232017-04-13 Pedro Alves <palves@redhat.com>
13624
13625 PR threads/13217
13626 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13627 (top level): Call it twice, with different thread sets.
13628
c6609450
PA
136292017-04-13 Pedro Alves <palves@redhat.com>
13630
13631 * thread.c: Include <algorithm>.
13632 (thread_array_cleanup): Delete.
13633 (scoped_inc_dec_ref): New class.
13634 (live_threads_count): New function.
13635 (set_thread_refcount): Delete.
13636 (tp_array_compar_ascending): Now a bool.
13637 (tp_array_compar): Convert to a std::sort comparison function.
13638 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13639 and live_threads_count.
13640
2a00d7ce
PA
136412017-04-13 Pedro Alves <palves@redhat.com>
13642
13643 * infrun.c (follow_fork_inferior): Also switch the current
13644 inferior.
13645
441d7c93
PA
136462017-04-13 Pedro Alves <palves@redhat.com>
13647
13648 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13649 before calling create_internal_breakpoint.
13650
808480f6
PA
136512017-04-13 Pedro Alves <palves@redhat.com>
13652
13653 * fork-child.c (execv_argv): New class.
13654 (breakup_args): Refactored as ...
13655 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13656 Copy arguments to storage and replace separators with NULL
13657 terminators in place.
13658 (escape_bang_in_quoted_argument): Adjust to return bool.
13659 (execv_argv::execv_argv): New ctor.
13660 (execv_argv::init_for_shell): New method, factored out from
13661 fork_inferior. Don't strdup strings into the vector.
13662 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13663 Remove free_vector_argv call.
13664
ad3d022a
YQ
136652017-04-13 Yao Qi <yao.qi@linaro.org>
13666
13667 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13668 tdep->rx_psw_type.
13669
e6ddc3bf
YQ
136702017-04-13 Yao Qi <yao.qi@linaro.org>
13671
13672 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13673 * rx-tdep.c (rx_gdbarch_init): Likewise.
13674
bfb8cf90
PA
136752017-04-13 Pedro Alves <palves@redhat.com>
13676
13677 * breakpoint.h (struct breakpoint): Reindent.
13678
f5336ca5
PA
136792017-04-13 Pedro Alves <palves@redhat.com>
13680
13681 * breakpoint.c (bp_location): Rename to ...
13682 (bp_locations): ... this. All references updated.
13683 (bp_location_count): Rename to ...
13684 (bp_locations_count): ... this. All references updated.
13685 (bp_location_placed_address_before_address_max): Rename to ...
13686 (bp_locations_placed_address_before_address_max): ... this. All
13687 references updated.
13688 (bp_location_shadow_len_after_address_max): Rename to ...
13689 (bp_locations_shadow_len_after_address_max): ... this. All
13690 references updated.
13691 (bp_location_compare_addrs): Rename to ...
13692 (bp_locations_compare_addrs): ... this. All references updated.
13693 (bp_location_compare):Rename to ...
13694 (bp_locations_compare): ... this. All references updated.
13695 (bp_location_target_extensions_update): Rename to ...
13696 (bp_locations_target_extensions_update): ... this. All references
13697 updated.
13698
be628ab8
SDJ
136992017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13700
13701 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13702 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13703 'sgtty.h'.
13704 * common/gdb_termios.h: New file, with parts of "terminal.h".
13705 * inflow.c: Include "gdb_termios.h".
13706 * ser-unix.c: Include "gdb_termios.h".
13707 * terminal.h: Move terminal-related defines to
13708 "common/gdb_termios.h".
13709
8e9e35b1
TT
137102017-04-12 Tom Tromey <tom@tromey.com>
13711
13712 * probe.c (parse_probes): Update.
13713 * location.h (delete_event_location): Don't declare.
13714 (event_location_deleter::operator()): Update.
13715 * location.c (event_location_deleter::operator()): Rename from
13716 delete_event_location.
13717 * linespec.h (linespec_result) <location>: Change type to
13718 event_location_up.
13719 * linespec.c (canonicalize_linespec, event_location_to_sals)
13720 (decode_objc): Update.
13721 (linespec_result): Don't call delete_event_location.
13722 * breakpoint.c (create_breakpoints_sal)
13723 (bkpt_probe_create_sals_from_location)
13724 (strace_marker_create_sals_from_location): Update.
13725
16e802b9
TT
137262017-04-12 Tom Tromey <tom@tromey.com>
13727
13728 * linespec.h (struct linespec_result): Add constructor and
13729 destructor.
13730 (init_linespec_result, destroy_linespec_result)
13731 (make_cleanup_destroy_linespec_result): Don't declare.
13732 * linespec.c (init_linespec_result): Remove.
13733 (linespec_result::~linespec_result): Rename from
13734 destroy_linespec_result. Update.
13735 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13736 Remove.
13737 * breakpoint.c (create_breakpoint, break_range_command)
13738 (decode_location_default): Update.
13739 * ax-gdb.c (agent_command_1): Update.
13740
d28cd78a
TT
137412017-04-12 Tom Tromey <tom@tromey.com>
13742
13743 * remote.c (remote_download_tracepoint): Update.
13744 * python/py-breakpoint.c (bppy_get_location): Update.
13745 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13746 (gdbscm_breakpoint_location): Update.
13747 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13748 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13749 Change type to event_location_up.
13750 * breakpoint.c (create_overlay_event_breakpoint)
13751 (create_longjmp_master_breakpoint)
13752 (create_std_terminate_master_breakpoint)
13753 (create_exception_master_breakpoint)
13754 (breakpoint_event_location_empty_p, print_breakpoint_location)
13755 (print_one_breakpoint_location, create_thread_event_breakpoint)
13756 (init_breakpoint_sal, create_breakpoint)
13757 (print_recreate_ranged_breakpoint, break_range_command)
13758 (init_ada_exception_breakpoint, say_where): Update.
13759 (base_breakpoint_dtor): Don't call delete_event_location.
13760 (bkpt_print_recreate, tracepoint_print_recreate)
13761 (dprintf_print_recreate, update_static_tracepoint)
13762 (breakpoint_re_set_default): Update.
13763
711799d5
TT
137642017-04-12 Tom Tromey <tom@tromey.com>
13765
13766 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13767 type of "to_do". Update.
13768 (compute_stack_depth): Use std::vector.
13769
52d214d3
TT
137702017-04-12 Tom Tromey <tom@tromey.com>
13771
13772 * printcmd.c (find_instruction_backward): Use std::vector.
13773
4c404b8b
TT
137742017-04-12 Tom Tromey <tom@tromey.com>
13775
13776 * symfile.c (objfilep): Remove typedef.
13777 (reread_symbols): Use a std::vector.
13778
156d9eab
TT
137792017-04-12 Tom Tromey <tom@tromey.com>
13780
13781 * mi/mi-main.c (exec_direction_forward): Remove.
13782 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13783 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13784 scoped_restore.
13785 * guile/guile.c (guile_repl_command, guile_command)
13786 (gdbscm_execute_gdb_command): Use scoped_restore.
13787 * go-exp.y (go_parse): Use scoped_restore.
13788 * d-exp.y (d_parse): Use scoped_restore.
13789 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13790 * c-exp.y (c_parse): Use scoped_restore.
13791
4d89769a
TT
137922017-04-12 Tom Tromey <tom@tromey.com>
13793
13794 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13795 (mi_parse): Update return type.
13796 (mi_parse_free): Remove.
13797 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13798 (mi_parse::~mi_parse): Rename from mi_parse_free.
13799 (mi_parse_cleanup): Remove.
13800 (mi_parse): Return a unique_ptr. Use new.
13801 * mi/mi-main.c (mi_execute_command): Update.
13802
4b217cc7
TT
138032017-04-12 Tom Tromey <tom@tromey.com>
13804
13805 * location.c (explicit_location_lex_one): Return a
13806 unique_xmalloc_ptr.
13807 (string_to_explicit_location): Update. Remove cleanups.
13808
59d3651b
TT
138092017-04-12 Tom Tromey <tom@tromey.com>
13810
13811 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13812 (compare_value_and_voffset): Change type. Update.
13813 (compute_vtable_size): Change type of "offset_vec".
13814 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13815 (gnuv3_get_typeid): Remove extraneous declaration.
13816
b24b0d6c
TT
138172017-04-12 Tom Tromey <tom@tromey.com>
13818
13819 * charset.h (wchar_iterator): Fix comment.
13820
80a3b8c5
TT
138212017-04-12 Tom Tromey <tom@tromey.com>
13822
13823 * charset.c (iconv_wrapper): New class.
13824 (cleanup_iconv): Remove.
13825 (convert_between_encodings): Use it.
13826
c83dd867
TT
138272017-04-12 Tom Tromey <tom@tromey.com>
13828
13829 * symfile.h (increment_reading_symtab): Update type.
13830 * symfile.c (decrement_reading_symtab): Remove.
13831 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13832 * psymtab.c (psymtab_to_symtab): Update.
13833 * dwarf2read.c (dw2_instantiate_symtab): Update.
13834
0e8621a0
TT
138352017-04-12 Tom Tromey <tom@tromey.com>
13836
13837 * jit.c (struct jit_reader): Declare separately. Add constructor
13838 and destructor. Change type of "handle".
13839 (loaded_jit_reader): Define separately.
13840 (jit_reader_load): Update. New "new".
13841 (jit_reader_unload_command): Use "delete".
13842 * gdb-dlfcn.h (struct dlclose_deleter): New.
13843 (gdb_dlhandle_up): New typedef.
13844 (gdb_dlopen, gdb_dlsym): Update types.
13845 (gdb_dlclose): Remove.
13846 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13847 (gdb_dlsym): Change type of "handle".
13848 (make_cleanup_dlclose): Remove.
13849 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13850 * compile/compile-c-support.c (load_libcc): Update.
13851
67d89901
TT
138522017-04-12 Tom Tromey <tom@tromey.com>
13853
13854 * symtab.h (find_pcs_for_symtab_line): Change return type.
13855 * symtab.c (find_pcs_for_symtab_line): Change return type.
13856 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13857 type of "vec". Update.
13858 (ltpy_get_pcs_for_line): Update.
13859 * linespec.c (decode_digits_ordinary): Update.
13860
93921405
TT
138612017-04-12 Tom Tromey <tom@tromey.com>
13862
13863 * tracepoint.c (actions_command): Update.
13864 * python/python.c (python_command, python_interactive_command):
13865 Update.
13866 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13867 * guile/guile.c (guile_command): Update.
13868 * defs.h (read_command_lines, read_command_lines_1): Return
13869 command_line_up.
13870 (command_lines_deleter): New struct.
13871 (command_line_up): New typedef.
13872 * compile/compile.c (compile_code_command)
13873 (compile_print_command): Update.
13874 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13875 command_line_up.
13876 (make_cleanup_free_command_lines): Remove.
13877 * cli/cli-script.c (get_command_line, read_command_lines_1)
13878 (copy_command_lines): Return command_line_up.
13879 (while_command, if_command, read_command_lines, define_command)
13880 (document_command): Update.
13881 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13882 Remove.
13883 * breakpoint.h (breakpoint_set_commands): Change type of
13884 "commands".
13885 * breakpoint.c (breakpoint_set_commands): Change type of
13886 "commands". Update.
13887 (do_map_commands_command, update_dprintf_command_list)
13888 (create_tracepoint_from_upload): Update.
13889
ffc2605c
TT
138902017-04-12 Tom Tromey <tom@tromey.com>
13891
13892 * tracepoint.c (scope_info): Update.
13893 * spu-tdep.c (spu_catch_start): Update.
13894 * python/python.c (gdbpy_decode_line): Update.
13895 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13896 * python/py-breakpoint.c (bppy_init): Update.
13897 * probe.c (parse_probes): Update.
13898 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13899 * location.h (event_location_deleter): New struct.
13900 (event_location_up): New typedef.
13901 (new_linespec_location, new_address_location, new_probe_location)
13902 (new_explicit_location, copy_event_location)
13903 (string_to_event_location, string_to_event_location_basic)
13904 (string_to_explicit_location): Update return type.
13905 (make_cleanup_delete_event_location): Remove.
13906 * location.c (new_linespec_location, new_address_location)
13907 (new_probe_location, new_explicit_location, copy_event_location):
13908 Return event_location_up.
13909 (delete_event_location_cleanup)
13910 (make_cleanup_delete_event_location): Remove.
13911 (string_to_explicit_location, string_to_event_location_basic)
13912 (string_to_event_location): Return event_location_up.
13913 * linespec.c (canonicalize_linespec, event_location_to_sals)
13914 (decode_line_with_current_source)
13915 (decode_line_with_last_displayed, decode_objc): Update.
13916 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13917 * completer.c (location_completer): Update.
13918 * cli/cli-cmds.c (edit_command, list_command): Update.
13919 * breakpoint.c (create_overlay_event_breakpoint)
13920 (create_longjmp_master_breakpoint)
13921 (create_std_terminate_master_breakpoint)
13922 (create_exception_master_breakpoint)
13923 (create_thread_event_breakpoint): Update.
13924 (init_breakpoint_sal): Update. Remove some dead code.
13925 (create_breakpoint_sal): Change type of "location". Update.
13926 (create_breakpoints_sal, create_breakpoint, break_command_1)
13927 (dprintf_command, break_range_command, until_break_command)
13928 (init_ada_exception_breakpoint)
13929 (strace_marker_create_sals_from_location)
13930 (update_static_tracepoint, trace_command, ftrace_command)
13931 (strace_command, create_tracepoint_from_upload): Update.
13932 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13933 * ax-gdb.c (agent_command_1): Update.
13934
8f10c932
PA
139352017-04-12 Pedro Alves <palves@redhat.com>
13936
13937 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13938 * configure.tgt: Handle i[34567]86-*-go32* and
13939 i[34567]86-*-msdosdjgpp*.
13940 * i386-tdep.c (i386_svr4_reg_to_regnum):
13941 Make extern.
13942 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13943 i386-go32-tdep.c.
13944 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13945 * i386-go32-tdep.c: New file.
13946 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13947 declarations.
13948
0a31ccfb
SM
139492017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13950
13951 * aix-thread.c (pd_status2str): Change return type to const char *.
13952
e9bb3fbb
PA
139532017-04-12 Pedro Alves <palves@redhat.com>
13954
13955 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13956 calls to set_gdbarch_gnu_triplet_regexp.
13957
53375380
PA
139582017-04-12 Pedro Alves <palves@redhat.com>
13959
13960 PR gdb/21323
13961 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13962 New enum value.
13963 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13964 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13965 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13966 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13967 * gdbarch.h, gdbarch.c: Regenerate.
13968 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13969 gdbarch_wchar_bit and gdbarch_wchar_signed.
13970 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13971 * arm-tdep.c (arm_gdbarch_init): Likewise.
13972 * avr-tdep.c (avr_gdbarch_init): Likewise.
13973 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13974 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13975 * i386-tdep.c (i386_go32_init_abi): Likewise.
13976 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13977 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13978 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13979 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13980 * sh-tdep.c (sh_gdbarch_init): Likewise.
13981 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13982 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13983 * windows-tdep.c (windows_init_abi): Likewise.
13984 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13985
53e710ac
PA
139862017-04-12 Pedro Alves <palves@redhat.com>
13987
13988 PR c++/21323
13989 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13990 cplus_primitive_type_char32_t>: New enum values.
13991 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13992 and cplus_primitive_type_char32_t.
13993 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13994 32, use the archtecture's built-in type for char16_t and char32_t,
13995 respectively. Otherwise, fallback to init_integer_type as before,
13996 but make the type unsigned, and issue a complaint.
13997 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13998
ab0538b8
AH
139992017-04-12 Alan Hayward <alan.hayward@arm.com>
14000
5e0e0422 14001 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
14002 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14003
5430098f
SDJ
140042017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14005
14006 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14007 'const char *'.
14008
7c5ded6a
SDJ
140092017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14010
14011 * common/common-utils.c (free_vector_argv): New function.
14012 * common/common-utils.h: Include <vector>.
14013 (free_vector_argv): New prototype.
14014 * darwin-nat.c (darwin_create_inferior): Rewrite function
14015 prototype in order to constify "exec_file" and accept a
14016 "std::string" for "allargs".
14017 * fork-child.c: Include <vector>.
14018 (breakup_args): Rewrite function, using C++.
14019 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14020 and accept "std::string" for "allargs". Update the code to
14021 calculate "argv" based on "allargs". Update calls to "exec_fun"
14022 and "execvp".
14023 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14024 order to constify "exec_file" and accept a "std::string" for
14025 "allargs".
14026 * go32-nat.c (go32_create_inferior): Likewise.
14027 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14028 * infcmd.c (run_command_1): Constify "exec_file". Use
14029 "std::string" for inferior arguments.
14030 * inferior.h (fork_inferior): Update prototype.
14031 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14032 prototype in order to constify "exec_file" and accept a
14033 "std::string" for "allargs".
14034 * nto-procfs.c (procfs_create_inferior): Likewise.
14035 * procfs.c (procfs_create_inferior): Likewise.
14036 * remote-sim.c (gdbsim_create_inferior): Likewise.
14037 * remote.c (extended_remote_run): Update code to accept
14038 "std::string" as argument.
14039 (extended_remote_create_inferior): Rewrite function prototype in
14040 order to constify "exec_file" and accept a "std::string" for
14041 "allargs".
14042 * rs6000-nat.c (super_create_inferior): Likewise.
14043 (rs6000_create_inferior): Likewise.
14044 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14045 * windows-nat.c (windows_create_inferior): Likewise.
14046
ae0eee42
PA
140472017-04-11 Pedro Alves <palves@redhat.com>
14048
14049 * thread.c: Fix whitespace throughout.
14050
a6acac06
PR
140512017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14052
14053 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14054
64403bd1
AH
140552017-04-11 Alan Hayward <alan.hayward@arm.com>
14056
14057 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14058
a5bef50f
SDJ
140592017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14060
14061 PR gdb/21364
14062 * osdata.c (info_osdata): Check if 'type' is an empty string
14063 instead of NULL.
14064
9295a5a9
PA
140652017-04-10 Pedro Alves <palves@redhat.com>
14066
14067 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14068 (ptid_to_global_thread_id, in_thread_list)
14069 (do_captured_list_thread_ids, set_resumed, set_running)
14070 (set_executing, set_stop_requested, finish_thread_state)
14071 (validate_registers_access, can_access_registers_ptid)
14072 (print_thread_info_1, switch_to_thread)
14073 (do_restore_current_thread_cleanup)
14074 (make_cleanup_restore_current_thread, thread_command)
14075 (thread_name_command): Use operator== instead of ptid_equal.
14076
996812e3
PA
140772017-04-10 Pedro Alves <palves@redhat.com>
14078
14079 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14080 (current_thread_cleanup_chain): Delete.
14081 (restore_current_thread_cleanup_dtor)
14082 (make_cleanup_restore_current_thread): Remove references to
14083 current_thread_cleanup_chain.
14084
845b344f
AH
140852017-04-10 Alan Hayward <alan.hayward@arm.com>
14086
14087 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14088 REG_UNKNOWN.
14089
803bdfe4
YQ
140902017-04-10 Yao Qi <yao.qi@linaro.org>
14091
14092 PR gdb/19942
14093 * gdbthread.h (thread_info::deletable): New method.
14094 (thread_info::incref): New method.
14095 (thread_info::decref): New method.
14096 (thread_info::refcount): Move it to private.
14097 * infrun.c (save_stop_context): Call inc_refcount.
14098 (release_stop_context_cleanup): Likewise.
14099 * thread.c (set_thread_exited): New function.
14100 (init_thread_list): Delete "tp" only it is deletable, otherwise
14101 call set_thread_exited.
14102 (delete_thread_1): Call set_thread_exited.
14103 (current_thread_cleanup) <inferior_pid>: Remove.
14104 <thread>: New field.
14105 (restore_current_thread_ptid_changed): Removed.
14106 (do_restore_current_thread_cleanup): Adjust.
14107 (restore_current_thread_cleanup_dtor): Don't call
14108 find_thread_ptid.
14109 (set_thread_refcount): Use dec_refcount.
14110 (make_cleanup_restore_current_thread): Adjust.
14111 (thread_apply_all_command): Call inc_refcount.
14112 (_initialize_thread): Don't call
14113 observer_attach_thread_ptid_changed.
14114
8c25b497
YQ
141152017-04-10 Yao Qi <yao.qi@linaro.org>
14116
14117 * thread.c (delete_thread_1): Hoist code on marking thread as
14118 exited.
14119
8473b447
SM
141202017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14121
14122 * windows-nat.c (windows_detach): Initialize ptid with
14123 minus_one_ptid.
14124
6670ec13
SM
141252017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14126
14127 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14128
ba2f91bb
AH
141292017-04-07 Alan Hayward <alan.hayward@arm.com>
14130
14131 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14132 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14133 (bfin_pseudo_register_write): Likewise
14134
436252de
SM
141352017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14136
14137 * common/ptid.h (struct ptid): Change to...
14138 (class ptid_t): ... this.
14139 <ptid_t>: New constructors.
14140 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14141 matches>: New methods.
14142 <make_null, make_minus_one>: New static methods.
14143 <pid>: Rename to...
14144 <m_pid>: ...this.
14145 <lwp>: Rename to...
14146 <m_lwp>: ...this.
14147 <tid>: Rename to...
14148 <m_tid>: ...this.
14149 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14150 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14151 as references, move comment to class ptid_t.
14152 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14153 ptid_t static methods.
14154 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14155 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14156 Take ptid arguments as references, implement using ptid_t methods.
14157 * unittests/ptid-selftests.c: New file.
14158 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14159 unittests/ptid-selftests.c.
14160 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14161
0dedf377
TP
141622017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14163
14164 * python/python.c (python_run_simple_file): Cast mode literal to
14165 non-const char pointer as expected by PyFile_FromString.
14166
4e9868d4
SM
141672017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14168
14169 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14170 minus_one_ptid and null_ptid.
14171
9bf2a700
PA
141722017-04-05 Pedro Alves <palves@redhat.com>
14173
14174 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14175 * configure: Regenerate.
14176
a121b7c1
PA
141772017-04-05 Pedro Alves <palves@redhat.com>
14178
14179 * ada-exp.y (yyerror): Constify.
14180 * ada-lang.c (bound_name, get_selections)
14181 (ada_variant_discrim_type)
14182 (ada_variant_discrim_name, ada_value_struct_elt)
14183 (ada_lookup_struct_elt_type, is_unchecked_variant)
14184 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14185 (catch_ada_exception_command_split)
14186 (catch_ada_assert_command_split, catch_assert_command)
14187 (ada_op_name): Constify.
14188 * ada-lang.h (ada_yyerror, get_selections)
14189 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14190 * arc-tdep.c (arc_print_frame_cache): Constify.
14191 * arm-tdep.c (arm_skip_stub): Constify.
14192 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14193 (gen_aggregate_elt_ref): Constify.
14194 * bcache.c (print_bcache_statistics): Constify.
14195 * bcache.h (print_bcache_statistics): Constify.
14196 * break-catch-throw.c (catch_exception_command_1):
14197 * breakpoint.c (struct ep_type_description::description):
14198 Constify.
14199 (add_solib_catchpoint): Constify.
14200 (catch_fork_command_1): Add cast.
14201 (add_catch_command): Constify.
14202 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14203 Constify.
14204 * bsd-uthread.c (bsd_uthread_state): Constify.
14205 * buildsym.c (patch_subfile_names): Constify.
14206 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14207 Constify.
14208 * c-exp.y (yyerror): Constify.
14209 (token::oper): Constify.
14210 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14211 * c-varobj.c (cplus_describe_child): Constify.
14212 * charset.c (find_charset_names): Add cast.
14213 (find_charset_names): Constify array and add const_cast.
14214 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14215 (edit_command): Constify.
14216 * cli/cli-decode.c (lookup_cmd): Constify.
14217 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14218 Constify.
14219 (struct dump_context): Constify.
14220 (add_dump_command, restore_command): Constify.
14221 * cli/cli-script.c (get_command_line): Constify.
14222 * cli/cli-script.h (get_command_line): Constify.
14223 * cli/cli-utils.c (check_for_argument): Constify.
14224 * cli/cli-utils.h (check_for_argument): Constify.
14225 * coff-pe-read.c (struct read_pe_section_data): Constify.
14226 * command.h (lookup_cmd): Constify.
14227 * common/print-utils.c (decimal2str): Constify.
14228 * completer.c (gdb_print_filename): Constify.
14229 * corefile.c (set_gnutarget): Constify.
14230 * cp-name-parser.y (yyerror): Constify.
14231 * cp-valprint.c (cp_print_class_member): Constify.
14232 * cris-tdep.c (cris_register_name, crisv32_register_name):
14233 Constify.
14234 * d-exp.y (yyerror): Constify.
14235 (struct token::oper): Constify.
14236 * d-lang.h (d_yyerror): Constify.
14237 * dbxread.c (struct header_file_location::name): Constify.
14238 (add_old_header_file, add_new_header_file, last_function_name)
14239 (dbx_next_symbol_text, add_bincl_to_list)
14240 (find_corresponding_bincl_psymtab, set_namestring)
14241 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14242 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14243 * defs.h (command_line_input, print_address_symbolic)
14244 (deprecated_readline_begin_hook): Constify.
14245 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14246 Constify.
14247 * event-top.c (handle_line_of_input): Constify and add cast.
14248 * exceptions.c (catch_errors): Constify.
14249 * exceptions.h (catch_errors): Constify.
14250 * expprint.c (print_subexp_standard, op_string, op_name)
14251 (op_name_standard, dump_raw_expression, dump_raw_expression):
14252 * expression.h (op_name, op_string, dump_raw_expression):
14253 Constify.
14254 * f-exp.y (yyerror): Constify.
14255 (struct token::oper): Constify.
14256 (struct f77_boolean_val::name): Constify.
14257 * f-lang.c (f_word_break_characters): Constify.
14258 * f-lang.h (f_yyerror): Constify.
14259 * fork-child.c (fork_inferior): Add cast.
14260 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14261 (new_variant): Constify.
14262 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14263 * gdbarch.c: Regenerate.
14264 * gdbcore.h (set_gnutarget): Constify.
14265 * go-exp.y (yyerror): Constify.
14266 (token::oper): Constify.
14267 * go-lang.h (go_yyerror): Constify.
14268 * go32-nat.c (go32_sysinfo): Constify.
14269 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14270 * guile/scm-cmd.c (cmdscm_function): Constify.
14271 * guile/scm-param.c (pascm_param_value): Constify.
14272 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14273 (h8300sx_register_name): Constify.
14274 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14275 Constify.
14276 * ia64-tdep.c (ia64_register_names): Constify.
14277 * infcmd.c (construct_inferior_arguments): Constify.
14278 (path_command, attach_post_wait): Constify.
14279 * language.c (show_range_command, show_case_command)
14280 (unk_lang_error): Constify.
14281 * language.h (language_defn::la_error)
14282 (language_defn::la_name_of_this): Constify.
14283 * linespec.c (decode_line_2): Constify.
14284 * linux-thread-db.c (thread_db_err_str): Constify.
14285 * lm32-tdep.c (lm32_register_name): Constify.
14286 * m2-exp.y (yyerror): Constify.
14287 * m2-lang.h (m2_yyerror): Constify.
14288 * m32r-tdep.c (m32r_register_names): Constify and make static.
14289 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14290 * m88k-tdep.c (m88k_register_name): Constify.
14291 * macroexp.c (appendmem): Constify.
14292 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14293 (upgrade_type, parse_external, parse_partial_symbols)
14294 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14295 (new_symbol): Constify.
14296 * memattr.c (mem_info_command): Constify.
14297 * mep-tdep.c (register_name_from_keyword): Constify.
14298 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14299 Constify.
14300 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14301 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14302 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14303 cast.
14304 (mi_execute_async_cli_command): Constify.
14305 * mips-tdep.c (mips_register_name): Constify.
14306 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14307 (am33_register_name, am33_2_register_name)
14308 * moxie-tdep.c (moxie_register_names): Constify.
14309 * nat/linux-osdata.c (osdata_type): Constify fields.
14310 * nto-tdep.c (nto_parse_redirection): Constify.
14311 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14312 (lookup_child_selector): Constify.
14313 (objc_methcall::name): Constify.
14314 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14315 (lookup_struct_typedef): Constify.
14316 * objfiles.c (pc_in_section): Constify.
14317 * objfiles.h (pc_in_section): Constify.
14318 * p-exp.y (struct token::oper): Constify.
14319 (yyerror): Constify.
14320 * p-lang.h (pascal_yyerror): Constify.
14321 * parser-defs.h (op_name_standard): Constify.
14322 (op_print::string): Constify.
14323 (exp_descriptor::op_name): Constify.
14324 * printcmd.c (print_address_symbolic): Constify.
14325 * psymtab.c (print_partial_symbols): Constify.
14326 * python/py-breakpoint.c (stop_func): Constify.
14327 (bppy_get_expression): Constify.
14328 * python/py-cmd.c (cmdpy_completer::name): Constify.
14329 (cmdpy_function): Constify.
14330 * python/py-event.c (evpy_add_attribute)
14331 (gdbpy_initialize_event_generic): Constify.
14332 * python/py-event.h (evpy_add_attribute)
14333 (gdbpy_initialize_event_generic): Constify.
14334 * python/py-evts.c (add_new_registry): Constify.
14335 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14336 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14337 * python/py-inferior.c (get_buffer): Add cast.
14338 * python/py-param.c (parm_constant::name): Constify.
14339 * python/py-unwind.c (fprint_frame_id): Constify.
14340 * python/python.c (gdbpy_parameter_value): Constify.
14341 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14342 * remote.c (memory_packet_config::name): Constify.
14343 (show_packet_config_cmd, remote_write_bytes)
14344 (remote_buffer_add_string):
14345 * reverse.c (exec_reverse_once): Constify.
14346 * rs6000-tdep.c (variant::name, variant::description): Constify.
14347 * rust-exp.y (rustyyerror): Constify.
14348 * rust-lang.c (rust_op_name): Constify.
14349 * rust-lang.h (rustyyerror): Constify.
14350 * serial.h (serial_ops::name): Constify.
14351 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14352 (sh_sh3e_register_name, sh_sh2e_register_name)
14353 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14354 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14355 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14356 (sh_sh4al_dsp_register_name): Constify.
14357 * sh64-tdep.c (sh64_register_name): Constify.
14358 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14359 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14360 * stabsread.c (patch_block_stabs, read_type_number)
14361 (ref_map::stabs, ref_add, process_reference)
14362 (symbol_reference_defined, define_symbol, define_symbol)
14363 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14364 (read_one_struct_field, read_struct_fields, read_baseclasses)
14365 (read_tilde_fields, read_struct_type, read_array_type)
14366 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14367 (read_huge_number, read_range_type, read_args, common_block_start)
14368 (find_name_end): Constify.
14369 * stabsread.h (common_block_start, define_symbol)
14370 (process_one_symbol, symbol_reference_defined, ref_add):
14371 * symfile.c (get_section_index, add_symbol_file_command):
14372 * symfile.h (get_section_index): Constify.
14373 * target-descriptions.c (tdesc_type::name): Constify.
14374 (tdesc_free_type): Add cast.
14375 * target.c (find_default_run_target):
14376 (add_deprecated_target_alias, find_default_run_target)
14377 (target_announce_detach): Constify.
14378 (do_option): Constify.
14379 * target.h (add_deprecated_target_alias): Constify.
14380 * thread.c (print_thread_info_1): Constify.
14381 * top.c (deprecated_readline_begin_hook, command_line_input):
14382 Constify.
14383 (init_main): Add casts.
14384 * top.h (handle_line_of_input): Constify.
14385 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14386 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14387 (tfind_command): Rename to ...
14388 (tfind_command_1): ... this and constify.
14389 (tfind_command): New function.
14390 (tfind_end_command, tfind_start_command): Adjust.
14391 (encode_source_string): Constify.
14392 * tracepoint.h (encode_source_string): Constify.
14393 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14394 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14395 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14396 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14397 * tui/tui-win.c (parse_scrolling_args): Constify.
14398 * tui/tui-windata.c (tui_erase_data_content): Constify.
14399 * tui/tui-windata.h (tui_erase_data_content): Constify.
14400 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14401 * tui/tui.c (tui_enable): Add cast.
14402 * utils.c (defaulted_query): Constify.
14403 (init_page_info): Add cast.
14404 (puts_debug, subset_compare): Constify.
14405 * utils.h (subset_compare): Constify.
14406 * varobj.c (varobj_format_string): Constify.
14407 * varobj.h (varobj_format_string): Constify.
14408 * vax-tdep.c (vax_register_name): Constify.
14409 * windows-nat.c (windows_detach): Constify.
14410 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14411 * xml-support.c (gdb_xml_end_element): Constify.
14412 * xml-tdesc.c (tdesc_start_reg): Constify.
14413 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14414 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14415 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14416
995816ba
PA
144172017-04-05 Pedro Alves <palves@redhat.com>
14418
14419 * proc-api.c (struct trans): Constify.
14420 (procfs_note): Constify.
14421 * proc-events.c (struct trans, syscall_table):
14422 * proc-flags.c (struct trans): Constify.
14423 * proc-utils.h (procfs_note): Constify.
14424 * proc-why.c (struct trans): Constify.
14425 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14426 (procfs_detach): Constify.
14427 * sol-thread.c (struct string_map): Constify.
14428 (td_err_string, td_state_string): Constify.
14429
3e83a920
PA
144302017-04-05 Pedro Alves <palves@redhat.com>
14431
14432 * proc-api.c (procfs_filename): Don't initialize
14433 procfs_filename.
14434 (prepare_to_trace): Assume procfs_filename is non-NULL.
14435 (_initialize_proc_api): Give procfs_filename a default value here.
14436
63160a43
PA
144372017-04-05 Pedro Alves <palves@redhat.com>
14438
14439 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14440 'cond_string' parameter.
14441 (extract_exception_regexp): Constify 'string' parameter.
14442 (catch_exception_command_1): Constify.
14443 * breakpoint.c (init_catchpoint)
14444 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14445 parameter.
14446 (ep_parse_optional_if_clause, catch_fork_command_1)
14447 (catch_exec_command_1): Constify.
14448 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14449 parameter.
14450 (ep_parse_optional_if_clause): Constify.
14451 * cli/cli-utils.c (remove_trailing_whitespace)
14452 (check_for_argument): Constify.
14453 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14454 non-const overload.
14455 (check_for_argument): Likewise.
14456
9b2eba3d
PA
144572017-04-05 Pedro Alves <palves@redhat.com>
14458
14459 * event-top.c (command_line_handler): Add cast to execute_command
14460 call.
14461 * record-btrace.c (cmd_record_btrace_bts_start)
14462 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14463 (cmd_record_btrace_start): Add cast to execute_command call.
14464 * record-full.c (record_full_goto_insn):
14465 * record.c (record_start, record_stop): Add cast to
14466 execute_command_to_string calls.
14467 (cmd_record_start): Add cast to execute_command calls.
14468
2adadf51
PA
144692017-04-05 Pedro Alves <palves@redhat.com>
14470
14471 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14472 static inline function.
14473 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14474 array and use gdb_PyArg_ParseTupleAndKeywords.
14475 * python/py-cmd.c (cmdpy_init): Likewise.
14476 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14477 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14478 (infpy_search_memory): Likewise.
14479 * python/py-objfile.c (objfpy_add_separate_debug_file)
14480 (gdbpy_lookup_objfile): Likewise.
14481 * python/py-symbol.c (gdbpy_lookup_symbol)
14482 (gdbpy_lookup_global_symbol): Likewise.
14483 * python/py-type.c (gdbpy_lookup_type): Likewise.
14484 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14485 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14486 Likewise.
14487
0d1f4ceb
PA
144882017-04-05 Pedro Alves <palves@redhat.com>
14489
14490 * python/python-internal.h (gdb_PyGetSetDef): New type.
14491 * python/py-block.c (block_object_getset)
14492 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14493 * python/py-event.c (event_object_getset)
14494 (finish_breakpoint_object_getset): Likewise.
14495 * python/py-inferior.c (inferior_object_getset): Likewise.
14496 * python/py-infthread.c (thread_object_getset): Likewise.
14497 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14498 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14499 * python/py-objfile.c (objfile_getset): Likewise.
14500 * python/py-progspace.c (pspace_getset): Likewise.
14501 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14502 Likewise.
14503 * python/py-record.c (recpy_record_getset): Likewise.
14504 * python/py-symbol.c (symbol_object_getset): Likewise.
14505 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14506 Likewise.
14507 * python/py-type.c (type_object_getset, field_object_getset):
14508 Likewise.
14509 * python/py-value.c (value_object_getset): Likewise.
14510
4d759979
PA
145112017-04-05 Pedro Alves <palves@redhat.com>
14512
14513 * python/python-internal.h (gdb_PyObject_CallMethod)
14514 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14515 New functions.
14516 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14517 (PySys_GetObject, PySys_SetPath): New macros.
14518
fdf9e36f
PA
145192017-04-05 Pedro Alves <palves@redhat.com>
14520
14521 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14522 info_osdata_command.
14523 * osdata.c (info_osdata_command): Rename to ...
14524 (info_osdata): ... this. Constify 'type' parameter, and remove
14525 the 'from_tty' parameter. Accept NULL TYPE.
14526 (info_osdata_command): New function.
14527 * osdata.h (info_osdata_command): Remove declaration.
14528 (info_osdata): New declaration.
14529
9f33b8b7
PA
145302017-04-05 Pedro Alves <palves@redhat.com>
14531
14532 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14533 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14534 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14535 parameter.
14536 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14537 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14538 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14539 parameter.
14540 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14541 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14542 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14543 (mi_cmd_file_list_exec_source_files)
14544 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14545 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14546 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14547 parameter.
14548 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14549 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14550 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14551 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14552 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14553 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14554 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14555 'command' parameter.
14556 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14557 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14558 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14559 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14560 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14561 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14562 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14563 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14564 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14565 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14566 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14567 parameter.
14568 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14569 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14570 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14571 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14572 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14573 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14574 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14575 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14576 (mi_cmd_data_list_changed_registers)
14577 (mi_cmd_data_write_register_values)
14578 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14579 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14580 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14581 (mi_cmd_list_features, mi_cmd_list_target_features)
14582 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14583 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14584 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14585 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14586 (mi_cmd_trace_frame_collected): Constify 'command'
14587 parameter.
14588 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14589 'command' parameter.
14590
67cb5b2d
PA
145912017-04-05 Pedro Alves <palves@redhat.com>
14592
14593 * ada-lang.c (ada_completer_word_break_characters): Now a const
14594 array.
14595 (ada_get_gdb_completer_word_break_characters): Constify.
14596 * completer.c (gdb_completer_command_word_break_characters)
14597 (gdb_completer_file_name_break_characters)
14598 (gdb_completer_quote_characters): Now const arrays.
14599 (get_gdb_completer_quote_characters): Constify.
14600 (set_rl_completer_word_break_characters): New function.
14601 (set_gdb_completion_word_break_characters)
14602 (complete_line_internal): Use it.
14603 * completer.h (get_gdb_completer_quote_characters): Constify.
14604 (set_rl_completer_word_break_characters): Declare.
14605 * f-lang.c (f_word_break_characters): Constify.
14606 * language.c (default_word_break_characters): Constify.
14607 * language.h (language_defn::la_word_break_characters): Constify.
14608 (default_word_break_characters): Constify.
14609 * top.c (init_main): Use set_rl_completer_word_break_characters.
14610
7a114964
PA
146112017-04-05 Pedro Alves <palves@redhat.com>
14612
14613 * aix-thread.c (aix_thread_pid_to_str)
14614 (aix_thread_extra_thread_info): Constify.
14615 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14616 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14617 (bsd_uthread_pid_to_str): Constify.
14618 * corelow.c (core_pid_to_str): Constify.
14619 * darwin-nat.c (darwin_pid_to_str): Constify.
14620 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14621 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14622 Constify.
14623 * gnu-nat.c (gnu_pid_to_str): Constify.
14624 * go32-nat.c (go32_pid_to_str): Constify.
14625 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14626 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14627 * inferior.c (inferior_pid_to_str): Constify.
14628 * linux-nat.c (linux_nat_pid_to_str): Constify.
14629 * linux-tdep.c (linux_core_pid_to_str): Constify.
14630 * linux-thread-db.c (thread_db_pid_to_str)
14631 (thread_db_extra_thread_info): Constify.
14632 * nto-tdep.c (nto_extra_thread_info): Constify.
14633 * nto-tdep.h (nto_extra_thread_info): Constify.
14634 * obsd-nat.c (obsd_pid_to_str): Constify.
14635 * procfs.c (procfs_pid_to_str): Constify.
14636 * ravenscar-thread.c (ravenscar_extra_thread_info)
14637 (ravenscar_pid_to_str): Constify.
14638 * remote-sim.c (gdbsim_pid_to_str): Constify.
14639 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14640 Constify.
14641 * sol-thread.c (solaris_pid_to_str): Constify.
14642 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14643 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14644 * target.c (default_pid_to_str, target_pid_to_str)
14645 (normal_pid_to_str, default_pid_to_str): Constify.
14646 * target.h (target_ops::to_pid_to_str)
14647 (target_ops::to_extra_thread_info): Constify.
14648 (target_pid_to_str, normal_pid_to_str): Constify.
14649 * windows-nat.c (windows_pid_to_str): Constify.
14650 * gdbarch.sh (core_pid_to_str): Constify.
14651 * target-delegates.c: Regenerate.
14652 * gdbarch.h, gdbarch.c: Regenerate.
14653
69bbf465
PA
146542017-04-05 Pedro Alves <palves@redhat.com>
14655
14656 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14657 the memory of the temporary warning_pre_print override.
14658 * utils.c (warning_pre_print): Constify.
14659 * utils.h (warning_pre_print): Constify.
14660
be47f9e8
PA
146612017-04-05 Pedro Alves <palves@redhat.com>
14662
14663 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14664 (shell_command): New function.
14665 (make_command): Use std::string.
14666 (init_cli_cmds): Register shell_command instead of shell_escape.
14667
bde6261a
PA
146682017-04-05 Pedro Alves <palves@redhat.com>
14669
14670 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14671 * tracepoint.c (default_collect): Don't initialize.
14672
b38ef47f
PA
146732017-04-05 Pedro Alves <palves@redhat.com>
14674
14675 * macroexp.c (macro_buffer::shared): Now a bool.
14676 (init_buffer): Update.
14677 (init_shared_buffer): Constify 'addr' parameter.
14678 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14679 casts.
14680
f995bbe8
PA
146812017-04-05 Pedro Alves <palves@redhat.com>
14682
14683 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14684 * disasm.c (set_disassembler_options): Constify local.
14685 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14686
4a596fe2
SDJ
146872017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14688
14689 PR gdb/21352
14690 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14691 option.
14692
2cad08ea
YQ
146932017-04-05 Yao Qi <yao.qi@linaro.org>
14694
14695 * frame.c (frame_unwind_register_unsigned): Call
14696 frame_unwind_register_value.
14697
55a98976
YQ
146982017-04-05 Yao Qi <yao.qi@linaro.org>
14699
14700 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14701 Use gdb_test_multiple, and don't match anchor.
14702
4ac40124
PA
147032017-04-05 Pedro Alves <palves@redhat.com>
14704
14705 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14706 (Write After Approval): Remove Simon Marchi.
14707
c053b654
PA
147082017-04-05 Pedro Alves <palves@redhat.com>
14709
14710 * common/gdb_optional.h (optional::optional): Make constexpr and
14711 initialize m_dummy.
14712
4c7bf4f9
JB
147132017-04-04 John Baldwin <jhb@FreeBSD.org>
14714
14715 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14716 (amd64fbsd_jmp_buf_reg_offset): Remove.
14717 (amd64fbsd_supply_uthread): Remove function.
14718 (amd64fbsd_collect_uthread): Remove function.
14719 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14720 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14721 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14722 (fbsd-nat.c): Update comment.
14723 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14724 (i386fbsd_jmp_buf_reg_offset): Remove.
14725 (i386fbsd_supply_uthread): Remove function.
14726 (i386fbsd_collect_uthread): Remove function.
14727 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14728
1e1a8bef
JB
147292017-04-04 John Baldwin <jhb@FreeBSD.org>
14730
14731 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14732 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14733 * NEWS: Mention that support for FreeBSD/alpha was removed.
14734 * alpha-fbsd-tdep.c: Delete file.
14735 * config/alpha/fbsd.mh: Delete file.
14736 * configure.host: Delete alpha*-*-freebsd* and
14737 alpha*-*-kfreebsd*-gnu.
14738 * configure.tgt: Delete alpha*-*-freebsd* and
14739 alpha*-*-kfreebsd*-gnu.
14740
49907934
JB
147412017-04-04 John Baldwin <jhb@FreeBSD.org>
14742
14743 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14744 amd64bsd_store_inferior_registers): Use ptid from regcache.
14745
6f77053d
PA
147462017-04-04 Pedro Alves <palves@redhat.com>
14747
14748 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14749 data fields, make them private and add "m_" prefixes.
14750 (lnp_state_machine::lnp_state_machine): New ctor.
14751 (record_line, check_line_address, handle_set_discriminator)
14752 (handle_set_address, handle_advance_pc, handle_special_opcode)
14753 (handle_advance_line, handle_set_file, handle_negate_stmt)
14754 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14755 (end_sequence, advance_line): New methods.
14756 (m_gdbarch, m_record_lines_p): New fields.
14757 (lnp_reader_state): Delete.
14758 (dwarf_record_line): Rename to ...
14759 (lnp_state_machine::record_line): ... adjust.
14760 (init_lnp_state_machine): Delete.
14761 (lnp_state_machine::lnp_state_machine): New.
14762 (check_line_address): Rename to ...
14763 (lnp_state_machine::check_line_address): This.
14764 (dwarf_decode_lines_1): Remove reference to "reader_state".
14765 Adjust lnp_state_machine having a non-default ctor. Use bool.
14766 State machine internal state manipulation moved to
14767 lnp_state_machine methods.
14768
9c541725
PA
147692017-04-04 Pedro Alves <palves@redhat.com>
14770
14771 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14772 unittests/offset-type-selftests.c.
14773 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14774 * common/offset-type.h: New file.
14775 * common/preprocessor.h: New file.
14776 * common/traits.h: New file.
14777 * common/valid-expr.h: New file.
14778 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14779 sect_offset and cu_offset strong typedefs throughout.
14780 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14781 typedefs throughout.
14782 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14783 sect_offset and cu_offset strong typedefs throughout.
14784 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14785 typedefs throughout.
14786 * gdbtypes.h: Include "common/offset-type.h".
14787 (cu_offset): Now an offset type (strong typedef) instead of a
14788 struct.
14789 (sect_offset): Likewise.
14790 (union call_site_parameter_u): Rename "param_offset" field to
14791 "param_cu_off".
14792 * unittests/offset-type-selftests.c: New file.
14793
ecfb656c
PA
147942017-04-04 Pedro Alves <palves@redhat.com>
14795
14796 * common/underlying.h: New file.
14797 * dwarf2read.c: Include "common/gdb_optional.h" and
14798 "common/underlying.h".
14799 (dir_index, file_name_index): New types.
14800 (file_entry): Use them.
14801 (file_entry::include): Use to_underlying.
14802 (line_header::add_file_name): Use dir_index.
14803 (read_formatted_entries): Use gdb::optional. Read form before
14804 writting to file_entry.
14805 (dwarf_decode_line_header): Use dir_index.
14806 (lnp_state_machine::current_file): Use to_underlying.
14807 (lnp_state_machine::file): Change type to file_name_index.
14808 (dwarf_record_line): Use to_underlying.
14809 (init_lnp_state_machine): Use file_name_index.
14810 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14811
d194f1fe
PA
148122017-04-04 Pedro Alves <palves@redhat.com>
14813
14814 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14815 operator bool, has_value and get methods.
14816
fff8551c
PA
148172017-04-04 Pedro Alves <palves@redhat.com>
14818
14819 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14820 fields.
14821 (line_header): Initialize all data fields. Change type of
14822 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14823 Change type of include_dirs to std::vector<const char *>. Remove
14824 num_include_dirs, include_dirs_size. Change type of file_names to
14825 std::vector<file_entry>. Remove num_file_names, file_names_size.
14826 (line_header::line_header): New.
14827 (line_header::add_include_dir, line_header::add_file_name): New
14828 methods.
14829 (line_header::include_dir_at): Remove NULL check.
14830 (line_header::file_name_at): Add const overload.
14831 (line_header_up): New unique_ptr typedef.
14832 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14833 std::vector. Remove free_line_header call.
14834 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14835 free_line_header call.
14836 (free_cu_line_header): Delete.
14837 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14838 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14839 Adjust to use std::vector.
14840 (free_line_header): Delete.
14841 (free_line_header_voidp): Use delete.
14842 (add_include_dir): Replace with ...
14843 (line_header::add_include_dir): ... this method. Use std::vector.
14844 (add_file_name): Replace with ...
14845 (line_header::add_file_name): ... this method. Use std::vector.
14846 (add_include_dir_stub): Delete.
14847 (read_formatted_entries): Remove memset.
14848 (dwarf_decode_line_header): Return a line_header_up instead of a
14849 raw pointer. Remove cleanup handling. Pass lambdas to
14850 read_formatted_entries. Adjust to use line_header methods.
14851 (dwarf_decode_lines_1): Adjust to use line_header methods.
14852 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14853 use std::vector.
14854
d62a8ae2
SM
148552017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14856
14857 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14858 instead of struct ptid.
14859
db3a1dc7
AH
148602017-05-04 Alan Hayward <alan.hayward@arm.com>
14861
14862 * frame.c (get_frame_register_bytes): Unwind using value.
14863 (put_frame_register_bytes): Likewise.
14864
b1b45502
IB
148652017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14866
14867 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14868 aggregate-like.
14869
ec13808e
JK
148702017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14871
14872 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14873
12316564
YQ
148742017-03-29 Yao Qi <yao.qi@linaro.org>
14875
14876 * gdbthread.h (struct thread_info): Declare constructor and
14877 destructor. Add some in-class member initializers.
14878 * thread.c (free_thread): Remove.
14879 (init_thread_list): Call delete instead of free_thread.
14880 (new_thread): Call thread_info constructor.
14881 (thread_info::thread_info): New function.
14882 (thread_info::~thread_info): New function.
14883 (delete_thread_1): Call delete instead of free_thread.
14884 (make_cleanup_restore_current_thread): Move tp and frame to
14885 inner block.
14886
fe5f7374
AK
148872017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14888
14889 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14890 (arc_skip_prologue): Likewise.
14891 (arc_make_frame_cache): Likewise.
14892 (arc_pv_get_operand): New function.
14893 (arc_is_in_prologue): Likewise.
14894 (arc_analyze_prologue): Likewise.
14895 (arc_print_frame_cache): Likewise.
14896 (MAX_PROLOGUE_LENGTH): New constant.
14897
eea78757
AK
148982017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14899
14900 * configure.tgt: Add arc-insn.o.
14901 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14902 (dump_arc_instruction_command): New function.
14903 (arc_fprintf_disasm): Likewise.
14904 (arc_disassemble_info): Likewise.
14905 (arc_insn_get_operand_value): Likewise.
14906 (arc_insn_get_operand_value_signed): Likewise.
14907 (arc_insn_get_memory_base_reg): Likewise.
14908 (arc_insn_get_memory_offset): Likewise.
14909 (arc_insn_get_branch_target): Likewise.
14910 (arc_insn_dump): Likewise.
14911 (arc_insn_get_linear_next_pc): Likewise.
14912 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14913 (arc_disassemble_info): Likewise.
14914 (arc_insn_get_branch_target): Likewise.
14915 (arc_insn_get_linear_next_pc): Likewise.
14916 * NEWS: Mention new "maint print arc arc-instruction".
14917
3be78afd
AK
149182017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14919
14920 * arc-tdep (maintenance_print_arc_list): New variable.
14921 (maintenance_print_arc_command): New function.
14922
296ec4fa
AK
149232017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14924
14925 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14926 Add "limm" and "reserved".
14927 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14928 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14929 * arc-tdep.h (arc_regnum): Likewise.
14930
f74f865e
MF
149312017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14932
14933 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14934 for THREADPTR register.
14935 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14936 register.
14937 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14938 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14939 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14940
0d0bf81a
MF
149412017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14942
14943 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14944 registers above gdbarch_num_regs (gdbarch) as privileged in
14945 call0 ABI.
14946
0ce4291e
MF
149472017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14948
14949 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14950 for a single specified register or for all registers in
14951 a0_base..a0_base + C0_NREGS range.
14952 (supply_gregset_reg): Call regcache_raw_supply for a single
14953 specified register or for all registers in a0_base..a0_base +
14954 C0_NREGS range.
14955
c56054f9
MF
149562017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14957
14958 * arch/xtensa.h (C0_NREGS): Add definition.
14959 * xtensa-tdep.c (C0_NREGS): Remove definition.
14960
a4398628
MF
149612017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14962
14963 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14964 Drop xtensa_default_isa initialization.
14965 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14966
8c43009f
PA
149672017-03-27 Pedro Alves <palves@redhat.com>
14968
14969 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14970 (file_entry::include_dir): New method.
14971 (line_header::include_dir_at, line_header::file_name_at): New
14972 methods.
14973 (setup_type_unit_groups, setup_type_unit_groups)
14974 (psymtab_include_file_name): Simplify using the new methods.
14975 (lnp_state_machine) <the_line_header>: New field.
14976 <file>: Add comment.
14977 (lnp_state_machine::current_file): New method.
14978 (dwarf_record_line): Simplify using the new methods.
14979 (init_lnp_state_machine): Initialize the "the_line_header" field.
14980 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14981 Simplify using the new methods.
14982
a7e80b9e
PA
149832017-03-27 Pedro Alves <palves@redhat.com>
14984
14985 * cp-name-parser.y (make_empty): Delete.
14986 (demangler_special, nested_name, ptr_operator, array_indicator)
14987 (direct_declarator, declarator_1): Use fill_comp instead of
14988 make_empty.
14989
21047726
PA
149902017-03-27 Pedro Alves <palves@redhat.com>
14991
14992 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14993 to ATTRIBUTE_PRINTF.
14994 * solib-target.c (library_list_start_list): Print "string" not
14995 "version".
14996 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14997 gdb_xml_error call.
14998
d721ba37
PA
149992017-03-27 Pedro Alves <palves@redhat.com>
15000
15001 * dwarf2read.c (struct file_and_directory): New.
15002 (dwarf2_get_dwz_file): Adjust to use std::string.
15003 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15004 (find_file_and_directory): Adjust to return a file_and_directory
15005 object.
15006 (read_file_scope): Adjust to use file_and_directory. Remove
15007 make_cleanup/do_cleanups calls.
15008 (open_and_init_dwp_file): Adjust to use std::string. Remove
15009 make_cleanup/do_cleanups calls.
15010 * python/python.c (do_start_initialization): Adjust to ldirname
15011 returning a std::string.
15012 * utils.c (ldirname): Now returns a std::string.
15013 * utils.h (ldirname): Change return type to std::string.
15014 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15015 returning a std::string.
15016 * xml-tdesc.c (file_read_description_xml): Likewise.
15017
ed771251
AH
150182017-03-24 Alan Hayward <alan.hayward@arm.com>
15019
15020 * regcache.c (regcache_debug_print_register): New function.
15021 * regcache.h (regcache_debug_print_register): New declaration.
15022 * target.c (debug_print_register): Remove.
15023 (target_fetch_registers): Call regcache_debug_print_register.
15024 (target_store_registers): Likewise.
15025
568c1b9f
PB
150262017-03-24 Pádraig Brady <pbrady@fb.com>
15027
15028 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15029 reference beyond the 'lh->include_dirs' array before accessing to
15030 it.
15031 (psymtab_include_file_name): Likewise.
15032 (dwarf_decode_lines_1): Likewise.
15033 (dwarf_decode_lines): Likewise.
15034 (file_file_name): Likewise.
15035
3e00d44f
SM
150362017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15037
15038 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15039 inferior_ptid.
15040 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15041 ps_lsetfpregs): Likewise.
15042 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15043 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15044 ps_lsetfpregs): Likewise.
15045 * target.c (target_fetch_registers, target_store_registers):
15046 Remove asserts.
15047
077ae656
AH
150482017-03-23 Alan Hayward <alan.hayward@arm.com>
15049
15050 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15051
1e2b521d
YQ
150522017-03-23 Yao Qi <yao.qi@linaro.org>
15053
15054 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15055 (_initialize_aarch64_tdep): Register it.
15056 (aarch64_record_load_store): Handle PRFM instruction.
15057 (aarch64_process_record_test): New function.
15058
33877125
YQ
150592017-03-23 Yao Qi <yao.qi@linaro.org>
15060
15061 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15062 indentation.
15063
a0eef940
YQ
150642017-03-23 Yao Qi <yao.qi@linaro.org>
15065
15066 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15067
3f2a3564
PR
150682017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15069
15070 python/python.c (do_start_initialization): Fix memory leak.
15071
b67aeab0
SM
150722017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15073
15074 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15075 using get_ptrace_pid.
15076 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15077 inferior_ptid.
15078 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15079 inferior_ptid instead of pid.
15080
ffdbe864
YQ
150812017-03-22 Yao Qi <yao.qi@linaro.org>
15082
15083 * aarch64-tdep.c: Wrap locally used classes in anonymous
15084 namespace.
15085 * arm-tdep.c: Likewise.
15086 * linespec.c: Likewise.
15087 * ui-out.c: Likewise.
15088
9d736fbf
JG
150892017-03-22 Jonah Graham <jonah@kichwacoders.com>
15090
15091 PR gdb/19637
15092 * python/lib/gdb/printer/bound_registers.py: Import sys.
15093
3de88e9a
SM
150942017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15095
15096 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15097 windows_thread_info parameter and use it instead of
15098 current_thread.
15099 (windows_fetch_inferior_registers): Don't set current_thread,
15100 pass the thread to do_windows_fetch_inferior_registers. Use
15101 ptid from regcache instead of inferior_ptid.
15102 (do_windows_store_inferior_registers): Add windows_thread_info
15103 parameter and use it instead of current_thread.
15104 (windows_store_inferior_registers): Don't set current_thread,
15105 pass the thread to do_windows_store_inferior_registers. Use
15106 ptid from regcache instead of inferior_ptid.
15107
0e7b8f61
SM
151082017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15109
15110 * ser-mingw.c (ser_windows_raw): Remove reference to
15111 struct serial::current_timeout.
15112
5badf10a
IR
151132017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15114
15115 PR tdep/20928
15116 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15117 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15118 (sparc64_fsr_type): Fix %fsr decoding.
15119
cee59b3f
TW
151202017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15121
15122 * python/py-record-btrace.c (btpy_insn_data): Change return type
15123 for Python 2.
15124
639a9038
SM
151252017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15126
15127 * spu-linux-nat.c (spu_fetch_inferior_registers,
15128 spu_store_inferior_registers): Use ptid from regcache, set and
15129 restore inferior_ptid.
15130 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15131 Likewise.
15132
bcc0c096
SM
151332017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15134
15135 * i386-linux-nat.c (fetch_register, store_register,
15136 i386_linux_fetch_inferior_registers,
15137 i386_linux_store_inferior_registers): Use ptid from regcache.
15138 * ia64-linux-nat.c (ia64_linux_fetch_register,
15139 ia64_linux_store_register): Likewise.
15140 * inf-ptrace.c (inf_ptrace_fetch_register,
15141 inf_ptrace_store_register): Likewise.
15142 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15143 m32r_linux_store_inferior_registers): Likewise.
15144 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15145 m68kbsd_store_inferior_registers): Likewise.
15146 * m68k-linux-nat.c (fetch_register, store_register,
15147 m68k_linux_fetch_inferior_registers,
15148 m68k_linux_store_inferior_registers): Likewise.
15149 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15150 m88kbsd_store_inferior_registers): Likewise.
15151 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15152 mips_fbsd_store_inferior_registers): Likewise.
15153 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15154 mips64_linux_regsets_store_registers): Likewise.
15155 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15156 mipsnbsd_store_inferior_registers): Likewise.
15157 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15158 mips64obsd_store_inferior_registers): Likewise.
15159 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15160 Likewise.
15161 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15162 ppcfbsd_store_inferior_registers): Likewise.
15163 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15164 ppc_linux_store_inferior_registers): Likewise.
15165 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15166 ppcnbsd_store_inferior_registers): Likewise.
15167 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15168 ppcobsd_store_registers): Likewise.
15169 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15170 Likewise.
15171 * ravenscar-thread.c (ravenscar_fetch_registers,
15172 ravenscar_store_registers, ravenscar_prepare_to_store):
15173 Likewise.
15174 * record-btrace.c (record_btrace_fetch_registers,
15175 record_btrace_store_registers, record_btrace_prepare_to_store):
15176 Likewise.
15177 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15178 Lookup inferior using ptid from regcache, instead of
15179 current_inferior.
15180 * remote.c (remote_fetch_registers, remote_store_registers): Use
15181 ptid from regcache.
15182 * rs6000-nat.c (fetch_register, store_register): Likewise.
15183 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15184 s390_linux_store_inferior_registers): Likewise.
15185 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15186 shnbsd_store_inferior_registers): Likewise.
15187 * sol-thread.c (sol_thread_fetch_registers,
15188 sol_thread_store_registers): Likewise.
15189 * sparc-nat.c (sparc_fetch_inferior_registers,
15190 sparc_store_inferior_registers): Likewise.
15191 * tilegx-linux-nat.c (fetch_inferior_registers,
15192 store_inferior_registers): Likewise.
15193 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15194 vaxbsd_store_inferior_registers): Likewise.
15195 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15196 store_xtregs): Likewise.
15197
c0f55cc6
AV
151982017-03-20 Artemiy Volkov <artemiyv@acm.org>
15199
15200 PR gdb/14441
15201 * NEWS: Mention support for rvalue references in GDB and python.
15202 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15203 supports both lvalue and rvalue references.
15204
15c0a2a9
AV
152052017-03-20 Artemiy Volkov <artemiyv@acm.org>
15206
15207 PR gdb/14441
15208 * gdbtypes.c (rank_one_type): Implement overloading
15209 resolution rules regarding rvalue references.
15210
aa006118
AV
152112017-03-20 Artemiy Volkov <artemiyv@acm.org>
15212
15213 PR gdb/14441
15214 * aarch64-tdep.c (aarch64_type_align)
15215 (aarch64_extract_return_value, aarch64_store_return_value): Change
15216 lvalue reference type checks to general reference type checks.
15217 * amd64-tdep.c (amd64_classify): Likewise.
15218 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15219 Likewise.
15220 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15221 (arm_store_return_value): Likewise.
15222 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15223 * c-typeprint.c (c_print_type): Likewise.
15224 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15225 (cplus_number_of_children, cplus_describe_child): Likewise.
15226 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15227 * completer.c (expression_completer): Likewise.
15228 * cp-support.c (make_symbol_overload_list_adl_namespace):
15229 Likewise.
15230 * darwin-nat-info.c (info_mach_region_command): Likewise.
15231 * dwarf2loc.c (entry_data_value_coerce_ref)
15232 (value_of_dwarf_reg_entry): Likewise.
15233 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15234 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15235 Likewise.
15236 * findvar.c (extract_typed_address, store_typed_address):
15237 Likewise.
15238 * gdbtypes.c (rank_one_type): Likewise.
15239 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15240 * infcall.c (value_arg_coerce): Likewise.
15241 * language.c (pointer_type): Likewise.
15242 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15243 Likewise.
15244 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15245 * mn10300-tdep.c (mn10300_type_align): Likewise.
15246 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15247 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15248 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15249 Likewise.
15250 * printcmd.c (print_formatted, x_command): Likewise.
15251 * python/py-type.c (typy_get_composite, typy_template_argument):
15252 Likewise.
15253 * python/py-value.c (valpy_referenced_value)
15254 (valpy_get_dynamic_type, value_has_field): Likewise.
15255 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15256 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15257 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15258 * spu-tdep.c (spu_scalar_value_p): Likewise.
15259 * symtab.c (lookup_symbol_aux): Likewise.
15260 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15261 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15262 Likewise.
15263 * valops.c (value_cast_pointers, value_cast)
15264 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15265 (value_struct_elt, value_struct_elt_bitpos)
15266 (value_find_oload_method_list, find_overload_match)
15267 (value_rtti_indirect_type): Likewise.
15268 * valprint.c (val_print_scalar_type_p, generic_val_print):
15269 Likewise.
15270 * value.c (value_actual_type, value_as_address, unpack_long)
15271 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15272 (coerce_ref): Likewise.
15273 * varobj.c (varobj_get_value_type): Likewise.
15274
3fcf899d
AV
152752017-03-20 Artemiy Volkov <artemiyv@acm.org>
15276
15277 PR gdb/14441
15278 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15279 table of constants.
15280 * python/lib/gdb/command/explore.py: Support exploring values
15281 of rvalue reference types.
15282 * python/lib/gdb/types.py: Implement get_basic_type() for
15283 rvalue reference types.
15284 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15285 constant.
15286 * python/py-value.c (valpy_getitem): Add an rvalue reference
15287 check.
15288 (valpy_reference_value): Add new parameter "refcode".
15289 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15290 New wrappers for valpy_reference_value().
15291 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15292 (gdbpy_invoke_xmethod): Likewise.
15293
4297a3f0
AV
152942017-03-20 Artemiy Volkov <artemiyv@acm.org>
15295
15296 PR gdb/14441
15297 * dwarf2read.c (process_die, read_type_die_1): Handle the
15298 DW_TAG_rvalue_reference_type DIE.
15299 (read_tag_reference_type): Add new parameter "refcode".
15300
e1cb3213
AV
153012017-03-20 Artemiy Volkov <artemiyv@acm.org>
15302
15303 PR gdb/14441
15304 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15305 (c_type_print_modifier, c_type_print_varspec_suffix)
15306 (c_type_print_base): Support printing rvalue reference types.
15307 * c-valprint.c (c_val_print, c_value_print): Support printing
15308 rvalue reference values.
15309
e4347c89
AV
153102017-03-20 Artemiy Volkov <artemiyv@acm.org>
15311
15312 PR gdb/14441
15313 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15314 typename.
15315 * cp-support.c (replace_typedefs): Handle
15316 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15317 * python/py-type.c (typy_lookup_type): Likewise.
15318
53cc15f5
AV
153192017-03-20 Artemiy Volkov <artemiyv@acm.org>
15320
15321 PR gdb/14441
15322 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15323 * parse.c (insert_type): Change assert statement.
15324 (follow_types): Handle rvalue reference types.
15325 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15326 constant.
15327
a65cfae5
AV
153282017-03-20 Artemiy Volkov <artemiyv@acm.org>
15329
15330 PR gdb/14441
15331 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15332 value_ref() interface.
15333 * c-valprint.c (c_value_print): Likewise.
15334 * infcall.c (value_arg_coerce): Likewise.
15335 * python/py-value.c (valpy_reference_value): Likewise.
15336 * valops.c (value_cast, value_reinterpret_cast)
15337 (value_dynamic_cast, typecmp): Likewise.
15338 (value_ref): Parameterize by kind of return value reference type.
15339 * value.h (value_ref): Add new parameter "refcode".
15340
3b224330
AV
153412017-03-20 Artemiy Volkov <artemiyv@acm.org>
15342
15343 PR gdb/14441
15344 * dwarf2read.c (read_tag_reference_type): Use
15345 lookup_lvalue_reference_type() instead of lookup_reference_type().
15346 * eval.c (evaluate_subexp_standard): Likewise.
15347 * f-exp.y: Likewise.
15348 * gdbtypes.c (make_reference_type, lookup_reference_type):
15349 Generalize with rvalue reference types.
15350 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15351 convenience wrappers for lookup_reference_type().
15352 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15353 reference kind parameter.
15354 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15355 wrappers for lookup_reference_type().
15356 * guile/scm-type.c (gdbscm_type_reference): Use
15357 lookup_lvalue_reference_type() instead of lookup_reference_type().
15358 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15359 * parse.c (follow_types): Likewise.
15360 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15361 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15362 Likewise.
15363 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15364 (gdbpy_invoke_xmethod): Likewise.
15365 * stabsread.c: Provide extra argument to make_reference_type()
15366 call.
15367 * valops.c (value_ref, value_rtti_indirect_type): Use
15368 lookup_lvalue_reference_type() instead of lookup_reference_type().
15369
f9aeb8d4
AV
153702017-03-20 Artemiy Volkov <artemiyv@acm.org>
15371
15372 PR gdb/14441
15373 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15374 (TYPE_IS_REFERENCE): New macro.
15375 (struct type): Add rvalue_reference_type field.
15376 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15377
51457a05
MAL
153782017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15379
15380 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15381 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15382 New function definition.
15383 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15384 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15385 New function declaration.
15386 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15387 * mi/mi-interp.h: New file.
15388 * solib.c (info_sharedlibrary_command): Replace for loop with
15389 ALL_SO_LIBS macro
15390 * solib.h (update_solib_list): New function declaration.
15391 (so_list_head): Move macro.
15392 * solist.h (ALL_SO_LIBS): New macro.
15393
e696b3ad
MAL
153942017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15395
15396 * infcmd.c (post_create_inferior): Remove unused argument in
15397 call to solib_add.
15398 * remote.c (remote_start_remote): Likewise.
15399 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15400 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15401 (enable_break): Likewise.
15402 * solib.c (update_solib_list): Remove unused target argument
15403 and its documentation.
15404 (solib_add): Remove unused target argument. Remove unused
15405 argument in call to update_solib_list.
15406 (info_sharedlibrary_command): Remove unused argument in call
15407 to update_solib_list.
15408 (sharedlibrary_command): Remove unused argument in call to
15409 solib_add.
15410 (handle_solib_event): Likewise.
15411 (reload_shared_libraries): Likewise.
15412 * solib.h (solib_add): Remove unused target argument.
15413
dcb84eda
AA
154142017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15415
15416 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15417 (s390_displaced_step_fixup): Cover relative branches with the
15418 default fixup handling. This fixes lack of support for some
15419 relative branch instructions.
15420
d9cb6cdc
SM
154212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15422
15423 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15424 ptid from regcache.
15425
1afaf9f4
SM
154262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15427
15428 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15429 i386_darwin_store_inferior_registers): Use ptid from regcache.
15430
aac12e24
SM
154312017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15432
15433 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15434 i386bsd_store_inferior_registers): Use ptid from regcache.
15435
bbe1eef1
SM
154362017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15437
15438 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15439 hppaobsd_store_registers): Use ptid from regcache.
15440
10799020
SM
154412017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15442
15443 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15444 hppanbsd_store_registers): Use ptid from regcache.
15445
00204cf7
SM
154462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15447
15448 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15449 from regcache. Use get_ptrace_pid.
15450
11a33714
SM
154512017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15452
15453 * corelow.c (get_core_register_section): Use ptid from regcache,
15454 update doc.
15455
317cd492
SM
154562017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15457
15458 * bsd-uthread.c (bsd_uthread_fetch_registers,
15459 bsd_uthread_store_registers): Use ptid from regcache, set and
15460 restore inferior_ptid.
15461
9ac8a7c2
SM
154622017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15463
15464 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15465 fetch_fp_regs, store_register, store_regs, store_fp_register,
15466 store_fp_regs): Use ptid from regcache.
15467
4ac4bb6a
SM
154682017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15469
15470 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15471 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15472 store_vfp_regs): Use ptid from regcache.
15473
9bcbdca8
PA
154742017-03-17 Pedro Alves <palves@redhat.com>
15475
15476 PR remote/21188
15477 * ser-base.c (ser_base_wait_for): Add comment.
15478 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15479 version.
15480 * ser-unix.c (hardwire_raw): Remove reference to
15481 scb->current_timeout.
15482 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15483 (hardwire_ops): Install ser_base_readchar instead of
15484 hardwire_readchar.
15485 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15486 Remove fields.
15487
7503099f
JG
154882017-03-17 Jonah Graham <jonah@kichwacoders.com>
15489
15490 PR gdb/19637
15491 * python/lib/gdb/printer/bound_registers.py: Add support for
15492 Python 3.
15493
7942e96e
AA
154942017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15495
15496 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15497 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15498 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15499 byte_offset to subobj_byte_offset. Fix the handling of
15500 DWARF_VALUE_STACK on big-endian targets when coming via an
15501 implicit pointer.
15502 (dwarf2_evaluate_loc_desc): Adjust call to
15503 dwarf2_evaluate_loc_desc_full.
15504 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15505 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15506
ba14f379
YQ
155072017-03-16 Yao Qi <yao.qi@linaro.org>
15508
15509 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15510 and REVSH instructions.
15511
b121eeb9
YQ
155122017-03-16 Yao Qi <yao.qi@linaro.org>
15513
15514 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15515 (arm_record_test): Declare.
15516 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15517 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15518 align with the manual.
15519 (thumb_record_misc): Adjust the code order to align with the
15520 manual.
15521 (thumb2_record_decode_insn_handler): Fix instruction matching.
15522 (instruction_reader_thumb): New class.
15523 (arm_record_test): New function.
15524
728a7913
YQ
155252017-03-16 Yao Qi <yao.qi@linaro.org>
15526
15527 * arm-tdep.c (abstract_memory_reader): New class.
15528 (instruction_reader): New class.
15529 (extract_arm_insn): Add argument 'reader'. Callers updated.
15530 (decode_insn): Likewise.
15531
34b43320
DE
155322017-03-16 Doug Evans <dje@google.com>
15533
a7c0469f
DE
15534 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15535 member. Change type of TYPE member to SCM. All uses updated.
15536 (lsscm_make_lazy_string_smob): Add assert.
15537 (lsscm_make_lazy_string): Flag bad length values.
15538 (lsscm_elt_type): New function.
15539 (gdbscm_lazy_string_to_value): Rewrite to use
15540 lsscm_safe_lazy_string_to_value.
15541 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15542 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15543 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15544 in incoming type.
15545 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15546 * guile/scm-type.c (tyscm_scm_to_type): New function.
15547
155482017-03-15 Doug Evans <dje@google.com>
15549
34b43320
DE
15550 PR python/17728, python/18439, python/18779
15551 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15552 member. Change type of TYPE member to PyObject *. All uses updated.
15553 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15554 (gdbpy_create_lazy_string_object): Flag bad length values.
15555 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15556 Handle typedefs in incoming type.
15557 (stpy_lazy_string_elt_type): New function.
15558 (gdbpy_extract_lazy_string): Call it.
15559 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15560 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15561 typedefs in incoming type.
15562
a3a5fecc
DE
155632017-03-16 Doug Evans <dje@google.com>
15564
15565 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15566 * guile/scm-type.c (tyscm_scm_to_type): New function.
15567
28f1c605
JW
155682017-03-16 Jiong Wang <jiong.wang@arm.com>
15569
15570 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15571 "ULONGEST" for "skip".
15572
87c336f6
AA
155732017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15574
15575 PR gdb/21220
15576 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15577 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15578 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15579 over ptrace peek/poke until end of buffer or error.
15580
cf81cf60
SM
155812017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15582
15583 * parse.c (length_of_subexp): Make static.
15584 * parser-defs.h (length_of_subexp): Remove.
15585
a379284a
AA
155862017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15587
15588 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15589 as well.
15590
8a6200ba
PA
155912017-03-14 Pedro Alves <palves@redhat.com>
15592
15593 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15594 (main): Use std::unique_ptr. Remove calls to
15595 cp_demangled_name_parse_free.
15596
f79ec206
SM
155972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15598
15599 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15600 alphabsd_store_inferior_registers): Use regcache->ptid instead
15601 of inferior_ptid.
15602
edb5fb00
SM
156032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15604
15605 * aix-thread.c (aix_thread_fetch_registers,
15606 aix_thread_store_registers): Use regcache->ptid instead of
15607 inferior_ptid.
15608
55119686
SM
156092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15610
15611 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15612 store_gregs_to_thread, fetch_fpregs_from_thread,
15613 store_fpregs_to_thread): Use regcache->ptid instead of
15614 inferior_ptid.
15615
6a06fbb7
SM
156162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15617
15618 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15619 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15620 instead of inferior_ptid.
15621
c6386875
SM
156222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15623
15624 * target.c (target_fetch_registers, target_store_registers): Add
15625 assert.
15626
ddaaf0fb
SM
156272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15628
15629 * regcache.h (regcache_get_ptid): New function.
15630 * regcache.c (regcache_get_ptid): New function.
15631
b9da89d1 156322017-03-13 Mark Wielaard <mark@klomp.org>
15633
15634 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15635
5f4d1085
KS
156362017-03-10 Keith Seitz <keiths@redhat.com>
15637
15638 PR c++/8218
15639 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15640
c65d6b55
PA
156412017-03-08 Pedro Alves <palves@redhat.com>
15642
15643 PR gdb/18360
15644 * infrun.c (start_step_over, do_target_resume, resume)
15645 (restart_threads): Assert we're not resuming a thread that is
15646 meant to be stopped.
15647 (infrun_thread_stop_requested_callback): Delete.
15648 (infrun_thread_stop_requested): If the thread is internally
15649 stopped, queue a pending stop event and clear the thread's
15650 inline-frame state.
15651 (handle_stop_requested): New function.
15652 (handle_syscall_event, handle_inferior_event_1): Use
15653 handle_stop_requested.
15654 (handle_stop_requested): New function.
15655 (handle_signal_stop): Set the thread's stop_signal here instead of
15656 at caller.
15657 (finish_step_over): Clear step over info unconditionally.
15658 (handle_signal_stop): If the user had interrupted the event
15659 thread, consider the stop a random signal.
15660 (handle_signal_stop) <signal arrived while stepping over
15661 breakpoint>: Don't restart threads here.
15662 (stop_waiting): Don't clear step-over info here.
15663
15c22686
PA
156642017-03-08 Pedro Alves <palves@redhat.com>
15665
15666 PR 21206
15667 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15668 goes to argument 2, not 1.
15669
6e5d74e7
PA
156702017-03-08 Pedro Alves <palves@redhat.com>
15671
15672 PR cli/21218
15673 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15674 display_gdb_prompt.
15675 (command_line_input): Add comment.
15676
9753a2f6
PA
156772017-03-08 Pedro Alves <palves@redhat.com>
15678
15679 PR tui/21216
15680 * tui/tui-file.c (tui_file::write): New.
15681 * tui/tui-file.h (tui_file): Override "write".
15682 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15683 factored out from ...
15684 (tui_puts): ... here.
15685 (tui_putc): Use them.
15686 (tui_write): New function.
15687 * tui/tui-io.h (tui_write): Declare.
15688
1672e0d9
SDJ
156892017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15690
15691 * Makefile.in (SFILES): Replace "environ.c" with
15692 "common/environ.c".
15693 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15694 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15695 to...
15696 * common/environ.c: ... here.
15697 * environ.h: Moved to...
15698 * common/environ.h: ... here.
15699
f7bb4e3a
PB
157002017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15701
15702 * gdbarch.sh (pstring_ptr): New static function.
15703 (gdbarch_disassembler_options): Use it.
15704 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15705 not valid_disassembler_option->name.
15706 * gdbarch.c: Regenerate.
15707
e45ced6c
PB
157082017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15709
15710 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15711
5f6fd321
PA
157122017-03-07 Pedro Alves <palves@redhat.com>
15713
15714 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15715
6dbb839a 157162017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
15717
15718 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15719 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15720 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 15721 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 15722
d274ecf4
SM
157232017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15724
15725 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15726
df97be55
SM
157272017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15728
15729 * remote.c (remote_add_target_side_commands): Use range-based
15730 for loop.
15731
7d45f3df
YQ
157322017-03-03 Yao Qi <yao.qi@linaro.org>
15733
15734 PR gdb/21165
15735 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15736 value is lazy.
15737 * valprint.c (common_val_print): Likewise.
15738
65b48a81
PB
157392017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15740
15741 * NEWS: Mention new set/show disassembler-options commands.
15742 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15743 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15744 (prospective_options): New static variable.
15745 (gdb_disassembler::gdb_disassembler): Initialize
15746 m_di.disassembler_options.
15747 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15748 (get_disassembler_options): New function.
15749 (set_disassembler_options): Likewise.
15750 (set_disassembler_options_sfunc): Likewise.
15751 (show_disassembler_options_sfunc): Likewise.
15752 (disassembler_options_completer): Likewise.
15753 (_initialize_disasm): Likewise.
15754 * disasm.h (get_disassembler_options): New prototype.
15755 (set_disassembler_options): Likewise.
15756 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15757 (gdbarch_verify_disassembler_options): Likewise.
15758 * gdbarch.c: Regenerate.
15759 * gdbarch.h: Likewise.
15760 * arm-tdep.c (num_disassembly_options): Delete.
15761 (set_disassembly_style): Likewise.
15762 (arm_disassembler_options): New static variable.
15763 (set_disassembly_style_sfunc): Convert short style name into long
15764 option name. Call set_disassembler_options.
15765 (show_disassembly_style_sfunc): New function.
15766 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15767 set_gdbarch_verify_disassembler_options.
15768 (_initialize_arm_tdep): Delete regnames variable and update callers.
15769 (arm_disassembler_options): Initialize.
15770 (disasm_options): New variable.
15771 (num_disassembly_options): Rename from this...
15772 (num_disassembly_styles): ...to this. Compute by scanning through
15773 disasm_options.
15774 (valid_disassembly_styles): Initialize using disasm_options.
15775 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15776 set_arm_regname_option.
15777 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15778 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15779 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15780 set_gdbarch_verify_disassembler_options.
15781 * s390-tdep.c (s390_disassembler_options): New static variable.
15782 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15783 set_gdbarch_verify_disassembler_options.
15784
d538e36d
SM
157852017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15786
15787 * remote.c (remote_add_target_side_condition): Remove "struct"
15788 keyword from range-based for loop.
15789
83621223
SM
157902017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15791
15792 * remote.c (remote_add_target_side_condition): Use range-based
15793 for loop. Update comment.
15794
2123df0e
YQ
157952017-02-27 Yao Qi <yao.qi@linaro.org>
15796
15797 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15798
8e368124
AH
157992017-02-26 Alan Hayward <alan.hayward@arm.com>
15800
15801 * regcache.c (regcache_raw_update): New function.
15802 (regcache_raw_read): Move code to regcache_raw_update.
15803 * regcache.h (regcache_raw_update): New declaration.
15804 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15805
a49dd8dd
JK
158062017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15807
15808 * dwarf2read.c (create_debug_type_hash_table): Initialize
15809 header.signature and header.type_offset_in_tu.
15810
34e4bae9
PA
158112017-02-24 Pedro Alves <palves@redhat.com>
15812
15813 * symtab.c (make_file_symbol_completion_list_1): Use
15814 add_symtab_completions.
15815
b0e4b369
AH
158162017-02-24 Alan Hayward <alan.hayward@arm.com>
15817
15818 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15819
975c21ab
AH
158202017-02-24 Alan Hayward <alan.hayward@arm.com>
15821
15822 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15823 I386_MAX_REGISTER_SIZE.
15824 (i386_pseudo_register_write): Likewise.
15825 (i386_process_record): Likewise.
15826 * i387-tdep.c (i387_supply_xsave): Likewise.
15827 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15828 (store_register): Likewise.
15829
14bc53a8
PA
158302017-02-23 Pedro Alves <palves@redhat.com>
15831
15832 * ada-lang.c: Include "common/function-view.h".
15833 (ada_iterate_over_symbols): Adjust to use function_view as
15834 callback type.
15835 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15836 (ada_make_symbol_completion_list): Use a lambda.
15837 (ada_exc_search_name_matches): Delete.
15838 (name_matches_regex): New.
15839 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15840 * compile/compile-c-support.c: Include "common/function-view.h".
15841 (print_one_macro): Change prototype to accept a ui_file pointer.
15842 (write_macro_definitions): Use a lambda.
15843 * dwarf2read.c: Include "common/function-view.h".
15844 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15845 (dw2_expand_symtabs_matching): Adjust to use function_view as
15846 callback type.
15847 * language.h: Include "common/function-view.h".
15848 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15849 function_view as callback type.
15850 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15851 * linespec.c: Include "common/function-view.h".
15852 (collect_info::add_symbol): New method.
15853 (struct symbol_and_data_callback, iterate_inline_only, struct
15854 symbol_matcher_data, iterate_name_matcher): Delete.
15855 (iterate_over_all_matching_symtabs): Adjust to use function_view
15856 as callback type and lambdas.
15857 (iterate_over_file_blocks): Adjust to use function_view as
15858 callback type.
15859 (decode_compound_collector): Now a class with private fields.
15860 (decode_compound_collector::release_symbols): New method.
15861 (collect_one_symbol): Rename to...
15862 (decode_compound_collector::operator()): ... this and adjust.
15863 (lookup_prefix_sym): decode_compound_collector construction bits
15864 move to decode_compound_collector ctor. Pass the
15865 decode_compound_collector object directly as callback. Remove
15866 cleanups and use decode_compound_collector::release_symbols
15867 instead.
15868 (symtab_collector): Now a class with private fields.
15869 (symtab_collector::release_symtabs): New method.
15870 (add_symtabs_to_list): Rename to...
15871 (symtab_collector::operator()): ... this and adjust.
15872 (collect_symtabs_from_filename): symtab_collector construction
15873 bits move to symtab_collector ctor. Pass the symtab_collector
15874 object directly as callback. Remove cleanups and use
15875 symtab_collector::release_symtabs instead.
15876 (collect_symbols): Delete.
15877 (add_matching_symbols_to_info): Use lambdas.
15878 * macrocmd.c (print_macro_callback): Delete.
15879 (info_macro_command): Use a lambda.
15880 (info_macros_command): Pass print_macro_definition as callable
15881 directly.
15882 (print_one_macro): Remove 'ignore' parameter.
15883 (macro_list_command): Adjust.
15884 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15885 (macro_for_each_data::user_data): Delete field.
15886 (foreach_macro): Adjust to call the function_view.
15887 (macro_for_each): Adjust to use function_view as callback type.
15888 (foreach_macro_in_scope): Adjust to call the function_view.
15889 (macro_for_each_in_scope): Adjust to use function_view as callback
15890 type.
15891 * macrotab.h: Include "common/function-view.h".
15892 (macro_callback_fn): Declare a prototype instead of a pointer.
15893 Remove "user_data" parameter.
15894 (macro_for_each, macro_for_each_in_scope): Adjust to use
15895 function_view as callback type.
15896 * psymtab.c (partial_map_expand_apply)
15897 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15898 Adjust to use function_view as callback type and to return bool.
15899 (psym_expand_symtabs_matching): Adjust to use function_view as
15900 callback types.
15901 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15902 to use function_view as callback type and to return bool.
15903 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15904 callback types.
15905 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15906 as callback types.
15907 * symfile.h: Include "common/function-view.h".
15908 (expand_symtabs_file_matcher_ftype)
15909 (expand_symtabs_symbol_matcher_ftype)
15910 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15911 return bool.
15912 (quick_symbol_functions::map_symtabs_matching_filename)
15913 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15914 function_view as callback type and return bool.
15915 (expand_symtabs_matching): Adjust to use function_view as callback
15916 type.
15917 (maintenance_expand_name_matcher)
15918 (maintenance_expand_file_matcher): Delete.
15919 (maintenance_expand_symtabs): Use lambdas.
15920 * symtab.c (iterate_over_some_symtabs): Adjust to use
15921 function_view as callback types and return bool.
15922 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15923 of a cleanup.
15924 (lookup_symtab_callback): Delete.
15925 (lookup_symtab): Use a lambda.
15926 (iterate_over_symbols): Adjust to use function_view as callback
15927 type.
15928 (struct search_symbols_data, search_symbols_file_matches)
15929 (search_symbols_name_matches): Delete.
15930 (search_symbols): Use a pair of lambdas.
15931 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15932 (symtab_expansion_callback): Delete.
15933 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15934 * symtab.h: Include "common/function-view.h".
15935 (iterate_over_some_symtabs): Adjust to use function_view as
15936 callback type and return bool.
15937 (iterate_over_symtabs): Adjust to use function_view as callback
15938 type.
15939 (symbol_found_callback_ftype): Remove 'data' parameter and return
15940 bool.
15941 (iterate_over_symbols): Adjust to use function_view as callback
15942 type.
15943
07e253aa
PA
159442017-02-23 Pedro Alves <palves@redhat.com>
15945
15946 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15947 (%.o) <unittests/%.c>: New pattern.
15948 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15949 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15950 * common/function-view.h: New file.
15951 * unittests/function-view-selftests.c: New file.
15952 * configure: Regenerate.
15953
8eaf5320
SM
159542017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15955
15956 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15957 inferior_ptid.
15958 * go32-nat.c (go32_thread_alive): Likewise.
15959
38768751
YQ
159602017-02-23 Yao Qi <yao.qi@linaro.org>
15961
15962 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15963 delete.
15964
0a8beaba
YQ
159652017-02-23 Yao Qi <yao.qi@linaro.org>
15966
15967 * varobj.c (varobj_clear_saved_item): Use delete instead of
15968 xfree.
15969 (update_dynamic_varobj_children): Likewise.
15970
58fdfd2c
JK
159712017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15972
15973 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15974
1b90b139
SM
159752017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15976
15977 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15978 m_enum_value to 0 in default constructor.
15979
2039d74e
EBM
159802017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15981
15982 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15983 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15984 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15985 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15986 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15987 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15988 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15989 IS_STORE_CONDITIONAL_INSN.
15990
7814882a
JK
159912017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15992
15993 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15994
0ae60b63
JK
159952017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15996
15997 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15998
0224619f
JK
159992017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16000
16001 * dwarf2read.c (skip_one_die, read_attribute_value)
16002 (dwarf2_const_value_attr, dump_die_shallow)
16003 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16004 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16005
0af92d60
JK
160062017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16007
16008 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16009 (dwarf_parse_macro_header): Accept DWARF version 5.
16010 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16011
216f72a1
JK
160122017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16013
16014 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16015 DW_AT_GNU_*.
16016 * common/common-exceptions.h (enum errors): Likewise.
16017 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16018 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16019 (dwarf_expr_context::execute_stack_op): Likewise.
16020 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16021 Likewise.
16022 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16023 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16024 (show_entry_values_debug, call_site_to_target_addr)
16025 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16026 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16027 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16028 (value_of_dwarf_block_entry, indirect_pieced_value)
16029 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16030 (disassemble_dwarf_expression): Likewise.
16031 * dwarf2read.c (process_die, inherit_abstract_dies)
16032 (read_call_site_scope): Likewise.
16033 * gdbtypes.h (struct func_type, struct call_site_parameter)
16034 (struct call_site): Likewise.
16035 * stack.c (read_frame_arg): Likewise.
16036 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16037
43988095
JK
160382017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16039
16040 * defs.h (read_unsigned_leb128): New declaration.
16041 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16042 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16043 (dwarf2_find_location_expression): Call also
16044 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16045 * dwarf2loc.h (dwarf2_version): New declaration.
16046 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16047 rnglists.
16048 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16049 .debug_rnglists.
16050 (struct dwop_section_names): Add loclists_dwo.
16051 (dwop_section_names): Add .debug_loclists.dwo.
16052 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16053 (struct dwarf2_per_cu_data): Add dwarf_version.
16054 (struct dwo_sections): Add loclists.
16055 (struct attr_abbrev): Add implicit_const.
16056 (read_indirect_line_string): New declaration.
16057 (read_unsigned_leb128): Delete declaration.
16058 (rcuh_kind): New definition.
16059 (read_and_check_comp_unit_head): Change parameter
16060 is_debug_types_section to section_kind.
16061 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16062 (read_comp_unit_head): Change parameter abfd to section, add parameter
16063 section_kind. Handle DWARF-5.
16064 (error_check_comp_unit_head): Accept also DWARF version 5.
16065 (read_and_check_comp_unit_head): Change parameter
16066 is_debug_types_section to section_kind.
16067 (read_and_check_type_unit_head): Delete function.
16068 (read_abbrev_offset): Handle DWARF-5.
16069 (create_debug_type_hash_table): Add parameter section_kind. Process
16070 only DW_UT_type. Use signature and type_offset_in_tu from struct
16071 comp_unit_head.
16072 (create_debug_types_hash_table): Update create_debug_type_hash_table
16073 caller.
16074 (create_all_type_units): Call create_debug_type_hash_table.
16075 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16076 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16077 caller.
16078 (skip_one_die): Handle DW_FORM_implicit_const.
16079 (dwarf2_rnglists_process): New function.
16080 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16081 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16082 (read_attribute_value): Handle DW_FORM_implicit_const,
16083 DW_FORM_line_strp.
16084 (read_attribute): Handle DW_FORM_implicit_const.
16085 (read_indirect_string_at_offset_from): New function from
16086 read_indirect_string_at_offset.
16087 (read_indirect_string_at_offset): Call
16088 read_indirect_string_at_offset_from.
16089 (read_indirect_line_string_at_offset): New function.
16090 (read_indirect_string): New function comment.
16091 (read_indirect_line_string): New function.
16092 (read_unsigned_leb128): Make it global.
16093 (dwarf2_string_attr): Handle DWARF-5.
16094 (add_include_dir_stub, read_formatted_entries): New functions.
16095 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16096 Handle DWARF-5.
16097 (per_cu_header_read_in): Update read_comp_unit_head caller.
16098 (dwarf2_version): New function.
16099 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16100 rnglists.
16101 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16102 fields.
16103
22d2f3ab
JK
161042017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16105
16106 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16107
5f46c5a5
JK
161082017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16109
16110 * dwarf2read.c (dwarf2_ranges_process): New function from
16111 dwarf2_ranges_read.
16112 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16113 dwarf2_ranges_process.
16114
78d4d2c5
JK
161152017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16116
16117 * dwarf2read.c (create_debug_type_hash_table): New function from
16118 create_debug_types_hash_table.
16119 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16120 (create_all_type_units, open_and_init_dwo_file): Update
16121 create_debug_types_hash_table callers.
16122
1b076f25
SDJ
161232017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16124
16125 PR gdb/16188
16126 * fork-child.c (trace_start_error): Fix thinko. va_end should
16127 refer to 'ap', not 'args'.
16128
0db8980c
SDJ
161292017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16130 Pedro Alves <palves@redhat.com>
16131
16132 PR gdb/16188
16133 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16134 calls succeeded.
16135 * fork-child.c (trace_start_error): New function.
16136 (trace_start_error_with_name): Likewise.
16137 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16138 * inf-ptrace.c (inf_ptrace_me): Likewise.
16139 * inferior.h (trace_start_error): New prototype.
16140 (trace_start_error_with_name): Likewise.
16141
99e8a4f9
SDJ
161422017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16143
16144 PR gdb/21164
16145 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16146 NULL before using it.
16147 * symmisc.c (maintenance_print_symbols): Likewise.
16148 (maintenance_print_msymbols): Likewise.
16149
4e746bb6
TW
161502017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16151
16152 * NEWS: Add record Python bindings entry.
16153
161542017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16155
16156 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16157 py-record-full.o.
16158 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16159 * python/py-record-btrace.c, python/py-record-btrace.h,
16160 python/py-record-full.c, python/py-record-full.h: New file.
16161 * python/py-record.c: Add include for py-record-btrace.h and
16162 py-record-full.h.
16163 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16164 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16165 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16166 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16167 New definition.
16168 (gdbpy_initialize_btrace): New export.
16169 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16170
161712017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16172
16173 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16174 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16175 * python/py-record.c: New file.
16176 * python/python-internal.h (gdbpy_start_recording,
16177 gdbpy_current_recording, gdpy_stop_recording,
16178 gdbpy_initialize_record): New export.
16179 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16180 (python_GdbMethods): Add gdbpy_start_recording,
16181 gdbpy_current_recording and gdbpy_stop_recording.
16182
161832017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16184
16185 * record-btrace.c (record_btrace_record_method): New function.
16186 (init_record_btrace_ops): Initialize to_record_method.
16187 * record-full.c (record_full_record_method): New function.
16188 (init_record_full_ops, init_record_full_core_ops): Add
16189 record_full_record_method.
16190 * record.h (enum record_method): New enum.
16191 * target-debug.h (target_debug_print_enum_record_method: New define.
16192 * target-delegates.c: Regenerate.
16193 * target.c (target_record_method): New function.
16194 * target.h: Include record.h.
16195 (struct target_ops) <to_record_method>: New field.
16196 (target_record_method): New export.
16197
161982017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16199
16200 * record.h (record_start, record_stop): New export.
16201 * record.c (record_start, record_stop): New function.
16202
162032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16204
16205 * btrace.c (btrace_fetch): Copy function call segments pointer
16206 into a vector.
16207 (btrace_clear): Clear the vector.
16208 (btrace_find_insn_by_number): Use binary search to find the correct
16209 function call segment.
16210 * btrace.h (brace_fun_p): New typedef.
16211 (struct btrace_thread_info) <functions>: New field.
16212
162132017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16214
16215 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16216 * btrace.c (btrace_decode_error): ... here. New function.
16217 * btrace.h (btrace_decode_error): New export.
16218
162192017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16220
16221 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16222 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16223 btrace_find_insn_by_number): Remove special case for gaps.
16224 * btrace.h (btrace_insn_get_error): New export.
16225 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16226 * record-btrace.c (btrace_insn_history): Print number for gaps.
16227 (record_btrace_info, record_btrace_goto): Handle gaps.
16228
3f77c769
TT
162292017-02-14 Tom Tromey <tom@tromey.com>
16230
16231 PR python/13598:
16232 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16233 event.
16234 * python/py-evts.c (gdbpy_initialize_py_events): Add
16235 before_prompt registry.
16236 * python/py-events.h (events_object) <before_prompt>: New field.
16237
4c2c7ac6
MM
162382017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16239
16240 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16241
5cf30ebf
LM
162422017-02-13 Luis Machado <lgustavo@codesourcery.com>
16243
16244 * symfile (_initialize_symfile): Add usage text to the load command's
16245 help text.
16246
26a06916
SM
162472017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16248
16249 * utils.c (defaulted_query): Don't query on secondary UIs.
16250
0b145e37
TT
162512017-02-10 Tom Tromey <tom@tromey.com>
16252
16253 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16254
2d8365c4
TT
162552017-02-10 Tom Tromey <tom@tromey.com>
16256
16257 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16258 "cleanup" local.
16259 * python/py-type.c (typy_legacy_template_argument): Remove
16260 unnecessary "cleanup" local.
16261
2bb8f231
TT
162622017-02-10 Tom Tromey <tom@tromey.com>
16263
16264 * python/python.c (do_start_initialization): New function, from
16265 _initialize_python.
16266 (_initialize_python): Call do_start_initialization.
16267 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16268 goto.
16269
1bdfaf42
TT
162702017-02-10 Tom Tromey <tom@tromey.com>
16271
16272 * python/py-prettyprint.c (pretty_print_one_value): Use
16273 gdbpy_ref.
16274
88b6faea
TT
162752017-02-10 Tom Tromey <tom@tromey.com>
16276
16277 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16278 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16279 gdbpy_ref.
16280 * python/py-type.c (field_new): Use gdbpy_ref.
16281 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16282 gdbpy_ref.
16283 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16284 (py_free_pspace): Likewise.
16285 (pspace_to_pspace_object): Likewise.
16286 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16287 (py_free_objfile): Likewise.
16288 (objfile_to_objfile_object): Likewise.
16289 * python/py-inferior.c (delete_thread_object): Use
16290 gdbpy_ref.
16291 (infpy_read_memory): Likewise.
16292 (py_free_inferior): Likewise.
16293 * python/py-evtregistry.c (create_eventregistry_object): Use
16294 gdbpy_ref.
16295 * python/py-event.c (create_event_object): Use gdbpy_ref.
16296
7780f186
TT
162972017-02-10 Tom Tromey <tom@tromey.com>
16298
16299 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16300 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16301 used.
16302 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16303 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16304 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16305 python/py-framefilter.c, python/py-function.c,
16306 python/py-inferior.c, python/py-infevents.c,
16307 python/py-linetable.c, python/py-newobjfileevent.c,
16308 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16309 python/py-signalevent.c, python/py-stopevent.c,
16310 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16311 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16312 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16313 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16314
d4b0bb18
TT
163152017-02-10 Tom Tromey <tom@tromey.com>
16316
16317 * ui-out.h (ui_out_emit_type): New class.
16318 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16319 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16320 and ui_out_emit_tuple.
16321 (enumerate_locals): Likewise.
16322 (py_mi_print_variables, py_print_locals, py_print_args): Use
16323 ui_out_emit_list.
16324 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16325 ui_out_emit_list.
16326 * common/gdb_optional.h: New file.
16327
f67f945c
MG
163282017-02-10 Martin Galvan <martingalvan@sourceware.org>
16329
16330 * MAINTAINERS (Write After Approval): Update my e-mail address.
16331
18da0c51
MG
163322017-02-10 Martin Galvan <martingalvan@sourceware.org>
16333
16334 PR gdb/21122
16335 * breakpoint.c (_initialize_breakpoint): Update the help description
16336 of the 'commands' command to indicate that it takes a list argument.
16337
62c14536
SM
163382017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16339
16340 * interps.c (current_interp_set_logging): Remove "return".
16341
ff6fa247
GB
163422017-02-09 Gary Benson <gbenson@redhat.com>
16343
16344 * symtab.c (add_symtab_completions): Prevent NULL pointer
16345 dereference.
16346
a474bd8e
PA
163472017-02-08 Pedro Alves <palves@redhat.com>
16348
16349 * interps.c (interp::interp): Remove reference to quiet_p.
16350 (interp_set): Make static. Remove dead "Switching to" output
16351 code.
16352 (interp_quiet_p, interp_set_quiet): Delete.
16353 (interpreter_exec_cmd): Don't set the interpreter quiet.
16354 * interps.h (interp_quiet_p): Make static.
16355 (class interp) <quiet_p>: Remove field
16356
3d7b173c
JG
163572017-02-08 Jerome Guitton <guitton@adacore.com>
16358
604c4576
JG
16359 * cli/cli-decode.c (find_command_name_length): Make it extern.
16360 * cli/cli-decode.h (find_command_name_length): Declare.
16361 * cli/cli-script.c (command_name_equals, line_first_arg):
16362 New functions.
16363 (process_next_line): Use cli-decode to parse command names.
16364 (build_command_line): Make args a constant pointer.
16365
163662017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 16367
3d7b173c
JG
16368 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16369 Remove case-insensitive search.
16370
1291063d
JM
163712017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16372
16373 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16374 at the end of the line. Avoids an ARI warning.
16375
20b477a7
LM
163762017-02-06 Luis Machado <lgustavo@codesourcery.com>
16377
16378 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16379 rdseed instructions.
16380 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16381
3f7b46f2
IR
163822017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16383
16384 PR tdep/20936
16385 Provide and use sparc32 and sparc64 target description XML files.
16386 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16387 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16388 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16389 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16390 * features/sparc/sparc32-solaris.xml: New file.
16391 * features/sparc/sparc64-solaris.xml: New file.
16392 * features/sparc/sparc32-solaris.c: Generated.
16393 * features/sparc/sparc64-solaris.c: Generated.
16394 * sparc-tdep.h: Account for differences in target descriptions.
16395 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16396 (sparc32_register_type): Use target provided registers.
16397 (validate_tdesc_registers): New function.
16398 (sparc32_gdbarch_init): Use tdesc_has_registers.
16399 Set pseudoregister functions.
16400 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16401 (sparc64_register_type): Use target provided registers.
16402 (sparc64_init_abi): Set pseudoregister functions.
16403
f0fd41c1
TT
164042017-02-03 Tom Tromey <tom@tromey.com>
16405
16406 PR rust/21097:
16407 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16408 with a single member.
16409
d6f9b0fb
PA
164102017-02-03 Pedro Alves <palves@redhat.com>
16411
16412 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16413 (cli_interp_base::~cli_interp_base): New.
16414 (cli_interp): New struct.
16415 (as_cli_interp): Cast the interp itself to cli_interp.
16416 (cli_interpreter_pre_command_loop): Rename to ...
16417 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16418 parameter.
16419 (cli_interpreter_init): Rename to ...
16420 (cli_interp::init): ... this. Remove 'self' parameter. Use
16421 boolean. Make extern.
16422 (cli_interpreter_resume): Rename to ...
16423 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16424 extern.
16425 (cli_interpreter_suspend): Rename to ...
16426 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16427 extern.
16428 (cli_interpreter_exec): Rename to ...
16429 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16430 extern.
16431 (cli_interpreter_supports_command_editing): Rename to ...
16432 (cli_interp_base::supports_command_editing): ... this. Remove
16433 'interp' parameter. Make extern.
16434 (cli_ui_out): Rename to ...
16435 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16436 Make extern.
16437 (cli_set_logging): Rename to ...
16438 (cli_interp_base::set_logging): ... this. Remove 'interp'
16439 parameter. Make extern.
16440 (cli_interp_procs): Delete.
16441 (cli_interp_factory): Adjust to use "new".
16442 * cli/cli-interp.h: Include "interps.h".
16443 (struct cli_interp_base): New struct.
16444 * interps.c (struct interp): Delete. Fields moved to interps.h.
16445 (interp_new): Delete.
16446 (interp::interp, interp::~interp): New.
16447 (interp_set): Use bool, and return void. Assume the interpreter
16448 has suspend, init and resume methods, and that the all return
16449 void.
16450 (set_top_level_interpreter): interp_set returns void.
16451 (interp_ui_out): Adapt.
16452 (current_interp_set_logging): Adapt.
16453 (interp_data): Delete.
16454 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16455 (interp_exec): Adapt.
16456 (top_level_interpreter_data): Delete.
16457 * interps.h (interp_init_ftype, interp_resume_ftype)
16458 (interp_suspend_ftype, interp_exec_ftype)
16459 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16460 (class interp): New.
16461 (interp_new): Delete.
16462 (interp_set): Now returns void. Use bool.
16463 (interp_data, top_level_interpreter_data): Delete.
16464 * mi/mi-common.h: Include interps.h.
16465 (class mi_interp): Inherit from interp. Define a ctor. Declare
16466 init, resume, suspect, exec, interp_ui_out, set_logging and
16467 pre_command_loop methods.
16468 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16469 (mi_interpreter_init): Rename to ...
16470 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16471 bool, return void and make extern. Adjust.
16472 (mi_interpreter_resume): ... Rename to ...
16473 (mi_interp::resume): ... this. Remove the 'data' parameter,
16474 return void and make extern. Adjust.
16475 (mi_interpreter_suspend): ... Rename to ...
16476 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16477 return void and make extern. Adjust.
16478 (mi_interpreter_exec): ... Rename to ...
16479 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16480 extern. Adjust.
16481 (mi_interpreter_pre_command_loop): ... Rename to ...
16482 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16483 parameter and make extern.
16484 (mi_on_normal_stop_1): Adjust.
16485 (mi_ui_out): Rename to ...
16486 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16487 parameter and make extern. Adjust.
16488 (mi_set_logging): Rename to ...
16489 (mi_interp::set_logging): ... this. Remove the 'interp'
16490 parameter and make extern. Adjust.
16491 (mi_interp_procs): Delete.
16492 (mi_interp_factory): Adjust to use 'new'.
16493 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16494 (mi_print_exception, mi_execute_command, mi_load_progress):
16495 Adjust.
16496 * tui/tui-interp.c (tui_interp): New class.
16497 (as_tui_interp): Return a tui_interp pointer.
16498 (tui_on_normal_stop, tui_on_signal_received)
16499 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16500 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16501 to use interp::interp_ui_out.
16502 (tui_init): Rename to ...
16503 (tui_interp::init): ... this. Remove the 'self' parameter, use
16504 bool, return void and make extern. Adjust.
16505 (tui_resume): Rename to ...
16506 (tui_interp::resume): ... this. Remove the 'data' parameter,
16507 return void and make extern. Adjust.
16508 (tui_suspend): Rename to ...
16509 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16510 return void and make extern. Adjust.
16511 (tui_ui_out): Rename to ...
16512 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16513 parameter, and make extern. Adjust.
16514 (tui_exec): Rename to ...
16515 (tui_interp::exec): ... this. Remove the 'data' parameter and
16516 make extern.
16517 (tui_interp_procs): Delete.
16518 (tui_interp_factory): Use "new".
16519
65c40c95
TT
165202017-02-02 Tom Tromey <tom@tromey.com>
16521
16522 * rust-exp.y (ends_raw_string, space_then_number)
16523 (rust_identifier_start_p): Return bool.
16524 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16525 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16526 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16527 (rust_chartype_p): Return bool.
16528 (val_print_struct, rust_print_struct_def, rust_print_type):
16529 Update.
16530 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16531 Return bool.
16532
b50f188d
TT
165332017-02-02 Tom Tromey <tom@tromey.com>
16534
16535 * rust-lang.c: Reindent.
16536
03c85b11
TT
165372017-02-02 Tom Tromey <tom@tromey.com>
16538
16539 * rust-lang.h (rust_crate_for_block): Update.
16540 * rust-lang.c (rust_crate_for_block): Return std::string.
16541 (rust_get_disr_info): Use std:;string, not
16542 gdb::unique_xmalloc_ptr.
16543 * rust-exp.y (crate_name): Update.
16544
9b6da501
PA
165452017-02-02 Pedro Alves <palves@redhat.com>
16546
16547 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16548 field out of gdb_disassembler_test and make it static.
16549
ec4cb20b
PA
165502017-02-02 Pedro Alves <palves@redhat.com>
16551
16552 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16553 mi1_interp and mi_interp fields.
16554
5be5dbf0
PA
165552017-02-02 Pedro Alves <palves@redhat.com>
16556
616268b6
PA
16557 * cli/cli-interp.c (struct saved_output_files, saved_output):
16558 Moved from cli/cli-logging.c.
16559 (cli_set_logging): New function.
16560 (cli_interp_procs): Install cli_set_logging.
16561 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16562 Declare.
16563 * cli/cli-logging.c (struct saved_output_files, saved_output):
16564 Moved to cli/cli-interp.c.
16565 (pop_output_files): Don't save outputs here.
16566 (make_logging_output): New function.
16567 (handle_redirections): Don't build tee nor save previous outputs
16568 here.
16569 * interps.c (current_interp_set_logging): Change prototype.
16570 Assume there's always a set_logging_proc method installed.
16571 * interps.h (interp_set_logging_ftype): Change prototype.
16572 (current_interp_set_logging): Change prototype and adjust comment.
16573 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16574 use make_logging_output.
16575 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
165762017-02-02 Pedro Alves <palves@redhat.com>
16577
5be5dbf0
PA
16578 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16579 from ...
16580 (set_logging_overwrite): ... here.
16581 (logging_no_redirect_file): Delete.
16582 (set_logging_redirect): Don't handle redirection on the fly.
16583 Instead warn that "logging off" / "logging on" is necessary.
16584 (pop_output_files): Delete references to logging_no_redirect_file.
16585 (show_logging_command): Always speak in terms of what will happen
16586 once logging is reenabled.
16587
c99cc448
PA
165882017-02-02 Pedro Alves <palves@redhat.com>
16589
16590 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16591
8b172ce7
PA
165922017-02-02 Pedro Alves <palves@redhat.com>
16593
16594 * disasm.c (gdb_pretty_print_insn): Rename to ...
16595 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16596 Remove gdbarch parameter. Adapt to clear the object's buffers
16597 instead of allocating new buffers, and to print using the object's
16598 gdb_disassembler instead of calling gdb_print_insn.
16599 (dump_insns): Use gdb_pretty_print_disassembler.
16600 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16601 (gdb_pretty_print_disassembler): New class.
16602 * record-btrace.c (btrace_insn_history): Use
16603 gdb_pretty_print_disassembler.
16604
d7e74731
PA
166052017-02-02 Pedro Alves <palves@redhat.com>
16606
16607 * ada-lang.c (type_as_string): Use string_file.
16608 * ada-valprint.c (ada_print_floating): Use string_file.
16609 * ada-varobj.c (ada_varobj_scalar_image)
16610 (ada_varobj_get_value_image): Use string_file.
16611 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16612 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16613 * breakpoint.c (update_inserted_breakpoint_locations)
16614 (insert_breakpoint_locations, reattach_breakpoints)
16615 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16616 (print_it_watchpoint): Use string_file.
16617 (save_breakpoints): Use stdio_file.
16618 * c-exp.y (oper): Use string_file.
16619 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16620 tee_file.
16621 (pop_output_files): Use delete.
16622 (handle_redirections): Use stdio_file and tee_file.
16623 * cli/cli-setshow.c (do_show_command): Use string_file.
16624 * compile/compile-c-support.c (c_compute_program): Use
16625 string_file.
16626 * compile/compile-c-symbols.c (generate_vla_size): Take a
16627 'string_file &' instead of a 'ui_file *'.
16628 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16629 of a 'ui_file *'. Use string_file.
16630 (generate_c_for_variable_locations): Take a 'string_file &'
16631 instead of a 'ui_file *'.
16632 * compile/compile-internal.h (generate_c_for_for_one_variable):
16633 Take a 'string_file &' instead of a 'ui_file *'.
16634 * compile/compile-loc2c.c (push, pushf, unary, binary)
16635 (print_label, pushf_register_address, pushf_register)
16636 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16637 'ui_file *'. Adjust.
16638 * compile/compile.c (compile_to_object): Use string_file.
16639 * compile/compile.h (compile_dwarf_expr_to_c)
16640 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16641 'ui_file *'.
16642 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16643 (replace_typedefs_qualified_name): Use string_file and
16644 obstack_copy0.
16645 * disasm.c (gdb_pretty_print_insn): Use string_file.
16646 (gdb_disassembly): Adjust reference the null_stream global.
16647 (do_ui_file_delete): Delete.
16648 (gdb_insn_length): Use null_stream.
16649 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16650 * dwarf2loc.c (dwarf2_compile_property_to_c)
16651 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16652 'string_file &' instead of a 'ui_file *'.
16653 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16654 * dwarf2read.c (do_ui_file_peek_last): Delete.
16655 (dwarf2_compute_name): Use string_file.
16656 * event-top.c (gdb_setup_readline): Use stdio_file.
16657 * gdbarch.sh (verify_gdbarch): Use string_file.
16658 * gdbtypes.c (safe_parse_type): Use null_stream.
16659 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16660 string_file.
16661 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16662 'string_file *' instead of a 'ui_file *'.
16663 (gdbscm_arch_disassemble): Use string_file.
16664 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16665 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16666 inherits from ui_file.
16667 (ioscm_file_port_delete, ioscm_file_port_rewind)
16668 (ioscm_file_port_put): Delete.
16669 (ioscm_file_port_write): Rename to ...
16670 (ioscm_file_port::write): ... this. Remove file_port_magic
16671 checks.
16672 (ioscm_file_port_new): Delete.
16673 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16674 ui_file_up.
16675 * guile/scm-type.c (tyscm_type_name): Use string_file.
16676 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16677 Use string_file.
16678 * infcmd.c (print_return_value_1): Use string_file.
16679 * infrun.c (print_target_wait_results): Use string_file.
16680 * language.c (add_language): Use string_file.
16681 * location.c (explicit_to_string_internal): Use string_file.
16682 * main.c (captured_main_1): Use null_file.
16683 * maint.c (maintenance_print_architecture): Use stdio_file.
16684 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16685 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16686 event_channel>: Change type to mi_console_file pointer.
16687 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16688 (mi_console_file_delete): Delete.
16689 (struct mi_console_file): Delete.
16690 (mi_console_file_magic): Delete.
16691 (mi_console_file_new): Delete.
16692 (mi_console_file::mi_console_file): New.
16693 (mi_console_file_delete): Delete.
16694 (mi_console_file_fputs): Delete.
16695 (mi_console_file::write): New.
16696 (mi_console_raw_packet): Delete.
16697 (mi_console_file::flush): New.
16698 (mi_console_file_flush): Delete.
16699 (mi_console_set_raw): Rename to ...
16700 (mi_console_file::set_raw): ... this.
16701 * mi/mi-console.h (class mi_console_file): New class.
16702 (mi_console_file_new, mi_console_set_raw): Delete.
16703 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16704 (mi_set_logging): Use delete and tee_file. Adjust.
16705 * mi/mi-main.c (output_register): Use string_file.
16706 (mi_cmd_data_evaluate_expression): Use string_file.
16707 (mi_cmd_data_read_memory): Use string_file.
16708 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16709 * mi/mi-out.c (mi_ui_out::main_stream): New.
16710 (mi_ui_out::rewind): Use main_stream and
16711 string_file.
16712 (mi_ui_out::put): Use main_stream and string_file.
16713 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16714 Allocate a 'string_file' instead.
16715 (mi_out_new): Don't allocate a mem_fileopen stream here.
16716 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16717 (mi_ui_out::main_stream): Declare method.
16718 * printcmd.c (eval_command): Use string_file.
16719 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16720 * python/py-arch.c (archpy_disassemble): Use string_file.
16721 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16722 * python/py-frame.c (frapy_str): Use string_file.
16723 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16724 Use string_file.
16725 * python/py-type.c (typy_str): Use string_file.
16726 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16727 * python/py-value.c (valpy_str): Use string_file.
16728 * record-btrace.c (btrace_insn_history): Use string_file.
16729 * regcache.c (regcache_print): Use stdio_file.
16730 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16731 * remote.c (escape_buffer): Use string_file.
16732 * rust-lang.c (rust_get_disr_info): Use string_file.
16733 * serial.c (serial_open_ops_1): Use stdio_file.
16734 (do_serial_close): Use delete.
16735 * stack.c (print_frame_arg): Use string_file.
16736 (print_frame_args): Remove local mem_fileopen stream, not used.
16737 (print_frame): Use string_file.
16738 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16739 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16740 Take a 'string_file *' instead of a 'ui_file *'.
16741 * top.c (new_ui): Use stdio_file and stderr_file.
16742 (free_ui): Use delete.
16743 (execute_command_to_string): Use string_file.
16744 (quit_confirm): Use string_file.
16745 * tracepoint.c (collection_list::append_exp): Use string_file.
16746 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16747 * tui/tui-file.c: Don't include "ui-file.h".
16748 (enum streamtype, struct tui_stream): Delete.
16749 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16750 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16751 (tui_file::tui_file): New method.
16752 (tui_file_fputs): Delete.
16753 (tui_file_get_strbuf): Delete.
16754 (tui_file::puts): New method.
16755 (tui_file_adjust_strbuf): Delete.
16756 (tui_file_flush): Delete.
16757 (tui_file::flush): New method.
16758 * tui/tui-file.h: Tweak intro comment.
16759 Include ui-file.h.
16760 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16761 (tui_file_adjust_strbuf): Delete declarations.
16762 (class tui_file): New class.
16763 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16764 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16765 (tui_register_format): Use string_stream.
16766 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16767 (tui_get_function_from_frame): Use string_file.
16768 * typeprint.c (type_to_string): Use string_file.
16769 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16770 (null_stream): New global.
16771 (ui_file_delete): Delete.
16772 (ui_file::ui_file): New.
16773 (null_file_isatty): Delete.
16774 (ui_file::~ui_file): New.
16775 (null_file_rewind): Delete.
16776 (ui_file::printf): New.
16777 (null_file_put): Delete.
16778 (null_file_flush): Delete.
16779 (ui_file::putstr): New.
16780 (null_file_write): Delete.
16781 (ui_file::putstrn): New.
16782 (null_file_read): Delete.
16783 (ui_file::putc): New.
16784 (null_file_fputs): Delete.
16785 (null_file_write_async_safe): Delete.
16786 (ui_file::vprintf): New.
16787 (null_file_delete): Delete.
16788 (null_file::write): New.
16789 (null_file_fseek): Delete.
16790 (null_file::puts): New.
16791 (ui_file_data): Delete.
16792 (null_file::write_async_safe): New.
16793 (gdb_flush, ui_file_isatty): Adjust.
16794 (ui_file_put, ui_file_rewind): Delete.
16795 (ui_file_write): Adjust.
16796 (ui_file_write_for_put): Delete.
16797 (ui_file_write_async_safe, ui_file_read): Adjust.
16798 (ui_file_fseek): Delete.
16799 (fputs_unfiltered): Adjust.
16800 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16801 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16802 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16803 (set_ui_file_data): Delete.
16804 (string_file::~string_file, string_file::write)
16805 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16806 (do_ui_file_as_string, ui_file_as_string): Delete.
16807 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16808 (struct mem_file): Delete.
16809 (mem_file_new): Delete.
16810 (stdio_file::stdio_file): New.
16811 (mem_file_delete): Delete.
16812 (stdio_file::stdio_file): New.
16813 (mem_fileopen): Delete.
16814 (stdio_file::~stdio_file): New.
16815 (mem_file_rewind): Delete.
16816 (stdio_file::set_stream): New.
16817 (mem_file_put): Delete.
16818 (stdio_file::open): New.
16819 (mem_file_write): Delete.
16820 (stdio_file_magic, struct stdio_file): Delete.
16821 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16822 (stdio_file::flush): New.
16823 (stdio_file_read): Rename to ...
16824 (stdio_file::read): ... this. Adjust.
16825 (stdio_file_write): Rename to ...
16826 (stdio_file::write): ... this. Adjust.
16827 (stdio_file_write_async_safe): Rename to ...
16828 (stdio_file::write_async_safe) ... this. Adjust.
16829 (stdio_file_fputs): Rename to ...
16830 (stdio_file::puts) ... this. Adjust.
16831 (stdio_file_isatty): Delete.
16832 (stdio_file_fseek): Delete.
16833 (stdio_file::isatty): New.
16834 (stderr_file_write): Rename to ...
16835 (stderr_file::write) ... this. Adjust.
16836 (stderr_file_fputs): Rename to ...
16837 (stderr_file::puts) ... this. Adjust.
16838 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16839 (stderr_file::stderr_file): New.
16840 (tee_file_magic): Delete.
16841 (struct tee_file): Delete.
16842 (tee_file::tee_file): New.
16843 (tee_file_new): Delete.
16844 (tee_file::~tee_file): New.
16845 (tee_file_delete): Delete.
16846 (tee_file_flush): Rename to ...
16847 (tee_file::flush): ... this. Adjust.
16848 (tee_file_write): Rename to ...
16849 (tee_file::write): ... this. Adjust.
16850 (tee_file::write_async_safe): New.
16851 (tee_file_fputs): Rename to ...
16852 (tee_file::puts): ... this. Adjust.
16853 (tee_file_isatty): Rename to ...
16854 (tee_file::isatty): ... this. Adjust.
16855 * ui-file.h (struct obstack, struct ui_file): Don't
16856 forward-declare.
16857 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16858 (ui_file_write_ftype)
16859 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16860 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16861 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16862 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16863 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16864 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16865 (set_ui_file_fseek): Delete.
16866 (ui_file_data, ui_file_delete, ui_file_rewind)
16867 (struct ui_file): New.
16868 (ui_file_up): New.
16869 (class null_file): New.
16870 (null_stream): Declare.
16871 (ui_file_write_for_put, ui_file_put): Delete.
16872 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16873 Delete.
16874 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16875 (gdb_fopen, tee_file_new): Delete.
16876 (struct string_file): New.
16877 (struct stdio_file): New.
16878 (stdio_file_up): New.
16879 (struct stderr_file): New.
16880 (class tee_file): New.
16881 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16882 of a 'ui_file *'. Adjust.
16883 * ui-out.h (class ui_out) <field_stream>: Likewise.
16884 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16885 (null_stream): Delete.
16886 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16887 Adjust.
16888 * utils.h (struct ui_file): Delete forward declaration..
16889 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16890 (error_stream): Take a 'string_file &' instead of a
16891 'ui_file *'.
16892 * varobj.c (varobj_value_get_print_value): Use string_file.
16893 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16894 * gdbarch.c: Regenerate.
16895
187808b0
PA
168962017-02-02 Pedro Alves <palves@redhat.com>
16897
16898 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16899 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16900 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16901 Adjust to call gdb_print_insn instead of
16902 gdb_disassembler::print_insn.
16903 (dump_insns, do_mixed_source_and_assembly_deprecated)
16904 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16905 'gdbarch' parameter. Remove gdb_disassembler parameter.
16906 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16907 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16908 declaration.
16909 (gdb_pretty_print_insn): Re-add declaration.
16910 * record-btrace.c (btrace_insn_history): Don't allocate a
16911 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16912
7a8eb317
SM
169132017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16914
16915 * disasm.h (gdb_disassembly): Remove file_string parameter.
16916 * disasm.c (gdb_disassembly): Likewise.
16917 * cli/cli-cmds.c (print_disassembly): Adapt.
16918 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16919 * stack.c (do_gdb_disassembly): Likewise.
16920
7346ef59
AA
169212017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16922
16923 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16924 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16925 targets. And if the implicit value is longer than needed, extract
16926 the first bytes instead of the "least significant" ones.
16927
cd4007e4
MM
169282017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16929
16930 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16931 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16932 (btrace_fetch): Assert can_access_registers_ptid.
16933 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16934 validate_registers_access.
16935
cf77c34e
MM
169362017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16937
16938 * gdbthread.h (can_access_registers_ptid): New.
16939 * thread.c (can_access_registers_ptid): New.
16940
be85ce7d
PA
169412017-02-01 Pedro Alves <palves@redhat.com>
16942
16943 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16944
29b0b251
PA
169452017-01-31 Pedro Alves <palves@redhat.com>
16946
16947 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16948 Fix typos.
16949
289b5b24
PA
169502017-01-31 Pedro Alves <palves@redhat.com>
16951
16952 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16953 not used.
16954
b47413b4
PA
169552017-01-31 Pedro Alves <palves@redhat.com>
16956
16957 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16958
60adb36c
PA
169592017-01-31 Pedro Alves <palves@redhat.com>
16960
16961 * common/scoped_restore.h
16962 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16963 change the value's parameter type to T2.
16964 (make_scoped_restore): Likewise.
16965
2735833d
WT
169662017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16967 Richard Henderson <rth@redhat.com>
16968
16969 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16970 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16971 GS_BASE for older kernels.
16972 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16973 GS_BASE for older kernels.
16974 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16975 and GS_BASE to the offset table.
16976 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16977 system register group.
16978 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16979 for older kernels.
16980 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16981 amd64 ABI.
16982 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16983 AMD64_GSBASE_REGNUM.
16984 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16985 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16986 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16987 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16988 i386/64bit-segments.xml in those rules.
16989 * features/i386/64bit-segments.xml: New file.
16990 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16991 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16992 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16993 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16994 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16995 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16996 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16997 * features/i386/amd64-avx-linux.c: Regenerated.
16998 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16999 * features/i386/amd64-avx-mpx.c: Regenerated.
17000 * features/i386/amd64-avx512-linux.c: Regenerated.
17001 * features/i386/amd64-linux.c: Regenerated.
17002 * features/i386/amd64-mpx-linux.c: Regenerated.
17003 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17004 * features/i386/i386-avx-mpx.c: Regenerated.
17005 * features/i386/x32-avx-linux.c: Regenerated.
17006 * features/i386/x32-avx512-linux.c: Regenerated.
17007 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17008 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17009 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17010 * regformats/i386/amd64-linux.dat: Regenerated.
17011 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17012 * regformats/i386/x32-avx-linux.dat: Regenerated.
17013 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17014 * regformats/i386/x32-linux.dat: Regenerated.
17015
8884e97e
WT
170162017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17017
17018 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17019 Set to AMD64_NUM_REGS.
17020
7005d26a
WT
170212017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17022
17023 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17024 that checks validity of a register number.
17025
4bd2e1b2
KC
170262017-01-27 Kees Cook <keescook@google.com>
17027
17028 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17029 fetch_fpregs if target has fpa registers.
17030 (arm_linux_store_inferior_registers): Call store_fpregs if target
17031 has fpa registers.
17032
7cf1de6c
AA
170332017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17034
17035 * cris-tdep.c (cris_gdbarch_init): Remove check for
17036 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17037
874a1c8c
AT
170382017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17039
17040 * corelow.c (get_core_register_section): Check for regset
17041 existence before checking for REGSET_VARIABLE_SIZE.
17042
d8b49cf0
YQ
170432017-01-26 Yao Qi <yao.qi@linaro.org>
17044 Pedro Alves <palves@redhat.com>
17045
17046 PR gdb/20939
17047 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17048 call memory_error, save memaddr instead.
17049 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17050 negative, cal memory_error.
17051 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17052
658ca58c
YQ
170532017-01-26 Yao Qi <yao.qi@linaro.org>
17054
17055 * disasm-selftests.c (memory_error_test): New function.
17056 (_initialize_disasm_selftests): Register memory_error_test.
17057
79843d45
YQ
170582017-01-26 Yao Qi <yao.qi@linaro.org>
17059
17060 * Makefile.in (SFILES): Add disasm-selftests.c and
17061 selftest-arch.c.
17062 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17063 * disasm-selftests.c: New file.
17064 * selftest-arch.c: New file.
17065 * selftest-arch.h: New file.
17066
8cafda32
YQ
170672017-01-26 Yao Qi <yao.qi@linaro.org>
17068
17069 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17070 to bfd_arch_mep. Don't return 0 if section is not
17071 found. Call print_insn_mep.
17072
e47ad6c0
YQ
170732017-01-26 Pedro Alves <palves@redhat.com>
17074 Yao Qi <yao.qi@linaro.org>
17075
17076 * arm-tdep.c: Include "disasm.h".
17077 (gdb_print_insn_arm): Update code to get gdbarch.
17078 * disasm.c (dis_asm_read_memory): Change it to
17079 gdb_disassembler::dis_asm_read_memory.
17080 (dis_asm_memory_error): Likewise.
17081 (dis_asm_print_address): Likewise.
17082 (gdb_pretty_print_insn): Change it to
17083 gdb_disassembler::pretty_print_insn.
17084 (dump_insns): Add one argument gdb_disassemlber. All
17085 callers updated.
17086 (do_mixed_source_and_assembly_deprecated): Likewise.
17087 (do_mixed_source_and_assembly): Likewise.
17088 (do_assembly_only): Likewise.
17089 (gdb_disassembler::gdb_disassembler): New.
17090 (gdb_disassembler::print_insn): New.
17091 * disasm.h (class gdb_disassembler): New.
17092 (gdb_pretty_print_insn): Remove declaration.
17093 (gdb_disassemble_info): Likewise.
17094 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17095 (gdbscm_disasm_read_memory_worker): Update.
17096 (gdbscm_disasm_read_memory): Update.
17097 (gdbscm_disasm_memory_error): Remove.
17098 (gdbscm_disasm_print_address): Remove.
17099 (gdbscm_disassembler::gdbscm_disassembler): New.
17100 (gdbscm_print_insn_from_port): Update.
17101 * mips-tdep.c: Include disasm.h.
17102 (gdb_print_insn_mips): Update code to get gdbarch.
17103 * record-btrace.c (btrace_insn_history): Update.
17104 * spu-tdep.c: Include disasm.h.
17105 (struct spu_dis_asm_data): Remove.
17106 (struct spu_dis_asm_info): New.
17107 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17108 SPU id.
17109 (gdb_print_insn_spu): Cast disassemble_info to
17110 spu_dis_asm_info.
17111
80d75874
YQ
171122017-01-26 Yao Qi <yao.qi@linaro.org>
17113
17114 * disasm.c (do_ui_file_delete): Delete.
17115 (gdb_insn_length): Move code creating stream to ...
17116 * utils.c (null_stream): ... here. New function.
17117 * utils.h (null_stream): Declare.
17118
60685cd0
SM
171192017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17120
17121 * python/py-inferior.c (find_thread_object): Return directly
17122 from the loop. Remove "found" variable.
17123
eb1cdb62
JB
171242017-01-21 Joel Brobecker <brobecker@adacore.com>
17125
17126 GDB 7.12.1 released.
17127
b1ce6568
SM
171282017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17129
17130 * python/py-function.c (fnpy_call): Reorder declarations to have
17131 the gdbpy_enter object declared first.
17132 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17133
6f8b0407
SM
171342017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17135
fec93fb1 17136 PR python/21068
6f8b0407
SM
17137 * python/python-internal.h (PyMem_RawMalloc): Define for
17138 Python < 3.4.
17139 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17140 PyMem_RawMalloc instead of PyMem_Malloc.
17141
78cbbba8
LM
171422017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17143 Luis Machado <lgustavo@codesourcery.com>
17144
17145 * NEWS (New commands): Mention flash-erase.
17146 (New MI commands): Mention target-flash-erase.
17147 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17148 command.
17149 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17150 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17151 * target.c (flash_erase_command): New function.
17152 (initialize_targets): Add new flash-erase command.
17153 * target.h (flash_erase_command): New declaration.
17154
2132fe85
JB
171552017-01-20 Joel Brobecker <brobecker@adacore.com>
17156
17157 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17158 HAVE_SYS_PROCFS_H is defined.
17159
d1dff226
AH
171602017-01-18 Alan Hayward <alan.hayward@arm.com>
17161
17162 * remote.c (struct cached_reg): Change data into a pointer.
17163 * (stop_reply_dtr): Free data pointers before deleting vector.
17164 (process_stop_reply): Likewise.
17165 (remote_parse_stop_reply): Allocate space for data
17166
9890e433
AH
171672017-01-18 Alan Hayward <alan.hayward@arm.com>
17168
17169 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17170 MAX_REGISTER_SIZE.
17171 (amd64_pseudo_register_read_value): Likewise.
17172 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17173 (store_register_using_P): Likewise.
17174 * regcache.c (regcache_xfer_part): Likewise.
17175
7a36499a
IR
171762017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17177
17178 Split real and pseudo registers.
17179 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17180 (sparc32_pseudo_regnum): New enum.
17181 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17182 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17183 (SPARC32_CP0_REGISTERS): New macro.
17184 (sparc32_pseudo_register_name): New function.
17185 (sparc32_register_name): Use sparc32_pseudo_register_name.
17186 (sparc32_pseudo_register_type): New function.
17187 (sparc32_register_type): Use sparc32_pseudo_register_type.
17188 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17189 pseudo register numbers.
17190 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17191 (SPARC64_CP0_REGISTERS): New macro.
17192 (sparc64_pseudo_register_name): New function.
17193 (sparc64_register_name): Use sparc64_pseudo_register_name.
17194 (sparc64_pseudo_register_type): New function.
17195 (sparc64_register_type): Use sparc64_pseudo_register_type.
17196 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17197 pseudo register numbers.
17198 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17199 sparc64_store_arguments): Handle pseudo register numbers.
17200
6f8976bf
YQ
172012017-01-13 Yao Qi <yao.qi@linaro.org>
17202
17203 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17204 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17205 output.
17206 (getpkt_or_notif_sane_1): Likewise.
17207
e4241ace
YQ
172082017-01-13 Yao Qi <yao.qi@linaro.org>
17209
17210 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17211 of CC. Pass "-x c++-header" instead of "-x c".
17212
3015c064
SM
172132017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17214
17215 * remote.c (remote_can_async_p): Update comment.
17216
fde1b17d
SM
172172017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17218
17219 * linux-nat.c (linux_nat_can_async_p): Update comment.
17220
ca1ca08b
SM
172212017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17222
17223 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17224
4ad2da73
SM
172252017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17226
17227 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17228
c8b23b3f
TT
172292017-01-10 Tom Tromey <tom@tromey.com>
17230
17231 * python/py-type.c (typy_legacy_template_argument): Update.
17232 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17233 ~demangle_parse_info): Declare new members.
17234 (cp_demangled_name_to_comp): Return unique_ptr.
17235 (cp_demangled_name_parse_free)
17236 (make_cleanup_cp_demangled_name_parse_free)
17237 (cp_new_demangle_parse_info): Remove.
17238 * cp-support.c (do_demangled_name_parse_free_cleanup)
17239 (make_cleanup_cp_demangled_name_parse_free): Remove.
17240 (inspect_type, cp_canonicalize_string_full)
17241 (cp_canonicalize_string): Update.
17242 (mangled_name_to_comp): Change return type.
17243 (cp_class_name_from_physname, method_name_from_physname)
17244 (cp_func_name, cp_remove_params): Update.
17245 * cp-name-parser.y (demangle_parse_info): New constructor, from
17246 cp_new_demangle_parse_info.
17247 (~demangle_parse_info): New destructor, from
17248 cp_demangled_name_parse_free.
17249 (cp_merge_demangle_parse_infos): Update.
17250 (cp_demangled_name_to_comp): Change return type.
17251
1ac32117
TT
172522017-01-10 Tom Tromey <tom@tromey.com>
17253
17254 * top.c (prevent_dont_repeat): Change return type.
17255 * python/python.c (execute_gdb_command): Use std::string.
17256 Update.
17257 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17258 * command.h (prevent_dont_repeat): Change return type.
17259 * breakpoint.c (bpstat_do_actions_1): Update.
17260
0cf08227
TT
172612017-01-10 Tom Tromey <tom@tromey.com>
17262
17263 * value.h (scoped_value_mark::~scoped_value_mark): Call
17264 free_to_mark.
17265 (scoped_value_mark::free_to_mark): New method.
17266 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17267 scoped_value_mark.
17268
eb115069
TT
172692017-01-10 Tom Tromey <tom@tromey.com>
17270
17271 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17272 (valpy_reference_value, valpy_const_value, valpy_get_address)
17273 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17274 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17275 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17276 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17277 scoped_value_mark.
17278 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17279 * value.h (scoped_value_mark): New class.
17280
906768f9
TT
172812017-01-10 Tom Tromey <tom@tromey.com>
17282
17283 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17284 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17285 * psymtab.c (discard_psymtabs_upto): Remove.
17286 (make_cleanup_discard_psymtabs): Remove.
17287 (struct psymtab_state): Remove.
17288
bef155c3
TT
172892017-01-10 Tom Tromey <tom@tromey.com>
17290
17291 * record-full.c (record_full_save_cleanups): Remove.
17292 (record_full_save): Use gdb::unlinker.
17293 * gcore.c (do_bfd_delete_cleanup): Remove.
17294 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17295 cleanups.
17296 * dwarf2read.c (unlink_if_set): Remove.
17297 (write_psymtabs_to_index): Use gdb::unlinker.
17298 * common/gdb_unlinker.h: New file.
17299
192b62ce
TT
173002017-01-10 Tom Tromey <tom@tromey.com>
17301
17302 * windows-tdep.c (windows_xfer_shared_library): Update.
17303 * windows-nat.c (windows_make_so): Update.
17304 * utils.h (make_cleanup_bfd_unref): Remove.
17305 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17306 * symfile.h (symfile_bfd_open)
17307 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17308 * symfile.c (read_symbols, symbol_file_add)
17309 (separate_debug_file_exists): Update.
17310 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17311 (generic_load, reread_symbols): Update.
17312 * symfile-mem.c (symbol_file_add_from_memory): Update.
17313 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17314 (spu_symbol_file_add_from_memory): Update.
17315 * solist.h (struct target_so_ops) <bfd_open>: Return
17316 gdb_bfd_ref_ptr.
17317 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17318 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17319 gdb_bfd_ref_ptr.
17320 (solib_map_sections, reload_shared_libraries_1): Update.
17321 * solib-svr4.c (enable_break): Update.
17322 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17323 * solib-frv.c (enable_break2): Update.
17324 * solib-dsbt.c (enable_break): Update.
17325 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17326 gdb_bfd_ref_ptr.
17327 (darwin_solib_get_all_image_info_addr_at_init): Update.
17328 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17329 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17330 * record-full.c (record_full_save): Update.
17331 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17332 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17333 * minidebug.c (find_separate_debug_file_in_section): Return
17334 gdb_bfd_ref_ptr.
17335 * machoread.c (macho_add_oso_symfile): Change abfd to
17336 gdb_bfd_ref_ptr.
17337 (macho_symfile_read_all_oso): Update.
17338 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17339 (macho_symfile_read): Update.
17340 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17341 (jit_bfd_try_read_symtab): Update.
17342 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17343 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17344 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17345 gdb_bfd_ref_ptr.
17346 (gdb_bfd_ref_policy): New struct.
17347 (gdb_bfd_ref_ptr): New typedef.
17348 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17349 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17350 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17351 gdb_bfd_ref_ptr.
17352 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17353 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17354 (gcore_command): Update.
17355 * exec.c (exec_file_attach): Update.
17356 * elfread.c (elf_symfile_read): Update.
17357 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17358 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17359 (open_and_init_dwo_file): Update.
17360 (open_dwp_file): Return gdb_bfd_ref_ptr.
17361 (open_and_init_dwp_file): Update.
17362 * corelow.c (core_open): Update.
17363 * compile/compile-object-load.c (compile_object_load): Update.
17364 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17365 * coffread.c (coff_symfile_read): Update.
17366 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17367 gdb_bfd_ref_ptr. Rename.
17368 (dump_bfd_file, restore_command): Update.
17369 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17370 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17371 (find_separate_debug_file_by_buildid): Update.
17372
50315b21
TT
173732017-01-10 Tom Tromey <tom@tromey.com>
17374
17375 * common/gdb_ref_ptr.h: New file.
17376 * python/py-ref.h (struct gdbpy_ref_policy): New.
17377 (gdbpy_ref): Now a typedef.
17378
fc4007c9
TT
173792017-01-10 Tom Tromey <tom@tromey.com>
17380
17381 * utils.h (make_cleanup_htab_delete): Don't declare.
17382 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17383 Remove.
17384 * linespec.c (decode_compound_collector): Add constructor,
17385 destructor.
17386 (lookup_prefix_sym): Remove cleanup.
17387 (symtab_collector): Add constructor, destructor.
17388 (collect_symtabs_from_filename): Remove cleanup.
17389 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17390 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17391 Use htab_up.
17392 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17393 * dwarf2read.c (dw2_expand_symtabs_matching)
17394 (dw2_map_symbol_filenames, dwarf_decode_macros)
17395 (write_psymtabs_to_index): Use htab_up.
17396 * dwarf2loc.c (func_verify_no_selftailcall)
17397 (call_site_find_chain_1, func_verify_no_selftailcall)
17398 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17399 std::vector, gdb::unique_xmalloc_ptr.
17400 (call_sitep): Remove typedef.
17401 (dwarf2_locexpr_baton_eval): Remove unused variable.
17402
8dbcee67
TT
174032017-01-10 Tom Tromey <tom@tromey.com>
17404
17405 * python/python-internal.h (make_cleanup_py_decref)
17406 (make_cleanup_py_xdecref): Don't declare.
17407 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17408 (py_xdecref, make_cleanup_py_xdecref): Remove.
17409
13df46cc
TT
174102017-01-10 Tom Tromey <tom@tromey.com>
17411
17412 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17413 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17414
06fc9bf7
TT
174152017-01-10 Tom Tromey <tom@tromey.com>
17416
17417 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17418
830a4934
TT
174192017-01-10 Tom Tromey <tom@tromey.com>
17420
17421 * python/py-utils.c (unicode_to_encoded_string)
17422 (python_string_to_target_string)
17423 (python_string_to_target_python_string)
17424 (python_string_to_host_string, gdbpy_obj_to_string)
17425 (get_addr_from_python): Use gdbpy_ref.
17426
4586d543
TT
174272017-01-10 Tom Tromey <tom@tromey.com>
17428
17429 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17430 gdbpy_ref.
17431
59876f8f
TT
174322017-01-10 Tom Tromey <tom@tromey.com>
17433
17434 * python/python.c (eval_python_command, gdbpy_decode_line)
17435 (gdbpy_run_events, gdbpy_start_type_printers)
17436 (gdbpy_apply_type_printers): Use gdbpy_ref.
17437
97d83487
TT
174382017-01-10 Tom Tromey <tom@tromey.com>
17439
17440 * python/py-param.c (get_doc_string, compute_enum_values): Use
17441 gdbpy_ref.
17442
9205649a
TT
174432017-01-10 Tom Tromey <tom@tromey.com>
17444
17445 * python/py-inferior.c (find_thread_object, build_inferior_list):
17446 Use gdbpy_ref.
17447
74c49d45
TT
174482017-01-10 Tom Tromey <tom@tromey.com>
17449
17450 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17451
16361ffb
TT
174522017-01-10 Tom Tromey <tom@tromey.com>
17453
17454 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17455 gdbpy_ref.
17456
905f2cca
TT
174572017-01-10 Tom Tromey <tom@tromey.com>
17458
17459 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17460 extra incref.
17461 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17462 Use gdbpy_ref.
17463
64081434
TT
174642017-01-10 Tom Tromey <tom@tromey.com>
17465
17466 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17467 gdbpy_ref.
17468
59e9e831
TT
174692017-01-10 Tom Tromey <tom@tromey.com>
17470
17471 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17472 decref results of PyArg_ParseTupleAndKeywords.
17473
9de10f6d
TT
174742017-01-10 Tom Tromey <tom@tromey.com>
17475
17476 * python/python.c (python_run_simple_file): Use
17477 unique_xmalloc_ptr, gdbpy_ref.
17478
2bd5759d
TT
174792017-01-10 Tom Tromey <tom@tromey.com>
17480
17481 * python/py-prettyprint.c (print_stack_unless_memory_error)
17482 (print_string_repr, print_children): Use gdbpy_ref.
17483 (dummy_python_frame): New class.
17484 (dummy_python_frame::dummy_python_frame): Rename from
17485 push_dummy_python_frame.
17486 (py_restore_tstate): Remove.
17487
3b4e0e01
TT
174882017-01-10 Tom Tromey <tom@tromey.com>
17489
17490 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17491
17a22718
TT
174922017-01-10 Tom Tromey <tom@tromey.com>
17493
17494 * python/python.c (ensure_python_env, restore_python_env):
17495 Remove.
17496 * python/python-internal.h (ensure_python_env): Don't declare.
17497 * varobj.h (varobj_ensure_python_env): Don't declare.
17498 * varobj.c (varobj_ensure_python_env): Remove.
17499
68cdc557
TT
175002017-01-10 Tom Tromey <tom@tromey.com>
17501
17502 * varobj.c (varobj_value_get_print_value): Use
17503 gdbpy_enter_varobj.
17504
1eba6383
TT
175052017-01-10 Tom Tromey <tom@tromey.com>
17506
17507 * python/py-prettyprint.c (print_string_repr, print_children):
17508 Update.
17509 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17510 of "encoding".
17511 * varobj.c (varobj_value_get_print_value): Update.
17512 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17513
bde7b3e3
TT
175142017-01-10 Tom Tromey <tom@tromey.com>
17515
17516 * varobj.c (varobj_get_display_hint)
17517 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17518 (varobj_set_visualizer, free_variable): Use
17519 gdbpy_enter_varobj.
17520
a7785f8c
TT
175212017-01-10 Tom Tromey <tom@tromey.com>
17522
17523 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17524 (do_finish_initialization): New function. Use gdbpy_ref.
17525 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17526 do_finish_initialization.
17527
2865bfce
TT
175282017-01-10 Tom Tromey <tom@tromey.com>
17529
17530 * python/py-param.c (get_set_value, get_show_value): Use
17531 gdbpy_enter, gdbpy_ref.
17532
0e9dcc75
TT
175332017-01-10 Tom Tromey <tom@tromey.com>
17534
17535 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17536
12a5cedd
TT
175372017-01-10 Tom Tromey <tom@tromey.com>
17538
17539 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17540
788f2586
TT
175412017-01-10 Tom Tromey <tom@tromey.com>
17542
17543 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17544 Use gdbpy_enter_varobj.
17545
6cd67bea
TT
175462017-01-10 Tom Tromey <tom@tromey.com>
17547
17548 * varobj.c (gdbpy_enter_varobj): New constructor.
17549 * python/python-internal.h (gdbpy_enter_varobj): New class.
17550 * python/py-varobj.c (py_varobj_get_iterator): Use
17551 gdbpy_enter_varobj.
17552
14b122bf
TT
175532017-01-10 Tom Tromey <tom@tromey.com>
17554
17555 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17556 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17557 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17558 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17559 unique_xmalloc_ptr.
17560 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17561
bf1ca3b9
TT
175622017-01-10 Tom Tromey <tom@tromey.com>
17563
17564 * python/py-xmethods.c (invoke_match_method): Use
17565 gdbpy_ref.
17566
572a5524
TT
175672017-01-10 Tom Tromey <tom@tromey.com>
17568
17569 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17570 gdbpy_enter, gdbpy_ref.
17571
396a78b6
TT
175722017-01-10 Tom Tromey <tom@tromey.com>
17573
17574 * python/python.c (python_interactive_command): Use gdbpy_enter.
17575
a88b13c7
TT
175762017-01-10 Tom Tromey <tom@tromey.com>
17577
17578 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17579 gdbpy_ref.
17580
e9f0c363
TT
175812017-01-10 Tom Tromey <tom@tromey.com>
17582
17583 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17584 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17585
6349f452
TT
175862017-01-10 Tom Tromey <tom@tromey.com>
17587
17588 * utils.h (htab_deleter): New struct.
17589 (htab_up): New typedef.
17590 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17591 gdbpy_enter, gdbpy_ref, htab_up.
17592
c0171de6
TT
175932017-01-10 Tom Tromey <tom@tromey.com>
17594
17595 * python/py-unwind.c (pending_frame_invalidate): Remove.
17596 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17597
f18e226f
TT
175982017-01-10 Tom Tromey <tom@tromey.com>
17599
17600 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17601 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17602
c57af3f1
TT
176032017-01-10 Tom Tromey <tom@tromey.com>
17604
17605 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17606
60e600ec
TT
176072017-01-10 Tom Tromey <tom@tromey.com>
17608
17609 * python/python.c (gdbpy_eval_from_control_command)
17610 (gdbpy_source_script, gdbpy_run_events)
17611 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17612 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17613 gdbpy_enter.
17614
bf7da5b0
TT
176152017-01-10 Tom Tromey <tom@tromey.com>
17616
17617 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17618
2d38bced
TT
176192017-01-10 Tom Tromey <tom@tromey.com>
17620
17621 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17622
07bc7329
TT
176232017-01-10 Tom Tromey <tom@tromey.com>
17624
17625 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17626 (python_on_inferior_call_pre, python_on_inferior_call_post)
17627 (python_on_memory_change, python_on_register_change)
17628 (python_inferior_exit, python_new_objfile, add_thread_object)
17629 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17630
6e7c365e
TT
176312017-01-10 Tom Tromey <tom@tromey.com>
17632
17633 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17634 (bpfinishpy_handle_exit): Use gdbpy_enter.
17635
6ba0cd40
TT
176362017-01-10 Tom Tromey <tom@tromey.com>
17637
17638 * python/py-cmd.c (cmdpy_destroyer)
17639 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17640 gdbpy_enter.
17641
de2dc875
TT
176422017-01-10 Tom Tromey <tom@tromey.com>
17643
17644 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17645 gdbpy_enter.
17646 (gdbpy_breakpoint_has_cond): Likewise.
17647
4ecee2c4
TT
176482017-01-10 Tom Tromey <tom@tromey.com>
17649
17650 * python/python.c (gdbpy_enter): New constructor.
17651 (~gdbpy_enter): New destructor.
17652 (restore_python_env, ensure_python_env): Rewrite.
17653 * python/python-internal.h (gdbpy_enter): New class.
17654
37fce74f
TT
176552017-01-10 Tom Tromey <tom@tromey.com>
17656
17657 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17658
53a0cca3
TT
176592017-01-10 Tom Tromey <tom@tromey.com>
17660
17661 * python/py-value.c (value_has_field, get_field_flag)
17662 (get_field_type, valpy_getitem, convert_value_from_python): Use
17663 gdbpy_ref.
17664
ff3724f5
TT
176652017-01-10 Tom Tromey <tom@tromey.com>
17666
17667 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17668 gdbpy_ref.
17669
0700aea5
TT
176702017-01-10 Tom Tromey <tom@tromey.com>
17671
17672 * python/py-prettyprint.c (search_pp_list)
17673 (find_pretty_printer_from_objfiles)
17674 (find_pretty_printer_from_progspace)
17675 (find_pretty_printer_from_gdb, find_pretty_printer)
17676 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17677 gdbpy_ref.
17678
1bb44c9f
TT
176792017-01-10 Tom Tromey <tom@tromey.com>
17680
17681 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17682
87ce03fd
TT
176832017-01-10 Tom Tromey <tom@tromey.com>
17684
17685 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17686 (ltpy_get_all_source_lines): Use gdbpy_ref.
17687
ee0a3fb8
TT
176882017-01-10 Tom Tromey <tom@tromey.com>
17689
17690 * python/py-framefilter.c (extract_sym, extract_value)
17691 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17692 gdbpy_ref.
17693
bf2a52fa
TT
176942017-01-10 Tom Tromey <tom@tromey.com>
17695
17696 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17697
f59fe7f8
TT
176982017-01-10 Tom Tromey <tom@tromey.com>
17699
17700 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17701
80bd970a
TT
177022017-01-10 Tom Tromey <tom@tromey.com>
17703
17704 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17705 gdbpy_ref.
17706
d1b3de2e
TT
177072017-01-10 Tom Tromey <tom@tromey.com>
17708
17709 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17710
3bb43384
TT
177112017-01-10 Tom Tromey <tom@tromey.com>
17712
17713 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17714 (typy_range): Use gdbpy_ref.
17715
abf5651e
TT
177162017-01-10 Tom Tromey <tom@tromey.com>
17717
17718 * python/py-threadevent.c (create_thread_event_object): Use
17719 gdbpy_ref.
17720 * python/py-stopevent.c (create_stop_event_object): Simplify.
17721 (emit_stop_event): Use gdbpy_ref.
17722 * python/py-signalevent.c (create_signal_event_object): Use
17723 gdbpy_ref.
17724 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17725 (emit_new_objfile_event, create_clear_objfiles_event_object)
17726 (emit_clear_objfiles_event): Use gdbpy_ref.
17727 * python/py-infevents.c (create_inferior_call_event_object)
17728 (create_register_changed_event_object)
17729 (create_memory_changed_event_object, emit_inferior_call_event)
17730 (emit_memory_changed_event, emit_register_changed_event): Use
17731 gdbpy_ref.
17732 * python/py-exitedevent.c (create_exited_event_object)
17733 (emit_exited_event): Use gdbpy_ref.
17734 * python/py-event.h (evpy_emit_event): Remove
17735 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17736 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17737 * python/py-continueevent.c (emit_continue_event): Use
17738 gdbpy_ref.
17739 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17740 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17741 gdbpy_ref.
17742 * python/py-bpevent.c (create_breakpoint_event_object): Use
17743 gdbpy_ref.
17744
a68ff33e
TT
177452017-01-10 Tom Tromey <tom@tromey.com>
17746
17747 * python/py-ref.h: New file.
17748
7becfd03
SM
177492017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17750
17751 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17752 void.
17753 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17754 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17755 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17756 * ui-out.c (ui_out::redirect): Likewise.
17757 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17758 * cli/cli-logging.c (set_logging_redirect): Update call site of
17759 ui_out::redirect.
17760 (handle_redirections): Likewise.
17761 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17762 * top.c (execute_command_to_string): Likewise.
17763 * utils.c (do_ui_out_redirect_pop): Likewise.
17764
df294654
SM
177652017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17766
17767 * stack.c (_initialize_stack): Update "frame" command help message.
17768
f5e6296e
IB
177692017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17770
17771 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17772
0e2d6fa6
YQ
177732017-01-06 Yao Qi <yao.qi@linaro.org>
17774
17775 * x86-linux-nat.h: Include gdb_proc_service.h.
17776
44d6d3f9
YQ
177772017-01-06 Yao Qi <yao.qi@linaro.org>
17778
17779 * ser-base.h: Include serial.h.
17780
656731fe
YQ
177812017-01-06 Yao Qi <yao.qi@linaro.org>
17782
17783 * ppc-linux-tdep.h: Include ppc-tdep.h.
17784
1ca8f924
YQ
177852017-01-06 Yao Qi <yao.qi@linaro.org>
17786
17787 * nat/amd64-linux-siginfo.h: Include signal.h.
17788
bc3008c4
YQ
177892017-01-06 Yao Qi <yao.qi@linaro.org>
17790
17791 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17792
66c80d03
YQ
177932017-01-06 Yao Qi <yao.qi@linaro.org>
17794
17795 * mi/mi-parse.h: Include mi-cmds.h.
17796
051d2dda
YQ
177972017-01-06 Yao Qi <yao.qi@linaro.org>
17798
17799 * inf-loop.c: Don't include "target.h".
17800 * inf-loop.h: Include it here.
17801
8018d34f
YQ
178022017-01-06 Yao Qi <yao.qi@linaro.org>
17803
17804 * dfp.h: Include "dboulest.h" and "expression.h".
17805
c0b8369c
YQ
178062017-01-06 Yao Qi <yao.qi@linaro.org>
17807
17808 * ax-gdb.h: Include "ax.h".
17809
ad5cba2a
YQ
178102017-01-06 Yao Qi <yao.qi@linaro.org>
17811
17812 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17813 with nat/gdb_ptrace.h.
17814
1c33cd7f
YQ
178152017-01-05 Yao Qi <yao.qi@linaro.org>
17816
17817 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17818 new line.
17819 (mips64_fbsd_sigframe_init): Likewise.
17820
c988ac1d
JB
178212017-01-04 John Baldwin <jhb@FreeBSD.org>
17822
17823 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17824 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17825
b268007c
JB
178262017-01-04 John Baldwin <jhb@FreeBSD.org>
17827
17828 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17829 * NEWS: Mention new FreeBSD/mips native configuration.
17830 * config/mips/fbsd.mh: New file.
17831 * configure.host: Add mips*-*-freebsd*.
17832 * mips-fbsd-nat.c: New file.
17833
387360da
JB
178342017-01-04 John Baldwin <jhb@FreeBSD.org>
17835
17836 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17837 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17838 * NEWS: Mention new FreeBSD/mips target.
17839 * configure.tgt: Add mips*-*-freebsd*.
17840 * mips-fbsd-tdep.c: New file.
17841 * mips-fbsd-tdep.h: New file.
17842
2aaaf250
YQ
178432017-01-04 Yao Qi <yao.qi@linaro.org>
17844
17845 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17846 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17847
61baf725
JB
178482017-01-01 Joel Brobecker <brobecker@adacore.com>
17849
6dbb839a 17850 Update copyright year range in all GDB files.
61baf725 17851
c113e7ff 178522017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 17853
c113e7ff 17854 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 17855
c113e7ff 17856For older changes see ChangeLog-2016.
c906108c
SS
17857\f
17858Local Variables:
17859mode: change-log
17860left-margin: 8
17861fill-column: 74
17862version-control: never
57da7796 17863coding: utf-8
c906108c 17864End:
This page took 2.750041 seconds and 4 git commands to generate.